Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/audio/copier/copier.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,12 @@ static int do_conversion_copy(struct comp_dev *dev,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this would be with "git cherry-pick -x " to have a ref to the mainline commit.

comp_get_copy_limits(src, sink, processed_data);

i = IPC4_SINK_QUEUE_ID(buf_get_id(sink));
/*
* Buffer ID is constructed as IPC4_COMP_ID(src_queue, dst_queue).
* From the buffer's perspective, copier's sink is the source,
* so we use IPC4_SRC_QUEUE_ID() to get the correct copier sink index.
*/
i = IPC4_SRC_QUEUE_ID(buf_get_id(sink));
if (i >= IPC4_COPIER_MODULE_OUTPUT_PINS_COUNT)
return -EINVAL;
buffer_stream_invalidate(src, processed_data->source_bytes);
Expand Down Expand Up @@ -617,7 +622,12 @@ static int copier_module_copy(struct processing_module *mod,
uint32_t source_samples;
int sink_queue_id;

sink_queue_id = IPC4_SINK_QUEUE_ID(buf_get_id(sink_c));
/*
* Buffer ID is constructed as IPC4_COMP_ID(src_queue, dst_queue).
* From the buffer's perspective, copier's sink is the source,
* so we use IPC4_SRC_QUEUE_ID() to get the correct copier sink index.
*/
sink_queue_id = IPC4_SRC_QUEUE_ID(buf_get_id(sink_c));
if (sink_queue_id >= IPC4_COPIER_MODULE_OUTPUT_PINS_COUNT)
return -EINVAL;

Expand Down
Loading