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

Commit 49237b20 authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: dp: disable audio engine on teardown_done



Disable the DP audio engine on receiving the teardown_done
callback from the audio codec. This ensures that the DP
engine is in the disabled (MUTE) state in preparation for
the next audio session.

CRs-Fixed: 2006127
Change-Id: I7c984531d308501690ede36ea959391ebef7599f
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent 75b4841b
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -1048,6 +1048,22 @@ static int dp_get_audio_edid_blk(struct platform_device *pdev,
	return rc;
} /* dp_get_audio_edid_blk */

static void dp_audio_teardown_done(struct platform_device *pdev)
{
	struct mdss_dp_drv_pdata *dp = platform_get_drvdata(pdev);

	if (!dp) {
		pr_err("invalid input\n");
		return;
	}

	mdss_dp_audio_enable(&dp->ctrl_io, false);
	/* Make sure the DP audio engine is disabled */
	wmb();

	pr_debug("audio engine disabled\n");
} /* dp_audio_teardown_done */

static int mdss_dp_init_ext_disp(struct mdss_dp_drv_pdata *dp)
{
	int ret = 0;
@@ -1069,6 +1085,8 @@ static int mdss_dp_init_ext_disp(struct mdss_dp_drv_pdata *dp)
		dp_get_audio_edid_blk;
	dp->ext_audio_data.codec_ops.cable_status =
		dp_get_cable_status;
	dp->ext_audio_data.codec_ops.teardown_done =
		dp_audio_teardown_done;

	if (!dp->pdev->dev.of_node) {
		pr_err("%s cannot find dp dev.of_node\n", __func__);