From 7a0078fc05c2c7c0b20f3f67372769aae63d31d4 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 24 May 2013 21:28:02 +1000 Subject: i9305: Force the use of both microphones to allow stereo recording Force the use of both AUDIO_DEVICE_IN_BACK_MIC and AUDIO_DEVICE_IN_BUILTIN_MIC if the device AUDIO_DEVICE_IN_BACK_MIC is selected to allow stereo recording Change-Id: I0ad230f2c63ba96a87a642dc92ad33f4eb807367 --- audio/audio_hw.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/audio/audio_hw.c b/audio/audio_hw.c index f05df17..eb5af69 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -814,12 +814,16 @@ static void select_output_device(struct m0_audio_device *adev, int force) static void select_input_device(struct m0_audio_device *adev, int force) { - switch(adev->in_device) { + int input_device = AUDIO_DEVICE_BIT_IN | adev->in_device; + + switch(input_device) { case AUDIO_DEVICE_IN_BUILTIN_MIC: ALOGD("%s: AUDIO_DEVICE_IN_BUILTIN_MIC", __func__); break; case AUDIO_DEVICE_IN_BACK_MIC: - ALOGD("%s: AUDIO_DEVICE_IN_BACK_MIC", __func__); + // Force use both mics for video recording + adev->in_device = (AUDIO_DEVICE_IN_BACK_MIC | AUDIO_DEVICE_IN_BUILTIN_MIC) & ~AUDIO_DEVICE_BIT_IN; + ALOGD("%s: AUDIO_DEVICE_IN_BACK_MIC and AUDIO_DEVICE_IN_BUILTIN_MIC", __func__); break; case AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET: ALOGD("%s: AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET", __func__); -- cgit v1.1