Skip to content

Commit a3dfee1

Browse files
committed
codec : dts : update cmakefile and toml for llext
Update CMakefile and toml to support building DTS to llext module Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
1 parent e74050d commit a3dfee1

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

src/audio/codec/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if(zephyr) ### Zephyr ###
77
add_subdirectory(dts/llext ${PROJECT_BINARY_DIR}/dts_llext)
88
add_dependencies(app dts)
99

10-
else(CONFIG_DTS_CODEC)
10+
elseif(CONFIG_DTS_CODEC)
1111
zephyr_library_sources(dts/dts.c)
1212
if (CONFIG_DTS_CODEC_STUB)
1313
zephyr_library_sources(dts/dts_stub.c)

src/audio/codec/dts/llext/CMakeLists.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
if(CONFIG_DTS_CODEC_STUB)
5-
sof_llext_build("dts"
6-
SOURCES ../dts.c
7-
../dts_stub.c
8-
)
9-
target_include_directories(dts_llext_lib PRIVATE
10-
"../../../../../third_party/include"
11-
)
5+
sof_llext_build("dts"
6+
SOURCES ../dts.c
7+
../dts_stub.c
8+
)
9+
target_include_directories(dts_llext_lib PRIVATE
10+
"../../../../../third_party/include"
11+
)
12+
elseif(CONFIG_DTS_CODEC STREQUAL "m")
13+
sof_llext_build("dts"
14+
SOURCES ../dts.c
15+
INCLUDES "${sof_top_dir}/third_party/include"
16+
LIBS_PATH "${sof_top_dir}/third_party/lib/"
17+
LIBS dts-sof-interface-i32 m c gcc
18+
)
19+
1220
else()
1321
message(FATAL_ERROR "Add library linking support in src/audio/codec/dts/llext/CMakeLists.txt")
1422
endif()

tools/rimage/config/ptl.toml.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ index = __COUNTER__
138138
#include <audio/tdfb/tdfb.toml>
139139
#endif
140140

141+
#if defined(CONFIG_DTS_CODEC) || defined(LLEXT_FORCE_ALL_MODULAR)
142+
#include <audio/codec/dts/dts.toml>
143+
#endif
144+
141145
#if defined(CONFIG_COMP_RTNR) || defined(LLEXT_FORCE_ALL_MODULAR)
142146
#include <audio/rtnr/rtnr.toml>
143147
#endif

0 commit comments

Comments
 (0)