Skip to content

Commit

Permalink
copier: Remove update of sink buffer format in copier_set_sink_fmt
Browse files Browse the repository at this point in the history
Sink format can only be set when the sink buffer is not binded. Sink
buffer parameters will be set on binding. Remove redundant code.

Signed-off-by: Adrian Warecki <[email protected]>
  • Loading branch information
softwarecki authored and kv2019i committed Jul 15, 2024
1 parent 024df27 commit da35d20
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/audio/copier/copier.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,6 @@ static int copier_set_sink_fmt(struct comp_dev *dev, const void *data,
const struct ipc4_copier_config_set_sink_format *sink_fmt = data;
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct list_item *sink_list;
struct comp_buffer *sink;

if (max_data_size < sizeof(*sink_fmt)) {
comp_err(dev, "error: max_data_size %d should be bigger than %d", max_data_size,
Expand Down Expand Up @@ -691,19 +689,6 @@ static int copier_set_sink_fmt(struct comp_dev *dev, const void *data,
&sink_fmt->sink_fmt, ipc4_gtw_none,
ipc4_bidirection);

/* update corresponding sink format */
list_for_item(sink_list, &dev->bsink_list) {
int sink_id;

sink = container_of(sink_list, struct comp_buffer, source_list);

sink_id = IPC4_SINK_QUEUE_ID(buf_get_id(sink));
if (sink_id == sink_fmt->sink_id) {
ipc4_update_buffer_format(sink, &sink_fmt->sink_fmt);
break;
}
}

return 0;
}

Expand Down

0 comments on commit da35d20

Please sign in to comment.