From 415b0511bf1f66298d37403871c6d4cd9cab7161 Mon Sep 17 00:00:00 2001 From: Brent Lu Date: Wed, 9 Oct 2024 11:06:56 +0800 Subject: [PATCH] mux: ignore active sink on other pipeline When mux is on capture pipeline, sinks could not be active/paused when processing COMP_TRIGGER_STOP command. However, active sink could be on another pipeline and should be ignored or the pipeline task will not exit and cause DSP panic if the core running the task is disabled later. PCMP ----> smart_amp ----> SSP(A) # playback ppl ^ | PCMC <---- demux <----- SSP(B) # echo reference ppl Signed-off-by: Brent Lu --- src/audio/mux/mux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/audio/mux/mux.c b/src/audio/mux/mux.c index 23b68cb5d464..b203046ed5aa 100644 --- a/src/audio/mux/mux.c +++ b/src/audio/mux/mux.c @@ -794,7 +794,9 @@ static int mux_sink_status_count(struct comp_dev *mux, uint32_t status) source_list); struct comp_buffer __sparse_cache *sink_c = buffer_acquire(sink); - if (sink_c->sink && sink_c->sink->state == status) + /* ignore active sink on other pipeline */ + if (sink_c->sink && sink_c->sink->state == status && + sink_c->sink->pipeline->pipeline_id == mux->pipeline->pipeline_id) count++; buffer_release(sink_c); }