Skip to content

Commit

Permalink
copier: Remove update source buffer format
Browse files Browse the repository at this point in the history
A data producing component is responsible for setting a sink buffer
parameters. It is not necessary for the copier to override source buffer
parameters. Remove the code responsible for it.

Signed-off-by: Adrian Warecki <[email protected]>
  • Loading branch information
softwarecki authored and kv2019i committed Jul 15, 2024
1 parent b58df6d commit 024df27
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/audio/copier/copier_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int apply_attenuation(struct comp_dev *dev, struct copier_data *cd,
void copier_update_params(struct copier_data *cd, struct comp_dev *dev,
struct sof_ipc_stream_params *params)
{
struct comp_buffer *sink, *source;
struct comp_buffer *sink;
struct list_item *sink_list;

memset(params, 0, sizeof(*params));
Expand Down Expand Up @@ -90,19 +90,6 @@ void copier_update_params(struct copier_data *cd, struct comp_dev *dev,
ipc4_update_buffer_format(sink, &cd->out_fmt[j]);
}

/*
* force update the source buffer format to cover cases where the source module
* fails to set the sink buffer params
*/
if (!list_is_empty(&dev->bsource_list)) {
struct ipc4_audio_format *in_fmt;

source = list_first_item(&dev->bsource_list, struct comp_buffer, sink_list);

in_fmt = &cd->config.base.audio_fmt;
ipc4_update_buffer_format(source, in_fmt);
}

/* update params for the DMA buffer */
switch (dev->ipc_config.type) {
case SOF_COMP_HOST:
Expand Down

0 comments on commit 024df27

Please sign in to comment.