diff --git a/tools/topology/topology2/cavs-es83x6.conf b/tools/topology/topology2/cavs-es83x6.conf new file mode 100644 index 000000000000..937c34b5e2ad --- /dev/null +++ b/tools/topology/topology2/cavs-es83x6.conf @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +IncludeByKey.HDMI_IN_CAPTURE { + "true" "platform/intel/hdmi-in-capture.conf" +} + + + + + +Define { + MCLK 24576000 + # override BE link ids + NUM_HDMIS 3 + HDMI1_ID 3 + HDMI2_ID 4 + HDMI3_ID 5 + PLATFORM "none" + HEADSET_CODEC_NAME 'SSP1-Codec' + HEADSET_PLAYBACK_PCM_STREAM_NAME 'Headset Playback' + HEADSET_CAPTURE_PCM_STREAM_NAME 'Headset Capture' + HEADSET_SSP_DAI_INDEX 1 + HEADSET_HW_CONFIG_NAME 'HEADSET HWCFG' + HEADSET_PCM_NAME "Headset" + HEADSET_PCM_ID 0 +} + +# override defaults with platform-specific config +IncludeByKey.PLATFORM { + "mtl" "platform/intel/mtl.conf" +} + +# include HDMI config if needed. +IncludeByKey.NUM_HDMIS { + "[3-4]" "platform/intel/hdmi-generic.conf" +} + +# +# List of all DAIs +# +#SSP Index: 0, Direction: duplex +Object.Dai.SSP [ + { + id 0 + dai_index $HEADSET_SSP_DAI_INDEX + direction "duplex" + name $HEADSET_CODEC_NAME + default_hw_conf_id 0 + sample_bits 32 + io_clk $MCLK + + Object.Base.hw_config.1 { + name $HEADSET_HW_CONFIG_NAME + 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 ----> SSP1 +# +# SSP1 ----> PCM0 + +# Pipeline ID:1 PCM ID: 0 +Object.Pipeline { + # playback pipelines + host-copier-gain-mixin-playback [ + { + index 1 + + Object.Widget.host-copier.1 { + stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' + pcm_id $HEADSET_PCM_ID + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Playback Volume 1' + } + } + } + ] + + mixout-gain-dai-copier-playback [ + { + index 2 + + Object.Widget.dai-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 + } + + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Main Playback Volume 2' + } + } + } + ] + + host-gateway-capture [ + { + index 5 + + Object.Widget.host-copier.1 { + stream_name '$HEADSET_CAPTURE_PCM_STREAM_NAME' + pcm_id $HEADSET_PCM_ID + } + } + ] + + io-gateway-capture [ + { + index 6 + + Object.Widget.dai-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.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } + ] +} + +Object.PCM.pcm [ + { + name "$HEADSET_PCM_NAME" + id $HEADSET_PCM_ID + direction "duplex" + Object.Base.fe_dai.1 { + name "$HEADSET_PCM_NAME" + } + + Object.PCM.pcm_caps.1 { + direction "playback" + name "$HEADSET_PLAYBACK_PCM_STREAM_NAME" + formats 'S16_LE,S24_LE,S32_LE' + } + + Object.PCM.pcm_caps.2 { + direction "capture" + name "$HEADSET_CAPTURE_PCM_STREAM_NAME" + formats 'S16_LE,S24_LE,S32_LE' + } + } +] + +Object.Base.route [ + { + source "gain.2.1" + sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" + } + { + source "mixin.1.1" + sink "mixout.2.1" + } + { + source "dai-copier.SSP.$HEADSET_CODEC_NAME.capture" + sink "host-copier.$HEADSET_PCM_ID.capture" + } + { + source "host-copier.$HEADSET_PCM_ID.playback" + sink "gain.1.1" + } +] diff --git a/tools/topology/topology2/platform/intel/hdmi-in-capture.conf b/tools/topology/topology2/platform/intel/hdmi-in-capture.conf new file mode 100644 index 000000000000..77dd17ccd259 --- /dev/null +++ b/tools/topology/topology2/platform/intel/hdmi-in-capture.conf @@ -0,0 +1,180 @@ +IncludeByKey.HDMI_IN_CAPTURE { + "true" "platform/intel/hdmi-in-ssp-config.conf" +} + +Object.Pipeline { + # capture pipelines + host-gateway-capture [ + { + index $HDMI_IN_1_CP_HOST_PIPELINE_ID + Object.Widget.pipeline.1 { + stream_name "dai-copier.SSP.$HDMI_IN_1_NAME.capture" + } + Object.Widget.host-copier.1 { + stream_name $HDMI_IN_1_CP_PCM_CAPS + pcm_id $HDMI_IN_1_PCM_ID + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + in_channels 2 + in_rate 48000 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_channels 2 + out_rate 48000 + } + ] + } + } + { + index $HDMI_IN_2_CP_HOST_PIPELINE_ID + Object.Widget.pipeline.1 { + stream_name "dai-copier.SSP.$HDMI_IN_2_NAME.capture" + } + Object.Widget.host-copier.1 { + stream_name $HDMI_IN_2_CP_PCM_CAPS + pcm_id $HDMI_IN_2_PCM_ID + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + in_channels 2 + in_rate 48000 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_channels 2 + out_rate 48000 + } + ] + } + } + ] + + io-gateway-capture [ + { + index $HDMI_IN_1_CP_DAI_PIPELINE_ID + + Object.Widget.pipeline.1 { + stream_name "dai-copier.SSP.$HDMI_IN_1_NAME.capture" + } + + Object.Widget.dai-copier."1" { + dai_index $HDMI_IN_1_INDEX + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name $HDMI_IN_1_NAME + node_type $I2S_LINK_INPUT_CLASS + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + in_channels 2 + in_rate 48000 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_channels 2 + out_rate 48000 + } + ] + } + } + { + index $HDMI_IN_2_CP_DAI_PIPELINE_ID + direction "capture" + Object.Widget.pipeline.1 { + stream_name "dai-copier.SSP.$HDMI_IN_2_NAME.capture" + } + + Object.Widget.dai-copier."1" { + dai_index $HDMI_IN_2_INDEX + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name $HDMI_IN_2_NAME + node_type $I2S_LINK_INPUT_CLASS + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + in_channels 2 + in_rate 48000 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_channels 2 + out_rate 48000 + } + ] + } + } + ] +} + +Object.Base.route [ + { + source "dai-copier.SSP.$HDMI_IN_1_NAME.capture" + sink "host-copier.$HDMI_IN_1_PCM_ID.capture" + } + { + source "dai-copier.SSP.$HDMI_IN_2_NAME.capture" + sink "host-copier.$HDMI_IN_2_PCM_ID.capture" + } +] + +Object.PCM.pcm [ + { + name $HDMI_IN_1_PCM_NAME + id $HDMI_IN_1_PCM_ID + direction "capture" + + Object.Base.fe_dai.1 { + name $HDMI_IN_1_PCM_NAME + } + + Object.PCM.pcm_caps.1 { + direction "capture" + name $HDMI_IN_1_CP_PCM_CAPS + formats 'S32_LE' + rate_min 48000 + rate_max 48000 + channels_min 2 + channels_max 2 + } + } + { + name $HDMI_IN_2_PCM_NAME + id $HDMI_IN_2_PCM_ID + direction "capture" + + Object.Base.fe_dai.1 { + name $HDMI_IN_2_PCM_NAME + } + + Object.PCM.pcm_caps.1 { + direction "capture" + name $HDMI_IN_2_CP_PCM_CAPS + formats 'S32_LE' + rate_min 48000 + rate_max 48000 + channels_min 2 + channels_max 2 + } + } +] diff --git a/tools/topology/topology2/platform/intel/hdmi-in-default.conf b/tools/topology/topology2/platform/intel/hdmi-in-default.conf new file mode 100644 index 000000000000..0d8e10c21017 --- /dev/null +++ b/tools/topology/topology2/platform/intel/hdmi-in-default.conf @@ -0,0 +1,28 @@ +# Default HDMI-IN variable definitions +Define { + # HDMI_IN_ID is dai link ID that is matched with machine driver + HDMI_IN_1_ID 6 + HDMI_IN_2_ID 7 + # HDMI_IN_INDEX is dai_index which passed to firmware + HDMI_IN_1_INDEX 0 + HDMI_IN_2_INDEX 2 + FORMAT s32le + HDMI_IN_MCLK 38400000 + HDMI_IN_1_NAME "SSP0-HDMI" + HDMI_IN_2_NAME "SSP2-HDMI" + + HDMI_IN_1_CP_HOST_PIPELINE_ID 7 + HDMI_IN_1_CP_DAI_PIPELINE_ID 8 + HDMI_IN_1_CP_PCM_CAPS "HDMI-In-1 Capture" + + HDMI_IN_2_CP_HOST_PIPELINE_ID 9 + HDMI_IN_2_CP_DAI_PIPELINE_ID 10 + HDMI_IN_2_CP_PCM_CAPS "HDMI-In-2 Capture" + + HDMI_IN_1_PCM_ID 1 + HDMI_IN_2_PCM_ID 2 + HDMI_IN_1_PCM_NAME "HDMI-In-1" + HDMI_IN_2_PCM_NAME "HDMI-In-2" + + HDMI_IN_CAPTURE false +} diff --git a/tools/topology/topology2/platform/intel/hdmi-in-ssp-config.conf b/tools/topology/topology2/platform/intel/hdmi-in-ssp-config.conf new file mode 100644 index 000000000000..2da8af66d294 --- /dev/null +++ b/tools/topology/topology2/platform/intel/hdmi-in-ssp-config.conf @@ -0,0 +1,56 @@ +#SSP DAI configuration to receive samples via I2S(in slave mode) +#from HDMI input converter chip. +Object.Dai.SSP [ + { + id $HDMI_IN_1_ID + dai_index $HDMI_IN_1_INDEX + direction "capture" + name $HDMI_IN_1_NAME + default_hw_conf_id 0 + sample_bits 32 + io_clk $HDMI_IN_MCLK + Object.Base.hw_config.1 { + id 0 + name "HDMI-In-1" + mclk_freq $HDMI_IN_MCLK + bclk_freq 3072000 + tdm_slot_width 32 + format "I2S" + bclk "codec_provider" + fsync "codec_provider" + fsync_freq 48000 + tdm_slots 2 + tx_slots 3 + rx_slots 3 + Object.Base.link_config.1 { + clock_source 0 + } + } + } + { + id $HDMI_IN_2_ID + dai_index $HDMI_IN_2_INDEX + direction "capture" + name $HDMI_IN_2_NAME + default_hw_conf_id 1 + sample_bits 32 + io_clk $HDMI_IN_MCLK + Object.Base.hw_config.1 { + id 0 + name "HDMI-In-2" + mclk_freq $HDMI_IN_MCLK + bclk_freq 3072000 + tdm_slot_width 32 + format "I2S" + bclk "codec_provider" + fsync "codec_provider" + fsync_freq 48000 + tdm_slots 2 + tx_slots 3 + rx_slots 3 + Object.Base.link_config.1 { + clock_source 0 + } + } + } +] diff --git a/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake b/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake index f78824e03c2d..a289295c5c74 100644 --- a/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake +++ b/tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake @@ -84,6 +84,11 @@ SPK_ID=6,SPEAKER_SSP_DAI_INDEX=0,HEADSET_CODEC_NAME=SSP2-Codec,SPEAKER_CODEC_NAM BT_NAME=SSP1-BT,BT_INDEX=1,BT_ID=7,BT_PCM_NAME=Bluetooth,INCLUDE_ECHO_REF=true,USE_CHAIN_DMA=true,\ DEEPBUFFER_D0I3_COMPATIBLE=true,GOOGLE_RTC_AEC_SUPPORT=1,DEEP_BUF_SPK=true,PLAYBACK_PIPELINE_SRC=dts" +#ES83x6+HDMI-IN +"cavs-es83x6\;sof-mtl-es83x6-ssp1-hdmi-ssp02\;PLATFORM=mtl,PREPROCESS_PLUGINS=nhlt,\ +NHLT_BIN=nhlt-sof-mtl-es83x6-ssp1-hdmi-ssp02.bin,HEADSET_SSP_DAI_INDEX=1,\ +HEADSET_CODEC_NAME=SSP1-Codec,HDMI_IN_CAPTURE=true" + # SDW + DMIC + HDMI "cavs-sdw\;sof-mtl-sdw-cs42l42-l0-max98363-l2\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\ PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\