Repository navigation
dts: fix memory allocation failed and move the pipeline to different core - #11230
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Replace the undefined heap symbol with SOF_ZEPHYR_VIRTUAL_HEAP_REGION_SIZE.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR adds DTS-specific SoundWire topologies, configurable core placement, and a PTL heap adjustment to address endpoint switching and allocation failures.
Changes:
- Adds DTS SDCA topology targets.
- Applies
DTS_CORE_IDto DTS pipelines and widgets. - Adds PTL virtual-heap configuration.
| File | Summary |
|---|---|
tools/topology/topology2/production/tplg-targets-sdca-generic.cmake |
Adds DTS SDCA topology targets. |
tools/topology/topology2/platform/intel/sdw-jack-dts.conf |
Applies configurable core affinity to jack DTS pipelines. |
tools/topology/topology2/platform/intel/sdw-amp-dts.conf |
Applies configurable core affinity to amplifier DTS pipelines. |
tools/topology/topology2/cavs-sdw.conf |
Defines the default DTS core. |
app/overlays/ptl/dts_overlay.conf |
Attempts to configure the PTL virtual heap, but uses an undefined Kconfig symbol and does not change the heap size. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| CONFIG_LLEXT_HEAP_SIZE=64 | ||
| CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n | ||
| CONFIG_SOF_STACK_SIZE=8192 | ||
| CONFIG_SOF_ZEPHYR_VIRTUAL_HEAP_SIZE=0x80000 |
There was a problem hiding this comment.
@joechengxperi This should change CONFIG_SOF_ZEPHYR_HEAP_SIZE due to a recent rename. See commit 5cf6f9c
There was a problem hiding this comment.
| { | ||
| index 21 | ||
| core_id $DTS_CORE_ID | ||
| core $DTS_CORE_ID |
There was a problem hiding this comment.
I think only one of them is needed and I think it's core, could you check?
There was a problem hiding this comment.
Yes, it's confusing the tplg compiler doesn't catch this, but for the pipeline widget, only "core" is needed.
But I won't block because of this, "core" is the pipeline level token (SOF_TKN_SCHED_CORE for Linux kernel) and "core_id" is the widget token (SOF_TKN_COMP_CORE_ID in Linux kernel). For a pipeline, both can be set, but only "core" is needed as Linux driver will force same values.
This is confusing I admit and we should improve this for topology developers.
| core_id $DTS_CORE_ID | ||
|
|
||
| Object.Widget.pipeline.1 { | ||
| core $DTS_CORE_ID |
There was a problem hiding this comment.
right, I think pipeline widgets use core, while processing components use core_id
kv2019i
left a comment
There was a problem hiding this comment.
Please fix the Kconfig name due to recent rename. Minor comments otherwise (other comments not blocking).
| CONFIG_LLEXT_HEAP_SIZE=64 | ||
| CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n | ||
| CONFIG_SOF_STACK_SIZE=8192 | ||
| CONFIG_SOF_ZEPHYR_VIRTUAL_HEAP_SIZE=0x80000 |
There was a problem hiding this comment.
@joechengxperi This should change CONFIG_SOF_ZEPHYR_HEAP_SIZE due to a recent rename. See commit 5cf6f9c
| { | ||
| index 21 | ||
| core_id $DTS_CORE_ID | ||
| core $DTS_CORE_ID |
There was a problem hiding this comment.
Yes, it's confusing the tplg compiler doesn't catch this, but for the pipeline widget, only "core" is needed.
But I won't block because of this, "core" is the pipeline level token (SOF_TKN_SCHED_CORE for Linux kernel) and "core_id" is the widget token (SOF_TKN_COMP_CORE_ID in Linux kernel). For a pipeline, both can be set, but only "core" is needed as Linux driver will force same values.
This is confusing I admit and we should improve this for topology developers.
| SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ | ||
| DEEP_BUF_SPK=true" | ||
|
|
||
| "cavs-sdw\;sof-sdca-jack-id0-dts\;SDW_JACK_OUT_STREAM=Playback-SimpleJack,\ |
There was a problem hiding this comment.
I don't think a feature topology can be used here, it cannot replace part of the topology, it can add to it a feature.
It replaces quite a bit in the topologies.

to

Similarly for the amp.
I think that for products with such changes the generic sdca topologies cannot be used, if people will start to copy, rename random topologies to 'stick', it is going to cause lots of issues and at the same time it will make debugging harder as no one knows exactly what is loaded.
Another option would be for the kernel to support sort of 'feature modifier' kernel parameter to add postfix to the feature topology name and try that first (than fall back to w/o modifier if not found).
feature_topology_type="dts" or feature_topology_type="jack:dts".
But, what if you want to add feedback also to the path which have dts? Or no DTS, but only feedback?
For products: tplg_filename=sof-<product name/code name>.tplg, my imagination let me down on the naming to imply that it is a monolithic topology for a certain configuration (and feature set).
DTS library would allocate memory failed when there are multiples apps are launched and endpoint switches at the same time. Incease the size to avoid this issue Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
65f79fd to
39e2cb6
Compare
Add DTS_CORE_ID and let the pipeline could run on approriate core Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
Enable DTS topology for SDCA and set to different cores for speaker/heapdhone pipeline to avoid resource not enough Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
39e2cb6 to
486634e
Compare
PR 11230: test resultsRun date: 2026-10-08 09:06 UTC Tested commit: 486634e8c41e0f9b5250eb002db184c7a75e6c47 |
|
@joechengxperi assume all review comment now resolved ? @kv2019i good for you ? |
Yes, all resolved. |

This PR is to resolve the issue Google reported that audio device would lost when there are two applications running and switch endpoint simultaneously.