diff --git a/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf b/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf index ef12e3a519a5..779f020fe740 100644 --- a/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf +++ b/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf @@ -14,8 +14,8 @@ IncludeByKey.DEEPBUFFER_FW_DMA_MS{ "[1-1000]" "platform/intel/deep-buffer.conf" } -Object.Dai { - HDA.0 { +Object.Dai.HDA [ + { name $HDA_ANALOG_DAI_NAME dai_index 0 id 4 @@ -25,76 +25,85 @@ Object.Dai { } direction duplex } -} +] + Object.Pipeline { - mixout-gain-efx-dai-copier-playback.0 { - index 2 + mixout-gain-efx-dai-copier-playback [ + { + index 2 - Object.Widget.copier.1 { - stream_name $HDA_ANALOG_DAI_NAME - dai_type "HDA" - copier_type "HDA" - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '2 Main Playback Volume' + Object.Widget.copier.1 { + stream_name $HDA_ANALOG_DAI_NAME + dai_type "HDA" + copier_type "HDA" } - } - Object.Widget.eqiir.1 { - Object.Control.bytes."1" { - name '2 Main playback Iir Eq' + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '2 Main Playback Volume' + } } - } - Object.Widget.eqfir.1 { - Object.Control.bytes."1" { - name '2 Main playback Fir Eq' + Object.Widget.eqiir.1 { + Object.Control.bytes."1" { + name '2 Main playback Iir Eq' + } + } + Object.Widget.eqfir.1 { + Object.Control.bytes."1" { + name '2 Main playback Fir Eq' + } } } - } + ] - host-copier-gain-mixin-playback.0 { - index 1 + host-copier-gain-mixin-playback [ + { + index 1 - Object.Widget.copier.1 { - stream_name $ANALOG_PLAYBACK_PCM - } + Object.Widget.copier.1 { + stream_name $ANALOG_PLAYBACK_PCM + } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '1 2nd Playback Volume' + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '1 2nd Playback Volume' + } } } - } + ] - passthrough-capture.1 { - index 3 - Object.Widget.copier.1 { - stream_name $ANALOG_CAPTURE_PCM + passthrough-capture [ + { + index 3 + Object.Widget.copier.1 { + stream_name $ANALOG_CAPTURE_PCM + } } - } + ] - passthrough-be.1 { - index 4 - direction capture + passthrough-be [ + { + index 4 + direction capture - Object.Widget.copier."1" { - dai_type "HDA" - type "dai_out" - copier_type "HDA" - stream_name $HDA_ANALOG_DAI_NAME - node_type $HDA_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + Object.Widget.copier."1" { + dai_type "HDA" + type "dai_out" + copier_type "HDA" + stream_name $HDA_ANALOG_DAI_NAME + node_type $HDA_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } } } - } + ] } -Object.PCM { - pcm.0 { +Object.PCM.pcm [ + { id 0 name 'HDA Analog' Object.Base.fe_dai.1 { @@ -112,20 +121,20 @@ Object.PCM { } direction duplex } -} +] # top-level pipeline connections -Object.Base { - route.1 { +Object.Base.route [ + { sink 'copier.HDA.2.1' source 'eqfir.2.1' } - route.2 { + { source 'mixin.1.1' sink 'mixout.2.1' } - route.3 { + { source 'copier.HDA.4.1' sink 'copier.host.3.1' } -} +] diff --git a/tools/topology/topology2/cavs-mixin-mixout-hda.conf b/tools/topology/topology2/cavs-mixin-mixout-hda.conf index 43d91d501a6c..680335420ec0 100644 --- a/tools/topology/topology2/cavs-mixin-mixout-hda.conf +++ b/tools/topology/topology2/cavs-mixin-mixout-hda.conf @@ -14,8 +14,8 @@ IncludeByKey.DEEPBUFFER_FW_DMA_MS{ "[1-1000]" "platform/intel/deep-buffer.conf" } -Object.Dai { - HDA.0 { +Object.Dai.HDA [ + { name $HDA_ANALOG_DAI_NAME dai_index 0 id 4 @@ -25,66 +25,75 @@ Object.Dai { } direction duplex } -} +] + Object.Pipeline { - mixout-gain-dai-copier-playback.0 { - index 2 + mixout-gain-dai-copier-playback [ + { + index 2 - Object.Widget.copier.1 { - stream_name $HDA_ANALOG_DAI_NAME - dai_type "HDA" - copier_type "HDA" - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '2 Main Playback Volume' + Object.Widget.copier.1 { + stream_name $HDA_ANALOG_DAI_NAME + dai_type "HDA" + copier_type "HDA" + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '2 Main Playback Volume' + } } } - } + ] - host-copier-gain-mixin-playback.0 { - index 1 + host-copier-gain-mixin-playback [ + { + index 1 - Object.Widget.copier.1 { - stream_name $ANALOG_PLAYBACK_PCM - } + Object.Widget.copier.1 { + stream_name $ANALOG_PLAYBACK_PCM + } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '1 2nd Playback Volume' + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '1 2nd Playback Volume' + } } } - } + ] - passthrough-capture.1 { - index 3 - Object.Widget.copier.1 { - stream_name $ANALOG_CAPTURE_PCM + passthrough-capture [ + { + index 3 + Object.Widget.copier.1 { + stream_name $ANALOG_CAPTURE_PCM + } } - } + ] - passthrough-capture-be.1 { - index 4 - direction capture + passthrough-capture-be [ + { + index 4 + direction capture - Object.Widget.copier."1" { - dai_type "HDA" - type "dai_out" - copier_type "HDA" - stream_name $HDA_ANALOG_DAI_NAME - node_type $HDA_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + Object.Widget.copier."1" { + dai_type "HDA" + type "dai_out" + copier_type "HDA" + stream_name $HDA_ANALOG_DAI_NAME + node_type $HDA_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } } } - } + ] } -Object.PCM { - pcm.0 { +Object.PCM.pcm [ + { id 0 name 'HDA Analog' Object.Base.fe_dai.1 { @@ -102,20 +111,20 @@ Object.PCM { } direction duplex } -} +] # top-level pipeline connections -Object.Base { - route.1 { +Object.Base.route [ + { sink 'copier.HDA.2.1' source 'gain.2.1' } - route.2 { + { source 'mixin.1.1' sink 'mixout.2.1' } - route.3 { + { source 'copier.HDA.4.1' sink 'copier.host.3.1' } -} +] diff --git a/tools/topology/topology2/cavs-nocodec-bt.conf b/tools/topology/topology2/cavs-nocodec-bt.conf index 957f1594e6ae..709373e3adc4 100644 --- a/tools/topology/topology2/cavs-nocodec-bt.conf +++ b/tools/topology/topology2/cavs-nocodec-bt.conf @@ -68,8 +68,8 @@ IncludeByKey.NUM_DMICS { # List of all DAIs # #SSP Index: 0, Direction: duplex -Object.Dai { - SSP."0" { +Object.Dai.SSP [ + { id 0 dai_index 0 direction "duplex" @@ -86,7 +86,7 @@ Object.Dai { tdm_slot_width 32 } } - SSP."1" { + { id 1 dai_index 1 direction "duplex" @@ -104,7 +104,7 @@ Object.Dai { tdm_slot_width 32 } } -} +] # # Pipeline definitions @@ -113,130 +113,134 @@ Object.Dai { # Pipeline ID:1 PCM ID: 0 Object.Pipeline { # playback pipelines - passthrough-be.1 { - index 2 - direction playback - Object.Widget.pipeline.1 { - stream_name 'NoCodec-0' - } - - Object.Widget.copier.1 { - dai_index 0 - dai_type "SSP" - copier_type "SSP" - stream_name "NoCodec-0" - node_type $I2S_LINK_OUTPUT_CLASS - } - } - - passthrough-playback.1 { - index 1 - Object.Widget.pipeline.1 { - stream_name 'NoCodec-0' - } - Object.Widget.copier.1 { - stream_name 'SSP0 Playback' - } - } + passthrough-be [ + { + index 2 + direction playback + Object.Widget.pipeline.1 { + stream_name 'NoCodec-0' + } - passthrough-be.2 { - index 4 - direction playback - Object.Widget.pipeline.1 { - stream_name 'NoCodec-1' + Object.Widget.copier.1 { + dai_index 0 + dai_type "SSP" + copier_type "SSP" + stream_name "NoCodec-0" + node_type $I2S_LINK_OUTPUT_CLASS + } } + { + index 4 + direction playback + Object.Widget.pipeline.1 { + stream_name 'NoCodec-1' + } - Object.Widget.copier.1 { - dai_index 1 - dai_type "SSP" - copier_type "SSP" - stream_name "NoCodec-1" - node_type $I2S_LINK_OUTPUT_CLASS + Object.Widget.copier.1 { + dai_index 1 + dai_type "SSP" + copier_type "SSP" + stream_name "NoCodec-1" + node_type $I2S_LINK_OUTPUT_CLASS + } } - } + ] - passthrough-playback.2 { - index 3 - Object.Widget.pipeline.1 { - stream_name 'NoCodec-1' + passthrough-playback [ + { + index 1 + Object.Widget.pipeline.1 { + stream_name 'NoCodec-0' + } + Object.Widget.copier.1 { + stream_name 'SSP0 Playback' + } } - Object.Widget.copier.1 { - stream_name 'SSP1 Playback' + { + index 3 + Object.Widget.pipeline.1 { + stream_name 'NoCodec-1' + } + Object.Widget.copier.1 { + stream_name 'SSP1 Playback' + } } - } + ] # capture pipelines - passthrough-capture.1 { - index 5 - Object.Widget.pipeline.1 { - stream_name 'NoCodec-0' - } - Object.Widget.copier.1 { - stream_name 'SSP0 Capture' - } - } - - passthrough-capture-be.4 { - index 6 - direction capture - Object.Widget.pipeline.1 { - stream_name 'NoCodec-0' - } - - Object.Widget.copier."1" { - dai_index 0 - dai_type "SSP" - type dai_out - copier_type "SSP" - stream_name "NoCodec-0" - node_type $I2S_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + passthrough-capture [ + { + index 5 + Object.Widget.pipeline.1 { + stream_name 'NoCodec-0' + } + Object.Widget.copier.1 { + stream_name 'SSP0 Capture' } } - } - - passthrough-capture.2 { - index 9 - Object.Widget.pipeline.1 { - stream_name 'NoCodec-1' - } - Object.Widget.copier.1 { - stream_name 'SSP1 Capture' + { + index 9 + Object.Widget.pipeline.1 { + stream_name 'NoCodec-1' + } + Object.Widget.copier.1 { + stream_name 'SSP1 Capture' + } } - } + ] + + passthrough-capture-be [ + { + index 6 + direction capture + Object.Widget.pipeline.1 { + stream_name 'NoCodec-0' + } - passthrough-capture-be.5 { - index 10 - direction capture - Object.Widget.pipeline.1 { - stream_name 'NoCodec-1' + Object.Widget.copier."1" { + dai_index 0 + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name "NoCodec-0" + node_type $I2S_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } + } } + { + index 10 + direction capture + Object.Widget.pipeline.1 { + stream_name 'NoCodec-1' + } - Object.Widget.copier."1" { - dai_index 1 - dai_type "SSP" - type dai_out - copier_type "SSP" - stream_name "NoCodec-1" - node_type $I2S_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + Object.Widget.copier."1" { + dai_index 1 + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name "NoCodec-1" + node_type $I2S_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } } } - } + ] } -Object.PCM { - pcm."0" { +Object.PCM.pcm [ + { name "Port0" id 0 direction "duplex" @@ -256,7 +260,7 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } - pcm."1" { + { name "Port1" id 1 direction "duplex" @@ -276,31 +280,27 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } -} +] -Object.Base { - route."1" { +Object.Base.route [ + { source "copier.host.1.1" sink "copier.SSP.2.1" } - - route."2" { + { source "copier.host.3.1" sink "copier.SSP.4.1" } - - route."3" { + { source "copier.SSP.6.1" sink "copier.host.5.1" } - - route."4" { + { source "copier.SSP.10.1" sink "copier.host.9.1" } - - route."5" { + { source "copier.SSP.12.1" sink "copier.host.11.1" } -} +] diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index b1f928aab7f1..130e76150d70 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -84,9 +84,8 @@ IncludeByKey.DEEPBUFFER_FW_DMA_MS{ # # List of all DAIs # -#SSP Index: 0, Direction: duplex -Object.Dai { - SSP."0" { +Object.Dai.SSP [ + { id 0 dai_index 0 direction "duplex" @@ -104,7 +103,7 @@ Object.Dai { tdm_slot_width 32 } } - SSP."1" { + { id 1 dai_index 1 direction "duplex" @@ -122,7 +121,7 @@ Object.Dai { tdm_slot_width 32 } } - SSP."2" { + { id 2 dai_index 2 direction "duplex" @@ -140,7 +139,7 @@ Object.Dai { tdm_slot_width 32 } } -} +] # # Pipeline definitions @@ -155,9 +154,8 @@ Object.Dai { # SSP2 ----> PCM2 # Pipeline ID:1 PCM ID: 0 -Object.Pipeline { - # playback pipelines - host-copier-gain-mixin-playback.1 { +Object.Pipeline.host-copier-gain-mixin-playback [ + { index 1 Object.Widget.copier.1 { @@ -169,8 +167,34 @@ Object.Pipeline { } } } + { + index 3 + + Object.Widget.copier.1 { + stream_name 'SSP1 Playback' + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Playback Volume 3' + } + } + } + { + index 5 + + Object.Widget.copier.1 { + stream_name 'SSP2 Playback' + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Playback Volume 5' + } + } + } +] - mixout-gain-smart-amp-dai-copier-playback.1 { +Object.Pipeline.mixout-gain-smart-amp-dai-copier-playback [ + { index 2 Object.Widget.copier.1 { @@ -202,21 +226,10 @@ Object.Pipeline { } } } +] - host-copier-gain-mixin-playback.2 { - index 3 - - Object.Widget.copier.1 { - stream_name 'SSP1 Playback' - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Playback Volume 3' - } - } - } - - mixout-gain-dai-copier-playback.2 { +Object.Pipeline.mixout-gain-dai-copier-playback [ + { index 4 Object.Widget.copier.1 { @@ -233,21 +246,7 @@ Object.Pipeline { } } } - - host-copier-gain-mixin-playback.3 { - index 5 - - Object.Widget.copier.1 { - stream_name 'SSP2 Playback' - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Playback Volume 5' - } - } - } - - mixout-gain-dai-copier-playback.3 { + { index 6 Object.Widget.copier.1 { @@ -264,9 +263,10 @@ Object.Pipeline { } } } +] - # capture pipelines - gain-copier-capture.1 { +Object.Pipeline.gain-copier-capture [ + { index 7 Object.Widget.copier.1 { @@ -279,7 +279,7 @@ Object.Pipeline { } } - gain-copier-capture.4 { + { index 17 format s32le Object.Widget.copier.1 { @@ -291,8 +291,10 @@ Object.Pipeline { } } } +] - gain-module-copier.1 { +Object.Pipeline.gain-module-copier [ + { index 19 direction "capture" Object.Widget.pipeline.1 { @@ -353,8 +355,10 @@ Object.Pipeline { } } } +] - dai-copier-gain-module-copier-capture.4 { +Object.Pipeline.dai-copier-gain-module-copier-capture [ + { index 8 Object.Widget.copier."1" { dai_index 0 @@ -396,16 +400,27 @@ Object.Pipeline { } } } +] - passthrough-capture.2 { +Object.Pipeline.passthrough-capture [ + { index 9 Object.Widget.copier.1 { stream_name 'SSP1 Capture' } } + { + index 11 - passthrough-capture-be.5 { + Object.Widget.copier.1 { + stream_name 'SSP2 Capture' + } + } +] + +Object.Pipeline.passthrough-capture-be [ + { index 10 direction capture @@ -425,16 +440,7 @@ Object.Pipeline { } } } - - passthrough-capture.3 { - index 11 - - Object.Widget.copier.1 { - stream_name 'SSP2 Capture' - } - } - - passthrough-capture-be.6 { + { index 12 direction capture @@ -454,8 +460,10 @@ Object.Pipeline { } } } +] - gain-capture.5 { +Object.Pipeline.gain-capture [ + { format $FORMAT index 18 Object.Widget.pipeline.1 { @@ -516,8 +524,7 @@ Object.Pipeline { } } } - - gain-capture.6 { + { format $FORMAT index 20 Object.Widget.pipeline.1 { @@ -578,10 +585,10 @@ Object.Pipeline { } } } -} +] -Object.PCM { - pcm."0" { +Object.PCM.pcm [ + { name "Port0" id 0 direction "duplex" @@ -601,7 +608,7 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } - pcm."12" { + { name "ssp-capture" id 12 direction "capture" @@ -613,7 +620,7 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } - pcm."1" { + { name "Port1" id 1 direction "duplex" @@ -633,7 +640,7 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } - pcm."2" { + { name "Port2" id 2 direction "duplex" @@ -653,8 +660,7 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } - - pcm.27 { + { name "DMIC0 Raw" id 27 direction "capture" @@ -668,8 +674,7 @@ Object.PCM { channels_max $NUM_DMICS } } - - pcm.28 { + { name "DMIC0 Raw 2" id 28 direction "capture" @@ -683,75 +688,67 @@ Object.PCM { channels_max $NUM_DMICS } } -} +] -Object.Base { - route."1" { +Object.Base.route [ + { source "smart_amp.2.1" sink "copier.SSP.2.1" } - - route."2" { + { source "mixin.1.1" sink "mixout.2.1" } - - route."3" { + { source "gain.4.1" sink "copier.SSP.4.1" } - route."4" { + { source "mixin.3.1" sink "mixout.4.1" } - - route."5" { + { source "gain.6.1" sink "copier.SSP.6.1" } - route."6" { + { source "mixin.5.1" sink "mixout.6.1" } - - route."7" { + { source "copier.SSP.8.1" sink "gain.8.1" } - - route."8" { + { source "copier.SSP.10.1" sink "copier.host.9.1" } - - route."9" { + { source "copier.SSP.12.1" sink "copier.host.11.1" } - - route."10" { + { source "copier.module.8.2" sink "copier.module.7.2" } - - route."11" { + { source "copier.module.8.2" sink "copier.module.17.2" } - route.12 { + { source copier.module.14.2 sink gain.19.1 } - route.13 { + { source copier.module.19.1 sink gain.18.1 } - route.14 { + { source copier.module.19.1 sink gain.20.1 } - route.15 { + { source "copier.SSP.8.1" sink "smart_amp.2.1" } -} +] diff --git a/tools/topology/topology2/cavs-rt5682.conf b/tools/topology/topology2/cavs-rt5682.conf index 2a06867deecf..34a63aec5b04 100644 --- a/tools/topology/topology2/cavs-rt5682.conf +++ b/tools/topology/topology2/cavs-rt5682.conf @@ -114,8 +114,8 @@ IncludeByKey.INCLUDE_ECHO_REF { # List of all DAIs # #SSP Index: 0, Direction: duplex -Object.Dai { - SSP."0" { +Object.Dai.SSP [ + { id 0 dai_index $HEADSET_SSP_DAI_INDEX direction "duplex" @@ -132,7 +132,7 @@ Object.Dai { tdm_slot_width 32 } } - SSP."1" { + { id $SPK_ID dai_index $SPEAKER_SSP_DAI_INDEX IncludeByKey.INCLUDE_ECHO_REF { @@ -157,7 +157,7 @@ Object.Dai { tdm_slot_width 32 } } -} +] # # Pipeline definitions @@ -171,108 +171,114 @@ Object.Dai { # Pipeline ID:1 PCM ID: 0 Object.Pipeline { # playback pipelines - host-copier-gain-mixin-playback.1 { - index 1 + host-copier-gain-mixin-playback [ + { + index 1 - Object.Widget.copier.1 { - stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Playback Volume 1' + Object.Widget.copier.1 { + stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' } - } - } - - mixout-gain-dai-copier-playback.1 { - index 2 - - Object.Widget.copier.1 { - dai_index $HEADSET_SSP_DAI_INDEX - dai_type "SSP" - copier_type "SSP" - stream_name "$HEADSET_CODEC_NAME" - node_type $I2S_LINK_OUTPUT_CLASS - - # override for 24-bit - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 32 + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Playback Volume 1' + } } } + { + index 3 - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Main Playback Volume 2' + Object.Widget.copier.1 { + stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME' } - } - } - - host-copier-gain-mixin-playback.2 { - index 3 - - Object.Widget.copier.1 { - stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME' - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Playback Volume 3' + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Playback Volume 3' + } } } - } - - mixout-gain-dai-copier-playback.2 { - index 4 + ] + + mixout-gain-dai-copier-playback [ + { + index 2 + + Object.Widget.copier.1 { + dai_index $HEADSET_SSP_DAI_INDEX + dai_type "SSP" + copier_type "SSP" + stream_name "$HEADSET_CODEC_NAME" + node_type $I2S_LINK_OUTPUT_CLASS + + # override for 24-bit + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 24 + out_bit_depth 32 + out_valid_bit_depth 32 + } + } - Object.Widget.copier.1 { - dai_index $SPEAKER_SSP_DAI_INDEX - dai_type "SSP" - copier_type "SSP" - stream_name "$SPEAKER_CODEC_NAME" - node_type $I2S_LINK_OUTPUT_CLASS + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Main Playback Volume 2' + } + } } + { + index 4 + + Object.Widget.copier.1 { + dai_index $SPEAKER_SSP_DAI_INDEX + dai_type "SSP" + copier_type "SSP" + stream_name "$SPEAKER_CODEC_NAME" + node_type $I2S_LINK_OUTPUT_CLASS + } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Main Playback Volume 4' + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Main Playback Volume 4' + } } } - } + ] - passthrough-capture.1 { - index 5 + passthrough-capture [ + { + index 5 - Object.Widget.copier.1 { - stream_name '$HEADSET_CAPTURE_PCM_STREAM_NAME' + Object.Widget.copier.1 { + stream_name '$HEADSET_CAPTURE_PCM_STREAM_NAME' + } } - } - - passthrough-capture-be.1 { - index 6 - direction capture - - Object.Widget.copier."1" { - dai_index $HEADSET_SSP_DAI_INDEX - dai_type "SSP" - type dai_out - copier_type "SSP" - stream_name "$HEADSET_CODEC_NAME" - node_type $I2S_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + ] + + passthrough-capture-be [ + { + index 6 + direction capture + + Object.Widget.copier."1" { + dai_index $HEADSET_SSP_DAI_INDEX + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name "$HEADSET_CODEC_NAME" + node_type $I2S_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } } } - } + ] } -Object.PCM { - pcm."0" { +Object.PCM.pcm [ + { name "Headset" id 0 direction "duplex" @@ -292,7 +298,7 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } - pcm."1" { + { name "Speakers" id 1 direction "playback" @@ -305,31 +311,27 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } -} +] -Object.Base { - route."1" { +Object.Base.route [ + { source "gain.2.1" sink "copier.SSP.2.1" } - - route."2" { + { source "mixin.1.1" sink "mixout.2.1" } - - route."3" { + { source "gain.4.1" sink "copier.SSP.4.1" } - - route."4" { + { source "mixin.3.1" sink "mixout.4.1" } - - route."5" { + { source "copier.SSP.6.1" sink "copier.host.5.1" } -} +] diff --git a/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf index 209e67a730f0..79968bf18e97 100644 --- a/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf +++ b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf @@ -37,8 +37,8 @@ Define { # List of all DAIs # #ALH Index: 0, Direction: duplex -Object.Dai { - ALH."2" { +Object.Dai.ALH [ + { dai_index 2 id $PLAYBACK_LINK_ID direction "playback" @@ -52,7 +52,7 @@ Object.Dai { name "ALH2" } } - ALH."3" { + { dai_index 3 id $CAPTURE_LINK_ID direction "capture" @@ -66,7 +66,7 @@ Object.Dai { name ALH3 } } -} +] # # Pipeline definitions @@ -74,61 +74,71 @@ Object.Dai { # Pipeline ID:1 PCM ID: 0 Object.Pipeline { - src-gain-mixin-playback."1" { - index 1 + src-gain-mixin-playback [ + { + index 1 - Object.Widget.copier.1.stream_name "Gain Playback 0" - Object.Widget.gain.1{ - Object.Control.mixer.1 { - name 'Src Playback Volume' - } - } + Object.Widget.copier.1.stream_name "Gain Playback 0" + Object.Widget.gain.1{ + Object.Control.mixer.1 { + name 'Src Playback Volume' + } + } - } - mixout-gain-dai-copier-playback."3" { - index 2 - - Object.Widget.copier.1 { - stream_name $SDW_PLAYBACK_PCM - dai_type "ALH" - copier_type "ALH" - type "dai_in" - node_type $ALH_LINK_OUTPUT_CLASS } - - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Main Playback Volume' - } - } - } - - passthrough-capture."4" { - index 4 - - Object.Widget.copier.1.stream_name "Passthrough Capture 0" - Object.Widget.copier.1.Object.Base.audio_format.1 { - # 32 -> 16 bits conversion is done here, - # so in_bit_depth is 32 (and out_bit_depth is 16). - in_bit_depth 32 + ] + + mixout-gain-dai-copier-playback [ + { + index 2 + + Object.Widget.copier.1 { + stream_name $SDW_PLAYBACK_PCM + dai_type "ALH" + copier_type "ALH" + type "dai_in" + node_type $ALH_LINK_OUTPUT_CLASS + } + + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Main Playback Volume' + } + } } - } - passthrough-capture-be.2 { - direction "capture" - index 3 - copier_type "ALH" - Object.Widget.copier.1 { - stream_name $SDW_CAPTURE_PCM - dai_type "ALH" - copier_type "ALH" - type "dai_out" - node_type $ALH_LINK_INPUT_CLASS + ] + + passthrough-capture [ + { + index 4 + + Object.Widget.copier.1.stream_name "Passthrough Capture 0" + Object.Widget.copier.1.Object.Base.audio_format.1 { + # 32 -> 16 bits conversion is done here, + # so in_bit_depth is 32 (and out_bit_depth is 16). + in_bit_depth 32 + } } - } + ] + + passthrough-capture-be [ + { + direction "capture" + index 3 + copier_type "ALH" + Object.Widget.copier.1 { + stream_name $SDW_CAPTURE_PCM + dai_type "ALH" + copier_type "ALH" + type "dai_out" + node_type $ALH_LINK_INPUT_CLASS + } + } + ] } -Object.PCM { - pcm."0" { +Object.PCM.pcm [ + { name "Jack out" id 0 direction "playback" @@ -143,7 +153,7 @@ Object.PCM { rate_max 48000 } } - pcm."1" { + { name "Jack in" id 1 direction "capture" @@ -156,21 +166,19 @@ Object.PCM { formats 'S16_LE,S32_LE' } } -} +] -Object.Base { - route."1" { +Object.Base.route [ + { source "mixin.1.1" sink "mixout.2.1" } - - route."2" { + { source 'gain.2.1' sink 'copier.ALH.2.1' } - - route."3" { + { source "copier.ALH.3.1" sink "copier.host.4.1" } -} +] diff --git a/tools/topology/topology2/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf index 7c7c177ea81a..770e00db7d57 100644 --- a/tools/topology/topology2/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -104,8 +104,8 @@ IncludeByKey.SDW_DMIC { # List of all DAIs # #ALH Index: 0, Direction: duplex -Object.Dai { - ALH."2" { +Object.Dai.ALH [ + { dai_index 2 id $SDW_JACK_OUT_BE_ID direction "playback" @@ -119,7 +119,7 @@ Object.Dai { name "ALH2" } } - ALH."3" { + { dai_index 3 id $SDW_JACK_IN_BE_ID direction "capture" @@ -133,7 +133,7 @@ Object.Dai { name "ALH3" } } -} +] # # Pipeline definitions @@ -141,62 +141,71 @@ Object.Dai { # Pipeline ID:1 PCM ID: 0 Object.Pipeline { - host-copier-gain-mixin-playback.0 { - index 0 - - Object.Widget.copier.1 { - stream_name "volume playback 0" - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '1 Playback Volume 0' - } - } - } - - mixout-gain-dai-copier-playback.1 { - index 1 + host-copier-gain-mixin-playback [ + { + index 0 Object.Widget.copier.1 { - stream_name $SDW_JACK_OUT_STREAM - dai_type "ALH" - copier_type "ALH" - node_type $ALH_LINK_OUTPUT_CLASS + stream_name "volume playback 0" } Object.Widget.gain.1 { Object.Control.mixer.1 { - name '2 Main Playback Volume' + name '1 Playback Volume 0' + } } } - } + ] - passthrough-capture.10 { - index 10 + mixout-gain-dai-copier-playback [ + { + index 1 - Object.Widget.copier.1.stream_name "Passthrough Capture 0" - Object.Widget.copier.1.Object.Base.audio_format.1 { - # 32 -> 16 bits conversion is done here, - # so in_bit_depth is 32 (and out_bit_depth is 16). - in_bit_depth 32 + Object.Widget.copier.1 { + stream_name $SDW_JACK_OUT_STREAM + dai_type "ALH" + copier_type "ALH" + node_type $ALH_LINK_OUTPUT_CLASS + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '2 Main Playback Volume' + } + } } - } - passthrough-capture-be.11 { - direction "capture" - index 11 - copier_type "ALH" + ] - Object.Widget.copier.1 { - stream_name $SDW_JACK_IN_STREAM - dai_type "ALH" - copier_type "ALH" - type "dai_out" - node_type $ALH_LINK_INPUT_CLASS + passthrough-capture [ + { + index 10 + + Object.Widget.copier.1.stream_name "Passthrough Capture 0" + Object.Widget.copier.1.Object.Base.audio_format.1 { + # 32 -> 16 bits conversion is done here, + # so in_bit_depth is 32 (and out_bit_depth is 16). + in_bit_depth 32 + } } - } + ] + + passthrough-capture-be [ + { + direction "capture" + index 11 + copier_type "ALH" + + Object.Widget.copier.1 { + stream_name $SDW_JACK_IN_STREAM + dai_type "ALH" + copier_type "ALH" + type "dai_out" + node_type $ALH_LINK_INPUT_CLASS + } + } + ] } -Object.PCM { - pcm.0 { +Object.PCM.pcm [ + { name "Jack out" id 0 direction "playback" @@ -209,7 +218,7 @@ Object.PCM { formats 'S16_LE,S32_LE' } } - pcm.1 { + { name "Jack in" id 1 direction "capture" @@ -222,21 +231,19 @@ Object.PCM { formats 'S16_LE,S32_LE' } } -} +] -Object.Base { - route.0 { +Object.Base.route [ + { source "gain.1.1" sink "copier.ALH.1.1" } - - route.1 { + { source "mixin.0.1" sink "mixout.1.1" } - - route.10 { + { source "copier.ALH.11.1" sink "copier.host.10.1" } -} +] diff --git a/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf b/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf index 639c9cd3ab31..aa8ceaf1fb8a 100644 --- a/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf +++ b/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf @@ -14,8 +14,8 @@ IncludeByKey.DEEPBUFFER_FW_DMA_MS{ "[1-1000]" "platform/intel/deep-buffer.conf" } -Object.Dai { - HDA.0 { +Object.Dai.HDA [ + { name $HDA_ANALOG_DAI_NAME dai_index 0 id 4 @@ -25,69 +25,78 @@ Object.Dai { } direction duplex } -} +] + Object.Pipeline { - mixout-gain-dai-copier-playback.0 { - index 2 + mixout-gain-dai-copier-playback [ + { + index 2 - Object.Widget.copier.1 { - stream_name $HDA_ANALOG_DAI_NAME - dai_type "HDA" - copier_type "HDA" - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '2 Main Playback Volume' + Object.Widget.copier.1 { + stream_name $HDA_ANALOG_DAI_NAME + dai_type "HDA" + copier_type "HDA" + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '2 Main Playback Volume' + } } } - } + ] - host-copier-gain-src-mixin-playback.0 { - index 1 + host-copier-gain-src-mixin-playback [ + { + index 1 - Object.Widget.copier.1 { - stream_name $ANALOG_PLAYBACK_PCM - } + Object.Widget.copier.1 { + stream_name $ANALOG_PLAYBACK_PCM + } - Object.Widget.src.1 { - } + Object.Widget.src.1 { + } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '1 2nd Playback Volume' + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '1 2nd Playback Volume' + } } } - } + ] - passthrough-capture.1 { - index 3 - Object.Widget.copier.1 { - stream_name $ANALOG_CAPTURE_PCM + passthrough-capture [ + { + index 3 + Object.Widget.copier.1 { + stream_name $ANALOG_CAPTURE_PCM + } } - } + ] - passthrough-be.1 { - index 4 - direction capture + passthrough-be [ + { + index 4 + direction capture - Object.Widget.copier."1" { - dai_type "HDA" - type "dai_out" - copier_type "HDA" - stream_name $HDA_ANALOG_DAI_NAME - node_type $HDA_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + Object.Widget.copier."1" { + dai_type "HDA" + type "dai_out" + copier_type "HDA" + stream_name $HDA_ANALOG_DAI_NAME + node_type $HDA_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } } } - } + ] } -Object.PCM { - pcm.0 { +Object.PCM.pcm [ + { id 0 name 'HDA Analog' Object.Base.fe_dai.1 { @@ -107,20 +116,20 @@ Object.PCM { } direction duplex } -} +] # top-level pipeline connections -Object.Base { - route.1 { +Object.Base.route [ + { sink 'copier.HDA.2.1' source 'gain.2.1' } - route.2 { + { source 'mixin.1.1' sink 'mixout.2.1' } - route.3 { + { source 'copier.HDA.4.1' sink 'copier.host.3.1' } -} +] diff --git a/tools/topology/topology2/input_pin_binding.conf b/tools/topology/topology2/input_pin_binding.conf deleted file mode 100644 index 494340f19181..000000000000 --- a/tools/topology/topology2/input_pin_binding.conf +++ /dev/null @@ -1,34 +0,0 @@ -# -# The intput pin binding class definition. All attributes defined herein are -# namespaced by alsatplg to "Object.Base.input_pin_binding.instance.attribute_name". -# -# Usage: Input pin binding objects can be instantiated as -# -# Object.Base.input_pin_binding."0" { -# input_pin_binding_name "copier.host.1.0" -# } -# -# where 0 is the unique instance name for the input_pin_binding object within the -# same alsaconf node. - -Class.Base."input_pin_binding" { - - DefineAttribute."instance" {} - - # The widget name that the intput pin should be bound with. - DefineAttribute."input_pin_binding_name" { - token_ref "sof_tkn_comp.string" - } - - attributes { - !constructor [ - "instance" - ] - - !mandatory [ - "input_pin_binding_name" - ] - - unique "instance" - } -} diff --git a/tools/topology/topology2/output_pin_binding.conf b/tools/topology/topology2/output_pin_binding.conf deleted file mode 100644 index a7acd10f4e50..000000000000 --- a/tools/topology/topology2/output_pin_binding.conf +++ /dev/null @@ -1,37 +0,0 @@ -# -# The output pin binding class definition. All attributes defined herein are -# namespaced by alsatplg to "Object.Base.output_pin_binding.instance.attribute_name". -# -# Usage: Source pin binding objects can be instantiated as -# -# Object.Base.output_pin_binding."0" { -# output_pin_binding_name "copier.host.1.0" -# } -# -# where 0 is the unique instance name for the output_pin_binding object within the -# same alsaconf node. - -Class.Base."output_pin_binding" { - - DefineAttribute."instance" {} - - # The widget name that the output pin should be bound with. - DefineAttribute."output_pin_binding_name" { - token_ref "sof_tkn_comp.string" - } - - attributes { - !constructor [ - "instance" - ] - - !mandatory [ - "output_pin_binding_name" - ] - # - # id attribute values for pin_binding_widget objects must be unique in the - # same alsaconf node - # - unique "instance" - } -} diff --git a/tools/topology/topology2/platform/intel/bt-generic.conf b/tools/topology/topology2/platform/intel/bt-generic.conf index e65afb385ae0..6e5fc8649302 100644 --- a/tools/topology/topology2/platform/intel/bt-generic.conf +++ b/tools/topology/topology2/platform/intel/bt-generic.conf @@ -8,211 +8,218 @@ IncludeByKey.BT_LOOPBACK_MODE { Object.Pipeline { # playback pipelines - passthrough-be.3 { - index $BT_PB_DAI_PIPELINE_ID - direction playback - Object.Widget.pipeline.1 { - stream_name $BT_PB_PIPELINE_STREAM_NAME - } - - Object.Widget.copier.1 { - dai_index $BT_INDEX - dai_type "SSP" - copier_type "SSP" - stream_name $BT_NAME - node_type $I2S_LINK_OUTPUT_CLASS - num_audio_formats 3 - num_input_audio_formats 3 - num_output_audio_formats 3 - Object.Base.audio_format.0 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 2 - out_channels 2 - dma_buffer_size "$[$obs * 2]" - } - Object.Base.audio_format.2 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 8000 - out_rate 8000 - dma_buffer_size "$[$obs * 2]" + passthrough-be [ + { + index $BT_PB_DAI_PIPELINE_ID + direction playback + Object.Widget.pipeline.1 { + stream_name $BT_PB_PIPELINE_STREAM_NAME } - Object.Base.audio_format.3 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 16000 - out_rate 16000 - dma_buffer_size "$[$obs * 2]" + + Object.Widget.copier.1 { + dai_index $BT_INDEX + dai_type "SSP" + copier_type "SSP" + stream_name $BT_NAME + node_type $I2S_LINK_OUTPUT_CLASS + num_audio_formats 3 + num_input_audio_formats 3 + num_output_audio_formats 3 + Object.Base.audio_format.0 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 2 + out_channels 2 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.2 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 8000 + out_rate 8000 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.3 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 16000 + out_rate 16000 + dma_buffer_size "$[$obs * 2]" + } } } - } + ] - passthrough-playback.3 { - index $BT_PB_HOST_PIPELINE_ID - Object.Widget.pipeline.1 { - stream_name $BT_PB_PIPELINE_STREAM_NAME - } - Object.Widget.copier.1 { - stream_name $BT_PB_PCM_CAPS - num_audio_formats 3 - num_input_audio_formats 3 - num_output_audio_formats 3 - Object.Base.audio_format.0 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 2 - out_channels 2 - dma_buffer_size "$[$obs * 2]" - } - Object.Base.audio_format.2 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 8000 - out_rate 8000 - dma_buffer_size "$[$obs * 2]" + passthrough-playback [ + { + index $BT_PB_HOST_PIPELINE_ID + Object.Widget.pipeline.1 { + stream_name $BT_PB_PIPELINE_STREAM_NAME } - Object.Base.audio_format.3 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 16000 - out_rate 16000 - dma_buffer_size "$[$obs * 2]" + Object.Widget.copier.1 { + stream_name $BT_PB_PCM_CAPS + num_audio_formats 3 + num_input_audio_formats 3 + num_output_audio_formats 3 + Object.Base.audio_format.0 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 2 + out_channels 2 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.2 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 8000 + out_rate 8000 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.3 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 16000 + out_rate 16000 + dma_buffer_size "$[$obs * 2]" + } } } - } + ] # capture pipelines - passthrough-capture.3 { - index $BT_CP_HOST_PIPELINE_ID - Object.Widget.pipeline.1 { - stream_name $BT_CP_PIPELINE_STREAM_NAME - } - Object.Widget.copier.1 { - stream_name $BT_CP_PCM_CAPS - num_audio_formats 3 - num_input_audio_formats 3 - num_output_audio_formats 3 - Object.Base.audio_format.0 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 2 - out_channels 2 - dma_buffer_size "$[$obs * 2]" - } - Object.Base.audio_format.2 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 8000 - out_rate 8000 - dma_buffer_size "$[$obs * 2]" + passthrough-capture [ + { + index $BT_CP_HOST_PIPELINE_ID + Object.Widget.pipeline.1 { + stream_name $BT_CP_PIPELINE_STREAM_NAME } - Object.Base.audio_format.3 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 16000 - out_rate 16000 - dma_buffer_size "$[$obs * 2]" + Object.Widget.copier.1 { + stream_name $BT_CP_PCM_CAPS + num_audio_formats 3 + num_input_audio_formats 3 + num_output_audio_formats 3 + Object.Base.audio_format.0 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 2 + out_channels 2 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.2 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 8000 + out_rate 8000 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.3 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 16000 + out_rate 16000 + dma_buffer_size "$[$obs * 2]" + } } } - } - - passthrough-capture-be.6 { - index $BT_CP_DAI_PIPELINE_ID - direction "capture" - Object.Widget.pipeline.1 { - stream_name $BT_CP_PIPELINE_STREAM_NAME - } + ] - Object.Widget.copier."1" { - dai_index $BT_INDEX - dai_type "SSP" - type dai_out - copier_type "SSP" - stream_name $BT_NAME - node_type $I2S_LINK_INPUT_CLASS - num_audio_formats 4 - num_input_audio_formats 4 - num_output_audio_formats 4 - Object.Base.audio_format.0 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 2 - out_channels 2 - dma_buffer_size "$[$obs * 2]" + passthrough-capture-be [ + { + index $BT_CP_DAI_PIPELINE_ID + direction "capture" + Object.Widget.pipeline.1 { + stream_name $BT_CP_PIPELINE_STREAM_NAME } - Object.Base.audio_format.1 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 8000 - out_rate 8000 - dma_buffer_size "$[$obs * 2]" - } - Object.Base.audio_format.2 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 - in_channels 1 - out_channels 1 - in_rate 16000 - out_rate 16000 - dma_buffer_size "$[$obs * 2]" + + Object.Widget.copier."1" { + dai_index $BT_INDEX + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name $BT_NAME + node_type $I2S_LINK_INPUT_CLASS + num_audio_formats 4 + num_input_audio_formats 4 + num_output_audio_formats 4 + Object.Base.audio_format.0 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 2 + out_channels 2 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.1 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 8000 + out_rate 8000 + dma_buffer_size "$[$obs * 2]" + } + Object.Base.audio_format.2 { + in_bit_depth 16 + in_valid_bit_depth 16 + out_bit_depth 16 + out_valid_bit_depth 16 + in_channels 1 + out_channels 1 + in_rate 16000 + out_rate 16000 + dma_buffer_size "$[$obs * 2]" + } } } - } + ] } -Object.Base { - route."500" { +Object.Base.route [ + { source $BT_PB_DAI_PIPELINE_SRC sink $BT_PB_HOST_PIPELINE_SINK } - - route."501" { + { source $BT_CP_DAI_PIPELINE_SRC sink $BT_CP_HOST_PIPELINE_SINK } -} +] -Object.PCM { - pcm."BT" { +Object.PCM.pcm [ + { name $BT_PCM_NAME id $BT_PCM_ID direction "duplex" @@ -240,4 +247,4 @@ Object.PCM { channels_max 2 } } -} +] diff --git a/tools/topology/topology2/platform/intel/bt-ssp-config-lbm.conf b/tools/topology/topology2/platform/intel/bt-ssp-config-lbm.conf index 2f33acb4d275..39f4a143c83f 100644 --- a/tools/topology/topology2/platform/intel/bt-ssp-config-lbm.conf +++ b/tools/topology/topology2/platform/intel/bt-ssp-config-lbm.conf @@ -1,5 +1,5 @@ -Object.Dai { - SSP."BT" { +Object.Dai.SSP [ + { id $BT_ID dai_index $BT_INDEX direction "duplex" @@ -53,4 +53,4 @@ Object.Dai { rx_slots 3 } } -} +] diff --git a/tools/topology/topology2/platform/intel/bt-ssp-config.conf b/tools/topology/topology2/platform/intel/bt-ssp-config.conf index 477f04583e2d..11a4919a9a4b 100644 --- a/tools/topology/topology2/platform/intel/bt-ssp-config.conf +++ b/tools/topology/topology2/platform/intel/bt-ssp-config.conf @@ -1,5 +1,5 @@ -Object.Dai { - SSP."BT" { +Object.Dai.SSP [ + { id $BT_ID dai_index $BT_INDEX direction "duplex" @@ -52,4 +52,4 @@ Object.Dai { rx_slots 0 } } -} +] diff --git a/tools/topology/topology2/platform/intel/deep-buffer.conf b/tools/topology/topology2/platform/intel/deep-buffer.conf index c374f1947234..7bf828638906 100644 --- a/tools/topology/topology2/platform/intel/deep-buffer.conf +++ b/tools/topology/topology2/platform/intel/deep-buffer.conf @@ -1,41 +1,40 @@ +Object.Pipeline.deepbuffer-playback [ + { + index $DEEP_BUFFER_PIPELINE_ID - Object.Pipeline { - deepbuffer-playback."1" { - index $DEEP_BUFFER_PIPELINE_ID - - Object.Widget.copier.1 { - stream_name $DEEP_BUFFER_PCM_NAME - } + Object.Widget.copier.1 { + stream_name $DEEP_BUFFER_PCM_NAME + } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Deepbuffer Volume' - } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Deepbuffer Volume' } } } +] - Object.PCM { - pcm.$DEEP_BUFFER_PCM_ID { - name $DEEP_BUFFER_PCM_NAME - id $DEEP_BUFFER_PCM_ID - direction playback - playback_compatible_d0i3 true +Object.PCM.pcm [ + { + name $DEEP_BUFFER_PCM_NAME + id $DEEP_BUFFER_PCM_ID + direction playback + playback_compatible_d0i3 true - Object.Base.fe_dai.1 { - name "DeepBuffer" - } + Object.Base.fe_dai.1 { + name "DeepBuffer" + } - Object.PCM.pcm_caps.1 { - name $DEEP_BUFFER_PCM_NAME - formats 'S16_LE,S24_LE,S32_LE' - } + Object.PCM.pcm_caps.1 { + name $DEEP_BUFFER_PCM_NAME + formats 'S16_LE,S24_LE,S32_LE' } } +] - Object.Base { - route."1000" { - source $DEEP_BUFFER_PIPELINE_SRC - sink $DEEP_BUFFER_PIPELINE_SINK - } +Object.Base.route [ + { + source $DEEP_BUFFER_PIPELINE_SRC + sink $DEEP_BUFFER_PIPELINE_SINK } +] diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index b8ecbee7f67e..6b4756ee34fa 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -1,5 +1,5 @@ -Object.Dai { - DMIC.0 { +Object.Dai.DMIC [ + { dai_index 0 name $DMIC0_NAME id $DMIC0_ID @@ -29,10 +29,7 @@ Object.Dai { mic_b_enable $PDM1_MIC_B_ENABLE } } -} - -Object.Dai { - DMIC.1 { + { name $DMIC1_NAME id $DMIC1_ID dai_index 1 @@ -63,14 +60,14 @@ Object.Dai { mic_b_enable $PDM1_MIC_B_ENABLE } } -} +] IncludeByKey.INCLUDE_WOV { "true" "platform/intel/dmic-wov.conf" } -Object.Pipeline { - gain-capture.100 { +Object.Pipeline.gain-capture [ + { format $FORMAT index $DMIC0_HOST_PIPELINE_ID @@ -155,9 +152,10 @@ Object.Pipeline { } } } +] - - dai-copier-gain-module-copier-capture.101 { +Object.Pipeline.dai-copier-gain-module-copier-capture [ + { index $DMIC0_DAI_PIPELINE_ID Object.Widget.copier.1 { @@ -249,21 +247,21 @@ Object.Pipeline { } } } -} +] -Object.Base { - route.100 { +Object.Base.route [ + { source $DMIC0_DAI_PIPELINE_SRC sink $DMIC0_HOST_PIPELINE_SINK } - route.101{ + { source $DMIC0_DAI_COPIER sink $DMIC0_DAI_GAIN } -} +] -Object.PCM { - pcm.10 { +Object.PCM.pcm [ + { name "DMIC" id $DMIC0_PCM_ID direction "capture" @@ -279,4 +277,4 @@ Object.PCM { channels_max $NUM_DMICS } } -} +] diff --git a/tools/topology/topology2/platform/intel/dmic-wov.conf b/tools/topology/topology2/platform/intel/dmic-wov.conf index 6d89546b0e68..fc01e2fc5ca9 100644 --- a/tools/topology/topology2/platform/intel/dmic-wov.conf +++ b/tools/topology/topology2/platform/intel/dmic-wov.conf @@ -1,125 +1,130 @@ Object.Pipeline { - passthrough-capture.110 { - format $FORMAT - rate 16000 - rate_min 16000 - rate_max 16000 - index $DMIC1_HOST_PIPELINE_ID + passthrough-capture [ + { + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index $DMIC1_HOST_PIPELINE_ID - Object.Widget.copier.1 { - stream_name $DMIC1_PCM_CAPS - Object.Base.audio_format.1 { - in_rate 16000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_rate 16000 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" - } - Object.Base.audio_format.2 { - in_rate 16000 - in_channels 4 - in_bit_depth 32 - in_valid_bit_depth 32 - out_rate 16000 - out_channels 4 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" - in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 - in_ch_map $CHANNEL_MAP_3_POINT_1 - out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 - out_ch_map $CHANNEL_MAP_3_POINT_1 + Object.Widget.copier.1 { + stream_name $DMIC1_PCM_CAPS + Object.Base.audio_format.1 { + in_rate 16000 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } + Object.Base.audio_format.2 { + in_rate 16000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_channels 4 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + } } } - } - dai-kpb-be.12 { - direction "capture" - format $FORMAT - rate 16000 - rate_min 16000 - rate_max 16000 - index $DMIC1_DAI_PIPELINE_ID + dai-kpb-be.12 { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index $DMIC1_DAI_PIPELINE_ID - Object.Widget.copier.1 { - dai_index 1 - type "dai_out" - dai_type "DMIC" - copier_type "DMIC" - type dai_out - stream_name $DMIC1_NAME - node_type $DMIC_LINK_INPUT_CLASS - num_audio_formats 2 - num_input_audio_formats 2 - num_output_audio_formats 2 - Object.Base.audio_format.1 { - in_rate 16000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_rate 16000 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + Object.Widget.copier.1 { + dai_index 1 + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + type dai_out + stream_name $DMIC1_NAME + node_type $DMIC_LINK_INPUT_CLASS + num_audio_formats 2 + num_input_audio_formats 2 + num_output_audio_formats 2 + Object.Base.audio_format.1 { + in_rate 16000 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } + Object.Base.audio_format.2 { + in_rate 16000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_channels 4 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + } } - Object.Base.audio_format.2 { - in_rate 16000 - in_channels 4 - in_bit_depth 32 - in_valid_bit_depth 32 - out_rate 16000 - out_channels 4 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" - in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 - in_ch_map $CHANNEL_MAP_3_POINT_1 - out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 - out_ch_map $CHANNEL_MAP_3_POINT_1 + + Object.Widget.kpb.1 { + Object.Base.output_pin_binding.1 { + output_pin_binding_name $WOV_PIPELINE_SINK + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name $DMIC1_HOST_PIPELINE_SINK + } + Object.Base.output_pin_binding.3 { + output_pin_binding_name "NotConnected" + } } } + ] - Object.Widget.kpb.1 { - Object.Base.output_pin_binding.1 { - output_pin_binding_name $WOV_PIPELINE_SINK - } - Object.Base.output_pin_binding.2 { - output_pin_binding_name $DMIC1_HOST_PIPELINE_SINK - } - Object.Base.output_pin_binding.3 { - output_pin_binding_name "NotConnected" + wov-detect [ + { + index $WOV_PIPELINE_ID + format s32le + channels 2 + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $WOV_CPC } } - } - wov-detect.1 { - index $WOV_PIPELINE_ID - format s32le - channels 2 - Object.Widget.wov.1 { - uuid $WOV_UUID - cpc $WOV_CPC - } - } + ] } -Object.Base { - route.102 { +Object.Base.route [ { + { source $DMIC_WOV_DAI_PIPELINE_KPB sink $DMIC1_HOST_PIPELINE_SINK } - route.103 { + { source $DMIC_WOV_DAI_PIPELINE_KPB sink $WOV_PIPELINE_SINK } - route.104 { + { source $WOV_PIPELINE_VIRTUAL sink $DMIC1_HOST_PIPELINE_SINK } -} +] -Object.PCM { - pcm.11 { +Object.PCM.pcm [ + { name "DMIC16k" id 11 direction "capture" @@ -138,4 +143,4 @@ Object.PCM { rate_max 16000 } } -} +] diff --git a/tools/topology/topology2/platform/intel/hdmi-generic.conf b/tools/topology/topology2/platform/intel/hdmi-generic.conf index 6075e8e8d018..d8d60879e93e 100644 --- a/tools/topology/topology2/platform/intel/hdmi-generic.conf +++ b/tools/topology/topology2/platform/intel/hdmi-generic.conf @@ -1,5 +1,5 @@ -Object.Dai { - HDA.4 { +Object.Dai.HDA [ + { dai_index 4 name iDisp1 id $HDMI1_ID @@ -9,7 +9,7 @@ Object.Dai { } direction playback } - HDA.5 { + { dai_index 5 name iDisp2 id $HDMI2_ID @@ -19,7 +19,7 @@ Object.Dai { } direction playback } - HDA.6 { + { dai_index 6 name iDisp3 id $HDMI3_ID @@ -29,108 +29,73 @@ Object.Dai { } direction playback } - # Include HDMI4 conditionally - IncludeByKey.NUM_HDMIS { - "4" { - HDA.7 { - dai_index 7 - name iDisp4 - id $HDMI4_ID - default_hw_conf_id 3 - Object.Base.hw_config.1 { - name "HDA6" - } - direction playback - } - } - } -} +] Object.Pipeline { - passthrough-playback.50 { - Object.Widget.copier.1 { - stream_name $HDMI1_PCM_CAPS - } - - index $HDMI1_HOST_PIPELINE_ID - use_chain_dma $USE_CHAIN_DMA - } - passthrough-be.51 { - direction "playback" - index $HDMI1_DAI_PIPELINE_ID + passthrough-playback [ + { + Object.Widget.copier.1 { + stream_name $HDMI1_PCM_CAPS + } - Object.Widget.copier.1 { - stream_name "iDisp1" - dai_type "HDA" - copier_type "HDA" - } - use_chain_dma $USE_CHAIN_DMA - } - passthrough-playback.60 { - Object.Widget.copier.1 { - stream_name $HDMI2_PCM_CAPS + index $HDMI1_HOST_PIPELINE_ID + use_chain_dma $USE_CHAIN_DMA } + { + Object.Widget.copier.1 { + stream_name $HDMI2_PCM_CAPS + } - index $HDMI2_HOST_PIPELINE_ID - use_chain_dma $USE_CHAIN_DMA - } - passthrough-be.61 { - direction "playback" - index $HDMI2_DAI_PIPELINE_ID - - Object.Widget.copier.1 { - stream_name 'iDisp2' - dai_type "HDA" - copier_type "HDA" - } - use_chain_dma $USE_CHAIN_DMA - } - passthrough-playback.70 { - Object.Widget.copier.1 { - stream_name $HDMI3_PCM_CAPS + index $HDMI2_HOST_PIPELINE_ID + use_chain_dma $USE_CHAIN_DMA } + { + Object.Widget.copier.1 { + stream_name $HDMI3_PCM_CAPS + } - index $HDMI3_HOST_PIPELINE_ID - use_chain_dma $USE_CHAIN_DMA - } - passthrough-be.71 { - direction "playback" - index $HDMI3_DAI_PIPELINE_ID - Object.Widget.copier.1 { - stream_name 'iDisp3' - dai_type "HDA" - copier_type "HDA" - } - use_chain_dma $USE_CHAIN_DMA - } - # Include HDMI4 pipelines conditionally - IncludeByKey.NUM_HDMIS { - "4" { - passthrough-playback.80 { - Object.Widget.copier.1 { - stream_name $HDMI4_PCM_CAPS - } + index $HDMI3_HOST_PIPELINE_ID + use_chain_dma $USE_CHAIN_DMA + } + ] + passthrough-be [ + { + direction "playback" + index $HDMI1_DAI_PIPELINE_ID - index $HDMI4_HOST_PIPELINE_ID - use_chain_dma $USE_CHAIN_DMA + Object.Widget.copier.1 { + stream_name "iDisp1" + dai_type "HDA" + copier_type "HDA" } - passthrough-be.81 { - direction "playback" - index $HDMI4_DAI_PIPELINE_ID + use_chain_dma $USE_CHAIN_DMA + } + { + direction "playback" + index $HDMI2_DAI_PIPELINE_ID - Object.Widget.copier.1 { - stream_name 'iDisp4' - dai_type "HDA" - copier_type "HDA" - } - use_chain_dma $USE_CHAIN_DMA + Object.Widget.copier.1 { + stream_name 'iDisp2' + dai_type "HDA" + copier_type "HDA" + } + use_chain_dma $USE_CHAIN_DMA + } + { + direction "playback" + index $HDMI3_DAI_PIPELINE_ID + Object.Widget.copier.1 { + stream_name 'iDisp3' + dai_type "HDA" + copier_type "HDA" } + use_chain_dma $USE_CHAIN_DMA } - } + ] } -Object.PCM { - pcm.5 { +Object.PCM.pcm [ + { name HDMI1 id $HDMI1_PCM_ID Object.Base.fe_dai.1 { @@ -143,7 +108,7 @@ Object.PCM { } direction playback } - pcm.6 { + { name HDMI2 id $HDMI2_PCM_ID Object.Base.fe_dai.1 { @@ -156,7 +121,7 @@ Object.PCM { } direction playback } - pcm.7 { + { name HDMI3 id $HDMI3_PCM_ID Object.Base.fe_dai.1 { @@ -169,10 +134,64 @@ Object.PCM { } direction playback } - # Include HDMI4 PCM conditionally - IncludeByKey.NUM_HDMIS { - "4" { - pcm.8 { +] + +# top-level pipeline connections +Object.Base.route [ + { + source $HDMI1_HOST_PIPELINE_SINK + sink $HDMI1_DAI_PIPELINE_SRC + } + { + source $HDMI2_HOST_PIPELINE_SINK + sink $HDMI2_DAI_PIPELINE_SRC + } + { + source $HDMI3_HOST_PIPELINE_SINK + sink $HDMI3_DAI_PIPELINE_SRC + } +] + +# Include HDMI4 DAI, pipelines, PCM and route conditionally +IncludeByKey.NUM_HDMIS { +"4" { + Object.Dai.HDA [ + { + dai_index 7 + name iDisp4 + id $HDMI4_ID + default_hw_conf_id 3 + Object.Base.hw_config.1 { + name "HDA6" + } + direction playback + } + ] + Object.Pipeline.passthrough-be [ + { + direction "playback" + index $HDMI4_DAI_PIPELINE_ID + + Object.Widget.copier.1 { + stream_name 'iDisp4' + dai_type "HDA" + copier_type "HDA" + } + use_chain_dma $USE_CHAIN_DMA + } + ] + Object.Pipeline.passthrough-playback [ + { + Object.Widget.copier.1 { + stream_name $HDMI4_PCM_CAPS + } + + index $HDMI4_HOST_PIPELINE_ID + use_chain_dma $USE_CHAIN_DMA + } + ] + Object.PCM.pcm [ + { name HDMI4 id $HDMI4_PCM_ID Object.Base.fe_dai.1 { @@ -185,30 +204,12 @@ Object.PCM { } direction playback } - } - } -} - -# top-level pipeline connections -Object.Base.route.50 { - source $HDMI1_HOST_PIPELINE_SINK - sink $HDMI1_DAI_PIPELINE_SRC -} -Object.Base.route.60 { - source $HDMI2_HOST_PIPELINE_SINK - sink $HDMI2_DAI_PIPELINE_SRC -} -Object.Base.route.70 { - source $HDMI3_HOST_PIPELINE_SINK - sink $HDMI3_DAI_PIPELINE_SRC -} - -# Include HDMI4 route conditionally -IncludeByKey.NUM_HDMIS { -"4" { - Object.Base.route.80 { - source $HDMI4_HOST_PIPELINE_SINK - sink $HDMI4_DAI_PIPELINE_SRC - } + ] + Object.Base.route [ + { + source $HDMI4_HOST_PIPELINE_SINK + sink $HDMI4_DAI_PIPELINE_SRC + } + ] } } diff --git a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf index dfa3e06e992a..37db2c4a6b68 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf @@ -10,8 +10,8 @@ Define { AMP_FEEDBACK_CH 2 } -Object.Dai { - ALH."1" { +Object.Dai.ALH [ + { dai_index 514 id $SDW_AMP_BE_ID direction "playback" @@ -25,7 +25,7 @@ Object.Dai { name "ALH514" } } - ALH."2" { + { dai_index 515 id $SDW_AMP_IN_BE_ID direction "capture" @@ -39,61 +39,70 @@ Object.Dai { name "ALH515" } } -} +] Object.Pipeline { - host-copier-gain-mixin-playback.20 { - index 20 + host-copier-gain-mixin-playback [ + { + index 20 - Object.Widget.copier.1 { - stream_name "sdw amplifiers" - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Amplifier Volume' + Object.Widget.copier.1 { + stream_name "sdw amplifiers" + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Amplifier Volume' + } } } - } + ] - mixout-gain-dai-copier-playback.21 { - index 21 + mixout-gain-dai-copier-playback [ + { + index 21 - Object.Widget.copier.1 { - stream_name $SDW_SPK_STREAM - dai_type "ALH" - copier_type "ALH" - node_type $ALH_LINK_OUTPUT_CLASS - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Main Amplifier Volume' + Object.Widget.copier.1 { + stream_name $SDW_SPK_STREAM + dai_type "ALH" + copier_type "ALH" + node_type $ALH_LINK_OUTPUT_CLASS + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Main Amplifier Volume' + } } } - } + ] - passthrough-capture.30 { - index 30 + passthrough-capture [ + { + index 30 - Object.Widget.copier.1.stream_name "amp feedback" - Object.Widget.copier.1.Object.Base.audio_format.1 { - # 32 -> 16 bits conversion is done here, - # so in_bit_depth is 32 (and out_bit_depth is 16). - in_bit_depth 32 + Object.Widget.copier.1.stream_name "amp feedback" + Object.Widget.copier.1.Object.Base.audio_format.1 { + # 32 -> 16 bits conversion is done here, + # so in_bit_depth is 32 (and out_bit_depth is 16). + in_bit_depth 32 + } } - } - passthrough-be.31 { - direction "capture" - index 31 - copier_type "ALH" - - Object.Widget.copier.1 { - stream_name $SDW_SPK_IN_STREAM - dai_type "ALH" - copier_type "ALH" - type "dai_out" - node_type $ALH_LINK_INPUT_CLASS + ] + + passthrough-be [ + { + direction "capture" + index 31 + copier_type "ALH" + + Object.Widget.copier.1 { + stream_name $SDW_SPK_IN_STREAM + dai_type "ALH" + copier_type "ALH" + type "dai_out" + node_type $ALH_LINK_INPUT_CLASS + } } - } + ] } IncludeByKey.NUM_SDW_AMPS { @@ -103,37 +112,41 @@ IncludeByKey.NUM_SDW_AMPS { } Object.Pipeline { - passthrough-be.$ALH_2ND_SPK_ID { - direction "playback" - index $ALH_2ND_SPK_ID - copier_type "ALH" - Object.Widget.copier.1 { - stream_name $SDW_SPK_STREAM - dai_type "ALH" - copier_type "ALH" - type "dai_in" - node_type $ALH_LINK_OUTPUT_CLASS + passthrough-be [ + { + direction "playback" + index $ALH_2ND_SPK_ID + copier_type "ALH" + Object.Widget.copier.1 { + stream_name $SDW_SPK_STREAM + dai_type "ALH" + copier_type "ALH" + type "dai_in" + node_type $ALH_LINK_OUTPUT_CLASS + } } - } - passthrough-capture-be.$ALH_2ND_SPK_IN_ID { - direction "capture" - index $ALH_2ND_SPK_IN_ID - copier_type "ALH" - - Object.Widget.copier.1 { - stream_name $SDW_SPK_IN_STREAM - dai_type "ALH" - copier_type "ALH" - type "dai_out" - node_type $ALH_LINK_INPUT_CLASS + ] + passthrough-capture-be [ + { + direction "capture" + index $ALH_2ND_SPK_IN_ID + copier_type "ALH" + + Object.Widget.copier.1 { + stream_name $SDW_SPK_IN_STREAM + dai_type "ALH" + copier_type "ALH" + type "dai_out" + node_type $ALH_LINK_INPUT_CLASS + } } - } + ] } } } -Object.PCM { - pcm.2 { +Object.PCM.pcm [ + { name "Speaker" id 2 direction "playback" @@ -146,7 +159,7 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } - pcm.3 { + { name "Amp feedback" id 3 direction "capture" @@ -161,21 +174,19 @@ Object.PCM { channels_max $AMP_FEEDBACK_CH } } -} +] -Object.Base { - route.20 { +Object.Base.route [ + { source "gain.21.1" sink "copier.ALH.21.1" } - - route.21 { + { source 'mixin.20.1' sink 'mixout.21.1' } - - route.30 { + { source "copier.ALH.31.1" sink "copier.host.30.1" } -} +] diff --git a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf index d80cff6bb021..6edf218efce3 100644 --- a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf @@ -5,8 +5,8 @@ Define { SDW_DMIC_BE_ID 4 } -Object.Dai { - ALH."1" { +Object.Dai.ALH [ + { dai_index 771 id $SDW_DMIC_BE_ID direction "capture" @@ -20,35 +20,39 @@ Object.Dai { name "ALH771" } } -} +] Object.Pipeline { - passthrough-capture.40 { - index 40 + passthrough-capture [ + { + index 40 - Object.Widget.copier.1.stream_name "sdw dmic" - Object.Widget.copier.1.Object.Base.audio_format.1 { - # 32 -> 16 bits conversion is done here, - # so in_bit_depth is 32 (and out_bit_depth is 16). - in_bit_depth 32 + Object.Widget.copier.1.stream_name "sdw dmic" + Object.Widget.copier.1.Object.Base.audio_format.1 { + # 32 -> 16 bits conversion is done here, + # so in_bit_depth is 32 (and out_bit_depth is 16). + in_bit_depth 32 + } } - } - passthrough-capture-be.41 { - direction "capture" - index 41 - copier_type "ALH" - Object.Widget.copier.1 { - stream_name $SDW_DMIC_STREAM - dai_type "ALH" - copier_type "ALH" - type "dai_out" - node_type $ALH_LINK_INPUT_CLASS + ] + passthrough-capture-be [ + { + direction "capture" + index 41 + copier_type "ALH" + Object.Widget.copier.1 { + stream_name $SDW_DMIC_STREAM + dai_type "ALH" + copier_type "ALH" + type "dai_out" + node_type $ALH_LINK_INPUT_CLASS + } } - } + ] } -Object.PCM { - pcm.4 { +Object.PCM.pcm [ + { name "Microphone" id 4 direction "capture" @@ -61,11 +65,11 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } -} +] -Object.Base { - route.40 { +Object.Base.route [ + { source "copier.ALH.41.1" sink "copier.host.40.1" } -} +] diff --git a/tools/topology/topology2/platform/intel/speaker-echo-ref.conf b/tools/topology/topology2/platform/intel/speaker-echo-ref.conf index f70c6e7ebd3e..b5aab3b32ae6 100644 --- a/tools/topology/topology2/platform/intel/speaker-echo-ref.conf +++ b/tools/topology/topology2/platform/intel/speaker-echo-ref.conf @@ -3,37 +3,41 @@ Define { } Object.Pipeline { - passthrough-capture.2 { - index $ECHO_REF_HOST_PIPELINE_ID + passthrough-capture [ + { + index $ECHO_REF_HOST_PIPELINE_ID - Object.Widget.copier.1 { - stream_name $ECHO_REF_STREAM_NAME + Object.Widget.copier.1 { + stream_name $ECHO_REF_STREAM_NAME + } } - } + ] - dai-copier-be.2 { - index $ECHO_REF_DAI_PIPELINE_ID + dai-copier-be [ + { + index $ECHO_REF_DAI_PIPELINE_ID - Object.Widget.copier."1" { - dai_index $SPEAKER_SSP_DAI_INDEX - dai_type "SSP" - type dai_out - copier_type "SSP" - stream_name $SPEAKER_CODEC_NAME - node_type $I2S_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - dma_buffer_size "$[$ibs * 2]" + Object.Widget.copier."1" { + dai_index $SPEAKER_SSP_DAI_INDEX + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name $SPEAKER_CODEC_NAME + node_type $I2S_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } } } - } + ] } -Object.PCM { - pcm."2" { +Object.PCM.pcm [ + { name "EchoRef" id 27 direction "capture" @@ -44,15 +48,15 @@ Object.PCM { formats 'S16_LE,S24_LE,S32_LE' } } -} +] -Object.Base { - route."7" { +Object.Base.route [ + { source $ECHO_REF_DAI_PIPELINE_SRC sink $ECHO_REF_COPIER_MODULE } - route."8" { + { source $ECHO_REF_COPIER_MODULE sink $ECHO_REF_HOST_PIPELINE_SINK } -} +] diff --git a/tools/topology/topology2/sof-hda-generic.conf b/tools/topology/topology2/sof-hda-generic.conf index 2ee593b13bed..8b53ec7cacdf 100644 --- a/tools/topology/topology2/sof-hda-generic.conf +++ b/tools/topology/topology2/sof-hda-generic.conf @@ -80,95 +80,95 @@ Define { # always include HDMI config -Object.Widget.virtual { - 1 { +Object.Widget.virtual [ + { name 'codec0_in' type input index 1 } - 2 { + { name 'codec1_in' type input index 2 } - 3 { + { name 'codec0_out' type output index 3 } - 4 { + { name 'codec1_out' type output index 4 } - 5 { + { name 'codec2_in' type input index 5 } - 6 { + { name 'codec2_out' type output index 6 } - 7 { + { name 'iDisp1_out' type output index 7 } - 8 { + { name 'iDisp2_out' type output index 8 } - 9 { + { name 'iDisp3_out' type output index 9 } - 10 { + { name 'iDisp3 Tx' type out_drv index 0 } - 11 { + { name 'iDisp2 Tx' type out_drv index 1 } - 12 { + { name 'iDisp1 Tx' type out_drv index 2 } - 13 { + { name 'Analog CPU Playback' type out_drv index 3 } - 14 { + { name 'Digital CPU Playback' type out_drv index 4 } - 15 { + { name 'Alt Analog CPU Playback' type out_drv index 5 } - 16 { + { name 'Analog CPU Capture' type input index 6 } - 17 { + { name 'Digital CPU Capture' type input index 7 } - 18 { + { name 'Alt Analog CPU Capture' type input index 8 } -} +]