hal: Use AUDIO_TX_MONO_COPP topology for incall record usecases
-Issue: Two sessions with fluence topology are created
in case of voice call + incall voice recording.
-Rootcause: To avoid fluence topology for incall
recording usecase when voice call is active, default
input device's audio calibration was used earlier.
But while re-organizing audio_extn_utils_send_audio_calibration()
incall recording usecase is not considered.
-Fix: Send default input device's audio calibration
for incall recording usecases
Change-Id: I0d3734be3c793d350b1c73d8f8fc4380bf06fe30
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 90dc0ef..2e48a71 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -2186,6 +2186,9 @@
if (usecase->type == PCM_PLAYBACK)
snd_device = usecase->out_snd_device;
+ else if ((usecase->type == PCM_CAPTURE) &&
+ voice_is_in_call_rec_stream(usecase->stream.in))
+ snd_device = voice_get_incall_rec_snd_device(usecase->in_snd_device);
else if ((usecase->type == PCM_HFP_CALL) || (usecase->type == PCM_CAPTURE))
snd_device = usecase->in_snd_device;
acdb_dev_id = acdb_device_table[audio_extn_get_spkr_prot_snd_device(snd_device)];
diff --git a/hal/msm8960/platform.c b/hal/msm8960/platform.c
index 8d5004d..5b4ebeb 100644
--- a/hal/msm8960/platform.c
+++ b/hal/msm8960/platform.c
@@ -489,6 +489,9 @@
if (usecase->type == PCM_PLAYBACK)
snd_device = platform_get_output_snd_device(adev->platform,
usecase->stream.out->devices);
+ else if ((usecase->type == PCM_CAPTURE) &&
+ voice_is_in_call_rec_stream(usecase->stream.in))
+ snd_device = voice_get_incall_rec_snd_device(usecase->in_snd_device);
else if ((usecase->type == PCM_HFP_CALL) || (usecase->type == PCM_CAPTURE))
snd_device = platform_get_input_snd_device(adev->platform,
adev->primary_output->devices);
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 59aae10..2caefe0 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1990,6 +1990,9 @@
if (usecase->type == PCM_PLAYBACK)
snd_device = usecase->out_snd_device;
+ else if ((usecase->type == PCM_CAPTURE) &&
+ voice_is_in_call_rec_stream(usecase->stream.in))
+ snd_device = voice_get_incall_rec_snd_device(usecase->in_snd_device);
else if ((usecase->type == PCM_HFP_CALL) || (usecase->type == PCM_CAPTURE))
snd_device = usecase->in_snd_device;