Skip to content

Commit

Permalink
Tools: Topology2: Add DMIC Enhanced Audio Capture development tplg
Browse files Browse the repository at this point in the history
This patch adds to DMIC0 capture TDFB beamformer and DRC for
dynamic range control. The names of updated topologies are
sof-hda-efx-generic-2ch.tplg and sof-hda-efx-generic-4ch.
The efx topologies with mbdrc are updated similarly.

The pipeline is enabled if DMIC0_ENHANCED_CAPTURE is set to true
in topologies build. They keys EFX_DMIC0_TDFB_PARAMS and
EFX_DMIC0_DRC_PARAMS control the configurations blobs use.

Build parameter DMIC0_PCM_CHANNELS controls the number of output
channels for beamformer. It is by default two.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu committed Jun 5, 2024
1 parent dc0c1e2 commit 450a841
Show file tree
Hide file tree
Showing 3 changed files with 441 additions and 211 deletions.
34 changes: 24 additions & 10 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,41 @@ EFX_HDA_MIC_TDFB_PARAMS=line2_pass,EFX_HDA_MIC_DRC_PARAMS=passthrough"

"sof-hda-generic\;sof-hda-efx-generic-2ch\;\
HDA_CONFIG=efx,NUM_DMICS=2,\
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,\
EFX_DRC_PARAMS=passthrough"
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,EFX_DRC_PARAMS=passthrough,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-hda-efx-generic-4ch\;\
HDA_CONFIG=efx,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,\
EFX_DRC_PARAMS=passthrough"
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,EFX_DRC_PARAMS=passthrough,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
DMIC0_PCM_CHANNELS=4"

"sof-hda-generic\;sof-hda-efx-generic-4to2ch\;\
HDA_CONFIG=efx,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,EFX_DRC_PARAMS=passthrough,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_generic_pm10deg,\
EFX_DMIC0_DRC_PARAMS=dmic_default,DMIC0_PCM_CHANNELS=2"

"sof-hda-generic\;sof-hda-efx-mbdrc-generic\;HDA_CONFIG=efx,HDA_MIC_ENHANCED_CAPTURE=true,\
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,EFX_DRC_COMPONENT=multiband,\
EFX_MBDRC_PARAMS=passthrough,EFX_HDA_MIC_TDFB_PARAMS=line2_pass,EFX_HDA_MIC_DRC_PARAMS=passthrough"

"sof-hda-generic\;sof-hda-efx-mbdrc-generic-2ch\;\
HDA_CONFIG=efx,NUM_DMICS=2,\
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,\
EFX_DRC_COMPONENT=multiband,EFX_MBDRC_PARAMS=passthrough"
HDA_CONFIG=efx,NUM_DMICS=2,EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,\
EFX_DRC_COMPONENT=multiband,EFX_MBDRC_PARAMS=passthrough,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-hda-efx-mbdrc-generic-4ch\;\
HDA_CONFIG=efx,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,\
EFX_DRC_COMPONENT=multiband,EFX_MBDRC_PARAMS=passthrough"
HDA_CONFIG=efx,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,EFX_FIR_PARAMS=passthrough,\
EFX_IIR_PARAMS=passthrough,EFX_DRC_COMPONENT=multiband,EFX_MBDRC_PARAMS=passthrough,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
DMIC0_PCM_CHANNELS=4"

"sof-hda-generic\;sof-hda-efx-mbdrc-generic-4to2ch\;\
HDA_CONFIG=efx,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,EFX_FIR_PARAMS=passthrough,\
EFX_IIR_PARAMS=passthrough,EFX_DRC_COMPONENT=multiband,EFX_MBDRC_PARAMS=passthrough,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_generic_pm10deg,\
EFX_DMIC0_DRC_PARAMS=dmic_default,DMIC0_PCM_CHANNELS=2"

# With 16 kHz DMIC1
"sof-hda-generic\;sof-hda-generic-cavs25-4ch-48k-16k\;HDA_CONFIG=mix,\
Expand Down
4 changes: 4 additions & 0 deletions tools/topology/topology2/platform/intel/dmic-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ Define {
DMIC0_RATE 48000
DMIC1_RATE 16000
DMIC1_ENABLE "false"

# TDFB and DRC pipeline
DMIC0_ENHANCED_CAPTURE "false"
DMIC0_PCM_CHANNELS 2
}
Loading

0 comments on commit 450a841

Please sign in to comment.