Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 322b48c2 authored by Garmond Leung's avatar Garmond Leung
Browse files

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: default avatarGarmond Leung <garmondl@codeaurora.org>
parent 0cfcf442
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;
}