File tree Expand file tree Collapse file tree 6 files changed +146
-10
lines changed
Expand file tree Collapse file tree 6 files changed +146
-10
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,24 @@ if(zephyr) ### Zephyr ###
2626 endif ()
2727
2828 if (CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING)
29- zephyr_library_sources(
30- module/dolby/dax.c
31- )
32- if (CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK)
29+ if (CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING STREQUAL "m" AND DEFINED CONFIG_LLEXT)
30+ add_subdirectory (module/dolby/llext
31+ ${PROJECT_BINARY_DIR} /dolby_dax_audio_processing_llext)
32+ add_dependencies (app dolby_dax_audio_processing)
33+ else ()
3334 zephyr_library_sources(
34- module/dolby/dax_mock .c
35+ module/dolby/dax .c
3536 )
36- else ()
37- target_link_libraries (SOF INTERFACE m)
38- target_link_libraries (SOF INTERFACE c)
39- zephyr_library_import(dax_effect ${sof_top_dir} /third_party/lib/libdax.a)
37+ if (CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK)
38+ zephyr_library_sources(
39+ module/dolby/dax_mock.c
40+ )
41+ else ()
42+ target_link_libraries (SOF INTERFACE m)
43+ target_link_libraries (SOF INTERFACE c)
44+ zephyr_library_import(dax_effect
45+ ${sof_top_dir} /third_party/lib/libdax.a)
46+ endif ()
4047 endif ()
4148 endif ()
4249
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ if CADENCE_CODEC
176176endif # Cadence
177177
178178 config COMP_DOLBY_DAX_AUDIO_PROCESSING
179- bool "Dolby DAX audio processing component"
179+ tristate "Dolby DAX audio processing component"
180180 default n
181181 help
182182 Select to include Dolby DAX component. Dolby DAX component implements DAX API.
Original file line number Diff line number Diff line change @@ -814,7 +814,34 @@ static const struct module_interface dolby_dax_audio_processing_interface = {
814814 .free = sof_dax_free ,
815815};
816816
817+ #if CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MODULE
818+ /* modular: llext dynamic link */
819+
820+ #include <module/module/api_ver.h>
821+ #include <module/module/llext.h>
822+ #include <rimage/sof/user/manifest.h>
823+
824+ static const struct sof_man_module_manifest main_manifest __section (".module" ) __used = {
825+ .module = {
826+ .name = "DAX" ,
827+ .uuid = SOF_REG_UUID (dolby_dax_audio_processing ),
828+ .entry_point = (uint32_t )(& dolby_dax_audio_processing_interface ),
829+ .instance_max_count = 1 ,
830+ .type = {
831+ .load_type = SOF_MAN_MOD_TYPE_LLEXT ,
832+ .domain_dp = 1 ,
833+ },
834+ .affinity_mask = 7 ,
835+ }
836+ };
837+
838+ SOF_LLEXT_BUILDINFO ;
839+
840+ #else
841+
817842DECLARE_MODULE_ADAPTER (dolby_dax_audio_processing_interface , dolby_dax_audio_processing_uuid ,
818843 dolby_dax_audio_processing_tr );
819844SOF_MODULE_INIT (dolby_dax_audio_processing ,
820845 sys_comp_module_dolby_dax_audio_processing_interface_init );
846+
847+ #endif
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: BSD-3-Clause
2+ //
3+ // Copyright(c) 2025 Intel Corporation. All rights reserved.
4+
5+ #include <stdint.h>
6+ #include <errno.h>
7+ #include <assert.h>
8+ #include <rtos/symbol.h>
9+
10+ /*
11+ * Stubs that are needed for linkage of some applications or libraries
12+ * that come from porting userspace code. Anyone porting should
13+ * make sure that any code does not depend on working copies of these
14+ * reentrant functions. We will fail for any caller.
15+ */
16+
17+ struct stat ;
18+ struct _reent ;
19+
20+ size_t _read_r (struct _reent * ptr , int fd , char * buf , size_t cnt )
21+ {
22+ errno = - ENOTSUP ;
23+ return - ENOTSUP ;
24+ }
25+
26+ size_t _write_r (struct _reent * ptr , int fd , char * buf , size_t cnt )
27+ {
28+ errno = - ENOTSUP ;
29+ return - ENOTSUP ;
30+ }
31+
32+ void * _sbrk_r (struct _reent * ptr , ptrdiff_t incr )
33+ {
34+ errno = - ENOTSUP ;
35+ return NULL ;
36+ }
37+
38+ int _lseek_r (struct _reent * ptr , int fd , int pos , int whence )
39+ {
40+ errno = - ENOTSUP ;
41+ return - ENOTSUP ;
42+ }
43+
44+ int _kill_r (struct _reent * ptr , int pid , int sig )
45+ {
46+ errno = - ENOTSUP ;
47+ return - ENOTSUP ;
48+ }
49+
50+ int _getpid_r (struct _reent * ptr )
51+ {
52+ errno = - ENOTSUP ;
53+ return - ENOTSUP ;
54+ }
55+
56+ int _fstat_r (struct _reent * ptr , int fd , struct stat * pstat )
57+ {
58+ errno = - ENOTSUP ;
59+ return - ENOTSUP ;
60+ }
61+
62+ int _close_r (struct _reent * ptr , int fd )
63+ {
64+ errno = - ENOTSUP ;
65+ return - ENOTSUP ;
66+ }
67+
68+ void _exit (int status )
69+ {
70+ assert (0 );
71+ while (1 ) {
72+ /* spin forever */
73+ }
74+ /* NOTREACHED */
75+ }
Original file line number Diff line number Diff line change 1+ # Copyright(c) 2025 Dolby Laboratories.
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ if (CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK)
5+ sof_llext_build("dolby_dax_audio_processing"
6+ SOURCES ../dax.c
7+ ../dax_mock.c
8+ INCLUDES ${sof_top_dir} /third_party/include
9+ )
10+ else ()
11+ sof_llext_build("dolby_dax_audio_processing"
12+ SOURCES ../dax.c ../llext-wrap.c
13+ INCLUDES ${sof_top_dir} /third_party/include
14+ LIBS_PATH ${sof_top_dir} /third_party/lib/
15+ LIBS dax m c gcc
16+ )
17+ endif ()
Original file line number Diff line number Diff line change 1+ /* SPDX-License-Identifier: BSD-3-Clause
2+ *
3+ * Copyright(c) 2025 Dolby Laboratories. All rights reserved.
4+ */
5+ #include <tools/rimage/config/platform.toml>
6+ #define LOAD_TYPE "2"
7+ #include "../dax.toml"
8+
9+ [module ]
10+ count = __COUNTER__
You can’t perform that action at this time.
0 commit comments