Skip to content

EQ FIR: Add support for runtime reconfiguration - #2259

Merged
lgirdwood merged 4 commits into
thesofproject:masterfrom
singalsu:fir_update_while_streaming
Jan 13, 2020
Merged

lgirdwood merged 4 commits into
thesofproject:masterfrom
singalsu:fir_update_while_streaming

Conversation

@singalsu

@singalsu singalsu commented Jan 8, 2020 •

Copy link
Copy Markdown
Collaborator

This pull request adds to FIR capability to change the configuration during playback or capture plus other changes to align the features with recent updates to IIR. There are four commits:

  • Add support for runtime reconfiguration

  • Remove handling of set/get value commands

  • Extrapolate channels response map with last valid

  • Add trace verbosity and align with IIR trace output

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are about 4 or 5 changes here that would be better as 4 or 5 separate patches in this PR.

@singalsu

singalsu commented Jan 8, 2020

Copy link
Copy Markdown
Collaborator Author

It looks like there are about 4 or 5 changes here that would be better as 4 or 5 separate patches in this PR.

OK, I'll see how much I can separate. There's need to test the in-between versions with multiple commits.

@lgirdwood

Copy link
Copy Markdown
Member

It looks like there are about 4 or 5 changes here that would be better as 4 or 5 separate patches in this PR.

OK, I'll see how much I can separate. There's need to test the in-between versions with multiple commits.

Just do the ones that make sense. i.e. the two items removed can be different patches.

@singalsu

singalsu commented Jan 8, 2020

Copy link
Copy Markdown
Collaborator Author

@lgirdwood Thanks, that's straightforward. I ran into problems in separating SOF_CTRL_CMD_ENUM change.

@singalsu
singalsu force-pushed the fir_update_while_streaming branch from 1101044 to 28f3dbc Compare January 8, 2020 17:09
@singalsu
singalsu requested a review from lgirdwood January 8, 2020 17:14
@singalsu

singalsu commented Jan 8, 2020

Copy link
Copy Markdown
Collaborator Author

I updated this PR with a four commits version. I changed one trace_eq() into trace_eq_error(), no other code changes for end result.

Comment thread src/audio/eq_fir/eq_fir.c Resolved
@singalsu

singalsu commented Jan 9, 2020

Copy link
Copy Markdown
Collaborator Author

Oops, I forgot to update commit message #1. It no more contains everything.

@singalsu
singalsu force-pushed the fir_update_while_streaming branch from 28f3dbc to cf18c0f Compare January 9, 2020 09:15
@singalsu

singalsu commented Jan 9, 2020

Copy link
Copy Markdown
Collaborator Author

I just updated the first commit message, no other changes.

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing, but it can lead to later errors if updated wrongly so best to fix.

Comment thread src/audio/eq_fir/fir_hifi3.c Resolved
This patch adds similarly as done for IIR capability to change the
configuration during playback or capture. The previous version
returned an error to driver in such case even with a valid request.
Due to driver logic of caching the controls (no separate handling for
EBUSY) the rejected request caused all successive streaming attempts
to fail.

Support for SOF_CTRL_CMD_ENUM to control preset-EQ is removed since
the driver does not support the feature. The implementation would
need a change anyway so better to remove it now and reintroduce it
if needed later.

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch removes the command handler stubs for COMP_CMD_SET_VALUE
and COMP_CMD_GET_VALUE. A proper error is issued if these commands are
passed to FIR.

Signed-off-by: Seppo Ingalsuo <[email protected]>
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 <[email protected]>
This patch unifies the configuration blob parsing related traces
with IIR. The low importance trace for response start index is
removed and a note about setting a channel to bypass is added. The
illegal channel map response index is traced with error.

Signed-off-by: Seppo Ingalsuo <[email protected]>
@singalsu
singalsu force-pushed the fir_update_while_streaming branch from cf18c0f to c875b5e Compare January 13, 2020 09:47

@paulstelian97 paulstelian97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing jumps out to me as wrong so approved.

@lgirdwood
lgirdwood merged commit b77c7dc into thesofproject:master Jan 13, 2020
@singalsu

Copy link
Copy Markdown
Collaborator Author

Woohoo, we can now close issues for sof-ctl during streaming. Thanks @paulstelian97 and @lgirdwood for review!

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