hal: Fix input device selection for camcorder stereo recording

- Single mic device would be seleted in camcorder, even if
  the dual mic enabled.
- In camcorder, the input device was force to select
  SND_DEVICE_IN_CAMCORDER_MIC, which is a singal mic.
- Fix by selecting dmic device as input devices in camcorder,
  Only when the fluence type is dual mic and the channel
  count is 2.

Change-Id: I4f6b7d54a3e7e6ddb98355d20c4bc28466905550
CRs-Fixed: 669982
This commit is contained in:
kunleiz 2014-05-30 09:52:25 +08:00 committed by Gerrit - the friendly Code Review server
parent 2ee2f60d7b
commit 18a3330f91
1 changed files with 5 additions and 1 deletions

View File

@ -1408,7 +1408,11 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
} else if (source == AUDIO_SOURCE_CAMCORDER) {
if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC ||
in_device & AUDIO_DEVICE_IN_BACK_MIC) {
snd_device = SND_DEVICE_IN_CAMCORDER_MIC;
if (my_data->fluence_type & FLUENCE_DUAL_MIC &&
channel_count == 2)
snd_device = SND_DEVICE_IN_SPEAKER_DMIC;
else
snd_device = SND_DEVICE_IN_CAMCORDER_MIC;
}
} else if (source == AUDIO_SOURCE_VOICE_RECOGNITION) {
if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) {