-
Notifications
You must be signed in to change notification settings - Fork 330
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
config: enable RTC_AEC module for LNL and PTL platforms #9730
base: main
Are you sure you want to change the base?
config: enable RTC_AEC module for LNL and PTL platforms #9730
Conversation
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 could we make all the mocks into modules and then load then into CI via UUID ?
@lgirdwood sure, but we'd need topologies that include those stub components to load and test them |
@tmleman please compile AEC as a LLEXT loadable module, we don't need it in production. EDIT: it may also require changes in testing, a module has to be loaded |
@marcinszkudlinski so it is run-time tested in QB? |
test for AEC + Mock is included in internal CI tests |
9965610
to
4f70175
Compare
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.
I'd swap the commits - first convert to "m" where already enabled, and then add directly as "m" where not enabled yet, but the result is the same
@tmleman can you check Internal CI thanks ! |
@lgirdwood PR must wait until the required changes in the tests are implemented. Validation is working on it. |
727d836
to
8a77adf
Compare
@tmleman I assume we have a valid test implemented now and its being run in CI ? |
This module had an incorrect byte order in uuid, this was fixed by #9793. For me its good to merge. |
@tmleman This has one quickbuild failing. Otherwise looks good for merge. |
24dbb6b
to
8048e70
Compare
@lgirdwood Previously, MTL CI failed in the RTC test due to an incorrect UUID. The problem was fixed by @softwarecki recent changes. Currently, the same test fails during module initialization: [ 0.692421] <inf> ipc: ipc_cmd: rx : 0x40005000|0x12010026
[ 0.692775] <wrn> ipc: ipc4_get_drv: get_drv(): the provided UUID (b780a0a6-269f-466f-b477-23dfa05af758) can't be found!
[ 0.695606] <wrn> llext: llext_link_plt: PLT: cannot find idx 53 name ipc4_update_source_format
[ 0.697148] <wrn> llext: llext_link_plt: PLT: cannot find idx 39 name comp_is_current_data_blob_valid
[ 0.701273] <wrn> llext: llext_link_plt: PLT: cannot find idx 53 name ipc4_update_source_format
[ 0.710821] <wrn> llext: llext_link_plt: PLT: cannot find idx 39 name comp_is_current_data_blob_valid
[ 0.719726] <inf> llext: llext_load: Loaded extension RTC_AEC
[ 0.721906] <err> lib_manager: lib_manager_module_create: lib_manager_allocate_module() failed!
[ 0.721948] <err> ipc: ipc4_init_module_instance: error: failed to init module 5000 : 0
[ 0.721991] <err> ipc: ipc_cmd: ipc4: MODULE_MSG failed with err 104
[ 0.956415] <inf> ipc: ipc_cmd: rx : 0x12010000|0x0 |
@lyakh do we need a west update ? |
@lgirdwood I suppose this is an excerpt from an Internal CI log? I don't think there's anything relevant in recent Zephyr changes, that would fix this, and we don't have a topology with this module, so I cannot test, sorry. But since it's a proper reproducible error with a full log, it should be rather easy to debug |
8048e70
to
77b1587
Compare
Ah - got you - enable all modules as mocks for LNL/PTL via CONFIG_COMP_STUBS instead of individually. @tmleman are we ready for this and if so good for you ? |
@lyakh Just to add I'm ok with proceeding with both this one and wider enablement of the mocks as libraries that get built by default. Just making a note that what is enabled goes to release. |
@kv2019i sorry, by "goes to release" you mean if we enable mock modules as individual loadable modules, they'll be included in (binary) releases? Why, they aren't needed externally, are they? |
Actually we only need google mock and the rest will not be used in any form so enabling them all is probably just a waste of space / build time / etc. But thats just mocks so Im ok with both options. |
OK, lets go with this first (since its needed) and goto to ALL later if everything is OK. |
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. IS the DEBUG patch for upstream ?
@lgirdwood shouldn't be, no, marking it "DNM" until removed, feel free to remove the tag when done |
The commit was added only for debugging purposes. In CI, I observe failures that I cannot reproduce locally. Many of these problems have already been fixed on this branch or on the main branch. The analysis is also complicated by the truncation of logs in some cases (which this commit should reduce). |
1540ec0
to
5cb072b
Compare
5cb072b
to
5cfa4a9
Compare
During the development of the RTC module as an LLEXT, I encountered several issues. Initially, after resolving problems with BSS and missing funcions warnings, I performed a rebase which introduced a new exception during module loading: [ 0.913273] <inf> ipc: ipc_cmd: rx : 0x40005000|0x12010026
[ 0.913650] <wrn> ipc: ipc4_get_drv: get_drv(): the provided UUID (b780a0a6-269f-466f-b477-23dfa05af758) can't be found!
[ 0.916363] <wrn> llext: llext_link_plt: PLT: cannot find idx 17 name comp_data_blob_
[ 0.920698] <wrn> llext: llext_link_plt: PLT: cannot find idx 17 name comp_data_blob_
[ 0.932858] <wrn> llext: llext_link_plt: PLT: cannot find idx 37 name module_ada
[ 0.934391] <inf> llext: llext_load: Loaded extension RTC_AEC
[ 0.938705] <err> os: print_fatal_exception: ** FATAL EXCEPTION
[ 0.938801] <err> os: print_fatal_exception: ** CPU 2 EXCCAUSE 0 (illegal instruction)
[ 0.938835] <err> os: print_fatal_exception: ** PC 0xa068b000 VADDR (nil)
[ 0.938861] <err> os: print_fatal_exception: ** PS 0x60f20
[ 0.938888] <err> os: print_fatal_exception: ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:15 CALLINC:2)
[ 0.938920] <err> os: xtensa_dump_stack: ** A0 0xa007898f SP 0xa00cb2d0 A2 0x1 A3 0x5000
[ 0.938948] <err> os: xtensa_dump_stack: ** A4 0x400dedc0 A5 0x400dee80 A6 0xa00cb2d0 A7 0xa00cb2d0
[ 0.938975] <err> os: xtensa_dump_stack: ** A8 0xa068b1b1 A9 0xa068d01c A10 0xa068d838 A11 0x28c0
[ 0.939001] <err> os: xtensa_dump_stack: ** A12 0xa00cb2f0 A13 (nil) A14 0x400defb8 A15 0x5
[ 0.939028] <err> os: xtensa_dump_stack: ** LBEG 0xa008516a LEND 0xa00851a0 LCOUNT (nil)
[ 0.939055] <err> os: xtensa_dump_stack: ** SAR 0x12
[ 0.939081] <err> os: xtensa_dump_stack: ** THREADPTR 0x90 The logs above, which include the names of missing functions, were incomplete. I attempted to address this by setting [ 0.559548] <err> os: print_fatal_exception: ** FATAL EXCEPTION
[ 0.559555] <err> os: print_fatal_exception: ** CPU 2 EXCCAUSE 12 (instr PIF data error)
[ 0.559565] <err> os: print_fatal_exception: ** PC (nil) VADDR (nil)
[ 0.559568] <err> os: print_fatal_exception: ** PS 0x60520
[ 0.559571] <err> os: print_fatal_exception: ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:5 CALLINC:2)
[ 0.559576] <err> os: xtensa_dump_stack: ** A0 0xa068b841 SP 0xa0333f20 A2 0xa0316000 A3 0xa00e03d8
[ 0.559580] <err> os: xtensa_dump_stack: ** A4 0x780 A5 0x1 A6 0x2 A7 0xa0327780
[ 0.559583] <err> os: xtensa_dump_stack: ** A8 0xa068c29a A9 (nil) A10 0xa0327000 A11 0xa06c0f40
[ 0.559586] <err> os: xtensa_dump_stack: ** A12 0x780 A13 0xffffa600 A14 (nil) A15 (nil)
[ 0.559591] <err> os: xtensa_dump_stack: ** LBEG 0xa068ba27 LEND 0xa068ba48 LCOUNT (nil)
[ 0.559595] <err> os: xtensa_dump_stack: ** SAR (nil)
[ 0.559598] <err> os: xtensa_dump_stack: ** THREADPTR (nil) Interestingly, adding some debug logs eventually made the test pass. Currently, the issue is that enabling logs results in an @lyakh have you observed any similar issues with LLEXT module load/unload processes? If so, could you provide any insights or assistance in resolving this problem? |
@tmleman I see it's running on core 2, can you try zephyrproject-rtos/zephyr#86491 ? Zephyr is in a code freeze ATM, waiting for them to merge. |
@lyakh it sounds then like we need to wait for Zephyr merge Window opening on Monday for this (and a few other pending PRs) ? |
5cfa4a9
to
54ea799
Compare
This patch exports the symbols `comp_is_current_data_blob_valid` and `ipc4_update_source_format` to resolve issues encountered when the Google RTC module was converted into an LLEXT module. The lack of exported symbols was causing warnings and subsequent firmware exceptions when these functions were called from within the module. Changes include: - Adding `EXPORT_SYMBOL` for `comp_is_current_data_blob_valid` in src/audio/data_blob.c. - Adding `EXPORT_SYMBOL` for `ipc4_update_source_format` in src/ipc/ipc4/helper.c. Signed-off-by: Tomasz Leman <[email protected]>
This patch enables the Google Real Time Communication Audio Processing (RTC_AEC) module for the LNL (Lunar Lake) and PTL (Panther Lake) platforms. The RTC_AEC module is essential for performing echo-cancelling and other real-time audio processing tasks. Changes include: - Enabling CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING and CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK in the intel_adsp_ace20_lnl.conf configuration file. - Enabling CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING and CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK in the intel_adsp_ace30_ptl.conf configuration file. This change ensures that the RTC_AEC module is included in the firmware builds for these platforms, allowing for proper testing and functionality of real-time audio processing features. Signed-off-by: Tomasz Leman <[email protected]>
This patch modifies the configuration to change the Google Real Time Communication Audio Processing (RTC_AEC) module from built-in to a loadable module for the MTPM, LNL, and PTL platforms. This change allows for more flexibility in managing the module and reduces the firmware size. Changes include: - Changing CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING from 'y' to 'm' in the intel_adsp_ace15_mtpm.conf configuration file. - Changing CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING from 'y' to 'm' in the intel_adsp_ace20_lnl.conf configuration file. - Changing CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING from 'y' to 'm' in the intel_adsp_ace30_ptl.conf configuration file. - Adding CONFIG_LLEXT, CONFIG_LLEXT_STORAGE_WRITABLE, and CONFIG_MODULES to the intel_adsp_ace30_ptl.conf configuration file to support loadable modules. This change ensures that the RTC_AEC module can be dynamically loaded as needed, providing greater flexibility and potentially improving system performance. Signed-off-by: Tomasz Leman <[email protected]>
54ea799
to
fd57f95
Compare
@wszypelt good to merge ? |
@lgirdwood Unfortunately, we still have an issue with RTC_AEC (exception) |
@tmleman @wszypelt is this with the stub or with the real module ? Can we share here to help debug ? Thanks |
@lgirdwood @lyakh In the tests, we use a mock. [ 1.681920] <inf> ipc: ipc_cmd: rx : 0x40008000|0x12010026
[ 1.682308] <wrn> ipc: ipc4_get_drv: get_drv(): the provided UUID (b780a0a6-269f-466f-b477-23dfa05af758) can't be found!
[ 1.686383] <wrn> llext: llext_link_plt: PLT: cannot find idx 22 name comp
[ 1.700713] <wrn> llext: llext_link_plt: PLT: cannot find idx 22 name comp
[ 1.705181] <wrn> llext: llext_link_plt: PLT: cannot find idx 22 name comp
[ 1.714426] <wrn> llext: llext_link_plt: PLT: cannot find idx 37 name module_ada
[ 1.716853] <inf> llext: llext_load: Loaded extension RTC_AEC
[ 1.721130] <inf> google_rtc_audio_processing_init: comp:1 0x8000 google_rtc_audio_processing_init()
[ 1.721228] <err> os: print_fatal_exception: ** FATAL EXCEPTION
[ 1.721283] <err> os: print_fatal_exception: ** CPU 2 EXCCAUSE 12 (instr PIF data error)
[ 1.721356] <err> os: print_fatal_exception: ** PC (nil) VADDR (nil)
[ 1.721385] <err> os: print_fatal_exception: ** PS 0x60d20
[ 1.721413] <err> os: print_fatal_exception: ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:13 CALLINC:2)
[ 1.721445] <err> os: xtensa_dump_stack: ** A0 0xa068b220 SP 0xa00c74e0 A2 (nil) A3 0x2
[ 1.721473] <err> os: xtensa_dump_stack: ** A4 0x2 A5 0xbb80 A6 0x2 A7 (nil)
[ 1.721501] <err> os: xtensa_dump_stack: ** A8 0xa068c0d6 A9 0xa006fbf0 A10 (nil) A11 0x1
[ 1.721530] <err> os: xtensa_dump_stack: ** A12 0x14 A13 0x40 A14 (nil) A15 (nil)
[ 1.721558] <err> os: xtensa_dump_stack: ** LBEG 0xa00854d8 LEND 0xa00854de LCOUNT (nil)
[ 1.721585] <err> os: xtensa_dump_stack: ** SAR 0x12
[ 1.721611] <err> os: xtensa_dump_stack: ** THREADPTR 0x34000 [ 0.392040] <inf> ipc: ipc_cmd: rx : 0x13000004|0x1
[ 0.392473] <inf> copier: copier_prepare: comp:1 0x30005 copier_prepare()
[ 0.392615] <inf> copier: copier_prepare: comp:1 0x20005 copier_prepare()
[ 0.393160] <inf> copier: copier_prepare: comp:0 0x5 copier_prepare()
[ 0.393246] <inf> google_rtc_audio_processing_prepare: comp:0 0x8000 google_rtc_audio_processing_prepare()
[ 0.393291] <wrn> google_rtc_audio_processing_prepare: comp:0 0x8000 Too many mic channels: 4, truncating to 2
[ 0.393443] <inf> module_adapter: module_adapter_prepare: comp:0 0x8000 DP Module period set to 10000
[ 0.393665] <inf> copier: copier_prepare: comp:0 0x10005 copier_prepare()
[ 0.393758] <inf> pipe: pipeline_trigger: pipe:1 0x0 pipe trigger cmd 7
[ 0.393895] <inf> ll_schedule: zephyr_ll_task_schedule_common: task add 0xa00db6c0 0xa00ab394U priority 0 flags 0x0
[ 0.394031] <inf> ll_schedule: zephyr_domain_register: zephyr_domain_register domain->type 1 domain->clk 0 domain->ticks_per_ms 38400 period 1000
[ 0.394395] <inf> copier: copier_comp_trigger: comp:1 0x30005 No dai copier found, start/end offset is not calculated
[ 0.394685] <inf> copier: copier_comp_trigger: comp:1 0x30005 No dai copier found, start/end offset is not calculated
[ 0.394940] <inf> pipe: pipeline_trigger: pipe:0 0x0 pipe trigger cmd 7
[ 0.395001] <inf> clock: clock_set_freq: clock 0 set freq 393216000Hz freq_idx 1 old 0
[ 0.395006] <inf> clock: clock_set_freq: clock 1 set freq 393216000Hz freq_idx 1 old 0
[ 0.395011] <inf> clock: clock_set_freq: clock 2 set freq 393216000Hz freq_idx 1 old 0
[ 0.395021] <inf> ll_schedule: zephyr_ll_task_schedule_common: task add 0xa00dbd40 0xa00ab394U priority 0 flags 0x0
[ 0.395066] <inf> copier: copier_comp_trigger: comp:0 0x5 No dai copier found, start/end offset is not calculated
[ 0.395086] <inf> copier: copier_comp_trigger: comp:0 0x5 No dai copier found, start/end offset is not calculated
[ 0.395100] <inf> ll_schedule: zephyr_ll_task_schedule_common: task add 0xa00d38c8 0xa00aaf44U priority 0 flags 0x0
[ 0.395136] <inf> host_comp: host_get_copy_bytes_normal: comp:0 0x10005 no bytes to copy, available samples: 0, free_samples: 768
[ 0.396061] <inf> host_comp: host_get_copy_bytes_normal: comp:1 0x30005 no bytes to copy, available samples: 384, free_samples: 0
[ 0.396070] <err> os: print_fatal_exception: ** FATAL EXCEPTION
[ 0.396076] <err> os: print_fatal_exception: ** CPU 0 EXCCAUSE 12 (instr PIF data error)
[ 0.396081] <err> os: print_fatal_exception: ** PC (nil) VADDR (nil)
[ 0.396085] <err> os: print_fatal_exception: ** PS 0x60720
[ 0.396088] <err> os: print_fatal_exception: ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:7 CALLINC:2)
[ 0.396091] <err> os: xtensa_dump_stack: ** A0 0xa0078faf SP 0xa00c04c0 A2 (nil) A3 0xa00dba00
[ 0.396096] <err> os: xtensa_dump_stack: ** A4 (nil) A5 0xa00dba80 A6 0x1 A7 0xa00daf00
[ 0.396100] <err> os: xtensa_dump_stack: ** A8 0xa007ceba A9 0x2 A10 0xa00db244 A11 (nil)
[ 0.396103] <err> os: xtensa_dump_stack: ** A12 0xa00db384 A13 (nil) A14 0xc0 A15 0x76543210
[ 0.396106] <err> os: xtensa_dump_stack: ** LBEG 0xa0036cd5 LEND 0xa0036ce4 LCOUNT 0xa0062b5f
[ 0.396110] <err> os: xtensa_dump_stack: ** SAR 0x2
[ 0.396115] <err> os: xtensa_dump_stack: ** THREADPTR 0x5 |
@tmleman this looks like an assert in user mode ??
OR is our user mode stack big enough for each of these modules ? |
This patch enables the Google Real Time Communication Audio Processing (RTC_AEC) module for the LNL (Lunar Lake) and PTL (Panther Lake) platforms. The RTC_AEC module is essential for performing echo-cancelling and other real-time audio processing tasks.
Changes include:
This change ensures that the RTC_AEC module is included in the firmware builds for these platforms, allowing for proper testing and functionality of real-time audio processing features.