From cc9638558918b095ebe1297b6f269703748d2c58 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 8 Jan 2020 18:02:29 +0200 Subject: [PATCH] EQ FIR: Extrapolate channels response map with last valid Response channel map extrapolation uses now last valid channel response instead of first response when there are more stream channels than channel map on configuration blob. The change is done for similarity with IIR. It prevents a false issue report from static code analysis. The extrapolation behavior is not critical and in effect type of usage where it is common to apply the single defined response for every channel so in that case there is no change. In transducer equalization the blob needs to define usually a different for every channel so also in that case extrapolation is not feasible to let happen and a full length channel map need to be defined anyway. The firmware trace shows which response # gets applied for channel. So when unsure the parsing of configuration blob can be quickly checked. Signed-off-by: Seppo Ingalsuo --- src/audio/eq_fir/eq_fir.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/audio/eq_fir/eq_fir.c b/src/audio/eq_fir/eq_fir.c index 45c28026e..0ea6ee803 100644 --- a/src/audio/eq_fir/eq_fir.c +++ b/src/audio/eq_fir/eq_fir.c @@ -303,15 +303,13 @@ static int eq_fir_init_coef(struct sof_eq_fir_config *config, /* Initialize 1st phase */ for (i = 0; i < nch; i++) { /* Check for not reading past blob response to channel assign - * map. If the blob has smaller channel map then apply for - * additional channels the response that was used for the first - * channel. This allows to use mono blobs to setup multi - * channel equalization without stopping to an error. + * map. The previous channel response is assigned for any + * additional channels in the stream. It allows to use single + * channel configuration to setup multi channel equalization + * with the same response. */ if (i < config->channels_in_config) resp = assign_response[i]; - else - resp = assign_response[0]; if (resp < 0) { /* Initialize EQ channel to bypass and continue with