diff options
author | kunleiz <kunleiz@codeaurora.org> | 2018-08-07 17:09:11 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-08-29 23:08:44 -0700 |
commit | dcf967a3ec01f7e2669c1e510ec391d61ca87dff (patch) | |
tree | 5a2b62c5a044195f313a2b9fbe7703d7b251f6a0 /hal/msm8974 | |
parent | 24d1f3b065167ac9ca6d04e43f84af0ba925dcf2 (diff) | |
download | hardware_qcom_audio-dcf967a3ec01f7e2669c1e510ec391d61ca87dff.tar.gz hardware_qcom_audio-dcf967a3ec01f7e2669c1e510ec391d61ca87dff.tar.bz2 hardware_qcom_audio-dcf967a3ec01f7e2669c1e510ec391d61ca87dff.zip |
hal: ensure voip tx update base on the rx path
Voip does not use primary output in rx path. When voip
rx device change, voip tx path is not updated accordingly.
Fix it by selecting voip tx device base on the rx path,
otherwise base on primary output device.
CRs-Fixed: 2289517
Change-Id: Ic078eb057be40dd4338ade70f541bb056c19dfca
Diffstat (limited to 'hal/msm8974')
-rwxr-xr-x | hal/msm8974/platform.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 92831159..2753ff80 100755 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -4490,6 +4490,16 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d (mode == AUDIO_MODE_IN_COMMUNICATION)) { if (out_device & AUDIO_DEVICE_OUT_SPEAKER) in_device = AUDIO_DEVICE_IN_BACK_MIC; + else if (out_device & AUDIO_DEVICE_OUT_EARPIECE) + in_device = AUDIO_DEVICE_IN_BUILTIN_MIC; + else if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET) + in_device = AUDIO_DEVICE_IN_WIRED_HEADSET; + else if (out_device & AUDIO_DEVICE_OUT_USB_DEVICE) + in_device = AUDIO_DEVICE_IN_USB_DEVICE; + + in_device = ((out_device == AUDIO_DEVICE_NONE) ? + AUDIO_DEVICE_IN_BUILTIN_MIC : in_device) & ~AUDIO_DEVICE_BIT_IN; + if (adev->active_input) { snd_device = get_snd_device_for_voice_comm(my_data, out_device, in_device); } |