Audio: DRC: Add processing enable switch control#8474
Audio: DRC: Add processing enable switch control#8474lgirdwood merged 2 commits intothesofproject:mainfrom
Conversation
|
@johnylin76 @cujomalainey Does adding this control and the logic of letting the control to impact to look OK to you? The operation should be as before if topology is not defining a switch - the blob will determine enabled / disabled. When there is a switch control in topology, processing is enabled only if blob has enable set and user space is set to enabled. This is the behaviour what I'm not fully sure about. Other way would be to enable the processing with the blob definitions whenever user requests it even if blob has enable set to false. For lowest disabled MCPS I was testing also a version that uses bypass copy function (drc_default_pass) for disabled but there would be a click when enabled/disabled so I dropped for now the idea. Note that multiband-DRC is somewhat different in enable switch control handling. It's not changing enabled/disable during streaming. I'd like to update it to be similar as what is defined for DRC to they would be kind of plug-in replacements for each other. DRC would be the light alternative for multiband-DRC (that runs min. 2 band filterbank always). |
johnylin76
left a comment
There was a problem hiding this comment.
It looks good to me only with one code suggestion. Thanks
src/audio/drc/drc.c
Outdated
| audio_stream_init_alignment_constants(1, 1, sink); | ||
| } | ||
|
|
||
| static bool drc_has_config(struct drc_comp_data *cd) |
There was a problem hiding this comment.
on ACE and cAVS the compiler is now allowed to inline automatically. If this is an issue on other platforms, I'd rather enable CONFIG_COMPILER_INLINE_FUNCTION_OPTION on them too, than adding inline to individual functions.
There was a problem hiding this comment.
Not sure what to do, maybe leaving like this since the inline happens. Checked it from zephyr.lst.
lgirdwood
left a comment
There was a problem hiding this comment.
LGTM when all current comments resolved.
205399b to
b5749f6
Compare
src/audio/drc/drc.c
Outdated
|
|
||
| switch (param_id) { | ||
| case SOF_IPC4_SWITCH_CONTROL_PARAM_ID: | ||
| if (ctl->id == 0 && ctl->num_elems == 1) { |
There was a problem hiding this comment.
shouldn't control IDs be macros?
There was a problem hiding this comment.
Yep, it's a good idea
b5749f6 to
460cea3
Compare
|
@johnylin76 will adding additional controls like this to EQ/MDRC cause any overhead in your offload logic? |
src/audio/drc/drc.c
Outdated
| } | ||
|
|
||
| /* Control pass-though in processing function with switch control */ | ||
| cd->enabled = drc_get_config_enabled(cd) && cd->enable_switch; |
There was a problem hiding this comment.
better to directly as:
cd->enabled = cd->config && cd->config->params.enabled
&& cd->enable_switch;
There was a problem hiding this comment.
OK, will change. The function has no other usage.
|
@lgirdwood |
|
@singalsu one conflict. |
460cea3 to
bca3a4b
Compare
This patch adds to DRC component in IPC4 mode a control to switch processing on/off. The control is useful for DRC pipeline that is used for both headphone (unprocessed) and speaker (processed). It also allows the user to switch off DRC processing if desired. If a blob has enable set to false the processing cannot be enabled with the switch control. If the blob enables processing, the user space can control processing on or off. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The mixer control for switch is added to widget definition of drc.conf. In cavs-mixin-mixout-efx-hda.conf the existing control name is changed to have "bytes" similarly as multiband-drc has. The switch control is added for the widget to implement the switch. The controls definitions files in benchmark topologies are replaced to new format from current .conf generator script. The bytes control is same as before, and the mixer control for switch is added. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
bca3a4b to
b79eb20
Compare
No description provided.