Skip to content

Commit 10b7a9a

Browse files
committed
up_down_mixer: reject unsupported channel configurations
init_mix() left mix_routine NULL for combos unhandled by select_mix_out_*() but accepted by set_downmix_coefficients() add NULL-check before calling set_downmix_coefficients() Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1 parent 3f7738d commit 10b7a9a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/audio/up_down_mixer/up_down_mixer.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ static int init_mix(struct processing_module *mod,
307307
return -EINVAL;
308308
}
309309

310+
/* select_mix_out_*() return NULL for unsupported in/out combos */
311+
if (!cd->mix_routine) {
312+
comp_err(dev, "unsupported channel configuration");
313+
return -EINVAL;
314+
}
315+
310316
/* Update audio format. */
311317
cd->out_fmt[0].valid_bit_depth = IPC4_DEPTH_24BIT;
312318
cd->out_fmt[0].depth = IPC4_DEPTH_32BIT;

0 commit comments

Comments
 (0)