Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EQ FIR: Improve robustness with configuration blobs #213

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/audio/eq_fir.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,17 @@ static int eq_fir_setup(struct fir_state_32x16 fir[],
/* Initialize 1st phase */
trace_eq("asr");
for (i = 0; i < nch; i++) {
resp = assign_response[i];
/* If the configuration blob contains less channels for
* response assign to channels than the current channels count
* use the first channel response to remaining channels. E.g.
* a blob that contains just a mono EQ can be used for stereo
* stream by using the same response for all channels.
*/
if (i < config->channels_in_config)
resp = assign_response[i];
else
resp = assign_response[0];

trace_value(resp);
if (resp >= config->number_of_responses || resp < 0) {
trace_eq_error("eas");
Expand Down