Skip to content

Commit 62e1d68

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 48f45cf commit 62e1d68

File tree

2 files changed

+18
-36
lines changed

2 files changed

+18
-36
lines changed

tools/topology/topology2/cavs/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set(TPLGS
55
# CAVS HDMI only topology with passthrough pipelines
66
"cavs-passthrough-hdmi\;cavs-passthrough-hdmi\;USE_CHAIN_DMA=true"
77
# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
8-
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda\;HDA_CONFIG=mix,USE_CHAIN_DMA=true"
8+
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda\;HDA_CONFIG=mix,USE_CHAIN_DMA=true,\
9+
DEEPBUFFER_FW_DMA_MS=100"
910
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
1011
# topologies below.
1112
# CNL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
@@ -20,10 +21,11 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,USE_CHAIN_DMA=true"
2021
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,USE_CHAIN_DMA=true"
2122
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-tgl\;\
2223
HDA_CONFIG=mix,NUM_DMICS=4,PLATFORM=cnl,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
23-
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,USE_CHAIN_DMA=true"
24+
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
2425
# MTL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
2526
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-mtl\;PLATFORM=mtl,\
26-
HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-mtl-hda-mix.bin"
27+
HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,\
28+
NHLT_BIN=nhlt-mtl-hda-mix.bin,DEEPBUFFER_FW_DMA_MS=100"
2729

2830
# CAVS SDW topology with passthrough pipelines
2931
"cavs-sdw\;cavs-sdw\;DEEPBUFFER_FW_DMA_MS=100"

tools/topology/topology2/cavs/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 13
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
}

0 commit comments

Comments
 (0)