diff options
author | kunleiz <kunleiz@codeaurora.org> | 2016-04-19 10:28:42 +0800 |
---|---|---|
committer | Arne Coucheron <arco68@gmail.com> | 2019-09-28 00:23:56 +0200 |
commit | 2a7ce7570baea6621377b7d501cdd23b74cbdeb9 (patch) | |
tree | 1da249415847f963ac19f6ca3e24bace7c0d124d | |
parent | 9dd8d5268095bf6a29344f678c74a5e10513d61b (diff) | |
download | hardware_qcom_audio-2a7ce7570baea6621377b7d501cdd23b74cbdeb9.tar.gz hardware_qcom_audio-2a7ce7570baea6621377b7d501cdd23b74cbdeb9.tar.bz2 hardware_qcom_audio-2a7ce7570baea6621377b7d501cdd23b74cbdeb9.zip |
hal: fix no sound issue in voice call
No audio is observed in voice call scenario since in_call state
is not update when voice usecase is stopped. This results in not
starting voice call usecase when setting up next call.
Fix by setting in_call state as false in voice_stop_usecase(). This
is to ensure that voice usecase is stopped and in_call state is update
properly.
CRs-Fixed: 996510
Change-Id: I480bb14899d678a47df8a61fbdd208b75ef7b395
-rw-r--r-- | hal/voice.c | 3 | ||||
-rw-r--r-- | hal/voice.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/hal/voice.c b/hal/voice.c index 249a9c49..b8a4609f 100644 --- a/hal/voice.c +++ b/hal/voice.c @@ -72,6 +72,9 @@ int voice_stop_usecase(struct audio_device *adev, audio_usecase_t usecase_id) session->state.current = CALL_INACTIVE; + if (!voice_is_call_state_active(adev)) + adev->voice.in_call = false; + ret = platform_stop_voice_call(adev->platform, session->vsid); /* 1. Close the PCM devices */ diff --git a/hal/voice.h b/hal/voice.h index 9be8443f..95609b33 100644 --- a/hal/voice.h +++ b/hal/voice.h @@ -81,8 +81,8 @@ int voice_set_parameters(struct audio_device *adev, struct str_parms *parms); void voice_get_parameters(struct audio_device *adev, struct str_parms *query, struct str_parms *reply); void voice_init(struct audio_device *adev); -bool voice_is_in_call(struct audio_device *adev); bool voice_is_in_call_rec_stream(struct stream_in *in); +bool voice_is_call_state_active(struct audio_device *adev); int voice_set_mic_mute(struct audio_device *dev, bool state); bool voice_get_mic_mute(struct audio_device *dev); int voice_set_volume(struct audio_device *adev, float volume); |