hal: Fix input device selection for stereo recording
Only if the fluence type is dual mic or quad mic and the channel
count is 2, the dmic device is selected as input device.
Change-Id: I22f9d2f154e9b6348ef547ff68014b5e68ae7e5f
CRs-fixed: 599947
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index c7896ae..312c327 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1175,7 +1175,8 @@
if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) {
if (audio_extn_ssr_get_enabled() && channel_count == 6)
snd_device = SND_DEVICE_IN_QUAD_MIC;
- else if (channel_count == 2)
+ else if (my_data->fluence_type & (FLUENCE_DUAL_MIC | FLUENCE_QUAD_MIC) &&
+ channel_count == 2)
snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
else
snd_device = SND_DEVICE_IN_HANDSET_MIC;