hal: fix BT device switch issue for audio playback during VoIP call
- When VoIP call is active on non-BT device and if the music playback
tries to switch to BT device, it will continue to route to non-BT
device on which the VoIP call is active already.
- Fix the issue by not selecting VoIP devices for audio playback when
they are on different back ends.
Change-Id: Iff9251fcf02f897d9b1cdc17fcf27c262518ada8
CRs-fixed: 652129
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 9f76d31..edf941a 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -637,7 +637,8 @@
}
} else if (voice_extn_compress_voip_is_active(adev)) {
voip_usecase = get_usecase_from_list(adev, USECASE_COMPRESS_VOIP_CALL);
- if (voip_usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) {
+ if ((voip_usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
+ (usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND)) {
in_snd_device = voip_usecase->in_snd_device;
out_snd_device = voip_usecase->out_snd_device;
}