Skip to content

Commit

Permalink
Revert "audio/mux: Fix crash on misconfiguration"
Browse files Browse the repository at this point in the history
This was only a partial workaround.  The root cause is that the sink
(in a different pipeline) really is off, and it needs to be turned on
somehow.

This reverts commit 8656119.
  • Loading branch information
andyross committed Nov 20, 2023
1 parent 29df6dc commit 57c25a5
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/audio/mux/mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,23 +473,18 @@ static int demux_process(struct processing_module *mod,
list_for_item(clist, &dev->bsink_list) {
sink = container_of(clist, struct comp_buffer, source_list);
sink_c = buffer_acquire(sink);
if (sink_c->sink->state == dev->state) {
i = get_stream_index(dev, cd, sink_c->pipeline_id);
/* return if index wrong */
if (i < 0) {
buffer_release(sink_c);
return i;
}

if (sink_c->sink->state != dev->state) {
comp_err(dev, "demux_process(): stream %d sink state %d does not match dev state %d",
i, sink_c->sink->state, dev->state);
return -1;
}

i = get_stream_index(dev, cd, sink_c->pipeline_id);
/* return if index wrong */
if (i < 0) {
buffer_release(sink_c);
return i;
look_ups[i] = get_lookup_table(dev, cd, sink_c->pipeline_id);
sinks_stream[i] = &sink_c->stream;
}

look_ups[i] = get_lookup_table(dev, cd, sink_c->pipeline_id);
sinks_stream[i] = &sink_c->stream;

buffer_release(sink_c);
}

Expand Down

0 comments on commit 57c25a5

Please sign in to comment.