diff options
author | juyuchen <juyuchen@google.com> | 2019-04-29 16:38:20 +0800 |
---|---|---|
committer | juyuchen <juyuchen@google.com> | 2019-04-29 16:38:20 +0800 |
commit | 12c4c36b7976cfbb1b26d2b940980c473dda1fce (patch) | |
tree | 83821a06d881fa1e0968595bec37e65699061b81 /hal | |
parent | 8c373e4c415df9698377de20b5202243a5c9c377 (diff) | |
download | audio-12c4c36b7976cfbb1b26d2b940980c473dda1fce.tar.gz |
audio: don't start voice call when voice path is not ready.
Bug: 130443032
Test: voice call test.
Change-Id: Icb9b92a1f6be23cbf93970d6b10777856127dcc5
Diffstat (limited to 'hal')
-rw-r--r-- | hal/voice.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hal/voice.c b/hal/voice.c index 708ce6c..6345a38 100644 --- a/hal/voice.c +++ b/hal/voice.c @@ -212,8 +212,13 @@ int voice_start_usecase(struct audio_device *adev, audio_usecase_t usecase_id) if (adev->mic_break_enabled) platform_set_mic_break_det(adev->platform, true); - pcm_start(session->pcm_tx); - pcm_start(session->pcm_rx); + ret = pcm_start(session->pcm_tx); + if (ret != 0) + goto error_start_voice; + + ret = pcm_start(session->pcm_rx); + if (ret != 0) + goto error_start_voice; audio_extn_tfa_98xx_enable_speaker(); |