Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions tools/topology/topology2/cavs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,31 @@
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
set(TPLGS
# CAVS HDMI only topology with passthrough pipelines
"cavs-passthrough-hdmi\;cavs-passthrough-hdmi"
"cavs-passthrough-hdmi\;cavs-passthrough-hdmi\;HDMI_CONFIG=chaindma"
# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda\;HDA_CONFIG=mix"
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda\;HDA_CONFIG=mix,HDMI_CONFIG=chaindma"
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
# topologies below.
# CNL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-2ch-cnl\;\
HDA_CONFIG=mix,NUM_DMICS=2,PLATFORM=cnl,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin"
HDA_CONFIG=mix,NUM_DMICS=2,PLATFORM=cnl,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,\
HDMI_CONFIG=chaindma"
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-cnl\;\
HDA_CONFIG=mix,NUM_DMICS=4,PLATFORM=cnl,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin"
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,HDMI_CONFIG=chaindma"
# TGL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-tgl\;\
HDA_CONFIG=mix,HDMI_CONFIG=chaindma,PLATFORM=tgl"
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-2ch-tgl\;\
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin"
HDA_CONFIG=mix,NUM_DMICS=2,PLATFORM=tgl,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,\
HDMI_CONFIG=chaindma"
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-tgl\;\
HDA_CONFIG=mix,NUM_DMICS=4,PLATFORM=cnl,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin"
HDA_CONFIG=mix,NUM_DMICS=4,PLATFORM=tgl,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin,HDMI_CONFIG=chaindma"
# MTL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-mtl\;PLATFORM=mtl,\
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"
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,HDMI_CONFIG=chaindma"

# CAVS SDW topology with passthrough pipelines
"cavs-sdw\;cavs-sdw"
Expand Down
9 changes: 7 additions & 2 deletions tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<mixout-gain-host-copier-capture.conf>
<deepbuffer-playback.conf>
<passthrough-be.conf>
<chain-dma-playback.conf>
<data.conf>
<pcm.conf>
<pcm_caps.conf>
Expand All @@ -34,6 +35,7 @@ Define {
HDA_CONFIG "none"
PLATFORM "none"
NUM_DMICS 0
HDMI_CONFIG "generic"
}

# override defaults with platform-specific config
Expand All @@ -59,8 +61,11 @@ Define {
HDMI3_ID 3
}

# always include HDMI config
<hdmi-generic.conf>
# include HDMI config
IncludeByKey.HDMI_CONFIG {
"generic" "platform/intel/hdmi-generic.conf"
"chaindma" "platform/intel/hdmi-chain-dma.conf"
}

Object.Widget.virtual {
codec0_in {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Object.Dai {
HDA.7 {
name iDisp4
id $HDMI4_ID
default_hw_conf_id 3
Object.Base.hw_config.HDA6 {}
direction playback
}
}
Object.Pipeline {
chain-dma-playback.23 {
Object.Widget.copier.1 {
stream_name $HDMI1_PCM_CAPS
}
Object.Widget.copier.2 {
stream_name $HDMI4_PCM_CAPS
}

index $HDMI4_HOST_PIPELINE_ID
}
}
Object.PCM {
pcm.8 {
name HDMI4
id 8
Object.Base.fe_dai.HDMI4 {}
Object.PCM.pcm_caps.playback {
name $HDMI4_PCM_CAPS
formats 'S32_LE,S24_LE,S16_LE'
}
direction playback
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Object.Dai {
HDA.4 {
name iDisp1
id $HDMI1_ID
default_hw_conf_id 1
Object.Base.hw_config.HDA4 {}
direction playback
}
HDA.5 {
name iDisp2
id $HDMI2_ID
default_hw_conf_id 2
Object.Base.hw_config.HDA5 {}
direction playback
}
HDA.6 {
name iDisp3
id $HDMI3_ID
default_hw_conf_id 3
Object.Base.hw_config.HDA6 {}
direction playback
}
}
Object.Pipeline {
chain-dma-playback.20 {
Object.Widget.copier.1 {
stream_name $HDMI1_PCM_CAPS
}
Object.Widget.copier.2 {
stream_name "iDisp1"
}

index $HDMI1_HOST_PIPELINE_ID
}
chain-dma-playback.21 {
Object.Widget.copier.1 {
stream_name $HDMI2_PCM_CAPS
}

Object.Widget.copier.2 {
stream_name "iDisp2"
}

index $HDMI2_HOST_PIPELINE_ID
}
chain-dma-playback.22 {
Object.Widget.copier.1 {
stream_name $HDMI3_PCM_CAPS
}
Object.Widget.copier.2 {
stream_name "iDisp3"
}

index $HDMI3_HOST_PIPELINE_ID
}
}
Object.PCM {
pcm.5 {
name HDMI1
id 5
Object.Base.fe_dai.HDMI1 {}
Object.PCM.pcm_caps.playback {
name $HDMI1_PCM_CAPS
formats 'S32_LE,S24_LE,S16_LE'
}
direction playback
}
pcm.6 {
name HDMI2
id 6
Object.Base.fe_dai.HDMI2 {}
Object.PCM.pcm_caps.playback {
name $HDMI2_PCM_CAPS
formats 'S32_LE,S24_LE,S16_LE'
}
direction playback
}
pcm.7 {
name HDMI3
id 7
Object.Base.fe_dai.HDMI3 {}
Object.PCM.pcm_caps.playback {
name $HDMI3_PCM_CAPS
formats 'S32_LE,S24_LE,S16_LE'
}
direction playback
}
}

# include 4th HDMI config if needed.
IncludeByKey.NUM_HDMIS {
"4" "platform/intel/hdmi-chain-dma-4th.conf"
}

1 change: 1 addition & 0 deletions tools/topology/topology2/include/common/tokens.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Object.Base.VendorToken {
dynamic_pipeline 206
# ABI 4.0 onwards
lp_mode 207
use_chain_dma 209
}

"sof_tkn_intel_ssp" {
Expand Down
12 changes: 12 additions & 0 deletions tools/topology/topology2/include/components/pipeline.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ Class.Widget."pipeline" {
}
}

# Skip setting up the pipeline in the DSP in the case of chained DMA mode
DefineAttribute."use_chain_dma" {
type "string"
token_ref "sof_tkn_scheduler.bool"
constraints {
!valid_values [
"true"
"false"
]
}
}

attributes {
# pipeline widget name will be constructed as pipeline.1, pipeline.2 etc
!constructor [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#
# CAVS chained DMA playback pipeline
#
# A chain DMA pipeline. All attributes defined herein are namespaced
# by alsatplg to "Object.Pipeline.passthrough-playback.N.attribute_name"
#
# Usage: chain-dma-playback pipeline object can be instantiated as:
#
# Object.Pipeline.chain-dma-playback."N" {}
#
# Where N is the unique instance ID within the same alsaconf node.
#

<include/components/copier.conf>
<include/components/pipeline.conf>
<include/common/audio_format.conf>

Class.Pipeline."chain-dma-playback" {

DefineAttribute."index" {}

<include/pipelines/pipeline-common.conf>

attributes {
!constructor [
"index"
]

!immutable [
"direction"
]

#
# passthrough-playback objects instantiated within the same alsaconf node must have
# unique pipeline_id attribute
#
unique "instance"
}

Object.Widget {
copier."1" {
copier_type "host"
node_type $HDA_HOST_OUTPUT_CLASS
type "aif_in"
num_audio_formats 1
# 1 audio format added for driver compatibility during topology parsing.
Object.Base.audio_format.1 {}
}
copier."2" {
type dai_in
dai_type "HDA"
copier_type "HDA"
node_type $HDA_LINK_OUTPUT_CLASS
num_audio_formats 1
# 1 audio format added for driver compatibility during topology parsing.
Object.Base.audio_format.1 {}
}

pipeline."1" {
use_chain_dma "true"
}
}

Object.Base {
route."1" {
source "copier.host..1"
sink "copier.HDA..2"
}
}

direction "playback"
dynamic_pipeline 1
}
11 changes: 11 additions & 0 deletions tools/topology/topology2/include/pipelines/pipeline-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,14 @@ DefineAttribute."time_domain" {

# flag to indicate if the pipeline is dynamic
DefineAttribute."dynamic_pipeline" {}

# Skip setting up the pipeline in the DSP in the case of chained DMA mode
DefineAttribute."use_chain_dma" {
type "string"
constraints {
!valid_values [
"true"
"false"
]
}
}