Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Audio: Module adapter: Fix in IPC4 invalid blob pass to init()
The cfg->size is the size of ipc4_base_module_cfg. The cfg->data is NULL but when such is encountered the comp_init_data_blob() allocates a zero bytes of size. Such blob is illegal and e.g. IIR will fail if not another blob is received by prepare(). DC block operates, but applies a rather high cut-off frequency that results to silent audio for e.g. lower voice frequencies. What happens with such illegal blob is component specific. The expected operation for most components is pass-through when a configuration blob is not set. This change should ensure that the component is not initialized with incorrect bytes control data if such is not passed with topology. IPC4 SRC utilizes in init() an ipc4_base_module_cfg variant that adds an uint32_t after it for sink rate. To pass the check for cfg->size the size subtract done in module adapter need to be taken into account. TODO: There is similar size check in selector, need to make similar change there. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
- Loading branch information