Merge "hal: Handle pcm_start failures for hfp"

This commit is contained in:
Linux Build Service Account 2014-08-05 19:34:08 -07:00 committed by Gerrit - the friendly Code Review server
commit 34affc6697
1 changed files with 20 additions and 4 deletions

View File

@ -204,10 +204,26 @@ static int32_t start_hfp(struct audio_device *adev,
ret = -EIO;
goto exit;
}
pcm_start(hfpmod.hfp_sco_rx);
pcm_start(hfpmod.hfp_sco_tx);
pcm_start(hfpmod.hfp_pcm_rx);
pcm_start(hfpmod.hfp_pcm_tx);
if (pcm_start(hfpmod.hfp_sco_rx) < 0) {
ALOGE("%s: pcm start for hfp sco rx failed", __func__);
ret = -EINVAL;
goto exit;
}
if (pcm_start(hfpmod.hfp_sco_tx) < 0) {
ALOGE("%s: pcm start for hfp sco tx failed", __func__);
ret = -EINVAL;
goto exit;
}
if (pcm_start(hfpmod.hfp_pcm_rx) < 0) {
ALOGE("%s: pcm start for hfp pcm rx failed", __func__);
ret = -EINVAL;
goto exit;
}
if (pcm_start(hfpmod.hfp_pcm_tx) < 0) {
ALOGE("%s: pcm start for hfp pcm tx failed", __func__);
ret = -EINVAL;
goto exit;
}
hfpmod.is_hfp_running = true;
hfp_set_volume(adev, hfpmod.hfp_volume);