Skip to content

Commit

Permalink
topology2: hda: share deep buffer conf setting
Browse files Browse the repository at this point in the history
Deep buffer is mixed with HDA analog.

Signed-off-by: Rander Wang <rander.wang@intel.com>
  • Loading branch information
RanderWang authored and lgirdwood committed Dec 5, 2022
1 parent c4f6b3d commit 8818e50
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 41 deletions.
9 changes: 5 additions & 4 deletions tools/topology/topology2/avs-tplg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
set(TPLGS
# CAVS HDMI only topology with passthrough pipelines
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true"
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true"
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
# topologies below.
"sof-hda-generic\;sof-hda-generic-2ch\;\
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,USE_CHAIN_DMA=true"
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,USE_CHAIN_DMA=true,\
DEEPBUFFER_FW_DMA_MS=100"
"sof-hda-generic\;sof-hda-generic-4ch\;\
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,USE_CHAIN_DMA=true"
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
# CAVS SDW topology with passthrough pipelines
"cavs-sdw\;cavs-sdw\;DEEPBUFFER_FW_DMA_MS=100"

Expand Down
46 changes: 13 additions & 33 deletions tools/topology/topology2/cavs-mixin-mixout-hda.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
Define {
ANALOG_PLAYBACK_PCM 'Analog Playback'
ANALOG_CAPTURE_PCM 'Analog Capture'
HDA_ANALOG_DAI_NAME 'Analog Playback and Capture'
ANALOG_PLAYBACK_PCM 'Analog Playback'
ANALOG_CAPTURE_PCM 'Analog Capture'
HDA_ANALOG_DAI_NAME 'Analog Playback and Capture'
DEEP_BUFFER_PIPELINE_ID 15
DEEP_BUFFER_PCM_ID 31
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
DEEP_BUFFER_PIPELINE_SINK 'mixout.2.1'
DEEP_BUFFER_PCM_NAME 'Deepbuffer HDA Analog'
}

# include deep buffer config if buffer size is in 1 - 1000 ms.
IncludeByKey.DEEPBUFFER_FW_DMA_MS{
"[1-1000]" "platform/intel/deep-buffer.conf"
}

Object.Dai {
Expand Down Expand Up @@ -43,20 +53,6 @@ Object.Pipeline {
}
}

deepbuffer-playback.0 {
index 5

Object.Widget.copier.1 {
stream_name 'Analog Deepbuffer Playback'
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name '5 3nd Playback Volume'
}
}
}

passthrough-capture.1 {
index 3
Object.Widget.copier.1 {
Expand Down Expand Up @@ -99,18 +95,6 @@ Object.PCM {
}
direction duplex
}

pcm.1 {
id 1
name 'DeepBuffer'
Object.Base.fe_dai.'DeepBuffer' {}
Object.PCM.pcm_caps.playback {
name 'Analog Deepbuffer Playback'
formats 'S32_LE,S24_LE,S16_LE'
}
direction playback
}

}

# top-level pipeline connections
Expand All @@ -127,8 +111,4 @@ Object.Base {
source 'copier.HDA.4.1'
sink 'copier.host.3.1'
}
route.4 {
source 'mixin.5.1'
sink 'mixout.2.1'
}
}
10 changes: 6 additions & 4 deletions tools/topology/topology2/sof-ace-tplg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
set(TPLGS
# HDMI only topology with passthrough pipelines
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true"
"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
# HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true"
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100"
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
# topologies below.
"sof-hda-generic\;sof-hda-generic-4ch\;PLATFORM=mtl,\
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"
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,DEEPBUFFER_FW_DMA_MS=100"
"sof-hda-generic\;sof-hda-generic-2ch\;PLATFORM=mtl,\
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin"
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,\
DEEPBUFFER_FW_DMA_MS=100"

# SDW topology with passthrough pipelines
"cavs-sdw\;mtl-sdw"
Expand Down

0 comments on commit 8818e50

Please sign in to comment.