msm8974: Honor input_mic_max_count property when set to 1.
The default value of max_mic_count is 2. max_mic_count is set to
the value specified by the input_mic_max_count property in
audio_platform_info.xml.
Honor the input_mic_max_count property when set to 1. Prior to
this change when max_mic_count this value is 1, the
'source_mic_type' includes SOURCE_DUAL_MIC. For the single mic
case, we don't want that.
Bug: 71773847
Test: Recording on a device with a single microphone uses
single-mic paths instead of dual mic paths when recording
flucence/voice or when specifying two mics.
Change-Id: I2b3be6333d4c58a611026ad63bc4178dca0a13ca
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 4addc80..3698a85 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1369,7 +1369,7 @@
dual_mic_config = true;
}
- my_data->source_mic_type = SOURCE_DUAL_MIC;
+ my_data->source_mic_type = 0;
my_data->fluence_in_spkr_mode = false;
my_data->fluence_in_voice_call = false;