hal: fix voice call mute with concurrent hifi playback
Enhance the AFE param config overide condition during voice
call, by checking for all codec back end devices instead of
limiting it to only one AFE(SLIM_0_RX) port.
Change-Id: Ieac10cba4ae187b44357573115f984cdfa1b745d
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index bf5b62b..e0400c6 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -4323,7 +4323,7 @@
// default backend
// force routing is not required here, caller will do it anyway
if ((voice_is_in_call(adev) || adev->mode == AUDIO_MODE_IN_COMMUNICATION) &&
- backend_idx == DEFAULT_CODEC_BACKEND) {
+ usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) {
ALOGW("%s:becf: afe:Use default bw and sr for voice/voip calls ",
__func__);
bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH;
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index f0f507d..8daa715 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -4290,7 +4290,7 @@
// default backend
// force routing is not required here, caller will do it anyway
if ((voice_is_in_call(adev) || adev->mode == AUDIO_MODE_IN_COMMUNICATION) &&
- backend_idx == DEFAULT_CODEC_BACKEND) {
+ usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) {
ALOGW("%s:becf: afe:Use default bw and sr for voice/voip calls ",
__func__);
bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH;