summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergii Iegorov2013-04-11 12:07:38 -0500
committerSergii Iegorov2013-04-11 12:20:19 -0500
commite7dcaf0d0b9f3c41521adec5fb37b01524fe5419 (patch)
tree1fa7fb3269b94123107b3ebc05d187276ba58f2f
parent2749124f4584fd4341d8c3302bccbdadb5679354 (diff)
downloaddevice-ti-common-open-e7dcaf0d0b9f3c41521adec5fb37b01524fe5419.tar.gz
device-ti-common-open-e7dcaf0d0b9f3c41521adec5fb37b01524fe5419.tar.xz
device-ti-common-open-e7dcaf0d0b9f3c41521adec5fb37b01524fe5419.zip
AudioHAL: Use proper audio input source for camcoder use case.
Use wired headset for camcoder recording use case if switched and sub mic in other case. Change-Id: I300922dae8f06f6b33be28cdbcb2ee57398a1fb3 Signed-off-by: Sergii Iegorov <x0155539@ti.com>
-rw-r--r--audio/audio_hw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 56c07e4..774aecd 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -1752,9 +1752,10 @@ static void select_input_device(struct omap_audio_device *adev)
1752 if (!bt_on) { 1752 if (!bt_on) {
1753 if ((adev->mode != AUDIO_MODE_IN_CALL) && (adev->active_input != 0)) { 1753 if ((adev->mode != AUDIO_MODE_IN_CALL) && (adev->active_input != 0)) {
1754 /* sub mic is used for camcorder or VoIP on speaker phone */ 1754 /* sub mic is used for camcorder or VoIP on speaker phone */
1755 sub_mic_on = (adev->active_input->source == AUDIO_SOURCE_CAMCORDER) || 1755 sub_mic_on = ((adev->active_input->source == AUDIO_SOURCE_CAMCORDER) &&
1756 ((adev->devices.out_devices & AUDIO_DEVICE_OUT_SPEAKER) && 1756 !(adev->devices.in_devices & AUDIO_DEVICE_IN_WIRED_HEADSET)) ||
1757 (adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION)); 1757 ((adev->devices.out_devices & AUDIO_DEVICE_OUT_SPEAKER) &&
1758 (adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION));
1758 } 1759 }
1759 if (!sub_mic_on) { 1760 if (!sub_mic_on) {
1760 headset_on = adev->devices.in_devices & AUDIO_DEVICE_IN_WIRED_HEADSET; 1761 headset_on = adev->devices.in_devices & AUDIO_DEVICE_IN_WIRED_HEADSET;