Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update waves codec integration for Zephyr production builds #9820

Merged
merged 2 commits into from
Feb 10, 2025
Merged
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
3 changes: 1 addition & 2 deletions src/drivers/mediatek/mt8196/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ void intc_init(void)

void intc_irq_unmask(enum IRQn_Type irq)
{
uint32_t word, group;
uint32_t word;

if (irq < IRQ_MAX_CHANNEL && intc_desc.irqs[irq].group < INTC_GRP_NUM) {
word = INTC_WORD(irq);
group = intc_desc.irqs[irq].group;
io_reg_update_bits(INTC_IRQ_EN(word), INTC_BIT(irq), INTC_BIT(irq));
} else {
tr_err(&intc_tr, "Invalid INTC interrupt %d", irq);
Expand Down
26 changes: 15 additions & 11 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1141,17 +1141,21 @@ elseif(CONFIG_DTS_CODEC)
endif()
endif()

if(CONFIG_WAVES_CODEC STREQUAL "m")
add_subdirectory(${SOF_AUDIO_PATH}/module_adapter/module/waves/llext
${PROJECT_BINARY_DIR}/waves_llext)
add_dependencies(app waves)
elseif(CONFIG_WAVES_CODEC)
zephyr_library_sources(
${SOF_AUDIO_PATH}/module_adapter/module/waves/waves.c
)
zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC_STUB
${SOF_AUDIO_PATH}/module_adapter/module/waves/maxx_stub.c
)
if(CONFIG_WAVES_CODEC)
set(WAVES_DIR ${SOF_AUDIO_PATH}/module_adapter/module/waves)
if(CONFIG_WAVES_CODEC STREQUAL "m")
add_subdirectory(${WAVES_DIR}/llext ${PROJECT_BINARY_DIR}/waves_llext)
add_dependencies(app waves)
else()
zephyr_library_sources(${WAVES_DIR}/waves.c)
if(CONFIG_WAVES_CODEC_STUB)
zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC_STUB
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks a bit weird with CONFIG_WAVES_CODEC_STUB tested both at LL1151 and then 1152, but should work still.

${WAVES_DIR}/maxx_stub.c)
else()
zephyr_library_import(waves_codec
${sof_top_dir}/third_party/lib/libMaxxChrome.a)
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you think it would also be good to enable modular build with the library?

message(FATAL_ERROR "Add library linking support in src/audio/module_adapter/module/waves/llext/CMakeLists.txt")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Undeniably, I just don't know how the llext stuff works yet and was afraid to break anything. :)

Copy link
Member

Choose a reason for hiding this comment

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

That can be done as stage 2 - no reason to block this PR today.

endif()
endif()
endif()

if(CONFIG_PROBE STREQUAL "m")
Expand Down
Loading