Skip to content

Commit 406e660

Browse files
RanderWangcujomalainey
authored andcommitted
topology2: add google rtc aec support
Add google rtc aec in topolog for chrome project Signed-off-by: Rander Wang <[email protected]>
1 parent 9124088 commit 406e660

File tree

2 files changed

+15
-74
lines changed

2 files changed

+15
-74
lines changed

tools/topology/topology2/cavs-rt5682.conf

Lines changed: 13 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<dai-copier-be.conf>
2222
<dai-copier-eqiir-module-copier-capture.conf>
2323
<gain-capture.conf>
24+
<gain-module-copier.conf>
25+
<google-rtc-aec-capture.conf>
2426
<data.conf>
2527
<pcm.conf>
2628
<pcm_caps.conf>
@@ -41,6 +43,10 @@
4143
<hdmi-default.conf>
4244
<bt-default.conf>
4345
<bt-generic.conf>
46+
<input_pin_binding.conf>
47+
<output_pin_binding.conf>
48+
<input_audio_format.conf>
49+
<output_audio_format.conf>
4450

4551
Define {
4652
MCLK 24576000
@@ -91,6 +97,8 @@ Define {
9197
BT_PB_HOST_PIPELINE_SINK "copier.SSP.10.1"
9298
BT_PB_DAI_PIPELINE_SRC "copier.host.9.1"
9399
BT_PB_PIPELINE_STREAM_NAME "copier.SSP.10.1"
100+
GOOGLE_RTC_AEC_SUPPORT 0
101+
GOOGLE_RTC_AEC_REF_SOURCE 'module-copier.8.2'
94102
}
95103

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

128+
# enable GOOGLE RTC AEC if needed
129+
IncludeByKey.GOOGLE_RTC_AEC_SUPPORT {
130+
"[1]" "platform/intel/google-rtc-aec-reference.conf"
131+
}
132+
120133
#
121134
# List of all DAIs
122135
#
@@ -279,61 +292,6 @@ Object.Pipeline {
279292
}
280293
}
281294
]
282-
283-
gain-capture [
284-
{
285-
format $FORMAT
286-
index 16
287-
288-
Object.Widget.pipeline.1 {
289-
stream_name "DMIC Raw"
290-
}
291-
Object.Widget.copier.1 {
292-
stream_name "DMIC Raw"
293-
Object.Base.audio_format.1 {
294-
in_bit_depth 32
295-
in_valid_bit_depth 32
296-
out_bit_depth 32
297-
out_valid_bit_depth 32
298-
}
299-
Object.Base.audio_format.2 {
300-
in_channels 4
301-
in_bit_depth 32
302-
in_valid_bit_depth 32
303-
out_channels 4
304-
out_bit_depth 32
305-
out_valid_bit_depth 32
306-
in_ch_cfg $CHANNEL_CONFIG_QUATRO
307-
in_ch_map $CHANNEL_MAP_3_POINT_1
308-
out_ch_cfg $CHANNEL_CONFIG_QUATRO
309-
out_ch_map $CHANNEL_MAP_3_POINT_1
310-
}
311-
}
312-
Object.Widget.gain.1 {
313-
Object.Base.audio_format.1 {
314-
in_bit_depth 32
315-
in_valid_bit_depth 32
316-
out_bit_depth 32
317-
out_valid_bit_depth 32
318-
}
319-
Object.Base.audio_format.2 {
320-
in_channels 4
321-
in_bit_depth 32
322-
in_valid_bit_depth 32
323-
out_channels 4
324-
out_bit_depth 32
325-
out_valid_bit_depth 32
326-
in_ch_cfg $CHANNEL_CONFIG_QUATRO
327-
in_ch_map $CHANNEL_MAP_3_POINT_1
328-
out_ch_cfg $CHANNEL_CONFIG_QUATRO
329-
out_ch_map $CHANNEL_MAP_3_POINT_1
330-
}
331-
Object.Control.mixer.1 {
332-
name 'Capture Raw Volume 1'
333-
}
334-
}
335-
}
336-
]
337295
}
338296

339297
Object.PCM.pcm [
@@ -370,20 +328,6 @@ Object.PCM.pcm [
370328
formats 'S16_LE,S24_LE,S32_LE'
371329
}
372330
}
373-
{
374-
name "DMIC Raw"
375-
id 18
376-
direction "capture"
377-
Object.Base.fe_dai."DMIC Raw" {}
378-
379-
Object.PCM.pcm_caps."capture" {
380-
name "DMIC Raw"
381-
# only 32-bit capture supported now
382-
formats 'S32_LE'
383-
channels_min $NUM_DMICS
384-
channels_max $NUM_DMICS
385-
}
386-
}
387331
]
388332

389333
Object.Base.route [
@@ -407,8 +351,4 @@ Object.Base.route [
407351
source "copier.SSP.6.1"
408352
sink "copier.host.5.1"
409353
}
410-
{
411-
source "module-copier.14.2"
412-
sink "gain.16.1"
413-
}
414354
]

tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ NUM_HDMIS=0,SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC
3232
"cavs-rt5682\;sof-mtl-max98357a-rt5682\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\
3333
PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\
3434
NHLT_BIN=nhlt-sof-mtl-max98357a-rt5682.bin,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\
35-
BT_NAME=SSP2-BT,BT_ID=8,BT_PCM_NAME=Bluetooth,USE_CHAIN_DMA=true,DEEPBUFFER_D0I3_COMPATIBLE=true"
35+
BT_NAME=SSP2-BT,BT_ID=8,BT_PCM_NAME=Bluetooth,USE_CHAIN_DMA=true,DEEPBUFFER_D0I3_COMPATIBLE=true,\
36+
GOOGLE_RTC_AEC_SUPPORT=1"
3637

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

0 commit comments

Comments
 (0)