Merge DTS support for PTL#10678
Conversation
This patch adds DTS_CODEC for Intel PTL platform builds. Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
There was a problem hiding this comment.
Pull request overview
Adds DTS-based pipeline configurations for the PTL SoundWire (SDW) topology, wiring DTS processing into speaker and jack playback paths and enabling DTS module packaging/build support.
Changes:
- Add new DTS-specific SDW amp/jack topology configuration files and select them via
SDW_*_PIPELINE_SRC=dts. - Introduce a new reusable
mixout-gain-eqiir-dts-alh-dai-copier-playbackpipeline class and register it incavs-sdw.conf. - Enable DTS module inclusion for PTL rimage config and extend DTS llext build rules.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/topology/topology2/production/tplg-targets-ace3.cmake | Adds a PTL RT721+RT1320 DTS topology target preset. |
| tools/topology/topology2/platform/intel/sdw-jack-dts.conf | New DTS-enhanced SDW jack pipelines and routing. |
| tools/topology/topology2/platform/intel/sdw-amp-dts.conf | New DTS-enhanced SDW amp (speaker) pipelines and routing. |
| tools/topology/topology2/include/pipelines/cavs/mixout-gain-eqiir-dts-alh-dai-copier-playback.conf | New pipeline class combining mixout/gain/eqiir/DTS/alh-copier. |
| tools/topology/topology2/cavs-sdw.conf | Registers the new pipeline include and selects DTS-specific configs. |
| tools/rimage/config/ptl.toml.h | Includes DTS toml when DTS codec is enabled/modular. |
| src/audio/codec/dts/llext/CMakeLists.txt | Adds linking for modular DTS llext builds. |
| src/audio/codec/dts/dts.toml | Increases DTS module IBS to 2048. |
| src/audio/codec/CMakeLists.txt | Fixes conditional structure for DTS codec selection. |
| app/overlays/ptl/dts_overlay.conf | Adds PTL overlay options to enable DTS and required components. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| source eqiir.$index.1 | ||
| sink dts.$index.1 | ||
| } |
There was a problem hiding this comment.
The pipeline routing stops at dts.$index.1 and never connects to alh-copier, so audio won’t reach the DAI stage. Add the missing route entry connecting the DTS widget output to the ALH copier input (consistent with how other playback pipelines terminate at alh-copier).
| } | |
| } | |
| { | |
| source dts.$index.1 | |
| sink alh-copier.$index.1 | |
| } |
| # | ||
| # BE playback pipeline: mixout-gain-alh-dai-copier. | ||
| # | ||
| # All attributes defined herein are namespaced | ||
| # by alsatplg to "Object.Pipeline.mixout-gain-alh-dai-copier-playback.N.attribute_name" | ||
| # | ||
| # Usage: mixout-gain-alh-dai-copier-playback pipeline object can be instantiated as: |
There was a problem hiding this comment.
The header comment and namespacing/usage examples reference mixout-gain-alh-dai-copier-playback, but this file defines mixout-gain-eqiir-dts-alh-dai-copier-playback. Update the comment block to match the actual class name and emitted object namespace to avoid misleading consumers.
There was a problem hiding this comment.
Ack, please update the comments to match the code.
| Object.Widget { | ||
| alh-copier [ | ||
| { | ||
| index $ALH_2ND_SPK_ID | ||
| type dai_in | ||
| stream_name $SDW_SPK_STREAM | ||
| dai_index 1 | ||
| type "dai_in" | ||
| direction "playback" | ||
| node_type $ALH_LINK_OUTPUT_CLASS |
There was a problem hiding this comment.
This object defines the type key twice (type dai_in and type \"dai_in\"). Duplicate keys can cause parse errors or unintended overrides depending on the config parser. Remove the duplicate type assignment (and apply the same fix to other duplicated type fields in this file, e.g., the dai_out blocks).
| Object.Widget.dts.1 { | ||
| Object.Control { | ||
| bytes."1" { | ||
| name 'Post Mixer $AMP_PLAYBACK_NAME DTS bytes' |
There was a problem hiding this comment.
The DTS bytes control here doesn’t specify a max value, while the jack DTS config sets max 2048 and dts.toml increases the module IBS to 2048. For consistency (and to avoid an implicit default limit that may be too small), set an explicit max matching the expected payload size.
| name 'Post Mixer $AMP_PLAYBACK_NAME DTS bytes' | |
| name 'Post Mixer $AMP_PLAYBACK_NAME DTS bytes' | |
| max 2048 |
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,JACK_RATE=96000,DEEP_BUF_JACK_RATE=96000" | ||
|
|
||
| # RT721 for DTS | ||
| "cavs-sdw\;sof-ptl-rt721-l3-rt1320-l3-dts\;PLATFORM=ptl,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\ |
There was a problem hiding this comment.
I didn't find a sof-ptl-rt721-l3-rt1320-l3 build here. Which topology is derived from? (i.e. the same audio codec configuration but without DTS)
There was a problem hiding this comment.
@johnylin76
This is provided by Mac. @macchian could you please help to comment on this? Thanks.
There was a problem hiding this comment.
@joechengxperi, @johnylin76 , to be updated the specific topology name due to 3rd party pipeline be included instead of functional topology.
src/audio/codec/CMakeLists.txt
Outdated
| add_dependencies(app dts) | ||
|
|
||
| else(CONFIG_DTS_CODEC) | ||
| elseif(CONFIG_DTS_CODEC) |
kv2019i
left a comment
There was a problem hiding this comment.
A few minor comments inline, please check (along with copilot review comments).
| # | ||
| # BE playback pipeline: mixout-gain-alh-dai-copier. | ||
| # | ||
| # All attributes defined herein are namespaced | ||
| # by alsatplg to "Object.Pipeline.mixout-gain-alh-dai-copier-playback.N.attribute_name" | ||
| # | ||
| # Usage: mixout-gain-alh-dai-copier-playback pipeline object can be instantiated as: |
There was a problem hiding this comment.
Ack, please update the comments to match the code.
| "false" { | ||
| Object.Base.route [ | ||
| { | ||
| source "gain.21.1" |
There was a problem hiding this comment.
@bardliao Shouldn't this be "dts.21.1" (instead of "gain.21.1") if enhanced playback is set and DTS is included in the graph. Or doesn't this matter for the virtual link (same problem in sdw-amp-dts.conf)?
Update CMakefile and toml to support building DTS to llext module Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
Increase the max parameter size to 2048 Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
6c4851d to
22cd285
Compare
Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
22cd285 to
58b4b15
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Usage: mixout-gain-dts-dai-copier-playback pipeline object can be instantiated as: | ||
| # Usage: mixout-gain-eqiir-dts-dai-copier-playback pipeline object can be instantiated as: | ||
| # | ||
| # Object.Pipeline.mixout-gain-dts-dai-copier-playback."N" { |
There was a problem hiding this comment.
The usage example in the header comment still references Object.Pipeline.mixout-gain-dts-dai-copier-playback even though this file defines mixout-gain-eqiir-dts-dai-copier-playback. Update the example to match the actual class name so it’s not misleading for topology authors.
| # Object.Pipeline.mixout-gain-dts-dai-copier-playback."N" { | |
| # Object.Pipeline.mixout-gain-eqiir-dts-dai-copier-playback."N" { |
| ] | ||
|
|
||
| # | ||
| # mixout-gain-alh-dai-copier-playback objects instantiated within the same alsaconf |
There was a problem hiding this comment.
This class is mixout-gain-eqiir-dts-alh-dai-copier-playback, but the comment above unique "instance" still says mixout-gain-alh-dai-copier-playback. Please update the comment to the correct pipeline name to avoid confusion when reusing this template.
| # mixout-gain-alh-dai-copier-playback objects instantiated within the same alsaconf | |
| # mixout-gain-eqiir-dts-alh-dai-copier-playback objects instantiated within the same alsaconf |
| # route and pipeline index start from pcm id * 10 | ||
|
|
||
| Define { | ||
| SDW_SPK_STREAM 'SDW1-Playback' | ||
| SDW_SPK_IN_STREAM 'SDW1-Capture' | ||
| ALH_2ND_SPK_ID 22 | ||
| ALH_3RD_SPK_ID 23 | ||
| ALH_2ND_SPK_IN_ID 32 | ||
| ALH_3RD_SPK_IN_ID 33 | ||
| SDW_AMP_BE_ID 2 | ||
| SDW_AMP_IN_BE_ID 3 | ||
| AMP_FEEDBACK_CH 2 | ||
| AMP_FEEDBACK_CH_PER_LINK 2 | ||
| SDW_AMP_FEEDBACK true | ||
| AMP_PLAYBACK_NAME 'Speaker Playback' | ||
| } | ||
|
|
There was a problem hiding this comment.
Unlike platform/intel/sdw-amp-generic.conf (lines 18-37), this DTS variant doesn’t include the deep-buffer speaker conditional (IncludeByKey.DEEPBUFFER_FW_DMA_MS -> IncludeByKey.DEEP_BUF_SPK -> include deep-buffer-spk.conf when SDW_JACK is false). Without that, a speaker-only (no jack) configuration can’t enable the deep-buffer speaker even when DEEP_BUF_SPK=true is passed. Consider adding the same deep-buffer include block here for feature parity.
| SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ | ||
| PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt721-l3-rt1320-l3-4ch.bin,\ | ||
| DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\ | ||
| DEEP_BUF_SPK=true,BT_PCM_ID=8,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\ |
There was a problem hiding this comment.
This target sets DEEP_BUF_SPK=true but does not set DEEPBUFFER_FW_DMA_MS. In sdw-jack-dts.conf the deep-buffer config is only included when DEEPBUFFER_FW_DMA_MS matches 1-1000ms, so the deep-buffer speaker instance won’t be generated as-is. Either add DEEPBUFFER_FW_DMA_MS (e.g. 10) or drop DEEP_BUF_SPK=true for this target to avoid a non-functional/misleading configuration.
| DEEP_BUF_SPK=true,BT_PCM_ID=8,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\ | |
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,BT_PCM_ID=8,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\ |
No description provided.