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

Commit f9420bfa authored by Alvin Lee's avatar Alvin Lee Committed by Greg Kroah-Hartman
Browse files

drm/amd/display: Only enable audio if speaker allocation exists



[ Upstream commit 6ac25e6d5b2fbf251e9fa2f4131d42c815b43867 ]

[Why]

In dm_helpers_parse_edid_caps, there is a corner case where no speakers
can be allocated even though the audio mode count is greater than 0.
Enabling audio when no speaker allocations exists can cause issues in
the video stream.

[How]

Add a check to not enable audio unless one or more speaker allocations
exist (since doing this can cause issues in the video stream).

Signed-off-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3998e684
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1956,7 +1956,7 @@ enum dc_status resource_map_pool_resources(
	/* TODO: Add check if ASIC support and EDID audio */
	if (!stream->sink->converter_disable_audio &&
	    dc_is_audio_capable_signal(pipe_ctx->stream->signal) &&
	    stream->audio_info.mode_count) {
	    stream->audio_info.mode_count && stream->audio_info.flags.all) {
		pipe_ctx->stream_res.audio = find_first_free_audio(
		&context->res_ctx, pool, pipe_ctx->stream_res.stream_enc->id);