diff options
author | madmack <alali48@gmail.com> | 2013-09-11 14:53:02 -0400 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-09-11 23:24:22 +0100 |
commit | 3ca121d25000734f9d8b041a43b75832f5cab22e (patch) | |
tree | c87643ee58784e1dafc58077a8b41514969766cf | |
parent | 85263f82487a4c00c4a2cb66a533d8caedbb90e6 (diff) | |
download | hardware_qcom_audio-stable/cm-10.2.tar.gz hardware_qcom_audio-stable/cm-10.2.tar.bz2 hardware_qcom_audio-stable/cm-10.2.zip |
Use HEADSET Tx if mic_type isn't analog and Rx device is HEADPHONEScm-10.2.1cm-10.2.0cm-10.2-M1stable/cm-10.2cm-10.2
Some devices require a different tx device when in_call and
headphones are inserted. While DMIC Endfire is the correct Tx
device for Earpiece Rx, choosing DMIC Endfire when Rx is
HEADPHONES will kill CSD. This patch will affect devices
without analog microphones, as set by the 'persist.audio.handset.mic'
property.
Change-Id: I109ddfd029bb0696db7dd1cb95eb14b253e04d61
-rw-r--r-- | hal/audio_hw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 275272ab..969474cc 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -697,7 +697,10 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, } if (out_device & AUDIO_DEVICE_OUT_EARPIECE || out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE) { - if (adev->mic_type_analog || adev->fluence_in_voice_call == false) { + if (!adev->mic_type_analog && + (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE)) { + snd_device = SND_DEVICE_IN_HANDSET_MIC; + } else if (adev->mic_type_analog || adev->fluence_in_voice_call == false) { snd_device = SND_DEVICE_IN_HANDSET_MIC; } else { if (adev->dualmic_config == DUALMIC_CONFIG_ENDFIRE) { |