Skip to content

Commit 92e6475

Browse files
Nicholas Kazlauskasalexdeucher
authored andcommitted
drm/amd/display: Set enabled to false at start of audio disable
[Why] In an effort to stop redundant calls to dce110_disable_audio_stream the audio->enabled flag was added to the audio resource struct. While this state probably shouldn't have been tracked on the audio struct itself it still works fine for some sequences. However, it does not work for cases where we're freeing the audio resource (such as hotplugs) or when dynamic audio is enabled. In these cases the pipe_ctx->stream_res.audio = NULL before we can set audio->enabled = false. The next time we acquire the audio resource such as on hotplug the audio will not be enabled for the stream since DC thinks it's still enabled. Audio state tracking should cover this sequence. [How] Set audio->enabled = false at the start as long as we have pipe_ctx->stream_res.audio. Signed-off-by: Nicholas Kazlauskas <[email protected]> Reviewed-by: Zhan Liu <[email protected]> Acked-by: Leo Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1bcff32 commit 92e6475

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,8 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx, int option)
10211021
pipe_ctx->stream_res.stream_enc->funcs->audio_mute_control(
10221022
pipe_ctx->stream_res.stream_enc, true);
10231023
if (pipe_ctx->stream_res.audio) {
1024+
pipe_ctx->stream_res.audio->enabled = false;
1025+
10241026
if (dc->res_pool->pp_smu)
10251027
pp_smu = dc->res_pool->pp_smu;
10261028

@@ -1051,8 +1053,6 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx, int option)
10511053
/* dal_audio_disable_azalia_audio_jack_presence(stream->audio,
10521054
* stream->stream_engine_id);
10531055
*/
1054-
if (pipe_ctx->stream_res.audio)
1055-
pipe_ctx->stream_res.audio->enabled = false;
10561056
}
10571057
}
10581058

0 commit comments

Comments
 (0)