Revert "hal: Fix voice session setup failure"
Camera click tones are not playing while in voice calls and headset
is connected since get_output_devices doesnt return a valid device.
Fix by returning combo device speaker-and-headset when in voice call.
The original issue reported in CR859796, seem to customer specific,
as on internal platforms, there are no usecases such as
"volte-call speaker-and-headset".
This reverts commit 62d96d50dafae78818994425275a743b68d70881.
Change-Id: Ic8146d8ed5ab7312fa40242c5fda00996a27c083
diff --git a/msm8909/hal/msm8916/platform.c b/msm8909/hal/msm8916/platform.c
index eb05a27..218d67d 100644
--- a/msm8909/hal/msm8916/platform.c
+++ b/msm8909/hal/msm8916/platform.c
@@ -1861,7 +1861,7 @@
goto exit;
}
- if (popcount(devices) == 2 && !voice_is_in_call(adev)) {
+ if (popcount(devices) == 2) {
if (devices == (AUDIO_DEVICE_OUT_WIRED_HEADPHONE |
AUDIO_DEVICE_OUT_SPEAKER)) {
snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
diff --git a/msm8909/hal/msm8974/platform.c b/msm8909/hal/msm8974/platform.c
index ed57cd9..5f69b18 100644
--- a/msm8909/hal/msm8974/platform.c
+++ b/msm8909/hal/msm8974/platform.c
@@ -1737,7 +1737,7 @@
goto exit;
}
- if (popcount(devices) == 2 && !voice_is_in_call(adev)) {
+ if (popcount(devices) == 2) {
if (devices == (AUDIO_DEVICE_OUT_WIRED_HEADPHONE |
AUDIO_DEVICE_OUT_SPEAKER)) {
if (my_data->external_spk_1)