Merge "hal: Fix voice session setup failure"
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index bb229b8..9f64969 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -2009,7 +2009,7 @@
goto exit;
}
- if (popcount(devices) == 2) {
+ if (popcount(devices) == 2 && !voice_is_in_call(adev)) {
if (devices == (AUDIO_DEVICE_OUT_WIRED_HEADPHONE |
AUDIO_DEVICE_OUT_SPEAKER)) {
if (my_data->external_spk_1)
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index b30eb97..fb39d94 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -2019,7 +2019,7 @@
goto exit;
}
- if (popcount(devices) == 2) {
+ if (popcount(devices) == 2 && !voice_is_in_call(adev)) {
if (devices == (AUDIO_DEVICE_OUT_WIRED_HEADPHONE |
AUDIO_DEVICE_OUT_SPEAKER)) {
if (my_data->external_spk_1)