Skip to content

Tools: Topology2: Add Multiband-DRC to sof-hda-efx-generic.tplg - #8049

Merged
lgirdwood merged 1 commit into
thesofproject:mainfrom
singalsu:tplg2_add_multiband_drc
Sep 11, 2023
Merged

Tools: Topology2: Add Multiband-DRC to sof-hda-efx-generic.tplg#8049
lgirdwood merged 1 commit into
thesofproject:mainfrom
singalsu:tplg2_add_multiband_drc

Conversation

@singalsu

@singalsusingalsu commented Aug 16, 2023

Copy link
Copy Markdown
Collaborator
This patch adds the topology2 files for multiband-DRC. The EFX
processing chain is gain - IIR - FIR - DRC or Multiband-DRC. The
DRC selection is done with macro EFX_DRC_COMPONENT and values
"singleband" and "multiband".
The multiband-drc has two ALSA controls, bytes and switch. The
switch control switches the processing on and off.
The generated topology files with multiband-drc are:
sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg
The topology files with DRC are as before:
sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg
The configuration blob default is updated to what is generated
by the current example_multiband_drc.m configuration script. The
pass-through blob is set as default for tplg2. The topology 1
blobs are updated similarly.

Picture of sof-hda-efx-mbdrc-generic.tplg with multi-band DRC:
sof-hda-efx-mbdrc-generic

PIcture of sof-hda-efx-mbdrc-generic.tplg with DRC:
sof-hda-efx-generic

Object.Widget.drc.1 {
Object.Control.bytes."1" {
name '2 Main playback DRC'
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC'

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This small fix could be separate commit.

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.

yep.

Comment threadtools/topology/topology2/development/tplg-targets.cmake Outdated
@singalsu
singalsuforce-pushed the tplg2_add_multiband_drc branch from f7b160c to 8982a62CompareAugust 22, 2023 13:58
Comment threadtools/topology/topology2/cavs-mixin-mixout-efx-hda.conf Outdated

@lgirdwoodlgirdwood 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.

PR may need split

@lgirdwoodlgirdwood 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.

I think you have slef reviewed and identified the changes needed.

Object.Widget.drc.1 {
Object.Control.bytes."1" {
name '2 Main playback DRC'
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC'

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.

yep.

@singalsu
singalsuforce-pushed the tplg2_add_multiband_drc branch from 70fba1f to d1a7471CompareAugust 25, 2023 11:17
@singalsu
singalsu marked this pull request as ready for review August 25, 2023 11:20
@singalsu
singalsu requested a review from a teamAugust 25, 2023 11:21
@@ -0,0 +1,71 @@
# Exported Control Bytes 16-Aug-2023

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.

We really need to have a comment explaining how these are generated.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yep, I'll do a PR to change the text in the tool.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Now fixed in this PR, re-exported the blobs. Tool PR is #8142.

This patch adds the topology2 files for multiband-DRC. The EFX
processing chain is gain - IIR - FIR - DRC or Multiband-DRC. The
DRC selection is done with macro EFX_DRC_COMPONENT and values
"singleband" and "multiband".
The multiband-drc has two ALSA controls, bytes and switch. The
switch control switches the processing on and off.
The generated topology files with multiband-drc are:
sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg
The topology files with DRC are as before:
sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg
The configuration blob default is updated to what is generated
by the current example_multiband_drc.m configuration script. The
pass-through blob is set as default for tplg2. The topology 1
blobs are updated similarly.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>

@kv2019ikv2019i 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.

@ranj063@jsarha for tplg conventions, ok?

@johnylin76johnylin76 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks.

@johnylin76

Copy link
Copy Markdown
Contributor

Hi @singalsu I have a question about multi-stream mix-out playback. (not related to this PR, just come into my mind while reviewing).

For GOOGLE_AEC topology, the AEC module has one input for echo reference, which is sourced from a DEMUX on playback pipeline. The expectation for compound topology graph of both multi-stream and AEC may be formed as follows:

PCM0P (pipeline 2) ---> Volume ------|
V
Mixer (pipeline 1) -----> DEMUX ---> SSP0
^ |
PCM1P (pipeline 3) ---> EQIIR ------| |
|-----------------|
V
PCM2C (pipeline 5) <--------- NR <--------- AEC <--|
|
Mixer (pipeline 4) <--- DMIC1
|
PCM3C (pipeline 6) <-------------------------------|

Do you think this is technically feasible?
FYI, AEC can be run without active echo reference, the playback and capture path are independent of each other.

@singalsu

Copy link
Copy Markdown
CollaboratorAuthor

Do you think this is technically feasible?
FYI, AEC can be run without active echo reference, the playback and capture path are independent of each other.

@johnylin76 The capture direction looks good, except typo with mixer, you must have meant demux there.

In playback direction the IIR location would be typically for all playback just before demux but if you need the other stream un-equalized this would be the way. I don't see why such topology would not work. I once tried 48 -> 16 kHz SRC with a mock-up AEC a reference path that wasn't working due to a scheduler limitation but here the reference path is without processing.

@kv2019i@mengdonglin@plbossart please chime in if this something not committed. Also SOF releases have differences in scheduler & pipelines capability, v2.2 may be more limited.

@lgirdwood
lgirdwood merged commit 84809f9 into thesofproject:mainSep 11, 2023
Sign up for freeto 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.

5 participants

@singalsu@johnylin76@cujomalainey@lgirdwood@kv2019i