mirror of https://github.com/thesofproject/sof.git
EQ IIR: Allow run the EQ in bypass mode when not configured
This patch changes the behaviour in prepare() such that we do not return an error if the IIR coefficients have not been set. It's better to start in bypass mode since this is valid usage for EQ when transducer EQ or effect does not need to be activated. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
4c0b1d4712
commit
3b52f29425
|
@ -532,25 +532,17 @@ static int eq_iir_prepare(struct comp_dev *dev)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Initialize EQ */
|
||||
cd->eq_iir_func = eq_iir_passthrough;
|
||||
|
||||
/* Initialize EQ. Note that if EQ has not received command to
|
||||
* configure the response the EQ prepare returns an error that
|
||||
* interrupts pipeline prepare for downstream.
|
||||
*/
|
||||
if (!cd->config) {
|
||||
comp_set_state(dev, COMP_TRIGGER_RESET);
|
||||
return -EINVAL;
|
||||
if (cd->config) {
|
||||
ret = eq_iir_setup(cd->iir, cd->config, dev->params.channels);
|
||||
if (ret < 0) {
|
||||
comp_set_state(dev, COMP_TRIGGER_RESET);
|
||||
return ret;
|
||||
}
|
||||
cd->eq_iir_func = eq_iir_s32_default;
|
||||
}
|
||||
|
||||
ret = eq_iir_setup(cd->iir, cd->config, dev->params.channels);
|
||||
if (ret < 0) {
|
||||
comp_set_state(dev, COMP_TRIGGER_RESET);
|
||||
return ret;
|
||||
}
|
||||
|
||||
cd->eq_iir_func = eq_iir_s32_default;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue