hal: reset echo reference at the end of recording/VoIP sessions
Echo reference is not being reset currently at the end of
recording/VoIP session causing the echo reference not to
work in the further instances of recording/VoIP sessions.
Fix this by resetting echo reference while closing the input
stream used for recording/VoIP usecases.
CRs-Fixed: 717973
Change-Id: I761ba112952951777525b1bf102c9d6ccaad3269
diff --git a/hal/audio_extn/hfp.c b/hal/audio_extn/hfp.c
index 5a68016..a0588a3 100644
--- a/hal/audio_extn/hfp.c
+++ b/hal/audio_extn/hfp.c
@@ -270,10 +270,13 @@
return -EINVAL;
}
- /* 2. Get and set stream specific mixer controls */
+ /* 2. Disable echo reference while stopping hfp */
+ platform_set_echo_reference(adev->platform, false);
+
+ /* 3. Get and set stream specific mixer controls */
disable_audio_route(adev, uc_info);
- /* 3. Disable the rx and tx devices */
+ /* 4. Disable the rx and tx devices */
disable_snd_device(adev, uc_info->out_snd_device);
disable_snd_device(adev, uc_info->in_snd_device);