diff options
Diffstat (limited to 'hal/audio_extn/hfp.c')
-rw-r--r-- | hal/audio_extn/hfp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hal/audio_extn/hfp.c b/hal/audio_extn/hfp.c index 66d1f9b0..f3075cfa 100644 --- a/hal/audio_extn/hfp.c +++ b/hal/audio_extn/hfp.c @@ -120,6 +120,7 @@ static int32_t start_hfp(struct audio_device *adev, ALOGD("%s: enter", __func__); adev->enable_hfp = true; + platform_set_mic_mute(adev->platform, false); uc_info = (struct audio_usecase *)calloc(1, sizeof(struct audio_usecase)); uc_info->id = hfpmod.ucid; @@ -209,7 +210,6 @@ static int32_t stop_hfp(struct audio_device *adev) struct audio_usecase *uc_info; ALOGD("%s: enter", __func__); - adev->enable_hfp = false; hfpmod.is_hfp_running = false; /* 1. Close the PCM devices */ @@ -244,6 +244,16 @@ static int32_t stop_hfp(struct audio_device *adev) disable_snd_device(adev, uc_info->out_snd_device); disable_snd_device(adev, uc_info->in_snd_device); + /* Disable the echo reference for HFP Tx */ + platform_set_echo_reference(adev, false, AUDIO_DEVICE_NONE); + + /* Set the unmute Tx mixer control */ + if (voice_get_mic_mute(adev)) { + platform_set_mic_mute(adev->platform, false); + ALOGD("%s: unMute HFP Tx", __func__); + } + adev->enable_hfp = false; + list_remove(&uc_info->list); free(uc_info); |