-
Notifications
You must be signed in to change notification settings - Fork 349
dax: Fixing compilation errors and better adaptation to LLEXT (contains Zephyr Dec03 update) #10413
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
Conversation
checkupup
commented
Dec 3, 2025
- 5.1, 7.1 input channels support for DAX.
- Fixed compilation errors on XTOS
- Remove memmove and sprintf usage in DAX code for better adaptation to LLEXT
|
Can one of the admins verify this patch?
|
| uint32_t offset = 0; | ||
|
|
||
| for (uint32_t i = 0; i < param_sz && offset < MAX_PARAMS_STR_BUFFER_SIZE; i++) | ||
| offset += sprintf(params_str + offset, "%d,", param_val[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other libc functions are exported from https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/llext/llext_export.c#L10-L17 - have you tried adding sprintf() and memmove() there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet. Oh thanks it seems like a better solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lyakh This change works, then I will commit a PR to Zephyr and revert the modifications in SOF. Very thanks.
diff --git a/subsys/llext/llext_export.c b/subsys/llext/llext_export.c
index fe2c417795b..c1835819fc3 100644
--- a/subsys/llext/llext_export.c
+++ b/subsys/llext/llext_export.c
@@ -5,6 +5,8 @@
*/
#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
#include <zephyr/llext/symbol.h>
EXPORT_SYMBOL(strcpy);
@@ -15,6 +17,9 @@ EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memset);
+EXPORT_SYMBOL(memmove);
+EXPORT_SYMBOL(strtoul);
+EXPORT_SYMBOL(sprintf);
/* These symbols are used if CCAC is given the flag -Os */
#ifdef __CCAC__There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See Zephyr PR: zephyrproject-rtos/zephyr#100442
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See Zephyr PR: zephyrproject-rtos/zephyr#100442
@checkupup as far as I understand this SOF PR does not actually formally depend on that Zephyr PR, right? Obviously you need it for your module to work, but from the SOF PoV nothing will break in the repository if this PR is merged before we update our Zephyr hash to include your Zephyr PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed a potential problem, let's adopt the modifications from both SOF and Zephyr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also approved zephyrproject-rtos/zephyr#100442.
@checkupup if we assume Zephyr PR will merge as-is, do we need any changes here ? I dont mind merging into SOF if its not a formal dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood No, if Zephyr PR is merged, the SOF commit 8a0e63e is no longer needed. However if the SOF commit is merged, the Zephyr PR is still needed. Both of them serve the LLEXT implementation of DAX module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood No, if Zephyr PR is merged, the SOF commit 8a0e63e is no longer needed. However if the SOF commit is merged, the Zephyr PR is still needed. Both of them serve the LLEXT implementation of DAX module.
@checkupup thanks, just checked and Zephyr PR is now merged. Can you drop the stdlib commit and add a west update to align with the new Zephyr commit we depend on. Thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood I will add the new Zephyr commit to west.yml. However, regardless of whether the stdlib commit is summitted or not, the modification of west.yml is necessary, so I tend to keep this commit to improve robustness to dependencies.
5220336 to
8a0e63e
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question.
| uint32_t offset = 0; | ||
|
|
||
| for (uint32_t i = 0; i < param_sz && offset < MAX_PARAMS_STR_BUFFER_SIZE; i++) | ||
| offset += sprintf(params_str + offset, "%d,", param_val[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also approved zephyrproject-rtos/zephyr#100442.
@checkupup if we assume Zephyr PR will merge as-is, do we need any changes here ? I dont mind merging into SOF if its not a formal dependency.
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question.
tools/topology/topology2/include/pipelines/cavs/mixout-gain-dax-dai-copier-playback.conf
Outdated
Show resolved
Hide resolved
@lgirdwood We don't need stdlib change if Zephyr PR merges as-is. But I believe minimizing dependencies is always a good thing when we compiling with |
|
rerun CI - due to lab power off |
|
SOFCI TEST |
|
Please use tags in the PR title next time, for example |
|
@checkupup looks like we have a conflict and the west patch could be dropped if it has your dependency. |
Add 5.1, 7.1 input channels for DAX. Signed-off-by: Jun Lai <jun.lai@dolby.com>
sof_top_dir is unavailable for non-zephyr build. Signed-off-by: Jun Lai <jun.lai@dolby.com>
We remove memmove and sprintf for two reasons: 1) Both of them are not available on XTOS when using certain xtensa toolchains. 2) Them are not marked as EXPORT_SYMBOL by Zephyr when compiling as LLEXT module. Signed-off-by: Jun Lai <jun.lai@dolby.com>
|
Hi, @lgirdwood , I have resolved the conflict, but we still needs the west patch:
I have kept the SOF commit due to:
|
|
looks like CI got stuck - will rerun. |
|
SOFCI TEST |