mirror of https://github.com/thesofproject/sof.git
Tools: Topology2: Add beamformer and DRC to HDA analog capture
This patch adds to analog microphone capture pipeline TDFB beamformer and DRC for dynamic range control. The name of updated topology is sof-hda-efx-generic.tplg. Similar capture enhance is added to multi-band DRC version sof-hda-efx-mbdrc-generic.tplg. The pipeline is enabled if HDA_MIC_ENHANCED_CAPTURE is set to true in topologies build. They keys EFX_HDA_MIC_TDFB_PARAMS and EFX_HDA_MIC_DRC_PARAMS control the configurations blobs use. There is no processing applied to capture audio since the topology is built with passthrough blobs. E.g. UCM should set up processing with blobs those have effect. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
ea1e318ce6
commit
95a0ffc0d4
|
@ -1,3 +1,5 @@
|
|||
<include/components/tdfb.conf>
|
||||
|
||||
Define {
|
||||
ANALOG_PLAYBACK_PCM 'Analog Playback'
|
||||
ANALOG_CAPTURE_PCM 'Analog Capture'
|
||||
|
@ -9,6 +11,7 @@ Define {
|
|||
DEEP_BUFFER_PCM_NAME 'Deepbuffer HDA Analog'
|
||||
HDA_ANALOG_CAPTURE_RATE 48000
|
||||
HDA_ANALOG_PLAYBACK_RATE 48000
|
||||
HDA_MIC_ENHANCED_CAPTURE 'false'
|
||||
}
|
||||
|
||||
# include deep buffer config if buffer size is in 1 - 1000 ms.
|
||||
|
@ -134,6 +137,32 @@ Object.Pipeline {
|
|||
Object.Widget.host-copier.1 {
|
||||
stream_name $ANALOG_CAPTURE_PCM
|
||||
pcm_id 0
|
||||
num_input_audio_formats 1
|
||||
Object.Base.input_audio_format [
|
||||
{
|
||||
in_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
in_bit_depth 32
|
||||
in_valid_bit_depth 32
|
||||
}
|
||||
]
|
||||
num_output_audio_formats 3
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
out_bit_depth 16
|
||||
out_valid_bit_depth 16
|
||||
}
|
||||
{
|
||||
out_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 24
|
||||
}
|
||||
{
|
||||
out_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 32
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -210,6 +239,91 @@ Object.Pipeline {
|
|||
}
|
||||
]
|
||||
}
|
||||
|
||||
IncludeByKey.HDA_MIC_ENHANCED_CAPTURE {
|
||||
"true" {
|
||||
Object.Widget.tdfb.1 {
|
||||
index 3
|
||||
Object.Control {
|
||||
bytes."1" {
|
||||
name 'Analog Capture TDFB bytes'
|
||||
max 16384
|
||||
IncludeByKey.EFX_HDA_MIC_TDFB_PARAMS {
|
||||
"line2_pass" "include/components/tdfb/line2_pass.conf"
|
||||
"line2_generic_pm10deg" "include/components/tdfb/line2_generic_pm10deg_48khz.conf"
|
||||
"line2_50mm" "include/components/tdfb/line2_50mm_pm0_30_90deg_48khz.conf"
|
||||
"line2_68mm" "include/components/tdfb/line2_68mm_pm0_30_90deg_48khz.conf"
|
||||
"line2_74mm" "include/components/tdfb/line2_74mm_pm0_30_90deg_48khz.conf"
|
||||
}
|
||||
}
|
||||
mixer."1" {
|
||||
name 'Analog Capture TDFB beam switch'
|
||||
}
|
||||
enum."1" {
|
||||
name 'Analog Capture TDFB angle set enum'
|
||||
}
|
||||
# Tracking is disabled from this topology, causes high MCPS
|
||||
#mixer."2" {
|
||||
# name 'Analog Capture TDFB track switch'
|
||||
#}
|
||||
#enum."2" {
|
||||
# name 'Analog Capture TDFB angle estimate enum'
|
||||
#}
|
||||
}
|
||||
num_input_audio_formats 1
|
||||
Object.Base.input_audio_format [
|
||||
{
|
||||
in_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
in_channels 2
|
||||
in_bit_depth 32
|
||||
in_valid_bit_depth 32
|
||||
}
|
||||
]
|
||||
num_output_audio_formats 1
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_channels 2
|
||||
out_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 32
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Object.Widget.drc.1 {
|
||||
index 3
|
||||
Object.Control {
|
||||
bytes."1" {
|
||||
name 'Analog Capture DRC bytes'
|
||||
IncludeByKey.EFX_HDA_MIC_DRC_PARAMS {
|
||||
"passthrough" "include/components/drc/passthrough.conf"
|
||||
"amic_default" "include/components/drc/amic_default.conf"
|
||||
}
|
||||
}
|
||||
mixer."1" {
|
||||
name 'Analog Capture DRC switch'
|
||||
}
|
||||
}
|
||||
num_input_audio_formats 1
|
||||
Object.Base.input_audio_format [
|
||||
{
|
||||
in_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
in_bit_depth 32
|
||||
in_valid_bit_depth 32
|
||||
}
|
||||
]
|
||||
num_output_audio_formats 1
|
||||
Object.Base.output_audio_format [
|
||||
{
|
||||
out_rate $HDA_ANALOG_CAPTURE_RATE
|
||||
out_bit_depth 32
|
||||
out_valid_bit_depth 32
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Object.PCM.pcm [
|
||||
{
|
||||
id 0
|
||||
|
@ -232,41 +346,65 @@ Object.PCM.pcm [
|
|||
]
|
||||
|
||||
# top-level pipeline connections
|
||||
|
||||
IncludeByKey.EFX_DRC_COMPONENT {
|
||||
"singleband" {
|
||||
Object.Base.route [
|
||||
{
|
||||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
|
||||
source 'drc.2.1'
|
||||
source 'host-copier.0.playback'
|
||||
sink 'gain.1.1'
|
||||
}
|
||||
{
|
||||
source 'mixin.1.1'
|
||||
sink 'mixout.2.1'
|
||||
}
|
||||
{
|
||||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
|
||||
sink 'eqiir.4.1'
|
||||
}
|
||||
{
|
||||
source 'module-copier.4.2'
|
||||
sink 'host-copier.0.capture'
|
||||
}
|
||||
{
|
||||
source 'host-copier.0.playback'
|
||||
sink 'gain.1.1'
|
||||
source 'drc.2.1'
|
||||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
|
||||
}
|
||||
]
|
||||
}
|
||||
"multiband" {
|
||||
Object.Base.route [
|
||||
{
|
||||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
|
||||
source 'multiband_drc.2.1'
|
||||
source 'host-copier.0.playback'
|
||||
sink 'gain.1.1'
|
||||
}
|
||||
{
|
||||
source 'mixin.1.1'
|
||||
sink 'mixout.2.1'
|
||||
}
|
||||
{
|
||||
source 'multiband_drc.2.1'
|
||||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
IncludeByKey.HDA_MIC_ENHANCED_CAPTURE {
|
||||
"true" {
|
||||
Object.Base.route [
|
||||
{
|
||||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
|
||||
sink 'eqiir.4.1'
|
||||
}
|
||||
{
|
||||
source 'module-copier.4.2'
|
||||
sink 'tdfb.3.1'
|
||||
}
|
||||
{
|
||||
source 'tdfb.3.1'
|
||||
sink 'drc.3.1'
|
||||
}
|
||||
{
|
||||
source 'drc.3.1'
|
||||
sink 'host-copier.0.capture'
|
||||
}
|
||||
]
|
||||
}
|
||||
"false" {
|
||||
Object.Base.route [
|
||||
{
|
||||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
|
||||
sink 'eqiir.4.1'
|
||||
|
@ -275,10 +413,7 @@ IncludeByKey.EFX_DRC_COMPONENT {
|
|||
source 'module-copier.4.2'
|
||||
sink 'host-copier.0.capture'
|
||||
}
|
||||
{
|
||||
source 'host-copier.0.playback'
|
||||
sink 'gain.1.1'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -56,8 +56,9 @@ NHLT_BIN=nhlt-sof-lnl-nocodec-fpga-4ch.bin,PASSTHROUGH=true,DMIC_IO_CLK=19200000
|
|||
"cavs-sdw\;sof-lnl-fpga-rt711-l0\;PLATFORM=lnl,NUM_HDMIS=0,PASSTHROUGH=true"
|
||||
|
||||
# CAVS HDA topology with mixer-based efx eq pipelines for HDA and passthrough pipelines for HDMI
|
||||
"sof-hda-generic\;sof-hda-efx-generic\;HDA_CONFIG=efx,\
|
||||
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,EFX_DRC_PARAMS=passthrough"
|
||||
"sof-hda-generic\;sof-hda-efx-generic\;HDA_CONFIG=efx,HDA_MIC_ENHANCED_CAPTURE=true,\
|
||||
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,EFX_DRC_PARAMS=passthrough,\
|
||||
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,\
|
||||
|
@ -69,9 +70,9 @@ 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"
|
||||
|
||||
"sof-hda-generic\;sof-hda-efx-mbdrc-generic\;HDA_CONFIG=efx,\
|
||||
EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,\
|
||||
EFX_DRC_COMPONENT=multiband,EFX_MBDRC_PARAMS=passthrough"
|
||||
"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,\
|
||||
|
|
Loading…
Reference in New Issue