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

Conversation

singalsu
Copy link
Collaborator

@singalsu singalsu commented Aug 8, 2018

This patch prevents an error if the EQ responses to channels mapping
table in the configuration blob contains less channels than current
number of channels in firmware. Without this check the lookup from blob
can go past the table. Reporting an error depended on successive blob
content to detect corrupt blob and was not guaranteed.

The situation is not changed to stop to error but instead extrapolate
the table by applying 1st channel EQ for additional channels. It e.g.
helps to duplicate mono effect EQ to all channels without need to make
blobs with mapping to match max. channels count of SOF. The used response
index for each channel can be seen from trace.

Signed-off-by: Seppo Ingalsuo [email protected]

This patch prevents an error if the EQ responses to channels mapping
table in the configuration blob contains less channels than current
number of channels in firmware. Without this check the lookup from blob
can go past the table. Reporting an error depended on successive blob
content to detect corrupt blob and was not guaranteed.

The situation is not changed to stop to error but instead extrapolate
the table by applying 1st channel EQ for additional channels. It e.g.
helps to duplicate mono effect EQ to all channels without need to make
blobs with mapping to match max. channels count of SOF. The used response
index for each channel can be seen from trace.

Signed-off-by: Seppo Ingalsuo <[email protected]>
@lgirdwood
Copy link
Member

@singalsu can you comment on the array

@singalsu
Copy link
Collaborator Author

@lgirdwood That's an array within the configuration blob that preferably should match the channels count if the channels are set to different equalization. E.g. if the the blob defines three EQs #0, #1, #2. This array assign_response[] maps the response to stream channels, e.g. as {2, 1} use EQ shape #2 for channel 0 and EQ shape #1 for channel 1. Was this your question?

@lgirdwood lgirdwood merged commit 2ed30b5 into thesofproject:next Aug 10, 2018
@singalsu singalsu deleted the eq_fir_blob_handling_fix_proposal branch April 29, 2019 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants