audio: hal: Fix handset mic selection for voice call
A bug was introduced when HFP call support was added previously.
Due to this handset call would always pick single mic even when
Fluence property was enabled. This fix addresses the issue.
Change-Id: I577d64b28bedde925b90417930533ba6dea60793
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index eba8e97..b3f95bf 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -3948,8 +3948,8 @@
snd_device = SND_DEVICE_IN_AANC_HANDSET_MIC;
adev->acdb_settings |= ANC_FLAG;
} else if (my_data->fluence_type == FLUENCE_NONE ||
- my_data->fluence_in_voice_call == false ||
- my_data->fluence_in_hfp_call == false) {
+ (my_data->fluence_in_voice_call == false &&
+ my_data->fluence_in_hfp_call == false)) {
snd_device = SND_DEVICE_IN_HANDSET_MIC;
if (audio_extn_hfp_is_active(adev))
platform_set_echo_reference(adev, true, out_device);
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index cb70875..9073e70 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -3712,8 +3712,8 @@
}
adev->acdb_settings |= ANC_FLAG;
} else if (my_data->fluence_type == FLUENCE_NONE ||
- my_data->fluence_in_voice_call == false ||
- my_data->fluence_in_hfp_call == false) {
+ (my_data->fluence_in_voice_call == false &&
+ my_data->fluence_in_hfp_call == false)) {
snd_device = SND_DEVICE_IN_HANDSET_MIC;
if (audio_extn_hfp_is_active(adev))
platform_set_echo_reference(adev, true, out_device);