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 <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2020-01-08 18:02:29 +02:00 committed by Liam Girdwood
parent 0d8e63b8e9
commit cc96385589
1 changed files with 4 additions and 6 deletions

View File

@ -303,15 +303,13 @@ static int eq_fir_init_coef(struct sof_eq_fir_config *config,
/* Initialize 1st phase */ /* Initialize 1st phase */
for (i = 0; i < nch; i++) { for (i = 0; i < nch; i++) {
/* Check for not reading past blob response to channel assign /* Check for not reading past blob response to channel assign
* map. If the blob has smaller channel map then apply for * map. The previous channel response is assigned for any
* additional channels the response that was used for the first * additional channels in the stream. It allows to use single
* channel. This allows to use mono blobs to setup multi * channel configuration to setup multi channel equalization
* channel equalization without stopping to an error. * with the same response.
*/ */
if (i < config->channels_in_config) if (i < config->channels_in_config)
resp = assign_response[i]; resp = assign_response[i];
else
resp = assign_response[0];
if (resp < 0) { if (resp < 0) {
/* Initialize EQ channel to bypass and continue with /* Initialize EQ channel to bypass and continue with