summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-05-24 19:22:53 +0200
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-05-24 19:25:41 +0200
commit35886fb084589f4245cc30a3ba83dcdc29dd3b32 (patch)
tree8c8e30486025ae9fadac33fee1c5a3256e5a9ff9
parent126c6c70ff0b9930a3114890de520c792e304667 (diff)
downloaddevice_samsung_i9300-35886fb084589f4245cc30a3ba83dcdc29dd3b32.zip
device_samsung_i9300-35886fb084589f4245cc30a3ba83dcdc29dd3b32.tar.gz
device_samsung_i9300-35886fb084589f4245cc30a3ba83dcdc29dd3b32.tar.bz2
i9300: audio: force use both mics when back mic is selected
for video recording Change-Id: Iaf8b878f7dc0a545ada41eab50962a945254c5f1
-rwxr-xr-xaudio/audio_hw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index e6dd08e..e2ff4eb 100755
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -661,12 +661,16 @@ static void select_output_device(struct m0_audio_device *adev)
static void select_input_device(struct m0_audio_device *adev)
{
- 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;
break;
case AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET:
ALOGD("%s: AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET", __func__);