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

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

disp: msm: dp: skip wait if audio engine is disabled



Skip the wait in the disable path if the audio engine has already
been disabled or was not previously enabled. This avoids an
unnecessary wait since the audio subsystem will only acknowledge
the notification and not request a tear down if no audio playback
was started by the user.

CRs-Fixed: 2550150
Change-Id: I7b47345430f3d9c63b80b0aa92cdc4dd77152da9
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent e070ce18
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -414,6 +414,9 @@ static int dp_audio_info_setup(struct platform_device *pdev,
	dp_audio_enable(audio, true);

	mutex_unlock(&audio->ops_lock);

	DP_DEBUG("audio stream configured\n");

	return rc;
}

@@ -671,6 +674,9 @@ static int dp_audio_notify(struct dp_audio_private *audio, u32 state)
	if (atomic_read(&audio->acked))
		goto end;

	if (state == EXT_DISPLAY_CABLE_DISCONNECT && !audio->engine_on)
		goto end;

	if (state == EXT_DISPLAY_CABLE_CONNECT)
		goto end;