Skip to content

Commit a0a365a

Browse files
committed
topology2: hda: share deep buffer conf setting
Deep buffer is mixed with HDA analog. Signed-off-by: Rander Wang <rander.wang@intel.com>
1 parent 6e10ea9 commit a0a365a

File tree

3 files changed

+24
-41
lines changed

3 files changed

+24
-41
lines changed

tools/topology/topology2/avs-tplg/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
44
set(TPLGS
55
# CAVS HDMI only topology with passthrough pipelines
6-
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true"
6+
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
77
# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
8-
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true"
8+
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
99
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
1010
# topologies below.
1111
"sof-hda-generic\;sof-hda-generic-2ch\;\
12-
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,USE_CHAIN_DMA=true"
12+
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,USE_CHAIN_DMA=true,\
13+
DEEPBUFFER_FW_DMA_MS=100"
1314
"sof-hda-generic\;sof-hda-generic-4ch\;\
1415
HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
15-
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,USE_CHAIN_DMA=true"
16+
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
1617
# CAVS SDW topology with passthrough pipelines
1718
"cavs-sdw\;cavs-sdw\;DEEPBUFFER_FW_DMA_MS=100"
1819

tools/topology/topology2/cavs-mixin-mixout-hda.conf

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
Define {
2-
ANALOG_PLAYBACK_PCM 'Analog Playback'
3-
ANALOG_CAPTURE_PCM 'Analog Capture'
4-
HDA_ANALOG_DAI_NAME 'Analog Playback and Capture'
2+
ANALOG_PLAYBACK_PCM 'Analog Playback'
3+
ANALOG_CAPTURE_PCM 'Analog Capture'
4+
HDA_ANALOG_DAI_NAME 'Analog Playback and Capture'
5+
DEEP_BUFFER_PIPELINE_ID 15
6+
DEEP_BUFFER_PCM_ID 31
7+
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
8+
DEEP_BUFFER_PIPELINE_SINK 'mixout.2.1'
9+
DEEP_BUFFER_PCM_NAME 'Deepbuffer HDA Analog'
10+
}
11+
12+
# include deep buffer config if buffer size is in 1 - 1000 ms.
13+
IncludeByKey.DEEPBUFFER_FW_DMA_MS{
14+
"[1-1000]" "platform/intel/deep-buffer.conf"
515
}
616

717
Object.Dai {
@@ -43,20 +53,6 @@ Object.Pipeline {
4353
}
4454
}
4555

46-
deepbuffer-playback.0 {
47-
index 5
48-
49-
Object.Widget.copier.1 {
50-
stream_name 'Analog Deepbuffer Playback'
51-
}
52-
53-
Object.Widget.gain.1 {
54-
Object.Control.mixer.1 {
55-
name '5 3nd Playback Volume'
56-
}
57-
}
58-
}
59-
6056
passthrough-capture.1 {
6157
index 3
6258
Object.Widget.copier.1 {
@@ -99,18 +95,6 @@ Object.PCM {
9995
}
10096
direction duplex
10197
}
102-
103-
pcm.1 {
104-
id 1
105-
name 'DeepBuffer'
106-
Object.Base.fe_dai.'DeepBuffer' {}
107-
Object.PCM.pcm_caps.playback {
108-
name 'Analog Deepbuffer Playback'
109-
formats 'S32_LE,S24_LE,S16_LE'
110-
}
111-
direction playback
112-
}
113-
11498
}
11599

116100
# top-level pipeline connections
@@ -127,8 +111,4 @@ Object.Base {
127111
source 'copier.HDA.4.1'
128112
sink 'copier.host.3.1'
129113
}
130-
route.4 {
131-
source 'mixin.5.1'
132-
sink 'mixout.2.1'
133-
}
134114
}

tools/topology/topology2/sof-ace-tplg/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
44
set(TPLGS
55
# HDMI only topology with passthrough pipelines
6-
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true"
6+
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
77
# HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
8-
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true"
8+
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
99
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
1010
# topologies below.
1111
"sof-hda-generic\;sof-hda-generic-4ch\;PLATFORM=mtl,\
12-
HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin"
12+
HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,\
13+
NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,DEEPBUFFER_FW_DMA_MS=100"
1314
"sof-hda-generic\;sof-hda-generic-2ch\;PLATFORM=mtl,\
14-
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin"
15+
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,\
16+
DEEPBUFFER_FW_DMA_MS=100"
1517

1618
# SDW topology with passthrough pipelines
1719
"cavs-sdw\;mtl-sdw"

0 commit comments

Comments
 (0)