copier: fix format check for set_attenuation

Fix format validation in set_attenuation function.

In previous implementation, bitdepth was compared to sink->buffer_fmt
value, which is an enum sof_ipc_buffer_format (interleaved or not).

Format bitdepth is represented by stream.frame_fmt (enum sof_ipc_frame),
so it should be compared to this value.

Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
This commit is contained in:
Przemyslaw Blaszkowski 2023-03-03 14:43:30 +01:00 committed by Liam Girdwood
parent 157fd098cc
commit a134878e46
1 changed files with 1 additions and 1 deletions

View File

@ -1484,7 +1484,7 @@ static int set_attenuation(struct comp_dev *dev, uint32_t data_offset, const cha
list_for_item(sink_list, &dev->bsink_list) {
sink = container_of(sink_list, struct comp_buffer, source_list);
if (sink->buffer_fmt < SOF_IPC_FRAME_S24_4LE) {
if (sink->stream.frame_fmt < SOF_IPC_FRAME_S24_4LE) {
comp_err(dev, "sink %d in format %d isn't supported by attenuation",
sink->id, sink->buffer_fmt);
return -EINVAL;