ASoC: codecs: Add teardown() call in shutdown

Display driver has a timeout to avoid prematurely turning
off audio engine. Add teardown function call to ensure
that display driver can turn off audio engine once audio
driver acknowledges the shutdown, so display driver
doesn't have to wait for the entire timeout period.

CRs-Fixed: 1075659
Change-Id: Ib8211a85543b659b7b19a6ebb85382dbbbecfec6
Signed-off-by: Garmond Leung <garmondl@codeaurora.org>
This commit is contained in:
Garmond Leung 2016-10-07 09:54:33 -07:00
parent 0cfcf4427c
commit 322b48c2be

View file

@ -318,8 +318,9 @@ static void msm_ext_disp_audio_codec_rx_dai_shutdown(
struct msm_ext_disp_audio_codec_rx_data *codec_data =
dev_get_drvdata(dai->codec->dev);
if (!codec_data || !codec_data->ext_disp_ops.cable_status) {
dev_err(dai->dev, "%s: codec data or cable_status is null\n",
if (!codec_data || !codec_data->ext_disp_ops.teardown_done ||
!codec_data->ext_disp_ops.cable_status) {
dev_err(dai->dev, "%s: codec data or teardown_done or cable_status is null\n",
__func__);
return;
}
@ -332,6 +333,8 @@ static void msm_ext_disp_audio_codec_rx_dai_shutdown(
__func__);
}
codec_data->ext_disp_ops.teardown_done(
codec_data->ext_disp_core_pdev);
return;
}