diff --git a/topology2/README.md b/topology2/README.md index ad10dd7..6f214f2 100644 --- a/topology2/README.md +++ b/topology2/README.md @@ -453,6 +453,23 @@ ACPI when selecting and loading the corresponding topology. Function topologies are intended to be reusable across devices that provide the same function. Please do not add any customized feature in the function topology. +`sof-hda-generic.conf` builds the HDA function topologies the same way `cavs-sdw.conf` builds the +`sof-sdca-*` ones: one conf, and macros that enable a single function and disable the others. + +| Function | Enable | Disable | +|---|---|---| +| HDA codec | `HDA_CONFIG=mix` (or `efx`, `src`, `dax`, `passthrough`) | `HDA_CONFIG=none` (default) | +| HDMI/DP (iDisp) | `NUM_HDMIS=3` (default) | `NUM_HDMIS=0` | +| PCH DMIC | `NUM_DMICS=1..4` | `NUM_DMICS=0` (default) | +| HDMI-IN (SSP) | `HDMI_IN_CAPTURE=true` | `HDMI_IN_CAPTURE=false` (default) | +| Bluetooth (SSP) | `ADD_BT=true` | `ADD_BT=false` (default) | + +The virtual widgets follow their function, so a disabled function leaves none behind. The +function topologies are the `sof---id` targets (see `sof_hda_get_tplg_files()`; +the HDA codec and HDMI ones have no NHLT blob and no ``) in +`production/tplg-targets-hda-generic.cmake`. They are loaded next to each other, so choose +non-overlapping PCM and pipeline IDs for each of them. + ### Registering CMake Targets Production topologies are registered in `production/tplg-targets-*.cmake` files. Each diff --git a/topology2/cavs-sdw.conf b/topology2/cavs-sdw.conf index 5070efe..a12e9de 100644 --- a/topology2/cavs-sdw.conf +++ b/topology2/cavs-sdw.conf @@ -29,6 +29,7 @@ + @@ -105,6 +106,11 @@ Define { COMPR_2_PIPELINE_SINK 'mixout.21.1' COMPR_2_PCM_NAME 'Compress Speaker' + COMPR_SPEED_PIPELINE_SINK 'mixout.1.1' + COMPR_SPEED_PCM_NAME 'Compress Speed Jack Out' + COMPR_SPEED_2_PIPELINE_SINK 'mixout.21.1' + COMPR_SPEED_2_PCM_NAME 'Compress Speed Speaker' + SDW_JACK_OUT_STREAM 'SDW0-Playback' SDW_JACK_IN_STREAM 'SDW0-Capture' SDW_JACK_OUT_BE_ID 0 @@ -137,6 +143,7 @@ Define { SDW_AMP_XOVER_EQFIR_PARAMS default DOLBY_DAX_CORE_ID 0 DTS_CORE_ID 0 + COMPR_SPEED_CORE_ID 1 SDW_AMP_PIPELINE_SRC "generic" SDW_JACK_PIPELINE_SRC "generic" SDW_ECHO_REF_DAI "false" @@ -247,6 +254,7 @@ IncludeByKey.SDW_JACK { Define { # disable compressed audio for Jack COMPRESSED_1 false + COMPRESSED_SPEED_1 false } } } @@ -256,6 +264,7 @@ IncludeByKey.NUM_SDW_AMP_LINKS { Define { # Enable compressed audio for Speaker COMPRESSED_2 true + COMPRESSED_SPEED_2 true } } } @@ -300,3 +309,6 @@ IncludeByKey.SDW_DMIC_AUDIO_FEATURE_CAPTURE { IncludeByKey.SDW_DMIC_COMPR_AUDIO_FEATURE_CAPTURE { "true" "platform/intel/sdw-dmic-audio-feature-compress.conf" } +IncludeByKey.COMPRESSED_SPEED { + "true" "platform/intel/compr-speed.conf" +} diff --git a/topology2/development/cavs-dmic-ssp-lbm-webrtc-aec.conf b/topology2/development/cavs-dmic-ssp-lbm-webrtc-aec.conf new file mode 100644 index 0000000..16bb3fe --- /dev/null +++ b/topology2/development/cavs-dmic-ssp-lbm-webrtc-aec.conf @@ -0,0 +1,307 @@ +# +# cAVS hybrid DMIC + SSP2 digital loopback topology for webrtc-aec +# +# Uses onboard DMIC0 (or ESP32-P4 PDM DMIC injector) for microphone capture +# and SSP2 in internal digital loopback (lbm_mode / SSCR1_LBM) for speaker +# playback echo reference: +# +# PCM2 playback ──(5)──> [SSP2 TX -> lbm_mode -> SSP2 RX] ──(12)──┐ +# ▼ +# DMIC0 RX ───────(8)──────────────────────────────> WEBRTC-AEC ──(7)──> PCM0 capture +# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Define { + MCLK 24576000 + PLATFORM "none" + DMIC_DRIVER_VERSION 1 + DMIC_IO_CLK 38400000 + DMIC0_ID 6 + DMIC0_PCM_ID 0 + DMIC0_PCM_NAME "DMIC0" + DMIC0_NAME "dmic01" + SSP2_PCM_NAME "Port2" + AEC_RATE 16000 + AEC_BCLK 1024000 + AEC_BITS 16 + AEC_FMT "S16_LE" + MIC_CH 2 + REF_CH 2 +} + +IncludeByKey.PLATFORM { + "tgl" "platform/intel/tgl.conf" + "adl" "platform/intel/tgl.conf" + "mtl" "platform/intel/mtl.conf" + "lnl" "platform/intel/lnl.conf" + "ptl" "platform/intel/ptl.conf" + "nvl" "platform/intel/ptl.conf" # Note: Assume same configuration as PTL +} + +Object.Dai.DMIC [ + { + dai_index 0 + name $DMIC0_NAME + id $DMIC0_ID + driver_version $DMIC_DRIVER_VERSION + io_clk $DMIC_IO_CLK + sample_rate $AEC_RATE + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + mic_a_enable 1 + mic_b_enable 1 + ctrl_id 0 + } + } +] + +Object.Dai.SSP [ + { + 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 1024000 + fsync_freq 16000 + tdm_slot_width 32 + Object.Base.link_config.1 { clock_source 1 } + } + } +] + +Object.Pipeline.io-gateway [ + { + index 6 + direction playback + Object.Widget.dai-copier.1 { + dai_index 2 dai_type "SSP" copier_type "SSP" + stream_name "NoCodec-2" node_type $I2S_LINK_OUTPUT_CLASS + num_input_pins 1 + num_input_audio_formats 1 + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $REF_CH + }] + num_output_audio_formats 1 + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth 32 out_valid_bit_depth 32 + out_channels $REF_CH + }] + } + } +] + +Object.Pipeline.host-gateway-playback [ + { + index 5 + Object.Widget.host-copier.1 { + stream_name 'SSP2 Playback' pcm_id 2 + num_input_audio_formats 1 + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $REF_CH + }] + num_output_audio_formats 1 + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $REF_CH + }] + } + } +] + +Object.Pipeline.host-gateway-capture [ + { + index 7 + Object.Widget.host-copier.1 { + stream_name 'DMIC0 Capture' pcm_id $DMIC0_PCM_ID + num_input_audio_formats 1 + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $MIC_CH + }] + num_output_audio_formats 1 + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $MIC_CH + }] + } + } +] + +Object.Pipeline.io-gateway-capture [ + { + index 8 + direction capture + Object.Widget.dai-copier.1 { + dai_index 0 dai_type "DMIC" type dai_out copier_type "DMIC" + stream_name $DMIC0_NAME node_type $DMIC_LINK_INPUT_CLASS + num_input_audio_formats 1 + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth 32 in_valid_bit_depth 32 + in_channels $MIC_CH + }] + num_output_audio_formats 1 + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $MIC_CH + }] + } + } + { + index 12 + direction capture + Object.Widget.dai-copier.1 { + dai_index 2 dai_type "SSP" type dai_out copier_type "SSP" + stream_name "NoCodec-2" node_type $I2S_LINK_INPUT_CLASS + num_input_audio_formats 1 + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth 32 in_valid_bit_depth 32 + in_channels $REF_CH + }] + num_output_audio_formats 1 + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $REF_CH + }] + } + } +] + +Object.Widget.webrtc-aec [ + { + index 7 + name "webrtc-aec.7.1" + num_input_pins 2 + num_input_audio_formats 2 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + input_pin_index 0 + in_rate $AEC_RATE + in_bit_depth $AEC_BITS + in_valid_bit_depth $AEC_BITS + in_channels $MIC_CH + ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" + } + { + input_pin_index 1 + in_rate $AEC_RATE + in_bit_depth $AEC_BITS + in_valid_bit_depth $AEC_BITS + in_channels $REF_CH + ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" + } + ] + + Object.Base.output_audio_format [ + { + out_rate $AEC_RATE + out_bit_depth $AEC_BITS + out_valid_bit_depth $AEC_BITS + out_channels $MIC_CH + obs "$[(($out_channels * ($[($out_rate + 999)] / 1000)) * ($out_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" + } + ] + + Object.Control { + mixer."1" { + name 'DMIC0 Capture AEC Switch' + } + mixer."2" { + name 'DMIC0 Capture AEC Suppression Switch' + } + } + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "dai-copier.DMIC.$DMIC0_NAME.capture" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "dai-copier.SSP.NoCodec-2.capture" + } + } +] + +Object.PCM.pcm [ + { + name "$DMIC0_PCM_NAME" + id $DMIC0_PCM_ID + direction "capture" + Object.Base.fe_dai.1 { name "$DMIC0_PCM_NAME" } + Object.PCM.pcm_caps.1 { + direction "capture" name "DMIC0 Capture" formats $AEC_FMT + rate_min $AEC_RATE rate_max $AEC_RATE channels_min $MIC_CH channels_max $MIC_CH + } + } + { + name "$SSP2_PCM_NAME" + id 2 + direction "playback" + Object.Base.fe_dai.1 { name "$SSP2_PCM_NAME" } + Object.PCM.pcm_caps.1 { + direction "playback" name "SSP2 Playback" formats $AEC_FMT + rate_min $AEC_RATE rate_max $AEC_RATE channels_min $REF_CH channels_max $REF_CH + } + } +] + +Object.Base.route [ + { source "host-copier.2.playback" sink "dai-copier.SSP.NoCodec-2.playback" } + { source "dai-copier.DMIC.$DMIC0_NAME.capture" sink "webrtc-aec.7.1" } + { source "dai-copier.SSP.NoCodec-2.capture" sink "webrtc-aec.7.1" } + { source "webrtc-aec.7.1" sink "host-copier.0.capture" } +] diff --git a/topology2/development/cavs-nocodec-webrtc-aec.conf b/topology2/development/cavs-nocodec-webrtc-aec.conf index 1b2df44..fe9833f 100644 --- a/topology2/development/cavs-nocodec-webrtc-aec.conf +++ b/topology2/development/cavs-nocodec-webrtc-aec.conf @@ -64,6 +64,16 @@ Define { SSP0_PCM_ID 0 SSP0_PCM_NAME "Port0" SSP2_PCM_NAME "Port2" + AEC_RATE 48000 + AEC_HW_CONF_ID 0 + AEC_BITS 16 + AEC_FMT "S16_LE" + MIC_CH 2 + REF_CH 2 + MIC_CH_CFG $CHANNEL_CONFIG_STEREO + MIC_CH_MAP $CHANNEL_MAP_STEREO + REF_CH_CFG $CHANNEL_CONFIG_STEREO + REF_CH_MAP $CHANNEL_MAP_STEREO } IncludeByKey.PLATFORM { @@ -72,6 +82,7 @@ IncludeByKey.PLATFORM { "mtl" "platform/intel/mtl.conf" "lnl" "platform/intel/lnl.conf" "ptl" "platform/intel/ptl.conf" + "nvl" "platform/intel/ptl.conf" # Note: Assume same configuration as PTL } Object.Dai.SSP [ @@ -80,7 +91,7 @@ Object.Dai.SSP [ dai_index 0 direction "duplex" name NoCodec-0 - default_hw_conf_id 0 + default_hw_conf_id $AEC_HW_CONF_ID sample_bits 32 quirks "lbm_mode" io_clk $MCLK @@ -88,6 +99,15 @@ Object.Dai.SSP [ name "SSP0" id 0 bclk_freq 3072000 + fsync_freq 48000 + tdm_slot_width 32 + Object.Base.link_config.1 { clock_source 1 } + } + Object.Base.hw_config.2 { + name "SSP0-16k" + id 1 + bclk_freq 1024000 + fsync_freq 16000 tdm_slot_width 32 Object.Base.link_config.1 { clock_source 1 } } @@ -97,7 +117,7 @@ Object.Dai.SSP [ dai_index 2 direction "duplex" name NoCodec-2 - default_hw_conf_id 0 + default_hw_conf_id $AEC_HW_CONF_ID sample_bits 32 quirks "lbm_mode" io_clk $MCLK @@ -105,6 +125,15 @@ Object.Dai.SSP [ name "SSP2" id 0 bclk_freq 3072000 + fsync_freq 48000 + tdm_slot_width 32 + Object.Base.link_config.1 { clock_source 1 } + } + Object.Base.hw_config.2 { + name "SSP2-16k" + id 1 + bclk_freq 1024000 + fsync_freq 16000 tdm_slot_width 32 Object.Base.link_config.1 { clock_source 1 } } @@ -121,9 +150,15 @@ Object.Pipeline.io-gateway [ stream_name "NoCodec-0" node_type $I2S_LINK_OUTPUT_CLASS num_input_pins 1 num_input_audio_formats 1 - Object.Base.input_audio_format [{ in_bit_depth 16 in_valid_bit_depth 16 }] + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $MIC_CH in_ch_cfg $MIC_CH_CFG in_ch_map $MIC_CH_MAP + }] num_output_audio_formats 1 - Object.Base.output_audio_format [{ out_bit_depth 32 out_valid_bit_depth 32 }] + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth 32 out_valid_bit_depth 32 + out_channels $MIC_CH out_ch_cfg $MIC_CH_CFG out_ch_map $MIC_CH_MAP + }] } } { @@ -134,9 +169,15 @@ Object.Pipeline.io-gateway [ stream_name "NoCodec-2" node_type $I2S_LINK_OUTPUT_CLASS num_input_pins 1 num_input_audio_formats 1 - Object.Base.input_audio_format [{ in_bit_depth 16 in_valid_bit_depth 16 }] + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $REF_CH in_ch_cfg $REF_CH_CFG in_ch_map $REF_CH_MAP + }] num_output_audio_formats 1 - Object.Base.output_audio_format [{ out_bit_depth 32 out_valid_bit_depth 32 }] + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth 32 out_valid_bit_depth 32 + out_channels $REF_CH out_ch_cfg $REF_CH_CFG out_ch_map $REF_CH_MAP + }] } } ] @@ -147,9 +188,15 @@ Object.Pipeline.host-gateway-playback [ Object.Widget.host-copier.1 { stream_name 'SSP0 Playback' pcm_id 0 num_input_audio_formats 1 - Object.Base.input_audio_format [{ in_bit_depth 16 in_valid_bit_depth 16 }] + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $MIC_CH in_ch_cfg $MIC_CH_CFG in_ch_map $MIC_CH_MAP + }] num_output_audio_formats 1 - Object.Base.output_audio_format [{ out_bit_depth 16 out_valid_bit_depth 16 }] + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $MIC_CH out_ch_cfg $MIC_CH_CFG out_ch_map $MIC_CH_MAP + }] } } { @@ -157,9 +204,15 @@ Object.Pipeline.host-gateway-playback [ Object.Widget.host-copier.1 { stream_name 'SSP2 Playback' pcm_id 2 num_input_audio_formats 1 - Object.Base.input_audio_format [{ in_bit_depth 16 in_valid_bit_depth 16 }] + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $REF_CH in_ch_cfg $REF_CH_CFG in_ch_map $REF_CH_MAP + }] num_output_audio_formats 1 - Object.Base.output_audio_format [{ out_bit_depth 16 out_valid_bit_depth 16 }] + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $REF_CH out_ch_cfg $REF_CH_CFG out_ch_map $REF_CH_MAP + }] } } ] @@ -171,9 +224,15 @@ Object.Pipeline.host-gateway-capture [ Object.Widget.host-copier.1 { stream_name 'SSP0 Capture' pcm_id 0 num_input_audio_formats 1 - Object.Base.input_audio_format [{ in_bit_depth 16 in_valid_bit_depth 16 }] + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth $AEC_BITS in_valid_bit_depth $AEC_BITS + in_channels $MIC_CH in_ch_cfg $MIC_CH_CFG in_ch_map $MIC_CH_MAP + }] num_output_audio_formats 1 - Object.Base.output_audio_format [{ out_bit_depth 16 out_valid_bit_depth 16 }] + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $MIC_CH out_ch_cfg $MIC_CH_CFG out_ch_map $MIC_CH_MAP + }] } } ] @@ -186,9 +245,15 @@ Object.Pipeline.io-gateway-capture [ dai_index 0 dai_type "SSP" type dai_out copier_type "SSP" stream_name "NoCodec-0" node_type $I2S_LINK_INPUT_CLASS num_input_audio_formats 1 - Object.Base.input_audio_format [{ in_bit_depth 32 in_valid_bit_depth 32 }] + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth 32 in_valid_bit_depth 32 + in_channels $MIC_CH in_ch_cfg $MIC_CH_CFG in_ch_map $MIC_CH_MAP + }] num_output_audio_formats 1 - Object.Base.output_audio_format [{ out_bit_depth 16 out_valid_bit_depth 16 }] + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $MIC_CH out_ch_cfg $MIC_CH_CFG out_ch_map $MIC_CH_MAP + }] } } { @@ -198,9 +263,15 @@ Object.Pipeline.io-gateway-capture [ dai_index 2 dai_type "SSP" type dai_out copier_type "SSP" stream_name "NoCodec-2" node_type $I2S_LINK_INPUT_CLASS num_input_audio_formats 1 - Object.Base.input_audio_format [{ in_bit_depth 32 in_valid_bit_depth 32 }] + Object.Base.input_audio_format [{ + in_rate $AEC_RATE in_bit_depth 32 in_valid_bit_depth 32 + in_channels $REF_CH in_ch_cfg $REF_CH_CFG in_ch_map $REF_CH_MAP + }] num_output_audio_formats 1 - Object.Base.output_audio_format [{ out_bit_depth 16 out_valid_bit_depth 16 }] + Object.Base.output_audio_format [{ + out_rate $AEC_RATE out_bit_depth $AEC_BITS out_valid_bit_depth $AEC_BITS + out_channels $REF_CH out_ch_cfg $REF_CH_CFG out_ch_map $REF_CH_MAP + }] } } ] @@ -213,6 +284,52 @@ Object.Widget.webrtc-aec [ index 7 name "webrtc-aec.7.1" num_input_pins 2 + num_input_audio_formats 2 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + input_pin_index 0 + in_rate $AEC_RATE + in_bit_depth $AEC_BITS + in_valid_bit_depth $AEC_BITS + in_channels $MIC_CH + in_ch_cfg $MIC_CH_CFG + in_ch_map $MIC_CH_MAP + ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" + } + { + input_pin_index 1 + in_rate $AEC_RATE + in_bit_depth $AEC_BITS + in_valid_bit_depth $AEC_BITS + in_channels $REF_CH + in_ch_cfg $REF_CH_CFG + in_ch_map $REF_CH_MAP + ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" + } + ] + + Object.Base.output_audio_format [ + { + out_rate $AEC_RATE + out_bit_depth $AEC_BITS + out_valid_bit_depth $AEC_BITS + out_channels $MIC_CH + out_ch_cfg $MIC_CH_CFG + out_ch_map $MIC_CH_MAP + obs "$[(($out_channels * ($[($out_rate + 999)] / 1000)) * ($out_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" + } + ] + + Object.Control { + mixer."1" { + name 'SSP0 Capture AEC Switch' + } + mixer."2" { + name 'SSP0 Capture AEC Suppression Switch' + } + } # Pin 0: microphone (same pipeline 7 as the host-copier sink) Object.Base.input_pin_binding.1 { @@ -232,10 +349,12 @@ Object.PCM.pcm [ direction "duplex" Object.Base.fe_dai.1 { name "$SSP0_PCM_NAME" } Object.PCM.pcm_caps.1 { - direction "playback" name "SSP0 Playback" formats 'S16_LE' + direction "playback" name "SSP0 Playback" formats $AEC_FMT + rate_min $AEC_RATE rate_max $AEC_RATE channels_min $MIC_CH channels_max $MIC_CH } Object.PCM.pcm_caps.2 { - direction "capture" name "SSP0 Capture" formats 'S16_LE' + direction "capture" name "SSP0 Capture" formats $AEC_FMT + rate_min $AEC_RATE rate_max $AEC_RATE channels_min $MIC_CH channels_max $MIC_CH } } { @@ -244,7 +363,8 @@ Object.PCM.pcm [ direction "playback" Object.Base.fe_dai.1 { name "$SSP2_PCM_NAME" } Object.PCM.pcm_caps.1 { - direction "playback" name "SSP2 Playback" formats 'S16_LE' + direction "playback" name "SSP2 Playback" formats $AEC_FMT + rate_min $AEC_RATE rate_max $AEC_RATE channels_min $REF_CH channels_max $REF_CH } } ] diff --git a/topology2/development/cavs-nocodec-webrtc-ns2.conf b/topology2/development/cavs-nocodec-webrtc-ns2.conf index 8cfa380..7b50125 100644 --- a/topology2/development/cavs-nocodec-webrtc-ns2.conf +++ b/topology2/development/cavs-nocodec-webrtc-ns2.conf @@ -58,6 +58,8 @@ Define { PLATFORM "none" SSP0_PCM_ID 0 SSP0_PCM_NAME "Port0" + # RNNoise requires a fixed 48 kHz DAI/graph rate + SSP0_RATE 48000 } IncludeByKey.PLATFORM { @@ -85,7 +87,8 @@ Object.Dai.SSP [ Object.Base.hw_config.1 { name "SSP0" id 0 - # 48 kHz × 2ch × 32-bit = 3.072 MHz BCLK + # Keep FSYNC locked to SSP0_RATE (48 kHz for RNNoise): 48 kHz × 2ch × 32-bit = 3.072 MHz BCLK + fsync_freq $SSP0_RATE bclk_freq 3072000 tdm_slot_width 32 Object.Base.link_config.1 { diff --git a/topology2/development/tplg-targets.cmake b/topology2/development/tplg-targets.cmake index 07f9166..5947071 100644 --- a/topology2/development/tplg-targets.cmake +++ b/topology2/development/tplg-targets.cmake @@ -237,13 +237,13 @@ DEEPBUFFER_FW_DMA_MS=false,HDA_ANALOG_CAPTURE_RATE=96000,HDA_ANALOG_PLAYBACK_RAT # by ffmpeg_enc. COMPR_FFMPEG_ENC # gates compr-capture-ffmpeg.conf, which taps the HDA analog capture BE, so it # may be built alongside or independently of the decode COMPR_FFMPEG path above. -"sof-hda-generic\;sof-hda-generic-ffmpeg-mp3-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true" -"sof-hda-generic\;sof-hda-generic-ffmpeg-aac-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true" -"sof-hda-generic\;sof-hda-generic-ffmpeg-flac-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true" -"sof-hda-generic\;sof-hda-generic-ffmpeg-alac-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true" -"sof-hda-generic\;sof-hda-generic-ffmpeg-sbc-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true" -"sof-hda-generic\;sof-hda-generic-ffmpeg-g722-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true" -"sof-hda-generic\;sof-hda-generic-ffmpeg-aptx-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true" +"sof-hda-generic\;sof-hda-generic-ffmpeg-mp3-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true,COMPR_FFMPEG_ENC_CODEC=mp3" +"sof-hda-generic\;sof-hda-generic-ffmpeg-aac-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true,COMPR_FFMPEG_ENC_CODEC=aac" +"sof-hda-generic\;sof-hda-generic-ffmpeg-flac-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true,COMPR_FFMPEG_ENC_CODEC=flac" +"sof-hda-generic\;sof-hda-generic-ffmpeg-alac-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true,COMPR_FFMPEG_ENC_CODEC=alac" +"sof-hda-generic\;sof-hda-generic-ffmpeg-sbc-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true,COMPR_FFMPEG_ENC_CODEC=sbc" +"sof-hda-generic\;sof-hda-generic-ffmpeg-g722-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true,COMPR_FFMPEG_ENC_CODEC=g722" +"sof-hda-generic\;sof-hda-generic-ffmpeg-aptx-enc-compr\;HDA_CONFIG=mix,COMPR_FFMPEG_ENC=true,COMPR_FFMPEG_ENC_CODEC=aptx" # SDW + DMIC + HDMI, with 16 kHz DMIC1 "cavs-sdw\;sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-16k\;PLATFORM=mtl,\ @@ -339,9 +339,24 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-rtcaec.bin" "development/cavs-nocodec-webrtc-ns\;sof-tgl-nocodec-webrtc-ns\;PLATFORM=tgl,\ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-webrtc-ns.bin" -# WebRTC AECm echo canceller (dual SSP: mic + ref) on TGL nocodec +# WebRTC AEC echo canceller (dual SSP lbm_mode: mic + ref) on TGL/PTL nocodec "development/cavs-nocodec-webrtc-aec\;sof-tgl-nocodec-webrtc-aec\;PLATFORM=tgl,\ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-webrtc-aec.bin" +"development/cavs-nocodec-webrtc-aec\;sof-ptl-nocodec-webrtc-aec\;PLATFORM=ptl,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-nocodec-webrtc-aec.bin" +"development/cavs-nocodec-webrtc-aec\;sof-tgl-nocodec-webrtc-aec-16k\;PLATFORM=tgl,\ +AEC_RATE=16000,AEC_HW_CONF_ID=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-webrtc-aec-16k.bin" +"development/cavs-nocodec-webrtc-aec\;sof-ptl-nocodec-webrtc-aec-16k\;PLATFORM=ptl,\ +AEC_RATE=16000,AEC_HW_CONF_ID=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-nocodec-webrtc-aec-16k.bin" +"development/cavs-nocodec-webrtc-aec\;sof-ptl-nocodec-webrtc-aec-2r1c\;PLATFORM=ptl,\ +AEC_RATE=16000,AEC_HW_CONF_ID=1,MIC_CH=1,REF_CH=2,MIC_CH_CFG=0,MIC_CH_MAP=0xFFFFFFF0,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-nocodec-webrtc-aec-2r1c.bin" + +# WebRTC AEC hybrid DMIC0 capture + SSP2 digital loopback (lbm_mode) echo reference +"development/cavs-dmic-ssp-lbm-webrtc-aec\;sof-tgl-dmic-ssp-lbm-webrtc-aec\;PLATFORM=tgl,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-dmic-ssp-lbm-webrtc-aec.bin" +"development/cavs-dmic-ssp-lbm-webrtc-aec\;sof-ptl-dmic-ssp-lbm-webrtc-aec\;PLATFORM=ptl,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-dmic-ssp-lbm-webrtc-aec.bin" # WebRTC NS2/RNNoise (48 kHz float) on TGL nocodec SSP "development/cavs-nocodec-webrtc-ns2\;sof-tgl-nocodec-webrtc-ns2\;PLATFORM=tgl,\ @@ -526,9 +541,17 @@ SDW_JACK_ECHO_REF=true,SDW_SPK_ECHO_REF=true,SDW_ECHO_REF_DAI=true" SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true" +"cavs-sdw\;sof-arl-cs42l43-l0-compr-speed\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,\ +SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ +COMPRESSED=true,COMPRESSED_SPEED=true" + "cavs-sdw\;sof-mtl-rt713-l0-rt1316-l12-compr\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,\ HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,COMPRESSED=true" +"cavs-sdw\;sof-mtl-rt713-l0-rt1316-l12-compr-speed\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,\ +HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,COMPRESSED=true,COMPRESSED_SPEED=true" + "cavs-sdw\;sof-ptl-rt721-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true" diff --git a/topology2/include/components/phase_vocoder.conf b/topology2/include/components/phase_vocoder.conf index c0541c2..9c0ecbb 100644 --- a/topology2/include/components/phase_vocoder.conf +++ b/topology2/include/components/phase_vocoder.conf @@ -78,6 +78,10 @@ Class.Widget."phase_vocoder" { shift 0 } text.0 { + # Speeds over 1 are disabled for now to be able to operate + # Phase Vocoder Module without DP-DP bind need. The compress + # decoder must be DP, so the DP mode and more free PCM flow + # is not available for the Phase Vocoder. name "phase_vocoder_speed_enum" !values [ "0.5" @@ -86,16 +90,16 @@ Class.Widget."phase_vocoder" { "0.8" "0.9" "1.0" - "1.1" - "1.2" - "1.3" - "1.4" - "1.5" - "1.6" - "1.7" - "1.8" - "1.9" - "2.0" + #"1.1" + #"1.2" + #"1.3" + #"1.4" + #"1.5" + #"1.6" + #"1.7" + #"1.8" + #"1.9" + #"2.0" ] } ops.1 { diff --git a/topology2/include/components/webrtc-ns2.conf b/topology2/include/components/webrtc-ns2.conf index 351ec1c..0668917 100644 --- a/topology2/include/components/webrtc-ns2.conf +++ b/topology2/include/components/webrtc-ns2.conf @@ -123,10 +123,14 @@ Class.Widget."webrtc-ns2" { ] # UUID: eacfacdc-2a87-c942-97e894c917a740db - uuid "dc:fa:cf:ea:87:2a:42:c9:97:e8:94:c9:17:a7:40:db" + uuid "dc:ac:cf:ea:87:2a:42:c9:97:e8:94:c9:17:a7:40:db" type "effect" no_pm "true" - cpc 5000 + # Default DP budget for 48 kHz / 480-sample RNNoise frames (5000 under-budgets on DSP; override per widget if needed) + cpc 100000 + scheduler_domain "DP" + stack_bytes_requirement 16384 + heap_bytes_requirement 163840 num_input_pins 1 num_output_pins 1 } diff --git a/topology2/include/formats/compr_input_audio_formats_pv.conf b/topology2/include/formats/compr_input_audio_formats_pv.conf new file mode 100644 index 0000000..51e41ea --- /dev/null +++ b/topology2/include/formats/compr_input_audio_formats_pv.conf @@ -0,0 +1,114 @@ + # Phase vocoder input formats: mono + stereo, all rates, + # 8/16/24/32-bit. ibs = frames * channels * bytes_per_sample + # (480 frames per DP period, matching current stereo values). + num_input_audio_formats 40 + CombineArrays.Object.Base.input_audio_format [ + # mono + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 8 ] + in_valid_bit_depth [ 8 ] + in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + ibs [ 480 ] + } + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 16 ] + in_valid_bit_depth [ 16 ] + ibs [ 960 ] + } + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 24 ] + ibs [ 1920 ] + } + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 32 ] + ibs [ 1920 ] + } + # stereo + { + in_channels [ 2 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 8 ] + in_valid_bit_depth [ 8 ] + in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + ibs [ 960 ] + } + { + in_channels [ 2 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 16 ] + in_valid_bit_depth [ 16 ] + ibs [ 1920 ] + } + { + in_channels [ 2 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 24 ] + ibs [ 3840 ] + } + { + in_channels [ 2 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 32 ] + ibs [ 3840 ] + } + ] diff --git a/topology2/include/formats/compr_output_audio_formats_pv.conf b/topology2/include/formats/compr_output_audio_formats_pv.conf new file mode 100644 index 0000000..2972927 --- /dev/null +++ b/topology2/include/formats/compr_output_audio_formats_pv.conf @@ -0,0 +1,114 @@ + # Phase vocoder output formats: mono + stereo, all rates, + # 8/16/24/32-bit. obs = frames * channels * bytes_per_sample + # (240 frames per DP period, matching current stereo values). + num_output_audio_formats 40 + CombineArrays.Object.Base.output_audio_format [ + # mono + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 8 ] + out_valid_bit_depth [ 8 ] + out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + obs [ 240 ] + } + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 16 ] + out_valid_bit_depth [ 16 ] + obs [ 480 ] + } + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 24 ] + obs [ 960 ] + } + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 32 ] + obs [ 960 ] + } + # stereo + { + out_channels [ 2 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 8 ] + out_valid_bit_depth [ 8 ] + out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + obs [ 480 ] + } + { + out_channels [ 2 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 16 ] + out_valid_bit_depth [ 16 ] + obs [ 960 ] + } + { + out_channels [ 2 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 24 ] + obs [ 1920 ] + } + { + out_channels [ 2 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 32 ] + obs [ 1920 ] + } + ] diff --git a/topology2/include/pipelines/cavs/compr-speed-playback.conf b/topology2/include/pipelines/cavs/compr-speed-playback.conf new file mode 100644 index 0000000..dcb3298 --- /dev/null +++ b/topology2/include/pipelines/cavs/compr-speed-playback.conf @@ -0,0 +1,116 @@ +# +# FE playback pipeline: compr-speed-playback +# +# All attributes defined herein are namespaced +# by alsatplg to "Object.Pipeline.compr-speed-playback.N.attribute_name" +# +# Usage: compr-speed-playback pipeline object can be instantiated as: +# +# Object.Pipeline.compr-speed-playback."N" { +# period 1000 +# time_domain "timer" +# } +# +# Where N is the unique pipeline ID within the same alsaconf node. +# + + + + + + + + + + + + + +Class.Pipeline."compr-speed-playback" { + + + + attributes { + !constructor [ + "index" + ] + + !immutable [ + "direction" + ] + + # + # compr-speed-playback objects instantiated within the same alsaconf + # node must have unique pipeline_id attribute + # + unique "instance" + } + + Object.Widget { + host-copier."1" { + type "aif_in" + node_type $HDA_HOST_OUTPUT_CLASS + num_output_pins 1 + deep_buffer_dma_ms $COMPR_DEEPBUFFER_MS + } + + decoder."1" { + scheduler_domain "DP" + } + + phase_vocoder."1" { + # Scheduler_domain is commented out to avoid DP-DP bind limitation. This + # limits the Phase Vocoder module to support only slow playback 0.5 - 1.0x + # with no speed up. + + # scheduler_domain "DP" + } + + module-copier."2" {} + + src."1" {} + + micsel."1" {} + + gain."1" {} + + mixin."1" {} + + pipeline."1" { + priority 0 + # enable lp mode + lp_mode 1 + } + } + + Object.Base.route [ + { + source decoder.$index.1 + sink phase_vocoder.$index.1 + } + { + source phase_vocoder.$index.1 + sink module-copier.$index.2 + } + { + source module-copier.$index.2 + sink src.$index.1 + } + { + source src.$index.1 + sink micsel.$index.1 + } + { + source micsel.$index.1 + sink gain.$index.1 + } + { + source gain.$index.1 + sink mixin.$index.1 + } + ] + + direction "playback" + dynamic_pipeline 1 + time_domain "timer" +} diff --git a/topology2/platform/intel/compr-capture-ffmpeg.conf b/topology2/platform/intel/compr-capture-ffmpeg.conf index f6801e6..8c5ec78 100644 --- a/topology2/platform/intel/compr-capture-ffmpeg.conf +++ b/topology2/platform/intel/compr-capture-ffmpeg.conf @@ -69,6 +69,23 @@ IncludeByKey.COMPR_FFMPEG_ENC { # 21.33 ms) must accumulate a full frame before emitting a # packet, so the DP ring supplies headroom a 2 ms LL buffer # lacks. + IncludeByKey.COMPR_FFMPEG_LLEXT { + "true" { + IncludeByKey.COMPR_FFMPEG_ENC_CODEC { + "mp3" { uuid "dd:75:7d:98:b0:2d:ca:4c:b2:ea:b3:e9:76:36:fe:00" } + "aac" { uuid "cd:35:54:b8:14:69:fd:4d:86:46:c8:38:73:d0:af:2a" } + "flac" { uuid "8a:0b:d3:f3:3c:f3:3d:41:a4:60:9e:1c:eb:37:8a:51" } + "alac" { uuid "6f:7b:05:b0:c2:b0:8c:41:88:b8:3b:50:ba:50:8b:ce" } + "sbc" { uuid "c8:36:15:2a:36:b8:44:4b:91:64:a6:58:27:6b:50:fd" } + "g722" { uuid "97:ed:1f:f7:cb:da:5e:43:9f:fb:6a:78:4f:12:fb:84" } + "aptx" { uuid "09:08:e5:1a:b4:4a:25:44:b0:c4:6e:07:69:d1:dd:3b" } + "aptx_hd" { uuid "bd:d4:2a:25:f2:98:be:41:98:5c:a4:6a:ac:2f:36:e8" } + "g726" { uuid "0a:82:aa:e9:23:69:ea:4f:ac:ea:e0:9e:95:44:2c:63" } + "alaw" { uuid "65:30:21:c5:1d:db:66:4a:97:96:eb:20:57:a0:c4:c0" } + "mulaw" { uuid "fc:0f:28:1f:bf:27:d6:48:b0:f7:5a:6b:80:63:3b:09" } + } + } + } core_id $COMPR_ENCODER_CORE_ID stack_bytes_requirement $COMPR_FFMPEG_ENC_STACK heap_bytes_requirement $COMPR_FFMPEG_ENC_HEAP diff --git a/topology2/platform/intel/compr-default.conf b/topology2/platform/intel/compr-default.conf index 73df2eb..fb15dd7 100644 --- a/topology2/platform/intel/compr-default.conf +++ b/topology2/platform/intel/compr-default.conf @@ -2,6 +2,7 @@ Define { COMPRESSED false COMPR_DEEPBUFFER_MS 100 # 100 ms copier dma size + COMPRESSED_SPEED false COMPRESSED_1 true COMPR_PCM_NAME 'Compress Playback' @@ -15,11 +16,20 @@ Define { # CONFIG_CROSS_CORE_STREAM in firmware. Set to 0 for firmware without # cross-core stream support. COMPR_DECODER_CORE_ID 1 + # Modular heap requirement of the Cadence decoder (DP) widget. + # For FLAC the memory scales with blocksize x channels x 4 bytes (U): + # ~2 x U for the library (output buffer and per channel working + # memory) + 3 x U for the DP output ring buffer + small buffers. + # The default fits up to 4608 samples per block (stereo, 32 bit, + # ~185 KiB). Bigger blocksizes (> 48kHz) need more, e.g. ~384 KiB + # for 8192 and ~704 KiB for 16384 samples per block. + COMPR_DECODER_HEAP 196608 # When true, the compress PCM is driven by the FFmpeg (libavcodec) # decoder widget (ffmpeg_dec) instead of the Cadence decoder. Enable # instead of COMPRESSED_1 (they share the COMPR_* pcm/pipeline defines). COMPR_FFMPEG false + COMPR_FFMPEG_LLEXT true COMPR_FFMPEG_DEC_STACK 65536 # Modular heap requirement (mod_alloc): up to 192 KiB DP output ring + # 64 KiB PCM staging buffer + 4 KiB input bounce buffer + 4 KiB @@ -36,6 +46,7 @@ Define { # HDA-specific PCM name are set where the BE is defined # (cavs-mixin-mixout-hda.conf). COMPR_FFMPEG_ENC false + COMPR_FFMPEG_ENC_CODEC 'mp3' COMPR_ENC_PCM_NAME 'Compress Capture' COMPR_ENC_PCM_ID 51 COMPR_ENC_PIPELINE_ID 91 @@ -51,9 +62,20 @@ Define { # fits within 384 KiB. COMPR_FFMPEG_ENC_HEAP 393216 - COMPRESSED_2 false COMPR_2_PCM_NAME 'Compress Playback 2' COMPR_2_PCM_ID 52 COMPR_2_PIPELINE_ID 92 + + COMPRESSED_SPEED_1 true + COMPR_SPEED_PCM_NAME 'Compress Speed Playback' + COMPR_SPEED_PCM_ID 60 + COMPR_SPEED_PIPELINE_ID 95 + + COMPRESSED_SPEED_2 false + COMPR_SPEED_2_PCM_NAME 'Compress Speed Playback 2' + COMPR_SPEED_2_PCM_ID 62 + COMPR_SPEED_2_PIPELINE_ID 96 + + COMPR_SPEED_CORE_ID 1 } diff --git a/topology2/platform/intel/compr-ffmpeg.conf b/topology2/platform/intel/compr-ffmpeg.conf index cc80c07..53faaf4 100644 --- a/topology2/platform/intel/compr-ffmpeg.conf +++ b/topology2/platform/intel/compr-ffmpeg.conf @@ -35,6 +35,24 @@ IncludeByKey.COMPR_FFMPEG { # (after container header stripping) and per-frame decoding. stack_bytes_requirement $COMPR_FFMPEG_DEC_STACK heap_bytes_requirement $COMPR_FFMPEG_DEC_HEAP + IncludeByKey.COMPR_FFMPEG_LLEXT { + "true" { + IncludeByKey.COMPR_FFMPEG_CODEC { + "flac" { uuid "8f:cf:76:3e:91:33:c5:42:9f:f2:5b:cd:5b:11:71:39" } + "aac" { uuid "1b:ac:31:56:a9:23:e4:45:87:a3:63:d0:b0:24:af:f2" } + "opus" { uuid "59:5e:fe:3f:fb:9f:c2:4f:b7:ae:86:1a:32:e2:09:8a" } + "mp3" { uuid "33:9c:c3:0d:1f:41:54:4b:88:a7:5b:2d:07:49:b6:c1" } + "alac" { uuid "35:6f:58:14:c6:70:29:42:ae:c1:d7:4e:9e:82:c0:89" } + "sbc" { uuid "cc:dc:df:b0:0d:4c:c1:4a:9d:4f:45:17:24:f9:b8:92" } + "g722" { uuid "7a:34:5d:e3:4d:22:a1:44:9e:61:97:4e:17:25:4b:64" } + "aptx" { uuid "fe:1c:4b:f6:1e:fe:a7:4e:9d:c5:bf:4c:2a:e8:d2:18" } + "aptx_hd" { uuid "20:fb:65:7e:9e:bd:8c:47:8c:09:3b:70:0f:3e:0b:52" } + "g726" { uuid "7c:cb:9e:d1:d8:ad:29:41:a1:0b:42:b7:2c:69:75:41" } + "alaw" { uuid "a8:27:6c:d0:36:05:09:40:a2:0d:c0:37:27:8e:6d:2b" } + "mulaw" { uuid "e3:50:eb:ba:c9:5b:3f:40:85:e1:46:65:14:95:ac:25" } + } + } + } # Optional codec setup control: extradata may be delivered via # ALSA mixer bytes control; FLAC STREAMINFO is also extracted # dynamically from the incoming stream by ffmpeg_dec. diff --git a/topology2/platform/intel/compr-speed.conf b/topology2/platform/intel/compr-speed.conf new file mode 100644 index 0000000..8663e69 --- /dev/null +++ b/topology2/platform/intel/compr-speed.conf @@ -0,0 +1,265 @@ + +IncludeByKey.COMPRESSED_SPEED_1 { +"true" { + Object.Pipeline.compr-speed-playback [ + { + index $COMPR_SPEED_PIPELINE_ID + + Object.Widget.host-copier.1 { + stream_name $COMPR_SPEED_PCM_NAME + pcm_id $COMPR_SPEED_PCM_ID + + + } + + Object.Widget.decoder.1 { + core_id $COMPR_SPEED_CORE_ID + + + } + + Object.Widget.phase_vocoder.1 { + + + Object.Control { + bytes."1" { + name '$COMPR_SPEED_PCM_NAME Phase Vocoder bytes' + + } + mixer."1" { + name '$COMPR_SPEED_PCM_NAME Phase Vocoder enable' + } + enum."1" { + name '$COMPR_SPEED_PCM_NAME Phase Vocoder speed' + } + } + } + + # converts the input to S32_LE + Object.Widget.module-copier.2 { + + + } + + # converts the input to 48KHz + # note: this is wrong for 96/192KHz HiRes audio!!!! + Object.Widget.src.1 { + rate_out 48000 + + } + + # converts the input to stereo + Object.Widget.micsel.1 { + Object.Control.bytes."1" { + name '$COMPR_SPEED_PCM_NAME selector bytes' + + } + + + } + + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Pre Mixer $COMPR_SPEED_PCM_NAME Volume' + } + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 48000 + 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 + } + ] + } + + Object.Widget.mixin.1 { + Object.Base.input_audio_format [ + { + in_rate 48000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } + ] + + Object.PCM.pcm [ + { + name $COMPR_SPEED_PCM_NAME + id $COMPR_SPEED_PCM_ID + direction playback + compress "true" + + Object.Base.fe_dai.1 { + name "$COMPR_SPEED_PCM_NAME" + } + + Object.PCM.pcm_caps.1 { + name $COMPR_SPEED_PCM_NAME + formats 'S32_LE' + rates '8000' + } + } + ] + + Object.Base.route [ + { + source mixin.$COMPR_SPEED_PIPELINE_ID.1 + sink $COMPR_SPEED_PIPELINE_SINK + } + { + source host-copier.$COMPR_SPEED_PCM_ID.playback + sink decoder.$COMPR_SPEED_PIPELINE_ID.1 + } + ] +} +} + +# Spawn another instance for speaker +IncludeByKey.COMPRESSED_SPEED_2 { +"true" { + Object.Pipeline.compr-speed-playback [ + { + index $COMPR_SPEED_2_PIPELINE_ID + + Object.Widget.host-copier.1 { + stream_name $COMPR_SPEED_2_PCM_NAME + pcm_id $COMPR_SPEED_2_PCM_ID + + + } + + Object.Widget.decoder.1 { + core_id $COMPR_SPEED_CORE_ID + + + } + + Object.Widget.phase_vocoder.1 { + + + Object.Control { + bytes."1" { + name '$COMPR_SPEED_2_PCM_NAME Phase Vocoder bytes' + + } + mixer."1" { + name '$COMPR_SPEED_2_PCM_NAME Phase Vocoder enable' + } + enum."1" { + name '$COMPR_SPEED_2_PCM_NAME Phase Vocoder speed' + } + } + } + + # converts the input to S32_LE + Object.Widget.module-copier.2 { + + + } + + # converts the input to 48KHz + # note: this is wrong for 96/192KHz HiRes audio!!!! + Object.Widget.src.1 { + rate_out 48000 + + } + + # converts the input to stereo + Object.Widget.micsel.1 { + Object.Control.bytes."1" { + name '$COMPR_SPEED_2_PCM_NAME selector bytes' + + } + + + } + + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Pre Mixer $COMPR_SPEED_2_PCM_NAME Volume' + } + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 48000 + 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 + } + ] + } + + Object.Widget.mixin.1 { + Object.Base.input_audio_format [ + { + in_rate 48000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } + ] + + Object.PCM.pcm [ + { + name $COMPR_SPEED_2_PCM_NAME + id $COMPR_SPEED_2_PCM_ID + direction playback + compress "true" + + Object.Base.fe_dai.1 { + name "$COMPR_SPEED_2_PCM_NAME" + } + + Object.PCM.pcm_caps.1 { + name $COMPR_SPEED_2_PCM_NAME + formats 'S32_LE' + rates '8000' + } + } + ] + + Object.Base.route [ + { + source mixin.$COMPR_SPEED_2_PIPELINE_ID.1 + sink $COMPR_SPEED_2_PIPELINE_SINK + } + { + source host-copier.$COMPR_SPEED_2_PCM_ID.playback + sink decoder.$COMPR_SPEED_2_PIPELINE_ID.1 + } + ] +} +} diff --git a/topology2/platform/intel/compr.conf b/topology2/platform/intel/compr.conf index 70ca4dc..de3e618 100644 --- a/topology2/platform/intel/compr.conf +++ b/topology2/platform/intel/compr.conf @@ -14,6 +14,7 @@ IncludeByKey.COMPRESSED_1 { Object.Widget.decoder.1 { core_id $COMPR_DECODER_CORE_ID + heap_bytes_requirement $COMPR_DECODER_HEAP } @@ -129,6 +130,7 @@ IncludeByKey.COMPRESSED_2 { Object.Widget.decoder.1 { core_id $COMPR_DECODER_CORE_ID + heap_bytes_requirement $COMPR_DECODER_HEAP } diff --git a/topology2/platform/intel/hda-codec-widgets.conf b/topology2/platform/intel/hda-codec-widgets.conf new file mode 100644 index 0000000..f3beb50 --- /dev/null +++ b/topology2/platform/intel/hda-codec-widgets.conf @@ -0,0 +1,64 @@ +# Virtual widgets of the HDA codec DAPM widgets, used by the HDA function +# of sof-hda-generic.conf +Object.Widget.virtual [ + { + name 'codec0_in' + type input + index 1 + } + { + name 'codec1_in' + type input + index 2 + } + { + name 'codec0_out' + type output + index 3 + } + { + name 'codec1_out' + type output + index 4 + } + { + name 'codec2_in' + type input + index 5 + } + { + name 'codec2_out' + type output + index 6 + } + { + name 'Analog CPU Playback' + type out_drv + index 3 + } + { + name 'Digital CPU Playback' + type out_drv + index 4 + } + { + name 'Alt Analog CPU Playback' + type out_drv + index 5 + } + { + name 'Analog CPU Capture' + type input + index 6 + } + { + name 'Digital CPU Capture' + type input + index 7 + } + { + name 'Alt Analog CPU Capture' + type input + index 8 + } +] diff --git a/topology2/production/tplg-targets-hda-generic.cmake b/topology2/production/tplg-targets-hda-generic.cmake index 72872d1..160356a 100644 --- a/topology2/production/tplg-targets-hda-generic.cmake +++ b/topology2/production/tplg-targets-hda-generic.cmake @@ -123,4 +123,133 @@ EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default" PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-ace3-2ch-dax.bin,\ DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\ EFX_DMIC0_DRC_PARAMS=dmic_default,DOLBY_DAX_CORE_ID=1" + +# Platform independent function topologies, shared by all platforms. The HDA +# codec and HDMI topologies have no NHLT blob, so sof_hda_get_tplg_files() in +# the Linux kernel requests them without a platform in the name. +"sof-hda-generic\;sof-hda-id4\;HDA_CONFIG=mix,NUM_HDMIS=0,\ +HDA_MIC_ENHANCED_CAPTURE=true,EFX_HDA_MIC_TDFB_PARAMS=line2_pass,\ +EFX_HDA_MIC_DRC_PARAMS=passthrough" + +"sof-hda-generic\;sof-hdmi-pcm3-id1\;PLATFORM=ptl" + +# Function topologies, ACE1, named the way sof_hda_get_tplg_files() in the Linux +# kernel requests them. Each one enables a single function of +# sof-hda-generic.conf and disables the others (HDA_CONFIG=none, NUM_DMICS=0, +# NUM_HDMIS=0, HDMI_IN_CAPTURE=false, ADD_BT=false), the way the sof-sdca-* +# topologies do with cavs-sdw.conf. They are loaded next to each other, so +# their PCM and pipeline IDs must not collide. +"sof-hda-generic\;sof-mtl-dmic-2ch-id6\;PLATFORM=mtl,NUM_HDMIS=0,NUM_DMICS=2,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-mtl-dmic-4ch-id6\;PLATFORM=mtl,NUM_HDMIS=0,NUM_DMICS=4,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-mtl-ssp6-hdmiin-id14\;PLATFORM=mtl,NUM_HDMIS=0,\ +HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\ +HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\ +HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\ +HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\ +HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8" + +"sof-hda-generic\;sof-mtl-ssp2-bt-id8\;PLATFORM=mtl,NUM_HDMIS=0,ADD_BT=true,BT_DEEP_BUFFER=true,\ +BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,\ +BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203" + +# Function topologies, ACE3, named the way sof_hda_get_tplg_files() in the Linux +# kernel requests them. Each one enables a single function of +# sof-hda-generic.conf and disables the others (HDA_CONFIG=none, NUM_DMICS=0, +# NUM_HDMIS=0, HDMI_IN_CAPTURE=false, ADD_BT=false), the way the sof-sdca-* +# topologies do with cavs-sdw.conf. They are loaded next to each other, so +# their PCM and pipeline IDs must not collide. +"sof-hda-generic\;sof-ptl-dmic-2ch-id6\;PLATFORM=ptl,NUM_HDMIS=0,NUM_DMICS=2,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-ptl-dmic-4ch-id6\;PLATFORM=ptl,NUM_HDMIS=0,NUM_DMICS=4,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-ptl-ssp6-hdmiin-id14\;PLATFORM=ptl,NUM_HDMIS=0,\ +HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\ +HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\ +HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\ +HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\ +HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8" + +# Function topologies, ACE2 (LNL), named the way sof_hda_get_tplg_files() in the Linux +# kernel requests them. See the ACE1 ones above. +"sof-hda-generic\;sof-lnl-dmic-2ch-id6\;PLATFORM=lnl,NUM_HDMIS=0,NUM_DMICS=2,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-lnl-dmic-4ch-id6\;PLATFORM=lnl,NUM_HDMIS=0,NUM_DMICS=4,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-lnl-ssp2-bt-id8\;PLATFORM=lnl,NUM_HDMIS=0,ADD_BT=true,BT_DEEP_BUFFER=true,\ +BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,\ +BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203" + +"sof-hda-generic\;sof-lnl-ssp6-hdmiin-id14\;PLATFORM=lnl,NUM_HDMIS=0,\ +HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\ +HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\ +HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\ +HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\ +HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8" + +# Function topologies, ACE4 (NVL), named the way sof_hda_get_tplg_files() in the Linux +# kernel requests them. See the ACE1 ones above. +"sof-hda-generic\;sof-nvl-dmic-2ch-id6\;PLATFORM=nvl,NUM_HDMIS=0,NUM_DMICS=2,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-nvl-dmic-4ch-id6\;PLATFORM=nvl,NUM_HDMIS=0,NUM_DMICS=4,\ +DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\ +DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\ +PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\ +EFX_DMIC0_DRC_PARAMS=dmic_default" + +"sof-hda-generic\;sof-nvl-ssp2-bt-id8\;PLATFORM=nvl,NUM_HDMIS=0,ADD_BT=true,BT_DEEP_BUFFER=true,\ +BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,\ +BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203" + +"sof-hda-generic\;sof-nvl-ssp6-hdmiin-id14\;PLATFORM=nvl,NUM_HDMIS=0,\ +HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\ +HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\ +HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\ +HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\ +HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8" +) + +list(APPEND SYMLINKS +# ARL and WCL use the MTL and PTL HDA function topologies +"sof-arl-dmic-2ch-id6\;sof-mtl-dmic-2ch-id6" +"sof-arl-dmic-4ch-id6\;sof-mtl-dmic-4ch-id6" +"sof-arl-ssp2-bt-id8\;sof-mtl-ssp2-bt-id8" +"sof-arl-ssp6-hdmiin-id14\;sof-mtl-ssp6-hdmiin-id14" +"sof-wcl-dmic-2ch-id6\;sof-ptl-dmic-2ch-id6" +"sof-wcl-dmic-4ch-id6\;sof-ptl-dmic-4ch-id6" +"sof-wcl-ssp2-bt-id8\;sof-ptl-ssp2-bt-id8" +"sof-wcl-ssp6-hdmiin-id14\;sof-ptl-ssp6-hdmiin-id14" ) diff --git a/topology2/production/tplg-targets-sdca-generic.cmake b/topology2/production/tplg-targets-sdca-generic.cmake index 8c4ac9b..279e655 100644 --- a/topology2/production/tplg-targets-sdca-generic.cmake +++ b/topology2/production/tplg-targets-sdca-generic.cmake @@ -55,14 +55,14 @@ EFX_MIC_TDFB_PARAMS=line4_pass" # the BT link. The link has two streams per direction and each gets a backend, # in the order Play0, Cap0, Play1, Cap1, so four consecutive IDs are taken and # the topology exposes a PCM per pair. The range below covers a jack and -# amplifier board without DMIC and BT (6) up to a jack, amplifier with feedback, -# PCH DMIC and BT board (10). Add a variant here for every further ID that is -# needed. +# amplifier board without DMIC and BT (6) up to a jack, amplifier, SoundWire +# DMIC, PCH DMIC and BT board (11). Add a variant for every further ID needed. "cavs-uaol\;sof-uaol-id6\;UAOL_PB_BE_ID=6,UAOL_CP_BE_ID=7,UAOL_PB1_BE_ID=8,UAOL_CP1_BE_ID=9" "cavs-uaol\;sof-uaol-id7\;UAOL_PB_BE_ID=7,UAOL_CP_BE_ID=8,UAOL_PB1_BE_ID=9,UAOL_CP1_BE_ID=10" "cavs-uaol\;sof-uaol-id8\;UAOL_PB_BE_ID=8,UAOL_CP_BE_ID=9,UAOL_PB1_BE_ID=10,UAOL_CP1_BE_ID=11" "cavs-uaol\;sof-uaol-id9\;UAOL_PB_BE_ID=9,UAOL_CP_BE_ID=10,UAOL_PB1_BE_ID=11,UAOL_CP1_BE_ID=12" "cavs-uaol\;sof-uaol-id10\;UAOL_PB_BE_ID=10,UAOL_CP_BE_ID=11,UAOL_PB1_BE_ID=12,UAOL_CP1_BE_ID=13" +"cavs-uaol\;sof-uaol-id11\;UAOL_PB_BE_ID=11,UAOL_CP_BE_ID=12,UAOL_PB1_BE_ID=13,UAOL_CP1_BE_ID=14" # Feature topologies which should work with the function topologies above "cavs-sdw\;sof-sdca-amp-ref\;SDW_JACK=false,NUM_HDMIS=0,JACK_RATE=48000,\ diff --git a/topology2/sof-hda-generic.conf b/topology2/sof-hda-generic.conf index 968d463..45276e4 100644 --- a/topology2/sof-hda-generic.conf +++ b/topology2/sof-hda-generic.conf @@ -57,6 +57,7 @@ + Define { HDA_CONFIG "none" @@ -76,6 +77,7 @@ IncludeByKey.PLATFORM { "mtl" "platform/intel/mtl.conf" "lnl" "platform/intel/lnl.conf" "ptl" "platform/intel/ptl.conf" + "nvl" "platform/intel/ptl.conf" # Note: Assume same configuration as PTL } IncludeByKey.ADD_BT { @@ -84,11 +86,31 @@ IncludeByKey.ADD_BT { # include HDA config if needed. IncludeByKey.HDA_CONFIG { - "mix" "cavs-mixin-mixout-hda.conf" - "efx" "cavs-mixin-mixout-efx-hda.conf" - "src" "cavs-src-mixin-mixout-hda.conf" - "dax" "cavs-mixin-mixout-dax-hda.conf" - "passthrough" "cavs-passthrough-hda.conf" + # Without the HDA function the HDA confs do not bring in the TDFB class + # that the DMIC function uses + "none" { + + } + "mix" { + + + } + "efx" { + + + } + "src" { + + + } + "dax" { + + + } + "passthrough" { + + + } } # include DMIC config if needed. @@ -108,102 +130,44 @@ Define { } IncludeByKey.NUM_HDMIS { -"[3-4]" "platform/intel/hdmi-generic.conf" + "[3-4]" { + + # iDisp widgets, present only when the HDMI function is enabled + Object.Widget.virtual [ + { + name 'iDisp1_out' + type output + index 7 + } + { + name 'iDisp2_out' + type output + index 8 + } + { + name 'iDisp3_out' + type output + index 9 + } + { + name 'iDisp3 Tx' + type out_drv + index 0 + } + { + name 'iDisp2 Tx' + type out_drv + index 1 + } + { + name 'iDisp1 Tx' + type out_drv + index 2 + } + ] + } } IncludeByKey.HDMI_IN_CAPTURE { "true" "platform/intel/hdmi-in-capture.conf" } - -Object.Widget.virtual [ - { - name 'codec0_in' - type input - index 1 - } - { - name 'codec1_in' - type input - index 2 - } - { - name 'codec0_out' - type output - index 3 - } - { - name 'codec1_out' - type output - index 4 - } - { - name 'codec2_in' - type input - index 5 - } - { - name 'codec2_out' - type output - index 6 - } - { - name 'iDisp1_out' - type output - index 7 - } - { - name 'iDisp2_out' - type output - index 8 - } - { - name 'iDisp3_out' - type output - index 9 - } - { - name 'iDisp3 Tx' - type out_drv - index 0 - } - { - name 'iDisp2 Tx' - type out_drv - index 1 - } - { - name 'iDisp1 Tx' - type out_drv - index 2 - } - { - name 'Analog CPU Playback' - type out_drv - index 3 - } - { - name 'Digital CPU Playback' - type out_drv - index 4 - } - { - name 'Alt Analog CPU Playback' - type out_drv - index 5 - } - { - name 'Analog CPU Capture' - type input - index 6 - } - { - name 'Digital CPU Capture' - type input - index 7 - } - { - name 'Alt Analog CPU Capture' - type input - index 8 - } -]