Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/overlays/ptl/dts_overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CONFIG_COMP_IIR=m
CONFIG_COMP_MODULE_ADAPTER=y
CONFIG_DTS_CODEC=y
CONFIG_LLEXT_HEAP_SIZE=64
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
CONFIG_SOF_STACK_SIZE=8192
2 changes: 1 addition & 1 deletion src/audio/codec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(zephyr) ### Zephyr ###
add_subdirectory(dts/llext ${PROJECT_BINARY_DIR}/dts_llext)
add_dependencies(app dts)

else(CONFIG_DTS_CODEC)
elseif(CONFIG_DTS_CODEC)
zephyr_library_sources(dts/dts.c)
if (CONFIG_DTS_CODEC_STUB)
zephyr_library_sources(dts/dts_stub.c)
Expand Down
2 changes: 1 addition & 1 deletion src/audio/codec/dts/dts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
1, 0, 0xfeef, 0xf, 0xf, 0x1ff]

REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
mod_cfg = [0, 0, 0, 0, 296, 5000000, 384, 384, 0, 5000, 0]
mod_cfg = [0, 0, 0, 0, 2048, 5000000, 384, 384, 0, 5000, 0]

index = __COUNTER__
22 changes: 15 additions & 7 deletions src/audio/codec/dts/llext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
# SPDX-License-Identifier: Apache-2.0

if(CONFIG_DTS_CODEC_STUB)
sof_llext_build("dts"
SOURCES ../dts.c
../dts_stub.c
)
target_include_directories(dts_llext_lib PRIVATE
"../../../../../third_party/include"
)
sof_llext_build("dts"
SOURCES ../dts.c
../dts_stub.c
)
target_include_directories(dts_llext_lib PRIVATE
"../../../../../third_party/include"
)
elseif(CONFIG_DTS_CODEC STREQUAL "m")
sof_llext_build("dts"
SOURCES ../dts.c
INCLUDES "${sof_top_dir}/third_party/include"
LIBS_PATH "${sof_top_dir}/third_party/lib/"
LIBS dts-sof-interface-i32 m c gcc
)

else()
message(FATAL_ERROR "Add library linking support in src/audio/codec/dts/llext/CMakeLists.txt")
endif()
4 changes: 4 additions & 0 deletions tools/rimage/config/ptl.toml.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ index = __COUNTER__
#include <audio/tdfb/tdfb.toml>
#endif

#if defined(CONFIG_DTS_CODEC) || defined(LLEXT_FORCE_ALL_MODULAR)
#include <audio/codec/dts/dts.toml>
#endif

#if defined(CONFIG_COMP_RTNR) || defined(LLEXT_FORCE_ALL_MODULAR)
#include <audio/rtnr/rtnr.toml>
#endif
Expand Down
3 changes: 3 additions & 0 deletions tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<mixout-gain-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-eqfir-drc-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-dts-alh-dai-copier-playback.conf>
<dai-copier-gain-eqiir-module-copier-capture.conf>
<gain-capture.conf>
<gain-copier-capture.conf>
Expand Down Expand Up @@ -191,6 +192,7 @@ IncludeByKey.SDW_AMP_XOVER {
"[1-3]" {
IncludeByKey.SDW_AMP_PIPELINE_SRC {
"dax" "platform/intel/sdw-amp-dax.conf"
"dts" "platform/intel/sdw-amp-dts.conf"
"generic" "platform/intel/sdw-amp-generic.conf"
}
}
Expand All @@ -214,6 +216,7 @@ IncludeByKey.SDW_JACK {
"true" {
IncludeByKey.SDW_JACK_PIPELINE_SRC {
"dax" "platform/intel/sdw-jack-dax.conf"
"dts" "platform/intel/sdw-jack-dts.conf"
"generic" "platform/intel/sdw-jack-generic.conf"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
#
# 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:
Comment on lines +1 to +7
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
#
# Object.Pipeline.mixout-gain-alh-dai-copier-playback."N" {
# time_domain "timer"
# }
#
# Where N is the unique pipeline ID within the same alsaconf node.
#

<include/components/alh-dai-copier.conf>
<include/components/gain.conf>
<include/components/mixout.conf>
<include/components/pipeline.conf>
<include/controls/bytes.conf>
<include/components/eqiir.conf>
<include/components/dts.conf>

Class.Pipeline."mixout-gain-eqiir-dts-alh-dai-copier-playback" {

<include/pipelines/pipeline-common.conf>

attributes {
!constructor [
"index"
]

!immutable [
"direction"
]

#
# mixout-gain-alh-dai-copier-playback objects instantiated within the same alsaconf
# node must have unique instance attribute
#
unique "instance"
}

Object.Widget {
mixout."1" {}
alh-copier."1" {
type dai_in
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1

# copier only supports one format based on mixin/mixout requirements:
# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
gain."1" {
num_input_audio_formats 1
num_output_audio_formats 1

# 32-bit 48KHz 2ch
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
}
]
}

eqiir."1" {
num_input_audio_formats 1
num_output_audio_formats 1

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.Control.bytes."1" {
<include/components/eqiir/flat.conf>
}
}

dts."1" {
num_input_audio_formats 1
num_output_audio_formats 1

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
}
]
}

pipeline."1" {
priority 0
lp_mode 0
}
}

Object.Base {
!route [
{
source mixout.$index.1
sink gain.$index.1
}
{
source gain.$index.1
sink eqiir.$index.1
}
{
source eqiir.$index.1
sink dts.$index.1
}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
}
}
{
source dts.$index.1
sink alh-copier.$index.1
}

Copilot uses AI. Check for mistakes.
]
}

direction "playback"
dynamic_pipeline 1
time_domain "timer"
}
Loading
Loading