Skip to content

Commit

Permalink
topology2: add google rtc aec support
Browse files Browse the repository at this point in the history
Add google rtc aec in topolog for chrome project

Signed-off-by: Rander Wang <rander.wang@intel.com>
  • Loading branch information
RanderWang authored and cujomalainey committed May 11, 2023
1 parent 9124088 commit 406e660
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 74 deletions.
86 changes: 13 additions & 73 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<dai-copier-be.conf>
<dai-copier-eqiir-module-copier-capture.conf>
<gain-capture.conf>
<gain-module-copier.conf>
<google-rtc-aec-capture.conf>
<data.conf>
<pcm.conf>
<pcm_caps.conf>
Expand All @@ -41,6 +43,10 @@
<hdmi-default.conf>
<bt-default.conf>
<bt-generic.conf>
<input_pin_binding.conf>
<output_pin_binding.conf>
<input_audio_format.conf>
<output_audio_format.conf>

Define {
MCLK 24576000
Expand Down Expand Up @@ -91,6 +97,8 @@ Define {
BT_PB_HOST_PIPELINE_SINK "copier.SSP.10.1"
BT_PB_DAI_PIPELINE_SRC "copier.host.9.1"
BT_PB_PIPELINE_STREAM_NAME "copier.SSP.10.1"
GOOGLE_RTC_AEC_SUPPORT 0
GOOGLE_RTC_AEC_REF_SOURCE 'module-copier.8.2'
}

# override defaults with platform-specific config
Expand All @@ -117,6 +125,11 @@ IncludeByKey.INCLUDE_ECHO_REF {
"true" "platform/intel/speaker-echo-ref.conf"
}

# enable GOOGLE RTC AEC if needed
IncludeByKey.GOOGLE_RTC_AEC_SUPPORT {
"[1]" "platform/intel/google-rtc-aec-reference.conf"
}

#
# List of all DAIs
#
Expand Down Expand Up @@ -279,61 +292,6 @@ Object.Pipeline {
}
}
]

gain-capture [
{
format $FORMAT
index 16

Object.Widget.pipeline.1 {
stream_name "DMIC Raw"
}
Object.Widget.copier.1 {
stream_name "DMIC Raw"
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_QUATRO
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_QUATRO
out_ch_map $CHANNEL_MAP_3_POINT_1
}
}
Object.Widget.gain.1 {
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_QUATRO
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_QUATRO
out_ch_map $CHANNEL_MAP_3_POINT_1
}
Object.Control.mixer.1 {
name 'Capture Raw Volume 1'
}
}
}
]
}

Object.PCM.pcm [
Expand Down Expand Up @@ -370,20 +328,6 @@ Object.PCM.pcm [
formats 'S16_LE,S24_LE,S32_LE'
}
}
{
name "DMIC Raw"
id 18
direction "capture"
Object.Base.fe_dai."DMIC Raw" {}

Object.PCM.pcm_caps."capture" {
name "DMIC Raw"
# only 32-bit capture supported now
formats 'S32_LE'
channels_min $NUM_DMICS
channels_max $NUM_DMICS
}
}
]

Object.Base.route [
Expand All @@ -407,8 +351,4 @@ Object.Base.route [
source "copier.SSP.6.1"
sink "copier.host.5.1"
}
{
source "module-copier.14.2"
sink "gain.16.1"
}
]
3 changes: 2 additions & 1 deletion tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ NUM_HDMIS=0,SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC
"cavs-rt5682\;sof-mtl-max98357a-rt5682\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\
PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\
NHLT_BIN=nhlt-sof-mtl-max98357a-rt5682.bin,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\
BT_NAME=SSP2-BT,BT_ID=8,BT_PCM_NAME=Bluetooth,USE_CHAIN_DMA=true,DEEPBUFFER_D0I3_COMPATIBLE=true"
BT_NAME=SSP2-BT,BT_ID=8,BT_PCM_NAME=Bluetooth,USE_CHAIN_DMA=true,DEEPBUFFER_D0I3_COMPATIBLE=true,\
GOOGLE_RTC_AEC_SUPPORT=1"

"cavs-rt5682\;sof-mtl-max98357a-rt5682-ssp2-ssp0\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\
PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\
Expand Down

0 comments on commit 406e660

Please sign in to comment.