Skip to content

Commit 6b2fa98

Browse files
committed
audio: codec_adapter: add DAX audio processing module
* Add DAX audio processing module * Add topology support for MTL platform * Add testbench topology support Signed-off-by: Jun Lai <jun.lai@dolby.com>
1 parent 7a0d25c commit 6b2fa98

File tree

28 files changed

+2626
-1
lines changed

28 files changed

+2626
-1
lines changed

app/overlays/mtl/dax_overlay.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_COMP_MODULE_ADAPTER=y
2+
CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING=y
3+
CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK=n

src/arch/host/configs/library_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ CONFIG_COMP_ARIA=y
22
CONFIG_COMP_ASRC=y
33
CONFIG_COMP_CROSSOVER=y
44
CONFIG_COMP_DCBLOCK=y
5+
CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING=y
56
CONFIG_COMP_DRC=y
67
CONFIG_COMP_FIR=y
78
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=y

src/audio/module_adapter/CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ if(zephyr) ### Zephyr ###
2525
zephyr_library_import(xa_mp3_enc ${CONFIG_CADENCE_CODEC_MP3_ENC_LIB})
2626
endif()
2727

28+
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)
33+
zephyr_library_sources(
34+
module/dolby/dax_mock.c
35+
)
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)
40+
endif()
41+
endif()
42+
2843
zephyr_include_directories_ifdef(CONFIG_LIBRARY_MANAGER
2944
${SOF_SRC_PATH}/include/sof/audio/module_adapter/iadk/
3045
${SOF_SRC_PATH}/include/sof/audio/module_adapter/library/
@@ -112,6 +127,15 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
112127

113128
endif()
114129

130+
if(CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING)
131+
add_local_sources(sof module/dolby/dax.c)
132+
if (CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK)
133+
add_local_sources(sof module/dolby/dax_mock.c)
134+
else()
135+
sof_add_static_library(dax_effect ${sof_top_dir}/third_party/lib/libdax.a)
136+
endif()
137+
endif()
138+
115139
if(CONFIG_PASSTHROUGH_CODEC)
116140
add_local_sources(sof module/passthrough.c)
117141
endif()

src/audio/module_adapter/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,23 @@ if CADENCE_CODEC
175175

176176
endif # Cadence
177177

178+
config COMP_DOLBY_DAX_AUDIO_PROCESSING
179+
bool "Dolby DAX audio processing component"
180+
default n
181+
help
182+
Select to include Dolby DAX component. Dolby DAX component implements DAX API.
183+
API definition together with pre-compiled library is shared by Dolby.
184+
If library is not provided, COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK must be true,
185+
then the input will be copied to the output.
186+
187+
config COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK
188+
bool "Dolby DAX audio processing component mock"
189+
default y if COMP_STUBS
190+
depends on COMP_DOLBY_DAX_AUDIO_PROCESSING
191+
help
192+
Mock DAX audio processing. It allows for compilation check and basic audio
193+
flow checking.
194+
178195
config PASSTHROUGH_CODEC
179196
bool "Passthrough codec"
180197
help

0 commit comments

Comments
 (0)