summaryrefslogtreecommitdiff
path: root/hal
diff options
context:
space:
mode:
authorJuyu Chen <juyuchen@google.com>2019-05-08 03:33:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-05-08 03:33:28 +0000
commitbac127b2972fc9425e09e948f7f2eccc649c4e78 (patch)
treec239b6dbd5498507cf2fc571140c61ab934581ad /hal
parent154055d2bce6311f03e5ac06e8ba417375b24817 (diff)
parent12c4c36b7976cfbb1b26d2b940980c473dda1fce (diff)
downloadaudio-bac127b2972fc9425e09e948f7f2eccc649c4e78.tar.gz
Merge "audio: don't start voice call when voice path is not ready." into qt-dev
Diffstat (limited to 'hal')
-rw-r--r--hal/voice.c9
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();