diff --git a/tools/topology/topology2/cavs-nocodec-multicore.conf b/tools/topology/topology2/cavs-nocodec-multicore.conf new file mode 100644 index 000000000000..b1dc28426617 --- /dev/null +++ b/tools/topology/topology2/cavs-nocodec-multicore.conf @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Define { + MCLK 24576000 + PLATFORM "none" + SSP0_CORE_ID 0 + SSP1_CORE_ID 1 + SSP2_CORE_ID 2 +} + +# override defaults with platform-specific config +IncludeByKey.PLATFORM { + "tgl" "platform/intel/tgl.conf" + "adl" "platform/intel/tgl.conf" + "mtl" "platform/intel/mtl.conf" +} + +# +# List of all DAIs +# +Object.Dai.SSP [ + { + id 0 + dai_index 0 + direction "duplex" + name NoCodec-0 + default_hw_conf_id 0 + sample_bits 32 + quirks "lbm_mode" + io_clk $MCLK + + Object.Base.hw_config.1 { + name "SSP0" + id 0 + bclk_freq 3072000 + tdm_slot_width 32 + # TODO: remove this. Needs alsaptlg change. + Object.Base.link_config.1 { + clock_source 1 + } + } + } + { + id 2 + dai_index 2 + direction "duplex" + name NoCodec-2 + default_hw_conf_id 0 + sample_bits 32 + quirks "lbm_mode" + io_clk $MCLK + + Object.Base.hw_config.1 { + name "SSP2" + id 0 + bclk_freq 3072000 + tdm_slot_width 32 + # TODO: remove this. Needs alsaptlg change. + Object.Base.link_config.1 { + clock_source 1 + } + } + } +] + +# +# Pipeline definitions +# +# PCM0 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP0 (core SSP0_CORE_ID) +# PCM1 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP1 (core SSP1_CORE_ID) +# PCM2 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP2 (core SSP2_CORE_ID) +# SSP0 ---> PCM0 +# SSP1 ---> PCM1 +# SSP2 ---> PCM2 + +# Pipeline ID:1 PCM ID: 0 +Object.Pipeline.host-copier-gain-mixin-playback [ + { + index 1 + + core $SSP0_CORE_ID + Object.Widget.copier.1 { + core_id $SSP0_CORE_ID + stream_name 'SSP0 Playback' + } + Object.Widget.gain.1 { + core_id $SSP0_CORE_ID + Object.Control.mixer.1 { + name 'Playback Volume 1' + } + } + } + { + index 5 + + core $SSP2_CORE_ID + Object.Widget.copier.1 { + core_id $SSP2_CORE_ID + stream_name 'SSP2 Playback' + } + Object.Widget.gain.1 { + core_id $SSP2_CORE_ID + Object.Control.mixer.1 { + name 'Playback Volume 5' + } + } + Object.Widget.mixin.1 { + core_id $SSP2_CORE_ID + } + } +] + +Object.Pipeline.mixout-gain-dai-copier-playback [ + { + index 14 + + core $SSP0_CORE_ID + Object.Widget.copier.1 { + core_id $SSP0_CORE_ID + dai_index 0 + dai_type "SSP" + copier_type "SSP" + stream_name "NoCodec-0" + node_type $I2S_LINK_OUTPUT_CLASS + } + + Object.Widget.gain.1 { + core_id $SSP0_CORE_ID + Object.Control.mixer.1 { + name 'Main Playback Volume 14' + } + } + } + { + index 6 + + core $SSP2_CORE_ID + Object.Widget.copier.1 { + core_id $SSP2_CORE_ID + dai_index 2 + dai_type "SSP" + copier_type "SSP" + stream_name "NoCodec-2" + node_type $I2S_LINK_OUTPUT_CLASS + } + + Object.Widget.gain.1 { + core_id $SSP2_CORE_ID + Object.Control.mixer.1 { + name 'Main Playback Volume 6' + } + } + Object.Widget.mixout.1 { + core_id $SSP2_CORE_ID + } + } +] + +Object.Pipeline.host-gateway-capture [ + { + index 7 + + Object.Widget.copier.1 { + stream_name 'SSP0 Capture' + } + } + { + index 11 + + Object.Widget.copier.1 { + stream_name 'SSP2 Capture' + } + } +] + +Object.Pipeline.io-gateway-capture [ + { + index 8 + direction capture + + Object.Widget.copier."1" { + dai_index 1 + 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 + } + } + } + { + index 12 + direction capture + + Object.Widget.copier."1" { + dai_index 2 + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name "NoCodec-2" + 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 + } + } + } +] + +Object.PCM.pcm [ + { + name "Port0" + id 0 + direction "duplex" + Object.Base.fe_dai.1 { + name "Port0" + } + + Object.PCM.pcm_caps.1 { + direction "playback" + name "SSP0 Playback" + formats 'S16_LE,S24_LE,S32_LE' + } + + Object.PCM.pcm_caps.2 { + direction "capture" + name "SSP0 Capture" + formats 'S16_LE,S24_LE,S32_LE' + } + } + { + name "Port2" + id 2 + direction "duplex" + Object.Base.fe_dai.1 { + name "Port2" + } + + Object.PCM.pcm_caps.1 { + direction "playback" + name "SSP2 Playback" + formats 'S16_LE,S24_LE,S32_LE' + } + + Object.PCM.pcm_caps.2 { + direction "capture" + name "SSP2 Capture" + formats 'S16_LE,S24_LE,S32_LE' + } + } +] + +Object.Base.route [ + { + source "gain.14.1" + sink "copier.SSP.14.1" + } + { + source "mixin.1.1" + sink "mixout.14.1" + } + { + source "gain.6.1" + sink "copier.SSP.6.1" + } + { + source "mixin.5.1" + sink "mixout.6.1" + } + { + source "copier.SSP.8.1" + sink "copier.host.7.1" + } + { + source "copier.SSP.12.1" + sink "copier.host.11.1" + } +] + +# There is pinmux conflict between SSP1 and DMIC on MTL RVP, +# so include SSP1 pipelines conditionally. +IncludeByKey.SSP1_ENABLED { + "true" { + Object.Dai.SSP [ + { + id 1 + dai_index 1 + direction "duplex" + name NoCodec-1 + default_hw_conf_id 0 + sample_bits 32 + quirks "lbm_mode" + io_clk $MCLK + + Object.Base.hw_config.1 { + name "SSP1" + id 0 + bclk_freq 3072000 + tdm_slot_width 32 + # TODO: remove this. Needs alsaptlg change. + Object.Base.link_config.1 { + clock_source 1 + } + } + } + ] + + Object.Pipeline.host-copier-gain-mixin-playback [ + { + index 3 + + core $SSP1_CORE_ID + Object.Widget.copier.1 { + core_id $SSP1_CORE_ID + stream_name 'SSP1 Playback' + } + Object.Widget.gain.1 { + core_id $SSP1_CORE_ID + Object.Control.mixer.1 { + name 'Playback Volume 3' + } + } + Object.Widget.mixin.1 { + core_id $SSP1_CORE_ID + } + } + ] + + Object.Pipeline.mixout-gain-dai-copier-playback [ + { + index 4 + + core $SSP1_CORE_ID + Object.Widget.copier.1 { + core_id $SSP1_CORE_ID + dai_index 1 + dai_type "SSP" + copier_type "SSP" + stream_name "NoCodec-1" + node_type $I2S_LINK_OUTPUT_CLASS + } + + Object.Widget.gain.1 { + core_id $SSP1_CORE_ID + Object.Control.mixer.1 { + name 'Main Playback Volume 4' + } + } + Object.Widget.mixout.1 { + core_id $SSP1_CORE_ID + } + } + ] + + Object.Pipeline.host-gateway-capture [ + { + index 9 + + Object.Widget.copier.1 { + stream_name 'SSP1 Capture' + } + } + ] + + Object.Pipeline.io-gateway-capture [ + { + index 10 + direction capture + + 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 + } + } + } + ] + + Object.PCM.pcm [ + { + name "Port1" + id 1 + direction "duplex" + Object.Base.fe_dai.1 { + name "Port1" + } + + Object.PCM.pcm_caps.1 { + direction "playback" + name "SSP1 Playback" + formats 'S16_LE,S24_LE,S32_LE' + } + + Object.PCM.pcm_caps.2 { + direction "capture" + name "SSP1 Capture" + formats 'S16_LE,S24_LE,S32_LE' + } + } + ] + + Object.Base.route [ + { + source "mixin.3.1" + sink "mixout.4.1" + } + { + source "gain.4.1" + sink "copier.SSP.4.1" + } + { + source "copier.SSP.10.1" + sink "copier.host.9.1" + } + ] + } +} diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index bf3d240019b6..0d5ab45ca022 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -213,7 +213,7 @@ Object.Pipeline.mixout-gain-smart-amp-dai-copier-playback [ } Object.Base.input_pin_binding.2 { - input_pin_binding_name "copier.SSP.8.1" + input_pin_binding_name "module-copier.8.1" } Object.Control.bytes."1" { @@ -345,7 +345,9 @@ Object.Pipeline.dai-copier-gain-module-copier-capture [ out_bit_depth 32 out_valid_bit_depth 32 } + } + Object.Widget.module-copier.1 { Object.Base.output_pin_binding.1 { output_pin_binding_name "gain.8.1" } @@ -634,7 +636,7 @@ Object.Base.route [ } { source "copier.SSP.8.1" - sink "gain.8.1" + sink "module-copier.8.1" } { source "copier.SSP.12.1" @@ -661,7 +663,7 @@ Object.Base.route [ sink gain.20.1 } { - source "copier.SSP.8.1" + source "module-copier.8.1" sink "smart_amp.2.1" } ] diff --git a/tools/topology/topology2/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf index 198e37953167..61fe676fd004 100644 --- a/tools/topology/topology2/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -69,6 +69,7 @@ Define { SDW_JACK_IN_BE_ID 1 NUM_SDW_AMP_LINKS 0 SDW_DMIC 0 + SDW_JACK true } # override defaults with platform-specific config @@ -90,11 +91,6 @@ IncludeByKey.NUM_HDMIS { "[3-4]" "platform/intel/hdmi-generic.conf" } -# include deep buffer config if buffer size is in 1 - 1000 ms. -IncludeByKey.DEEPBUFFER_FW_DMA_MS{ - "[1-1000]" "platform/intel/deep-buffer.conf" -} - IncludeByKey.NUM_SDW_AMP_LINKS { "[1-2]" "platform/intel/sdw-amp-generic.conf" } @@ -103,159 +99,7 @@ IncludeByKey.SDW_DMIC { "1" "platform/intel/sdw-dmic-generic.conf" } -# -# List of all DAIs -# -#ALH Index: 0, Direction: duplex -Object.Dai.ALH [ - { - dai_index 0 - id $SDW_JACK_OUT_BE_ID - direction "playback" - name $SDW_JACK_OUT_STREAM - default_hw_conf_id 0 - rate 48000 - channels 2 - - Object.Base.hw_config.1 { - id 0 - name "ALH2" - } - } - { - dai_index 10 - id $SDW_JACK_IN_BE_ID - direction "capture" - name $SDW_JACK_IN_STREAM - default_hw_conf_id 1 - rate 48000 - channels 2 - - Object.Base.hw_config.1 { - id 1 - name "ALH3" - } - } -] - -# -# Pipeline definitions -# - -# Pipeline ID:1 PCM ID: 0 -Object.Pipeline { - host-copier-gain-mixin-playback [ - { - 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 [ - { - index 1 - - 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' - } - } - } - ] - - host-gateway-capture [ - { - 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 - } - } - ] - - highpass-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.Widget.eqiir.1 { - Object.Control.bytes."1" { - name '4 Main capture Iir Eq' - } - } - } - ] +IncludeByKey.SDW_JACK { +"true" "platform/intel/sdw-jack-generic.conf" } -Object.PCM.pcm [ - { - name "Jack out" - id 0 - direction "playback" - Object.Base.fe_dai.1 { - name "Jack out" - } - - Object.PCM.pcm_caps.1 { - name "volume playback 0" - formats 'S16_LE,S32_LE' - } - } - { - name "Jack in" - id 1 - direction "capture" - Object.Base.fe_dai.1 { - name "Jack in" - } - - Object.PCM.pcm_caps.1 { - name "Passthrough Capture 0" - formats 'S16_LE,S32_LE' - } - } -] - -Object.Base.route [ - { - source "gain.1.1" - sink "copier.ALH.1.1" - } - { - source "mixin.0.1" - sink "mixout.1.1" - } - { - source "copier.ALH.11.1" - sink "eqiir.11.1" - } - { - source "eqiir.11.1" - sink "copier.host.10.1" - } -] diff --git a/tools/topology/topology2/development/tplg-targets.cmake b/tools/topology/topology2/development/tplg-targets.cmake index faed8382d4a1..0592f8b4a5fd 100644 --- a/tools/topology/topology2/development/tplg-targets.cmake +++ b/tools/topology/topology2/development/tplg-targets.cmake @@ -28,9 +28,14 @@ PLATFORM=adl" # SSP topology for MTL "cavs-nocodec\;sof-mtl-nocodec\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ -PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin,DEEPBUFFER_FW_DMA_MS=100" +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin,DEEPBUFFER_FW_DMA_MS=100,\ +DEEPBUFFER_D0I3_COMPATIBLE=true" "cavs-nocodec\;sof-mtl-nocodec-ssp0-ssp2\;PLATFORM=mtl,NUM_DMICS=2,SSP1_ENABLED=false,\ -PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin,DEEPBUFFER_FW_DMA_MS=100" +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin,DEEPBUFFER_FW_DMA_MS=100,\ +DEEPBUFFER_D0I3_COMPATIBLE=true" + +"cavs-nocodec-multicore\;sof-mtl-nocodec-multicore\;PLATFORM=mtl,SSP1_ENABLED=true,SSP0_CORE_ID=0,\ +SSP1_CORE_ID=1,SSP2_CORE_ID=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin" # CAVS HDA topology with mixer-based efx eq pipelines for HDA and passthrough pipelines for HDMI "sof-hda-generic\;sof-hda-efx-generic\;HDA_CONFIG=efx,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100,\ diff --git a/tools/topology/topology2/include/components/src_format.conf b/tools/topology/topology2/include/components/src_format.conf index bb261d23d72b..6fc582f0cf0b 100644 --- a/tools/topology/topology2/include/components/src_format.conf +++ b/tools/topology/topology2/include/components/src_format.conf @@ -1,369 +1,238 @@ #src format array num_input_audio_formats 42 - num_output_audio_formats 42 - # 8khz input - Object.Base.audio_format.1 { - in_rate 8000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.2 { - in_rate 8000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.3{ - in_rate 8000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - - # 11.025 khz input - Object.Base.audio_format.4 { - in_rate 11025 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - # for 11.025k, 22.05k, 44.1k, 88.2k and 176.4k, extra 4 sample size is needed - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.5 { - in_rate 11025 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.6{ - in_rate 11025 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - # 12khz input - Object.Base.audio_format.7 { - in_rate 12000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.8 { - in_rate 12000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.9{ - in_rate 12000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - - # 16khz input - Object.Base.audio_format.10 { - in_rate 16000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.11 { - in_rate 16000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.12{ - in_rate 16000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - - # 22.05khz input - Object.Base.audio_format.13 { - in_rate 22050 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.14 { - in_rate 22050 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.15{ - in_rate 22050 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - - # 24khz input - Object.Base.audio_format.16 { - in_rate 24000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.17 { - in_rate 24000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.18{ - in_rate 24000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - - # 32khz input - Object.Base.audio_format.19 { - in_rate 32000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.20 { - in_rate 32000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.21 { - in_rate 32000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - - # 44.1khz input - Object.Base.audio_format.22 { - in_rate 44100 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.23 { - in_rate 44100 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.24{ - in_rate 44100 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - # 48khz input - Object.Base.audio_format.25 { - in_rate 48000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.26 { - in_rate 48000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.27 { - in_rate 48000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - - # 64khz input - Object.Base.audio_format.28 { - in_rate 64000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.29 { - in_rate 64000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.30 { - in_rate 64000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 88.2khz input - Object.Base.audio_format.31 { - in_rate 88200 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.32 { - in_rate 88200 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.33 { - in_rate 88200 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - # 96khz input - Object.Base.audio_format.34 { - in_rate 96000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.35 { - in_rate 96000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.36 { - in_rate 96000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } - - # 176.4khz input - Object.Base.audio_format.37 { - in_rate 176400 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.38 { - in_rate 176400 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - Object.Base.audio_format.39 { - in_rate 176400 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" - } - - # 192khz input - Object.Base.audio_format.40 { - in_rate 192000 - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.41 { - in_rate 192000 - in_bit_depth 32 - in_valid_bit_depth 24 - out_bit_depth 32 - out_valid_bit_depth 24 - } - - Object.Base.audio_format.42 { - in_rate 192000 - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } + Object.Base.input_audio_format [ + # 8khz input + { + in_rate 8000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 8000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 11.025 khz input + { + in_rate 11025 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 11025 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 11025 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 12khz input + { + in_rate 12000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 12000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 12000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 16khz input + { + in_rate 16000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 16000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 16000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 22.05khz input + { + in_rate 22050 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 22050 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 22050 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 24khz input + { + in_rate 24000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 24000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 24000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 32khz input + { + in_rate 32000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 32000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 32000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 44.1khz input + { + in_rate 44100 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 44100 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 44100 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 48khz input + { + in_rate 48000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 48000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 48000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 64khz input + { + in_rate 64000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 64000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 64000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 88.2khz input + { + in_rate 88200 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 88200 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 88200 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 96khz input + { + in_rate 96000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 96000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 96000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 176.4khz input + { + in_rate 176400 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 176400 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 176400 + in_bit_depth 32 + in_valid_bit_depth 32 + } + # 192khz input + { + in_rate 192000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 192000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_rate 192000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + + num_output_audio_formats 1 + + Object.Base.output_audio_format [ + { + out_rate 48000 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] diff --git a/tools/topology/topology2/include/pipelines/cavs/dai-copier-gain-module-copier-capture.conf b/tools/topology/topology2/include/pipelines/cavs/dai-copier-gain-module-copier-capture.conf index dfa3c2752064..ad2259d47898 100644 --- a/tools/topology/topology2/include/pipelines/cavs/dai-copier-gain-module-copier-capture.conf +++ b/tools/topology/topology2/include/pipelines/cavs/dai-copier-gain-module-copier-capture.conf @@ -57,6 +57,16 @@ Class.Pipeline."dai-copier-gain-module-copier-capture" { out_valid_bit_depth 32 } } + module-copier."1" { + num_input_audio_formats 1 + num_output_audio_formats 1 + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + } + } module-copier."2" { num_input_audio_formats 1 @@ -92,6 +102,10 @@ Class.Pipeline."dai-copier-gain-module-copier-capture" { source gain.$index.1 sink module-copier.$index.2 } + route.2 { + source module-copier.$index.1 + sink gain.$index.1 + } } direction "capture" 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 6139b5574bee..292e5b1686c0 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 @@ -16,7 +16,8 @@ # Where N is the unique pipeline ID within the same alsaconf node. # - + + 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 1e1e9cca2aa4..d2ae1e08fa0c 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 @@ -15,6 +15,8 @@ # # Where N is the unique pipeline ID within the same alsaconf node. # + + diff --git a/tools/topology/topology2/platform/intel/common_definitions.conf b/tools/topology/topology2/platform/intel/common_definitions.conf index f4d49718f559..9c684c7968c0 100644 --- a/tools/topology/topology2/platform/intel/common_definitions.conf +++ b/tools/topology/topology2/platform/intel/common_definitions.conf @@ -58,6 +58,7 @@ Define { SPI_INPUT_CLASS 26 # SPI Input (DSP <-) DEEPBUFFER_FW_DMA_MS 100 # 100 ms copier dma size + DEEPBUFFER_D0I3_COMPATIBLE false # Deep buffer PCM is not D0I3 compatible SSP_BLOB_VERSION_1_0 0x100 SSP_BLOB_VERSION_1_5 0x105 diff --git a/tools/topology/topology2/platform/intel/deep-buffer.conf b/tools/topology/topology2/platform/intel/deep-buffer.conf index 7bf828638906..f66b5d62e39f 100644 --- a/tools/topology/topology2/platform/intel/deep-buffer.conf +++ b/tools/topology/topology2/platform/intel/deep-buffer.conf @@ -19,7 +19,7 @@ Object.PCM.pcm [ name $DEEP_BUFFER_PCM_NAME id $DEEP_BUFFER_PCM_ID direction playback - playback_compatible_d0i3 true + playback_compatible_d0i3 $DEEPBUFFER_D0I3_COMPATIBLE Object.Base.fe_dai.1 { name "DeepBuffer" diff --git a/tools/topology/topology2/platform/intel/dmic-default.conf b/tools/topology/topology2/platform/intel/dmic-default.conf index d5bfb7d11f1e..f23f930b3cf1 100644 --- a/tools/topology/topology2/platform/intel/dmic-default.conf +++ b/tools/topology/topology2/platform/intel/dmic-default.conf @@ -33,5 +33,5 @@ Define { WOV_UUID '1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67' WOV_CPC '360000' DMIC1_PCM_CAPS 'Passthrough Capture 18' - + DMIC_CORE_ID 0 } diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index 179ad75422ee..5d7747d360c1 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -73,6 +73,7 @@ Object.Pipeline.gain-capture [ Object.Widget.copier.1 { stream_name $DMIC0_PCM_CAPS + core_id $DMIC_CORE_ID num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -95,6 +96,7 @@ Object.Pipeline.gain-capture [ } } Object.Widget.gain.1 { + core_id $DMIC_CORE_ID num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -121,6 +123,7 @@ Object.Pipeline.gain-capture [ } Object.Widget.module-copier."2" { + core_id $DMIC_CORE_ID num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -142,6 +145,9 @@ Object.Pipeline.gain-capture [ out_ch_map $CHANNEL_MAP_3_POINT_1 } } + Object.Widget.pipeline."1" { + core $DMIC_CORE_ID + } } ] @@ -150,6 +156,7 @@ Object.Pipeline.dai-copier-eqiir-module-copier-capture [ index $DMIC0_DAI_PIPELINE_ID Object.Widget.copier.1 { + core_id $DMIC_CORE_ID dai_index 0 dai_type "DMIC" copier_type "DMIC" @@ -179,6 +186,7 @@ Object.Pipeline.dai-copier-eqiir-module-copier-capture [ } Object.Widget.module-copier."2" { + core_id $DMIC_CORE_ID stream_name $DMIC0_NAME num_input_audio_formats 2 num_output_audio_formats 2 @@ -203,6 +211,7 @@ Object.Pipeline.dai-copier-eqiir-module-copier-capture [ } Object.Widget.eqiir.1 { + core_id $DMIC_CORE_ID num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -223,6 +232,9 @@ Object.Pipeline.dai-copier-eqiir-module-copier-capture [ name 'DMIC0 capture Iir Eq' } } + Object.Widget.pipeline."1" { + core $DMIC_CORE_ID + } } ] diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf new file mode 100644 index 000000000000..0c81629f9e3e --- /dev/null +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -0,0 +1,159 @@ +# include deep buffer config if buffer size is in 1 - 1000 ms. +IncludeByKey.DEEPBUFFER_FW_DMA_MS{ + "[1-1000]" "platform/intel/deep-buffer.conf" +} + +# +# List of all DAIs +# +Object.Dai.ALH [ + { + dai_index 0 + id $SDW_JACK_OUT_BE_ID + direction "playback" + name $SDW_JACK_OUT_STREAM + default_hw_conf_id 0 + rate 48000 + channels 2 + + Object.Base.hw_config.1 { + id 0 + name "ALH2" + } + } + { + dai_index 10 + id $SDW_JACK_IN_BE_ID + direction "capture" + name $SDW_JACK_IN_STREAM + default_hw_conf_id 0 + rate 48000 + channels 2 + + Object.Base.hw_config.1 { + id 0 + name "ALH3" + } + } +] + +# +# Pipeline definitions +# + +Object.Pipeline { + host-copier-gain-mixin-playback [ + { + 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 [ + { + index 1 + + 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' + } + } + } + ] + + host-gateway-capture [ + { + 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 + } + } + ] + + highpass-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.Widget.eqiir.1 { + Object.Control.bytes."1" { + name '4 Main capture Iir Eq' + } + } + } + ] +} + +Object.PCM.pcm [ + { + name "Jack out" + id 0 + direction "playback" + Object.Base.fe_dai.1 { + name "Jack out" + } + + Object.PCM.pcm_caps.1 { + name "volume playback 0" + formats 'S16_LE,S32_LE' + } + } + { + name "Jack in" + id 1 + direction "capture" + Object.Base.fe_dai.1 { + name "Jack in" + } + + Object.PCM.pcm_caps.1 { + name "Passthrough Capture 0" + formats 'S16_LE,S32_LE' + } + } +] + +Object.Base.route [ + { + source "gain.1.1" + sink "copier.ALH.1.1" + } + { + source "mixin.0.1" + sink "mixout.1.1" + } + { + source "copier.ALH.11.1" + sink "eqiir.11.1" + } + { + source "eqiir.11.1" + sink "copier.host.10.1" + } +] diff --git a/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake b/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake index f3267f84ee01..5b0fbeddcfa3 100644 --- a/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake +++ b/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake @@ -3,31 +3,41 @@ # Array of "input-file-name;output-file-name;comma separated pre-processor variables" set(TPLGS # HDMI only topology with passthrough pipelines -"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100" +"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100,\ +DEEPBUFFER_D0I3_COMPATIBLE=true" # HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI -"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100" +"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100,\ +DEEPBUFFER_D0I3_COMPATIBLE=true" # If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the # topologies below. "sof-hda-generic\;sof-hda-generic-4ch\;PLATFORM=mtl,\ HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,\ -NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100" +NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100,\ +DEEPBUFFER_D0I3_COMPATIBLE=true" "sof-hda-generic\;sof-hda-generic-2ch\;PLATFORM=mtl,\ HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,\ -USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100" +USE_CHAIN_DMA=true,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true" # SDW + DMIC topology with passthrough pipelines # We will change NUM_HDMIS to 3 once HDMI is enabled on MTL RVP -"cavs-sdw\;sof-mtl-rt711-4ch\;PLATFORM=mtl,NUM_DMICS=4,DMIC0_ID=2,DMIC1_ID=3,NUM_HDMIS=0,\ -PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-rt711-4ch.bin,DEEPBUFFER_FW_DMA_MS=100" +"cavs-sdw\;sof-mtl-rt711-4ch\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +DMIC0_ID=2,DMIC1_ID=3,NUM_HDMIS=0,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-rt711-4ch.bin,\ +DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true" + +"cavs-sdw\;sof-mtl-rt711-l0-rt1316-l23-rt714-l1\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\ +NUM_HDMIS=0,SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture" + +# Below topologies are used on Chromebooks "cavs-rt5682\;sof-mtl-max98357a-rt5682\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\ PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\ NHLT_BIN=nhlt-sof-mtl-max98357a-rt5682.bin,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\ -BT_NAME=SSP2-BT,BT_ID=8,BT_PCM_NAME=Bluetooth,USE_CHAIN_DMA=true" +BT_NAME=SSP2-BT,BT_ID=8,BT_PCM_NAME=Bluetooth,USE_CHAIN_DMA=true,DEEPBUFFER_D0I3_COMPATIBLE=true" "cavs-rt5682\;sof-mtl-max98357a-rt5682-ssp2-ssp0\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\ PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\ NHLT_BIN=nhlt-sof-mtl-max98357a-rt5682.bin,DEEPBUFFER_FW_DMA_MS=10,HEADSET_SSP_DAI_INDEX=2,\ SPEAKER_SSP_DAI_INDEX=0,HEADSET_CODEC_NAME=SSP2-Codec,SPEAKER_CODEC_NAME=SSP0-Codec,\ -BT_NAME=SSP1-BT,BT_INDEX=1,BT_ID=8,BT_PCM_NAME=Bluetooth,INCLUDE_ECHO_REF=true,USE_CHAIN_DMA=true" +BT_NAME=SSP1-BT,BT_INDEX=1,BT_ID=8,BT_PCM_NAME=Bluetooth,INCLUDE_ECHO_REF=true,USE_CHAIN_DMA=true,\ +DEEPBUFFER_D0I3_COMPATIBLE=true" )