diff options
author | mark <mcampbellsmith@gmail.com> | 2013-05-24 21:28:02 +1000 |
---|---|---|
committer | mark <mcampbellsmith@gmail.com> | 2013-05-26 20:35:04 +1000 |
commit | 7a0078fc05c2c7c0b20f3f67372769aae63d31d4 (patch) | |
tree | 2e6df68899b2de619b51b970ca63e79a9ef33a9d /audio | |
parent | d515019ce6bd331a037f076dfd45baf807e7d6a6 (diff) | |
download | device_samsung_i9305-7a0078fc05c2c7c0b20f3f67372769aae63d31d4.zip device_samsung_i9305-7a0078fc05c2c7c0b20f3f67372769aae63d31d4.tar.gz device_samsung_i9305-7a0078fc05c2c7c0b20f3f67372769aae63d31d4.tar.bz2 |
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
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio_hw.c | 8 |
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__); |