hal: Added support for HFP
- Added setparameter to be set from hfp app to enable
and disable hfp session.
- Implemeted start and stop hfp session which takes
care of switching device and setting the session
Change-Id: Ie8697328ccbfee09d0d162f6fad01ddb552e4f83
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index a207c2f..da67145 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -109,6 +109,7 @@
[USECASE_AUDIO_RECORD_FM_VIRTUAL] = {MULTIMEDIA2_PCM_DEVICE,
MULTIMEDIA2_PCM_DEVICE},
[USECASE_AUDIO_PLAYBACK_FM] = {FM_PLAYBACK_PCM_DEVICE, FM_CAPTURE_PCM_DEVICE},
+ [USECASE_AUDIO_HFP_SCO] = {HFP_PCM_RX, HFP_SCO_RX},
[USECASE_VOICE_CALL] = {VOICE_CALL_PCM_DEVICE, VOICE_CALL_PCM_DEVICE},
[USECASE_VOICE2_CALL] = {VOICE2_CALL_PCM_DEVICE, VOICE2_CALL_PCM_DEVICE},
[USECASE_VOLTE_CALL] = {VOLTE_CALL_PCM_DEVICE, VOLTE_CALL_PCM_DEVICE},
@@ -989,6 +990,7 @@
} else if (my_data->fluence_type == FLUENCE_NONE ||
my_data->fluence_in_voice_call == false) {
snd_device = SND_DEVICE_IN_HANDSET_MIC;
+ set_echo_reference(adev->mixer, "SLIM_RX");
} else {
snd_device = SND_DEVICE_IN_VOICE_DMIC;
adev->acdb_settings |= DMIC_FLAG;