mirror of https://github.com/thesofproject/sof.git
mux: add channels check in mux_prepare_active_look_up()
This commit adds channel parameter checking in mux_prepare_active_look_up() function. Look up table should not include elements referring to channels higher than those actually set in source/sink buffers. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit is contained in:
parent
473d8894f0
commit
acc022b4c4
|
@ -336,6 +336,12 @@ static void mux_prepare_active_look_up(struct comp_dev *dev,
|
|||
if (!source)
|
||||
continue;
|
||||
|
||||
if ((cd->lookup[0].copy_elem[elem].in_ch >
|
||||
(source->channels - 1)) ||
|
||||
(cd->lookup[0].copy_elem[elem].out_ch >
|
||||
(sink->channels - 1)))
|
||||
continue;
|
||||
|
||||
cd->active_lookup.copy_elem[active_elem] =
|
||||
cd->lookup[0].copy_elem[elem];
|
||||
active_elem++;
|
||||
|
|
Loading…
Reference in New Issue