diff --git a/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf b/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf index 8f3b96e87a2b..7da087ed3de1 100644 --- a/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf +++ b/tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf @@ -60,8 +60,9 @@ Object.Pipeline { { index 1 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $ANALOG_PLAYBACK_PCM + pcm_id 0 } Object.Widget.gain.1 { @@ -75,8 +76,9 @@ Object.Pipeline { host-gateway-capture [ { index 3 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $ANALOG_CAPTURE_PCM + pcm_id 0 } } ] @@ -135,6 +137,10 @@ Object.Base.route [ } { source 'copier.HDA.4.1' - sink 'copier.host.3.1' + sink 'host-copier.0.capture' + } + { + source 'host-copier.0.playback' + sink 'gain.1.1' } ] diff --git a/tools/topology/topology2/cavs-mixin-mixout-hda.conf b/tools/topology/topology2/cavs-mixin-mixout-hda.conf index aa00ca621093..88d457ae1dcb 100644 --- a/tools/topology/topology2/cavs-mixin-mixout-hda.conf +++ b/tools/topology/topology2/cavs-mixin-mixout-hda.conf @@ -50,8 +50,9 @@ Object.Pipeline { { index 1 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $ANALOG_PLAYBACK_PCM + pcm_id 0 } Object.Widget.gain.1 { @@ -65,8 +66,9 @@ Object.Pipeline { host-gateway-capture [ { index 3 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $ANALOG_CAPTURE_PCM + pcm_id 0 } } ] @@ -134,6 +136,10 @@ Object.Base.route [ } { source 'eqiir.4.1' - sink 'copier.host.3.1' + sink 'host-copier.0.capture' + } + { + source 'host-copier.0.playback' + sink 'gain.1.1' } ] diff --git a/tools/topology/topology2/cavs-nocodec-bt.conf b/tools/topology/topology2/cavs-nocodec-bt.conf index 33adb22cca52..db97bb8c55de 100644 --- a/tools/topology/topology2/cavs-nocodec-bt.conf +++ b/tools/topology/topology2/cavs-nocodec-bt.conf @@ -161,8 +161,9 @@ Object.Pipeline { Object.Widget.pipeline.1 { stream_name 'NoCodec-0' } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Playback' + pcm_id 0 } } { @@ -170,8 +171,9 @@ Object.Pipeline { Object.Widget.pipeline.1 { stream_name 'NoCodec-1' } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP1 Playback' + pcm_id 1 } } ] @@ -183,8 +185,9 @@ Object.Pipeline { Object.Widget.pipeline.1 { stream_name 'NoCodec-0' } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Capture' + pcm_id 0 } } { @@ -192,8 +195,9 @@ Object.Pipeline { Object.Widget.pipeline.1 { stream_name 'NoCodec-1' } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP1 Capture' + pcm_id 1 } } ] @@ -291,20 +295,20 @@ Object.PCM.pcm [ Object.Base.route [ { - source "copier.host.1.1" + source "host-copier.0.playback" sink "copier.SSP.2.1" } { - source "copier.host.3.1" + source "host-copier.1.playback" sink "copier.SSP.4.1" } { source "copier.SSP.6.1" - sink "copier.host.5.1" + sink "host-copier.0.capture" } { source "copier.SSP.10.1" - sink "copier.host.9.1" + sink "host-copier.1.capture" } { source "copier.SSP.12.1" diff --git a/tools/topology/topology2/cavs-nocodec-multicore.conf b/tools/topology/topology2/cavs-nocodec-multicore.conf index b1dc28426617..581126d0c1e6 100644 --- a/tools/topology/topology2/cavs-nocodec-multicore.conf +++ b/tools/topology/topology2/cavs-nocodec-multicore.conf @@ -120,9 +120,10 @@ Object.Pipeline.host-copier-gain-mixin-playback [ index 1 core $SSP0_CORE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { core_id $SSP0_CORE_ID stream_name 'SSP0 Playback' + pcm_id 0 } Object.Widget.gain.1 { core_id $SSP0_CORE_ID @@ -135,9 +136,10 @@ Object.Pipeline.host-copier-gain-mixin-playback [ index 5 core $SSP2_CORE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { core_id $SSP2_CORE_ID stream_name 'SSP2 Playback' + pcm_id 2 } Object.Widget.gain.1 { core_id $SSP2_CORE_ID @@ -201,15 +203,17 @@ Object.Pipeline.host-gateway-capture [ { index 7 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Capture' + pcm_id 0 } } { index 11 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP2 Capture' + pcm_id 2 } } ] @@ -317,11 +321,19 @@ Object.Base.route [ } { source "copier.SSP.8.1" - sink "copier.host.7.1" + sink "host-copier.0.capture" } { source "copier.SSP.12.1" - sink "copier.host.11.1" + sink "host-copier.2.capture" + } + { + source 'host-copier.0.playback' + sink 'gain.1.1' + } + { + source 'host-copier.2.playback' + sink 'gain.5.1' } ] @@ -358,9 +370,10 @@ IncludeByKey.SSP1_ENABLED { index 3 core $SSP1_CORE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { core_id $SSP1_CORE_ID stream_name 'SSP1 Playback' + pcm_id 1 } Object.Widget.gain.1 { core_id $SSP1_CORE_ID @@ -404,8 +417,9 @@ IncludeByKey.SSP1_ENABLED { { index 9 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP1 Capture' + pcm_id 1 } } ] @@ -466,7 +480,11 @@ IncludeByKey.SSP1_ENABLED { } { source "copier.SSP.10.1" - sink "copier.host.9.1" + sink "host-copier.1.capture" + } + { + source 'host-copier.1.playback' + sink 'gain.3.1' } ] } diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index e96e7e25e130..a4919dff7874 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -174,8 +174,9 @@ IncludeByKey.PASSTHROUGH { { index 1 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Playback' + pcm_id 0 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -186,8 +187,9 @@ IncludeByKey.PASSTHROUGH { { index 5 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP2 Playback' + pcm_id 2 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -256,8 +258,9 @@ IncludeByKey.PASSTHROUGH { { index 7 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Capture' + pcm_id 7 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -269,8 +272,9 @@ IncludeByKey.PASSTHROUGH { { index 17 format s32le - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0-1 Capture' + pcm_id 12 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -472,8 +476,9 @@ IncludeByKey.PASSTHROUGH { Object.Pipeline.host-gateway-playback [ { index 1 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Playback' + pcm_id 0 num_input_audio_formats 3 Object.Base.input_audio_format [ { @@ -508,8 +513,9 @@ IncludeByKey.PASSTHROUGH { } { index 5 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP2 Playback' + pcm_id 2 num_input_audio_formats 3 Object.Base.input_audio_format [ { @@ -548,8 +554,9 @@ IncludeByKey.PASSTHROUGH { { index 7 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Capture' + pcm_id 0 } } ] @@ -590,8 +597,9 @@ Object.Pipeline.host-gateway-capture [ { index 11 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP2 Capture' + pcm_id 2 } } ] @@ -627,8 +635,9 @@ IncludeByKey.PASSTHROUGH { Object.Widget.pipeline.1 { stream_name "DMIC0 Raw" } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "Gain Capture 18" + pcm_id 27 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -682,8 +691,9 @@ IncludeByKey.PASSTHROUGH { Object.Widget.pipeline.1 { stream_name "DMIC0 Raw 2" } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "Gain Capture 20" + pcm_id 28 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -828,7 +838,7 @@ IncludeByKey.PASSTHROUGH { Object.Base.route [ { source "copier.SSP.12.1" - sink "copier.host.11.1" + sink "host-copier.2.capture" } ] @@ -875,20 +885,44 @@ IncludeByKey.PASSTHROUGH { source "copier.SSP.8.1" sink "smart_amp.2.1" } + { + source 'host-copier.0.playback' + sink 'gain.1.1' + } + { + source 'host-copier.2.playback' + sink 'gain.5.1' + } + { + source "gain.18.1" + sink "host-copier.27.capture" + } + { + source "gain.20.1" + sink "host-copier.28.capture" + } + { + source "gain.7.1" + sink "host-copier.7.capture" + } + { + source "gain.17.1" + sink "host-copier.12.capture" + } ] } "true" { Object.Base.route [ { source "copier.SSP.8.1" - sink "copier.host.7.1" + sink "host-copier.0.capture" } { - source "copier.host.1.1" + source "host-copier.0.playback" sink "copier.SSP.2.1" } { - source "copier.host.5.1" + source "host-copier.2.playback" sink "copier.SSP.6.1" } ] @@ -965,8 +999,9 @@ IncludeByKey.SSP1_ENABLED { { index 9 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP1 Capture' + pcm_id 1 } } ] @@ -977,8 +1012,9 @@ IncludeByKey.SSP1_ENABLED { { index 3 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP1 Playback' + pcm_id 1 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -1056,8 +1092,9 @@ IncludeByKey.SSP1_ENABLED { Object.Pipeline.host-gateway-playback [ { index 3 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP1 Playback' + pcm_id 1 num_input_audio_formats 3 Object.Base.input_audio_format [ { @@ -1128,12 +1165,16 @@ IncludeByKey.SSP1_ENABLED { source "gain.4.1" sink "copier.SSP.4.1" } + { + source 'host-copier.1.playback' + sink 'gain.3.1' + } ] } "true" { Object.Base.route [ { - source "copier.host.3.1" + source "host-copier.1.playback" sink "copier.SSP.4.1" } ] @@ -1142,7 +1183,7 @@ IncludeByKey.SSP1_ENABLED { Object.Base.route [ { source "copier.SSP.10.1" - sink "copier.host.9.1" + sink "host-copier.1.capture" } ] } diff --git a/tools/topology/topology2/cavs-rt5682.conf b/tools/topology/topology2/cavs-rt5682.conf index cd6932dc9a82..213f2233e834 100644 --- a/tools/topology/topology2/cavs-rt5682.conf +++ b/tools/topology/topology2/cavs-rt5682.conf @@ -201,8 +201,9 @@ Object.Pipeline { { index 1 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' + pcm_id 0 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -213,8 +214,9 @@ Object.Pipeline { { index 3 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME' + pcm_id 1 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -265,8 +267,9 @@ Object.Pipeline { { index 5 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name '$HEADSET_CAPTURE_PCM_STREAM_NAME' + pcm_id 0 } } ] @@ -349,6 +352,14 @@ Object.Base.route [ } { source "copier.SSP.6.1" - sink "copier.host.5.1" + sink "host-copier.0.capture" + } + { + source "host-copier.0.playback" + sink "gain.1.1" + } + { + source "host-copier.1.playback" + sink "gain.3.1" } ] diff --git a/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf index 5786ae6d70f4..f3840a02122e 100644 --- a/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf +++ b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf @@ -80,7 +80,10 @@ Object.Pipeline { { index 1 - Object.Widget.copier.1.stream_name "Gain Playback 0" + Object.Widget.host-copier.1 { + stream_name "Gain Playback 0" + pcm_id 0 + } Object.Widget.gain.1{ Object.Control.mixer.1 { name 'Src Playback Volume' @@ -114,11 +117,14 @@ Object.Pipeline { { 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 + Object.Widget.host-copier.1 { + stream_name "Passthrough Capture 0" + pcm_id 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 + } } } ] @@ -181,6 +187,10 @@ Object.Base.route [ } { source "copier.ALH.3.1" - sink "copier.host.4.1" + sink "host-copier.1.capture" + } + { + source 'host-copier.0.playback' + sink 'gain.1.1' } ] diff --git a/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf b/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf index dfda6d5132ca..8bc3798953e9 100644 --- a/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf +++ b/tools/topology/topology2/cavs-src-mixin-mixout-hda.conf @@ -50,8 +50,9 @@ Object.Pipeline { { index 1 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $ANALOG_PLAYBACK_PCM + pcm_id 0 } Object.Widget.src.1 { @@ -68,8 +69,9 @@ Object.Pipeline { host-gateway-capture [ { index 3 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $ANALOG_CAPTURE_PCM + pcm_id 0 } } ] @@ -130,6 +132,10 @@ Object.Base.route [ } { source 'copier.HDA.4.1' - sink 'copier.host.3.1' + sink 'host-copier.0.capture' + } + { + source 'host-copier.0.playback' + sink 'gain.1.1' } ] diff --git a/tools/topology/topology2/include/components/copier.conf b/tools/topology/topology2/include/components/copier.conf index 703a13cb0d5b..4de382aebd2d 100644 --- a/tools/topology/topology2/include/components/copier.conf +++ b/tools/topology/topology2/include/components/copier.conf @@ -51,7 +51,6 @@ Class.Widget."copier" { constraints { !valid_values [ "HDA" - "host" "SSP" "ALH" "DMIC" @@ -107,9 +106,6 @@ Class.Widget."copier" { token_ref "sof_tkn_copier.word" constraints { !valid_values [ - $HDA_HOST_OUTPUT_CLASS # HD/A host output (-> DSP) - $HDA_HOST_INPUT_CLASS # HD/A host input (<- DSP) - $HDA_HOST_INOUT_CLASS # HD/A host input/output (rsvd for future use) $HDA_LINK_OUTPUT_CLASS # HD/A link output (DSP ->) $HDA_LINK_INPUT_CLASS # HD/A link input (DSP <-) $HDA_LINK_INOUT_CLASS # HD/A link input/output (rsvd for future use) @@ -133,14 +129,6 @@ Class.Widget."copier" { } } - # - # Deep buffer size in ms. Applicable only for host copiers - # - DefineAttribute."deep_buffer_dma_ms" { - # Token set reference name and type - token_ref "sof_tkn_copier.word" - } - attributes { # # The copier widget name would be constructed using the copier type, index and diff --git a/tools/topology/topology2/include/components/host-copier.conf b/tools/topology/topology2/include/components/host-copier.conf new file mode 100644 index 000000000000..51b952f07f56 --- /dev/null +++ b/tools/topology/topology2/include/components/host-copier.conf @@ -0,0 +1,138 @@ +# +# Host gateway copier widget +# +# A host gateway copier widget. All attributes defined herein are namespaced +# by alsatplg to "Object.Widget.host-copier.N.attribute_name" +# +# Usage: this component can be used by instantiating it in the parent object. i.e. +# +# Object.Widget.host-copier."N" { +# pcm_id 1 +# } +# +# Where N is the unique instance number for the host-copier object within the same alsaconf node. + +Class.Widget."host-copier" { + # + # Pipeline ID for the copier object + # + DefineAttribute."index" {} + + /* PCM ID that the host-copier is bound with */ + DefineAttribute."pcm_id" {} + + # + # Copier object instance + # + DefineAttribute."instance" {} + + #include common component definition + + + # + # host-copier component UUID + # + DefineAttribute."uuid" { + type "string" + # Token set reference name and type + token_ref "sof_tkn_comp.uuid" + } + + # + # Bespoke Attribute Definitions for host copiers + # + + DefineAttribute."direction" { + type "string" + token_ref "sof_tkn_dai.word" + constraints { + !valid_values [ + "playback" + "capture" + ] + !tuple_values [ + 0 + 1 + ] + } + } + + # + # cycles per chunk processed + # + DefineAttribute."cpc" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + DefineAttribute."bss_size" {} + + DefineAttribute."is_pages" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + DefineAttribute."node_type" { + # Token set reference name and type + token_ref "sof_tkn_copier.word" + constraints { + !valid_values [ + $HDA_HOST_OUTPUT_CLASS # HD/A host output (-> DSP) + $HDA_HOST_INPUT_CLASS # HD/A host input (<- DSP) + $HDA_HOST_INOUT_CLASS # HD/A host input/output (rsvd for future use) + ] + } + } + + # + # Deep buffer size in ms. Applicable only for host copiers + # + DefineAttribute."deep_buffer_dma_ms" { + # Token set reference name and type + token_ref "sof_tkn_copier.word" + } + + attributes { + # + # The host copier widget name would be constructed using the copier pcm_id and + # direction. For ex: "host-copier.1.playback". + # + !constructor [ + "pcm_id" + "direction" + ] + + # + # mandatory attributes that must be provided when the buffer class is instantiated. + # num_input_audio_formats for playback and num_output_formats for capture are + # mandatory even though the num_input_pins/num_output_pins are 0 because + # these are used to set the DMA buffer format. + !mandatory [ + "num_input_audio_formats" + "num_output_audio_formats" + "node_type" + ] + + # + # immutable attributes cannot be modified in the object instance + # + !immutable [ + "uuid" + ] + + unique "instance" + } + + # + # Default attributes for Copier + # + #UUID: 9BA00C83-CA12-4A83-943C-1FA2E82F9DDA + uuid "83:0c:a0:9b:12:CA:83:4a:94:3c:1f:a2:e8:2f:9d:da" + no_pm "true" + core_id 0 + cpc 1647 + bss_size 280 + + # math expression for computing is_pages + is_pages "$[(($bss_size + 4095) & -4095) / 4096]" +} diff --git a/tools/topology/topology2/include/pipelines/cavs/deepbuffer-playback.conf b/tools/topology/topology2/include/pipelines/cavs/deepbuffer-playback.conf index 8b5ffe020ce2..fbb19283a9dd 100644 --- a/tools/topology/topology2/include/pipelines/cavs/deepbuffer-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/deepbuffer-playback.conf @@ -17,7 +17,7 @@ # - + @@ -45,12 +45,12 @@ Class.Pipeline."deepbuffer-playback" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_in" node_type $HDA_HOST_OUTPUT_CLASS num_input_audio_formats 3 num_output_audio_formats 3 + num_output_pins 1 deep_buffer_dma_ms $DEEPBUFFER_FW_DMA_MS # 16-bit 48KHz 2ch Object.Base.audio_format.1 { @@ -97,16 +97,12 @@ Class.Pipeline."deepbuffer-playback" { } } - Object.Base { - route.1 { - source copier.host.$index.1 - sink gain.$index.1 - } - route.2 { + Object.Base.route [ + { source gain.$index.1 sink mixin.$index.1 } - } + ] direction "playback" dynamic_pipeline 1 diff --git a/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf b/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf index 371991dbf01d..57e65070b6db 100644 --- a/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf +++ b/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf @@ -18,7 +18,7 @@ # - + @@ -45,11 +45,11 @@ Class.Pipeline."gain-capture" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_out" num_input_audio_formats 3 num_output_audio_formats 3 + num_input_pins 1 # 16-bit 48KHz 2ch Object.Base.audio_format.1 { in_bit_depth 32 @@ -107,13 +107,6 @@ Class.Pipeline."gain-capture" { } } - Object.Base { - route."1" { - source "gain.$index.1" - sink "copier.host.$index.1" - } - } - direction "capture" dynamic_pipeline 1 time_domain "timer" diff --git a/tools/topology/topology2/include/pipelines/cavs/gain-copier-capture.conf b/tools/topology/topology2/include/pipelines/cavs/gain-copier-capture.conf index 1003fcb38546..86ee039fd90e 100644 --- a/tools/topology/topology2/include/pipelines/cavs/gain-copier-capture.conf +++ b/tools/topology/topology2/include/pipelines/cavs/gain-copier-capture.conf @@ -18,7 +18,7 @@ # - + @@ -45,11 +45,11 @@ Class.Pipeline."gain-copier-capture" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_out" num_input_audio_formats 3 num_output_audio_formats 3 + num_input_pins 1 # 16-bit 48KHz 2ch Object.Base.audio_format.1 { @@ -108,16 +108,12 @@ Class.Pipeline."gain-copier-capture" { } } - Object.Base { - route."1" { + Object.Base.route [ + { source "module-copier.$index.2" sink "gain.$index.1" } - route."2" { - source "gain.$index.1" - sink "copier.host.$index.1" - } - } + ] direction "capture" dynamic_pipeline 1 diff --git a/tools/topology/topology2/include/pipelines/cavs/gain-playback.conf b/tools/topology/topology2/include/pipelines/cavs/gain-playback.conf index cf553651b7ce..81aedde59f7f 100644 --- a/tools/topology/topology2/include/pipelines/cavs/gain-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/gain-playback.conf @@ -17,7 +17,7 @@ # - + @@ -44,11 +44,11 @@ Class.Pipeline."gain-playback" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_in" num_input_audio_formats 3 num_output_audio_formats 3 + num_output_pins 1 # 16-bit 48KHz 2ch Object.Base.audio_format.1 { out_bit_depth 32 @@ -91,13 +91,6 @@ Class.Pipeline."gain-playback" { } } - Object.Base { - route."1" { - source "copier.host.$index.1" - sink "gain.$index.1" - } - } - direction "playback" dynamic_pipeline 1 time_domain "timer" diff --git a/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-mixin-playback.conf b/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-mixin-playback.conf index 26faeb8891f1..814e78252eb8 100644 --- a/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-mixin-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-mixin-playback.conf @@ -17,7 +17,7 @@ # - + @@ -45,12 +45,12 @@ Class.Pipeline."host-copier-gain-mixin-playback" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_in" node_type $HDA_HOST_OUTPUT_CLASS num_input_audio_formats 3 num_output_audio_formats 3 + num_output_pins 1 # 16-bit 48KHz 2ch Object.Base.audio_format.1 { out_bit_depth 32 @@ -95,16 +95,12 @@ Class.Pipeline."host-copier-gain-mixin-playback" { } } - Object.Base { - route.1 { - source copier.host.$index.1 - sink gain.$index.1 - } - route.2 { + Object.Base.route [ + { source gain.$index.1 sink mixin.$index.1 } - } + ] direction "playback" dynamic_pipeline 1 diff --git a/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-src-mixin-playback.conf b/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-src-mixin-playback.conf index 292e5b1686c0..c8b3d5f4216a 100644 --- a/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-src-mixin-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/host-copier-gain-src-mixin-playback.conf @@ -18,7 +18,7 @@ - + @@ -47,10 +47,10 @@ Class.Pipeline."host-copier-gain-src-mixin-playback" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_in" node_type $HDA_HOST_OUTPUT_CLASS + num_output_pins 1 } @@ -73,20 +73,16 @@ Class.Pipeline."host-copier-gain-src-mixin-playback" { } } - Object.Base { - route.1 { - source copier.host..1 - sink gain..1 + Object.Base.route [ + { + source gain.$index.1 + sink src.$index.1 } - route.2 { - source gain..1 - sink src..1 + { + source src.$index.1 + sink mixin.$index.1 } - route.3 { - source src..1 - sink mixin..1 - } - } + ] direction "playback" dynamic_pipeline 1 diff --git a/tools/topology/topology2/include/pipelines/cavs/host-gateway-capture.conf b/tools/topology/topology2/include/pipelines/cavs/host-gateway-capture.conf index eb966b869eec..deb9df7f9650 100644 --- a/tools/topology/topology2/include/pipelines/cavs/host-gateway-capture.conf +++ b/tools/topology/topology2/include/pipelines/cavs/host-gateway-capture.conf @@ -17,7 +17,7 @@ # - + Class.Pipeline."host-gateway-capture" { @@ -43,10 +43,10 @@ Class.Pipeline."host-gateway-capture" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_out" node_type $HDA_HOST_INPUT_CLASS + num_input_pins 1 num_input_audio_formats 6 num_output_audio_formats 6 # 16-bit output format 48KHz 2ch. Input sample format is always 32-bit for capture diff --git a/tools/topology/topology2/include/pipelines/cavs/host-gateway-playback.conf b/tools/topology/topology2/include/pipelines/cavs/host-gateway-playback.conf index acae69900f8f..577513ad77b4 100644 --- a/tools/topology/topology2/include/pipelines/cavs/host-gateway-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/host-gateway-playback.conf @@ -16,7 +16,7 @@ # Where N is the unique pipeline ID within the same alsaconf node. # - + @@ -43,10 +43,10 @@ Class.Pipeline."host-gateway-playback" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { node_type $HDA_HOST_OUTPUT_CLASS type "aif_in" + num_output_pins 1 num_input_audio_formats 3 num_output_audio_formats 3 # 16-bit input format 48KHz 2ch. Output sample format is always 32-bit for playback diff --git a/tools/topology/topology2/include/pipelines/cavs/mixout-gain-host-copier-capture.conf b/tools/topology/topology2/include/pipelines/cavs/mixout-gain-host-copier-capture.conf index 35c822a62ad5..594251d66062 100644 --- a/tools/topology/topology2/include/pipelines/cavs/mixout-gain-host-copier-capture.conf +++ b/tools/topology/topology2/include/pipelines/cavs/mixout-gain-host-copier-capture.conf @@ -17,7 +17,7 @@ # - + @@ -47,12 +47,12 @@ Class.Pipeline."mixout-gain-host-copier-capture" { Object.Widget { mixout."1" {} - copier."1" { - copier_type "host" + host-copier."1" { type "aif_out" node_type $HDA_HOST_INPUT_CLASS num_input_audio_formats 4 num_output_audio_formats 4 + num_input_pins 1 # 16-bit 48KHz 2ch Object.Base.audio_format.1 { in_bit_depth 32 @@ -108,16 +108,12 @@ Class.Pipeline."mixout-gain-host-copier-capture" { } } - Object.Base { - route.1 { - source mixout.$index.1 - sink gain.$index.1 - } - route.2 { + Object.Base.route [ + { source gain.$index.1 sink copier.host.$index.1 } - } + ] direction "capture" dynamic_pipeline 1 diff --git a/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf b/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf index d2ae1e08fa0c..aaab347faf37 100644 --- a/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf @@ -18,7 +18,7 @@ - + @@ -43,9 +43,9 @@ Class.Pipeline."src-gain-mixin-playback" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_in" + num_output_pins 1 @@ -87,22 +87,16 @@ Class.Pipeline."src-gain-mixin-playback" { } } - Object.Base { - route."1" { - source "copier.host.$index.1" - sink "src.$index.1" - } - - route."2" { + Object.Base.route [ + { source "src.$index.1" sink "gain.$index.1" } - - route."3" { + { source "gain.$index.1" sink "mixin.$index.1" - } - } + } + ] direction "playback" dynamic_pipeline 1 diff --git a/tools/topology/topology2/platform/intel/bt-generic.conf b/tools/topology/topology2/platform/intel/bt-generic.conf index 5962ff9d7f0a..fdd4fa399844 100644 --- a/tools/topology/topology2/platform/intel/bt-generic.conf +++ b/tools/topology/topology2/platform/intel/bt-generic.conf @@ -62,8 +62,9 @@ Object.Pipeline { Object.Widget.pipeline.1 { stream_name $BT_PB_PIPELINE_STREAM_NAME } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $BT_PB_PCM_CAPS + pcm_id $BT_PCM_ID num_input_audio_formats 3 num_output_audio_formats 3 Object.Base.audio_format.0 { @@ -105,8 +106,9 @@ Object.Pipeline { Object.Widget.pipeline.1 { stream_name $BT_CP_PIPELINE_STREAM_NAME } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $BT_CP_PCM_CAPS + pcm_id $BT_PCM_ID num_input_audio_formats 3 num_output_audio_formats 3 Object.Base.audio_format.0 { @@ -193,12 +195,12 @@ Object.Pipeline { Object.Base.route [ { - source $BT_PB_DAI_PIPELINE_SRC + source "host-copier.$BT_PCM_ID.playback" sink $BT_PB_HOST_PIPELINE_SINK } { source $BT_CP_DAI_PIPELINE_SRC - sink $BT_CP_HOST_PIPELINE_SINK + sink "host-copier.$BT_PCM_ID.capture" } ] diff --git a/tools/topology/topology2/platform/intel/deep-buffer.conf b/tools/topology/topology2/platform/intel/deep-buffer.conf index f66b5d62e39f..047e409a26e2 100644 --- a/tools/topology/topology2/platform/intel/deep-buffer.conf +++ b/tools/topology/topology2/platform/intel/deep-buffer.conf @@ -2,8 +2,9 @@ Object.Pipeline.deepbuffer-playback [ { index $DEEP_BUFFER_PIPELINE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $DEEP_BUFFER_PCM_NAME + pcm_id $DEEP_BUFFER_PCM_ID } Object.Widget.gain.1 { @@ -37,4 +38,8 @@ Object.Base.route [ source $DEEP_BUFFER_PIPELINE_SRC sink $DEEP_BUFFER_PIPELINE_SINK } + { + source host-copier.$DEEP_BUFFER_PCM_ID.playback + sink gain.$DEEP_BUFFER_PIPELINE_ID.1 + } ] diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index 34fc26afa8e0..8c1fc2654f01 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -73,9 +73,10 @@ IncludeByKey.PASSTHROUGH { format $FORMAT index $DMIC0_HOST_PIPELINE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $DMIC0_PCM_CAPS core_id $DMIC_CORE_ID + pcm_id $DMIC0_PCM_ID num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -248,14 +249,19 @@ IncludeByKey.PASSTHROUGH { source $DMIC0_DAI_PIPELINE_SRC sink $DMIC0_HOST_PIPELINE_SINK } + { + source "gain.$DMIC0_HOST_PIPELINE_ID.1" + sink "host-copier.$DMIC0_PCM_ID.capture" + } ] } "true" { Object.Pipeline.host-gateway-capture [ { index $DMIC0_HOST_PIPELINE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $DMIC0_PCM_CAPS + pcm_id $DMIC0_PCM_ID num_input_audio_formats 2 Object.Base.input_audio_format [ { @@ -331,7 +337,7 @@ IncludeByKey.PASSTHROUGH { Object.Base.route [ { source "copier.DMIC.$DMIC0_DAI_PIPELINE_ID.1" - sink "copier.host.$DMIC0_HOST_PIPELINE_ID.1" + sink "host-copier.$DMIC0_PCM_ID.capture" } ] } diff --git a/tools/topology/topology2/platform/intel/dmic-wov.conf b/tools/topology/topology2/platform/intel/dmic-wov.conf index 42e5815dccac..37796b178077 100644 --- a/tools/topology/topology2/platform/intel/dmic-wov.conf +++ b/tools/topology/topology2/platform/intel/dmic-wov.conf @@ -7,8 +7,9 @@ Object.Pipeline { rate_max 16000 index $DMIC1_HOST_PIPELINE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $DMIC1_PCM_CAPS + pcm_id 11 Object.Base.audio_format.1 { in_rate 16000 in_bit_depth 32 @@ -108,7 +109,7 @@ Object.Pipeline { Object.Base.route [ { source $DMIC_WOV_DAI_PIPELINE_KPB - sink $DMIC1_HOST_PIPELINE_SINK + sink "host-copier.11.capture" } { source $DMIC_WOV_DAI_PIPELINE_KPB @@ -116,7 +117,7 @@ Object.Base.route [ } { source $WOV_PIPELINE_VIRTUAL - sink $DMIC1_HOST_PIPELINE_SINK + sink "host-copier.11.capture" } ] diff --git a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf index e7c641468193..430d16373bf9 100644 --- a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf +++ b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf @@ -21,8 +21,9 @@ Object.Pipeline.host-gateway-capture[ { index 19 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "DMIC0 AEC" + pcm_id 27 } } ] @@ -31,8 +32,9 @@ Object.Pipeline.gain-capture [ { index 20 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "DMIC0 AN" + pcm_id 28 } Object.Widget.gain.1 { @@ -89,10 +91,14 @@ Object.Base.route [ } { source "module-copier.18.2" - sink "copier.host.19.1" + sink "host-copier.27.capture" } { source "module-copier.18.2" sink "gain.20.1" } + { + source "gain.20.1" + sink "host-copier.28.capture" + } ] diff --git a/tools/topology/topology2/platform/intel/hdmi-generic.conf b/tools/topology/topology2/platform/intel/hdmi-generic.conf index a22c49e1af93..4a8792751da8 100644 --- a/tools/topology/topology2/platform/intel/hdmi-generic.conf +++ b/tools/topology/topology2/platform/intel/hdmi-generic.conf @@ -34,24 +34,27 @@ Object.Dai.HDA [ Object.Pipeline { host-gateway-playback [ { - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $HDMI1_PCM_CAPS + pcm_id $HDMI1_PCM_ID } index $HDMI1_HOST_PIPELINE_ID use_chain_dma $USE_CHAIN_DMA } { - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $HDMI2_PCM_CAPS + pcm_id $HDMI2_PCM_ID } index $HDMI2_HOST_PIPELINE_ID use_chain_dma $USE_CHAIN_DMA } { - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $HDMI3_PCM_CAPS + pcm_id $HDMI3_PCM_ID } index $HDMI3_HOST_PIPELINE_ID @@ -178,15 +181,15 @@ Object.PCM.pcm [ # top-level pipeline connections Object.Base.route [ { - source $HDMI1_HOST_PIPELINE_SINK + source "host-copier.$HDMI1_PCM_ID.playback" sink $HDMI1_DAI_PIPELINE_SRC } { - source $HDMI2_HOST_PIPELINE_SINK + source "host-copier.$HDMI2_PCM_ID.playback" sink $HDMI2_DAI_PIPELINE_SRC } { - source $HDMI3_HOST_PIPELINE_SINK + source "host-copier.$HDMI3_PCM_ID.playback" sink $HDMI3_DAI_PIPELINE_SRC } ] @@ -234,8 +237,9 @@ IncludeByKey.NUM_HDMIS { ] Object.Pipeline.host-gateway-playback [ { - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $HDMI4_PCM_CAPS + pcm_id $HDMI4_PCM_ID } index $HDMI4_HOST_PIPELINE_ID @@ -259,7 +263,7 @@ IncludeByKey.NUM_HDMIS { ] Object.Base.route [ { - source $HDMI4_HOST_PIPELINE_SINK + source "host-copier.$HDMI4_PCM_ID.playback" sink $HDMI4_DAI_PIPELINE_SRC } ] diff --git a/tools/topology/topology2/platform/intel/nocodec-ssp0-2level.conf b/tools/topology/topology2/platform/intel/nocodec-ssp0-2level.conf index a2d907ea22c9..8eb119911bd5 100644 --- a/tools/topology/topology2/platform/intel/nocodec-ssp0-2level.conf +++ b/tools/topology/topology2/platform/intel/nocodec-ssp0-2level.conf @@ -5,8 +5,9 @@ Object.Pipeline.host-copier-gain-mixin-playback [ Object.Widget.pipeline.1 { stream_name 'NoCodec-0' } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name 'SSP0 Aux Playback' + pcm_id $SSP0_MIXER_PCM_ID_1 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -49,6 +50,11 @@ Object.Base.route [ source $SSP0_MIXER_SOURCE_2 sink $SSP0_MIXER_SINK_1 } + { + source host-copier.$SSP0_MIXER_PCM_ID_1.playback + sink gain.$SSP0_MIXER_PIPELINE_ID_2.1 + } + { source $SSP0_MIXER_SOURCE_3 sink $SSP0_MIXER_SINK_2 diff --git a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf index 730d582a9bc8..dacde5399242 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf @@ -33,8 +33,9 @@ Object.Pipeline { { index 20 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "sdw amplifiers" + pcm_id 2 } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -129,6 +130,10 @@ Object.Base.route [ source 'mixin.20.1' sink 'mixout.21.1' } + { + source 'host-copier.2.playback' + sink 'gain.20.1' + } ] IncludeByKey.SDW_AMP_FEEDBACK { @@ -154,11 +159,14 @@ IncludeByKey.SDW_AMP_FEEDBACK { { 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.host-copier.1 { + stream_name "amp feedback" + pcm_id 3 + 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 + } } } ] @@ -221,7 +229,7 @@ IncludeByKey.SDW_AMP_FEEDBACK { Object.Base.route [ { source "copier.ALH.31.1" - sink "copier.host.30.1" + sink "host-copier.3.capture" } ] } diff --git a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf index 0a66cb90ac45..d7320289a7de 100644 --- a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf @@ -27,11 +27,14 @@ Object.Pipeline { { 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.host-copier.1 { + stream_name "sdw dmic" + pcm_id 4 + 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 + } } } ] @@ -70,6 +73,6 @@ Object.PCM.pcm [ Object.Base.route [ { source "copier.ALH.41.1" - sink "copier.host.40.1" + sink "host-copier.4.capture" } ] diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index 0c81629f9e3e..1d6c0c97b2f0 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -46,13 +46,14 @@ Object.Pipeline { { index 0 - Object.Widget.copier.1 { - stream_name "volume playback 0" - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name '1 Playback Volume 0' - } + Object.Widget.host-copier.1 { + stream_name "volume playback 0" + pcm_id 0 + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '1 Playback Volume 0' + } } } ] @@ -79,11 +80,14 @@ Object.Pipeline { { index 10 - Object.Widget.copier.1.stream_name "Passthrough Capture 0" - Object.Widget.copier.1.Object.Base.audio_format.1 { - # 32/32 -> 16/16 bits conversion is done here - in_bit_depth 32 - in_valid_bit_depth 32 + Object.Widget.host-copier.1 { + stream_name "Passthrough Capture 0" + pcm_id 1 + Object.Base.audio_format.1 { + # 32/32 -> 16/16 bits conversion is done here + in_bit_depth 32 + in_valid_bit_depth 32 + } } } ] @@ -154,6 +158,10 @@ Object.Base.route [ } { source "eqiir.11.1" - sink "copier.host.10.1" + sink "host-copier.1.capture" + } + { + source "host-copier.0.playback" + sink "gain.0.1" } ] diff --git a/tools/topology/topology2/platform/intel/speaker-echo-ref.conf b/tools/topology/topology2/platform/intel/speaker-echo-ref.conf index 3926712264d8..0fba6b61326f 100644 --- a/tools/topology/topology2/platform/intel/speaker-echo-ref.conf +++ b/tools/topology/topology2/platform/intel/speaker-echo-ref.conf @@ -7,8 +7,9 @@ Object.Pipeline { { index $ECHO_REF_HOST_PIPELINE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $ECHO_REF_STREAM_NAME + pcm_id 27 } } ] @@ -56,6 +57,6 @@ Object.Base.route [ } { source $ECHO_REF_COPIER_MODULE - sink $ECHO_REF_HOST_PIPELINE_SINK + sink "host-copier.27.capture" } ]