asrc: Fixed sink rate selection

Don't change sink rate if value from IPC is 0 (auto detect)

Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
This commit is contained in:
Adrian Warecki 2022-02-10 13:48:05 +01:00 committed by Liam Girdwood
parent 8c0b05d579
commit 838c7328f8
1 changed files with 3 additions and 1 deletions

View File

@ -530,7 +530,9 @@ static int asrc_params(struct comp_dev *dev,
sinkb = list_first_item(&dev->bsink_list, struct comp_buffer,
source_list);
sinkb->stream.rate = asrc_get_sink_rate(&cd->ipc_config);
/* Don't change sink rate if value from IPC is 0 (auto detect) */
if (asrc_get_sink_rate(&cd->ipc_config))
sinkb->stream.rate = asrc_get_sink_rate(&cd->ipc_config);
/* set source/sink_frames/rate */
cd->source_rate = sourceb->stream.rate;