Skip to content

Tools: Topology2: Move in DMIC capture gain from host to dai pipeline#9154

Closed
singalsu wants to merge 2 commits intothesofproject:mainfrom
singalsu:tplg2_dmic_move_gain_to_dai_pipeline
Closed

Tools: Topology2: Move in DMIC capture gain from host to dai pipeline#9154
singalsu wants to merge 2 commits intothesofproject:mainfrom
singalsu:tplg2_dmic_move_gain_to_dai_pipeline

Conversation

@singalsu
Copy link
Collaborator

No description provided.

singalsu added 2 commits May 22, 2024 16:42
This change prepares for adding it instead to DMIC DAI copier
pipeline. There it will control mute/unmute for all possible
module copier connected other capture PCMs.

The pipeline object gain-capture is replaced with simpler
host-gateway-capture. The definition of DMIC0_HOST_PIPELINE_SINK
need to be changed from gain to host-copier.

With this patch, the typical DMIC capture path looks like:

dai-copier --> eqiir --> module-copier --> host-copier

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This change adds volume and switch  "Dmic0" into dai-copier pipeline.
It ensures that all capture from DMIC follows the mute key control
even if some other processing and PCMs are added to module copier.

The patch adds a new pipeline class
dai-copier-eqiir-gain-module-copier-capture. It is similar as
replaced dai-copier-eqiir-module-copier-capture but adds the
gain component.

The confusing DMIC0_DAI_GAIN (set to eqiir) is removed from all
top level topologies (nocodec, rt5682, sdw, hda).

After this a typical DMIC0 pipeline looks like:

dai-copier --> eqiir --> gain --> module-copier --> host-copier

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
Copy link
Collaborator Author

singalsu commented May 22, 2024

This change is needed to keep DMIC mute keys & LEDs functional for all DMIC capture PCMs. E.g. if adding another pipeline and PCM for beamformer and DRC as in #9146 the the PCM is not impacted by the mute switch.

Here is an example with sof-hda-generic-4ch (before, after):
sof-hda-generic-4ch-before
sof-hda-generic-4ch-after

The mtl-nocodec topology already demonstrates the issue where Dmic0 switch in gain.13.1 does not impact other PCMs.
sof-mtl-nocodec-before
sof-mtl-nocodec-after

<include/components/dai-copier.conf>
<include/controls/bytes.conf>
<include/components/eqiir.conf>
<include/components/pipeline.conf>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Include of gain.conf is missing, build it worked because it was included somewhere else.

@@ -0,0 +1,204 @@
#
Copy link
Collaborator

Choose a reason for hiding this comment

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

@singalsu if this PR is not too urgent, can it wait till the new pipeline extension template goes upstream?

@singalsu
Copy link
Collaborator Author

Closing this, the PR is now part of #9176

@singalsu singalsu closed this May 30, 2024
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.

2 participants