summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/audio_hw.c8
1 files 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__);