Skip to content

Conversation

@jsarha
Copy link
Contributor

@jsarha jsarha commented Aug 13, 2025

I pushed this out for review already now even if there is more modules to convert, to get some early feedback from my additions and changes to the module resource API.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces new module adapter resource management APIs and converts several audio processing modules to use them. The changes improve resource tracking and provide automated cleanup functionality for modules.

  • Adds a new module resource management system with containers and tracking capabilities
  • Introduces convenience APIs for memory allocation, data blob handlers, and SRAM copies
  • Converts multiple audio modules (crossover, multiband DRC, DRC, copier, ASRC, aria, SRC) to use the new APIs

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
zephyr/sof_shell.c Updates shell command to display heap high watermark alongside current usage
src/include/sof/audio/module_adapter/module/generic.h Adds new module_resources structure and declares new module allocation APIs
src/include/module/module/base.h Changes module_data to use module_resources instead of module_memory
src/include/module/crossover/crossover_common.h Updates crossover functions to accept processing_module parameter for resource tracking
src/audio/module_adapter/module_adapter.c Simplifies heap usage tracking using new resource structure
src/audio/module_adapter/module/generic.c Implements new resource management system with container pooling and automatic cleanup
src/audio/multiband_drc/multiband_drc.h Updates multiband DRC reset function signature
src/audio/multiband_drc/multiband_drc.c Converts multiband DRC to use new module APIs and removes manual cleanup
src/audio/drc/drc_algorithm.h Updates DRC function signatures for new module API
src/audio/drc/drc.c Converts DRC module to use new allocation APIs
src/audio/crossover/crossover.c Converts crossover module to use new allocation APIs and removes manual cleanup
src/audio/copier/copier.c Updates copier module to use new allocation APIs
src/audio/asrc/* Converts ASRC module to use new allocation APIs throughout
src/audio/aria/aria.c Converts aria module to use new allocation APIs
src/audio/src/src_common.c Updates SRC to use new mod_fast_get/put APIs

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

One open, btw I would split the PR as some fixes could be taken now.

@jsarha jsarha force-pushed the module_api_additions_module_changes branch 3 times, most recently from 4b6d75a to b1f58e8 Compare August 13, 2025 20:27
@jsarha jsarha force-pushed the module_api_additions_module_changes branch 5 times, most recently from 4ddea61 to b5b500e Compare August 15, 2025 09:21
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Some minor nits, but looks good. I'd keep this as module interface changes/additions, one or two example modules converted and not put more into the PR. This is already lot of code to go through and some of the changes really require attention. I'd expect the module conversions to be more mechanistics changes that will be easier to review as separate PRs. Unless there is some dependencies I'm missing, but seems this is an opt-in migration process here.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

just minor comments.

struct module_memory *container = container_get(mod);
struct comp_data_blob_handler *dbh;

#if DEBUG
Copy link
Member

Choose a reason for hiding this comment

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

to make this cleaner I would define a macro (based on above Kconfig) and using zephyr type asserts at the top of the file (if config=n then macro is empty). This gets rid of the #if DEBUG all over the file.


container->ptr = dbh;
container->size = 0;
container->free = (void (*)(void *))comp_data_blob_handler_free;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jsarha in #10164 (comment) I was also (implicitly) suggesting to fix this typecast too, because it's effectively also dropping const. Since you'll be fixing PTL CI failures, we still have a chance to fix this too, or we can make that a follow-up, shouldn't be critical

Copy link
Collaborator

Choose a reason for hiding this comment

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

The PTL failures - is that a problem with sof-test? Looks like kernel module unloading is failing

@jsarha
Copy link
Contributor Author

jsarha commented Aug 25, 2025

SOFCI TEST

@jsarha jsarha force-pushed the module_api_additions_module_changes branch from c66734f to 36463e2 Compare August 25, 2025 15:24
Copy link
Collaborator

@lyakh lyakh left a comment

Choose a reason for hiding this comment

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

no more const-dropping, thanks!

list_item_del(&mem->mem_list);
container_put(mod, mem);
return 0;
list_for_item_safe(res_list, _res_list, &res->res_list) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need for _safe() here - you return once a match is found and the element is deleted

@jsarha jsarha force-pushed the module_api_additions_module_changes branch 3 times, most recently from 80af2e7 to d48ced9 Compare August 25, 2025 22:18
@jsarha
Copy link
Contributor Author

jsarha commented Aug 25, 2025

Whoa. What a tedious job to stitch the cmocka test together again after the previous, seamingly straight forward, change. If all the CI tests are still broken after this, I am considering going back to previous version, as @lyakh is on vacation and noone else complained about the casts I got rid off.

Add mod_data_blob_handler_new() to module API. The function is
otherwise the same as comp_data_blob_handler_new(), but it takes a
module pointer as the first argument, and the blob handler is
automatically freed when the module unloads.

The handler allocated with mod_data_blob_handler_new() should not be
freed with comp_data_blob_handler_free(), mod_data_blob_handler_free()
should be used.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@jsarha jsarha force-pushed the module_api_additions_module_changes branch from d48ced9 to 22f8892 Compare August 26, 2025 08:41
@jsarha
Copy link
Contributor Author

jsarha commented Aug 26, 2025

SOFCI TEST

@jsarha
Copy link
Contributor Author

jsarha commented Aug 27, 2025

About the CI issues, the eq_fir and eq_iir cmocka failures are probably not related to this PR (they appear also on this test PR, tha only has the first commit of this PR and eq_fir or eq_iir modules have not yet been converted): #10196

But the pass rate on regular CI tests is so much worse with my full PR that it requires much more testing from me. Unfortunately the reasons for PTL failures are not clear at all, so I put my effort on the couple of failures seen on LNL that are not there on the above test PR.

@lgirdwood
Copy link
Member

About the CI issues, the eq_fir and eq_iir cmocka failures are probably not related to this PR (they appear also on this test PR, tha only has the first commit of this PR and eq_fir or eq_iir modules have not yet been converted): #10196

Ack - @singalsu can you take care of the EQ bug.

But the pass rate on regular CI tests is so much worse with my full PR that it requires much more testing from me. Unfortunately the reasons for PTL failures are not clear at all, so I put my effort on the couple of failures seen on LNL that are not there on the above test PR.

Ok, lets break the full PR down into smaller chunks to debug.

Jyri Sarha added 4 commits August 27, 2025 17:32
Add module API versions of fast_get() and fast_put(). The SRAM copies
reserved with mod_fast_get() are released automatically when the
module unloads, and those SRAM copies should not be freed with the
regular fast_put().

The sram-copy allocated with mod_fast_get() should not be freed with
regular fast_put(), but mod_fast_put() should be used.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Add safeguard to mod_alloc() and friends that checks that they are
always called from the same thread (e.g. no locking needed).

The checking code has to be also behind defined(__ZEPHYR__) to keep
cmocka tests working.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
…ree()

Use list_for_item() instead of list_for_item_safe() in mod_free().
There is no need for *_safe() version when loop is not continued after
an element is removed from the list.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Take mod_fast_get() and mod_fast_put() into use.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@jsarha jsarha force-pushed the module_api_additions_module_changes branch from 22f8892 to 289efb1 Compare August 27, 2025 14:42
@jsarha
Copy link
Contributor Author

jsarha commented Aug 27, 2025

Drop the most of module conversions (except for SRC, that was already partly converted, but needed the mod_fast_get() change) and leave the API additions. Hopefully this performes better in the CI and once the API changes are merged, push the individual module changes as separate PRs in parallel to find out which modules cause the CI problems.

The module conversions and cmocka fixes on top of this PRs are here in this huge draft PR: #10195

@jsarha
Copy link
Contributor Author

jsarha commented Aug 28, 2025

@lgirdwood now the PTL failure pattern is the same as in this close to mainline PR: #10196

Could we merge this now, so I could start sending the module conversion separately, to se which ones are broken?

@lrudyX
Copy link

lrudyX commented Aug 28, 2025

Internal CI fail not related to this PR

@jsarha
Copy link
Contributor Author

jsarha commented Aug 28, 2025

So with this PR, the only module converted is the SRC, which I have been manually testing through out the development process. In addition to SRC the only modules affected by the memory API changes the modules that used the old module_allocate_memory() and friends, e.g. dts, cadence, and waves (see 2a87a79).

@jsarha
Copy link
Contributor Author

jsarha commented Aug 29, 2025

@lgirdwood , Here is also logs from SRC (the only fully converted module in this PR) testbench run through Valgrind. No memoryleaks or other problems deteceted. I think this PR should now be ready to merge. (The earlier edit was false alarm, these are x86 results)

sof/tools/test/audio$ ../../testbench/build_testbench/install/bin/sof-testbench4 -r 44100 -R 48000 -c 2 -n 2 -b S32_LE -p 1,2 -t ../../build_tools/topology/topology2/development/sof-hda-benchmark-src32.tplg -C 300000 -i in.raw -o chirp_test_out_693542.raw
trace: [1756453535.397724] <inf> (ll_schedule.c:114) ll_scheduler_init()
trace: [1756453535.397891] <inf> (edf_schedule.c:112) edf_scheduler_init()
pipeline run 0/1
==========================================================
                           Test Start 0
==========================================================
debug: loading comp_id 1: pipeline_id 0: widget iDisp3 Tx type 5 size 132 at offset 322 is_pages 0
debug: loading comp_id 2: pipeline_id 1: widget codec0_in type 0 size 132 at offset 490 is_pages 0
debug: loading comp_id 3: pipeline_id 1: widget iDisp2 Tx type 5 size 132 at offset 622 is_pages 0
debug: loading comp_id 4: pipeline_id 1: widget src.1.1 type 20 size 132 at offset 2250 is_pages 0
debug: loading comp_id 5: pipeline_id 1: widget host-copier.0.playback type 11 size 132 at offset 8046 is_pages 1
debug: loading comp_id 7: pipeline_id 2: widget codec1_in type 0 size 132 at offset 8418 is_pages 0
debug: loading comp_id 8: pipeline_id 2: widget iDisp1 Tx type 5 size 132 at offset 8550 is_pages 0
debug: loading comp_id 9: pipeline_id 2: widget dai-copier.HDA.Analog.playback type 13 size 132 at offset 9622 is_pages 1
debug: loading comp_id 11: pipeline_id 3: widget codec0_out type 1 size 132 at offset 9994 is_pages 0
debug: loading comp_id 12: pipeline_id 3: widget Analog CPU Playback type 5 size 132 at offset 10126 is_pages 0
debug: loading comp_id 13: pipeline_id 3: widget src.3.2 type 20 size 132 at offset 11754 is_pages 0
debug: loading comp_id 14: pipeline_id 3: widget host-copier.0.capture type 12 size 132 at offset 17918 is_pages 1
debug: loading comp_id 16: pipeline_id 4: widget codec1_out type 1 size 132 at offset 18290 is_pages 0
debug: loading comp_id 17: pipeline_id 4: widget Digital CPU Playback type 5 size 132 at offset 18422 is_pages 0
debug: loading comp_id 18: pipeline_id 4: widget dai-copier.HDA.Analog.capture type 14 size 132 at offset 19126 is_pages 1
debug: loading comp_id 20: pipeline_id 5: widget codec2_in type 0 size 132 at offset 19498 is_pages 0
debug: loading comp_id 21: pipeline_id 5: widget Alt Analog CPU Playback type 5 size 132 at offset 19630 is_pages 0
debug: loading comp_id 22: pipeline_id 6: widget codec2_out type 1 size 132 at offset 19798 is_pages 0
debug: loading comp_id 23: pipeline_id 6: widget Analog CPU Capture type 0 size 132 at offset 19930 is_pages 0
debug: loading comp_id 24: pipeline_id 7: widget iDisp1_out type 1 size 132 at offset 20098 is_pages 0
debug: loading comp_id 25: pipeline_id 7: widget Digital CPU Capture type 0 size 132 at offset 20230 is_pages 0
debug: loading comp_id 26: pipeline_id 8: widget iDisp2_out type 1 size 132 at offset 20398 is_pages 0
debug: loading comp_id 27: pipeline_id 8: widget Alt Analog CPU Capture type 0 size 132 at offset 20530 is_pages 0
debug: loading comp_id 28: pipeline_id 9: widget iDisp3_out type 1 size 132 at offset 20698 is_pages 0
debug: loading comp_id 29: pipeline_id 50: widget host-copier.3.playback type 11 size 132 at offset 21378 is_pages 1
debug: loading comp_id 31: pipeline_id 51: widget dai-copier.HDA.iDisp1.playback type 13 size 132 at offset 22710 is_pages 1
debug: loading comp_id 33: pipeline_id 60: widget host-copier.4.playback type 11 size 132 at offset 23614 is_pages 1
debug: loading comp_id 35: pipeline_id 61: widget dai-copier.HDA.iDisp2.playback type 13 size 132 at offset 24946 is_pages 1
debug: loading comp_id 37: pipeline_id 70: widget host-copier.5.playback type 11 size 132 at offset 25850 is_pages 1
debug: loading comp_id 39: pipeline_id 71: widget dai-copier.HDA.iDisp3.playback type 13 size 132 at offset 27182 is_pages 1
warning: failed  assigning pipeline for iDisp3 Tx
warning: failed  assigning pipeline for codec2_in
warning: failed  assigning pipeline for Alt Analog CPU Playback
warning: failed  assigning pipeline for codec2_out
warning: failed  assigning pipeline for Analog CPU Capture
warning: failed  assigning pipeline for iDisp1_out
warning: failed  assigning pipeline for Digital CPU Capture
warning: failed  assigning pipeline for iDisp2_out
warning: failed  assigning pipeline for Alt Analog CPU Capture
warning: failed  assigning pipeline for iDisp3_out
trace: [1756453535.400082] <inf> (handler.c:1661) rx    : 0x11000004|0
trace: [1756453535.400155] <inf> (pipeline-graph.c:116) pipeline new pipe_id 0 priority 0
trace: [1756453535.400218] <inf> (handler.c:1661) rx    : 0x4000009a|0x16
trace: [1756453535.400379] <inf> (handler.c:1661) rx    : 0x40000007|0xf
trace: [1756453535.400459] <inf> (handler.c:1661) rx    : 0x4500009a|0x7
trace: [1756453535.400529] <inf> (ipc-helper.c:60) buffer new size 0x580 id 0.0 flags 0x0
trace: [1756453535.400581] <inf> (pipeline-graph.c:182) connect buffer 0 as sink
trace: [1756453535.400636] <inf> (pipeline-graph.c:184) connect buffer 0 as source
trace: [1756453535.400690] <inf> (handler.c:1661) rx    : 0x11010002|0
trace: [1756453535.400733] <inf> (pipeline-graph.c:116) pipeline new pipe_id 1 priority 0
trace: [1756453535.400810] <inf> (handler.c:1661) rx    : 0x4000009c|0x10016
trace: [1756453535.401107] <inf> (handler.c:1661) rx    : 0x45000007|0x9c
trace: [1756453535.401173] <inf> (ipc-helper.c:60) buffer new size 0x580 id 0.0 flags 0x0
trace: [1756453535.401209] <inf> (pipeline-graph.c:182) connect buffer 0 as sink
trace: [1756453535.401240] <inf> (pipeline-graph.c:184) connect buffer 0 as source
trace: [1756453535.401275] <inf> (handler.c:1661) rx    : 0x13000003|0
trace: [1756453535.401316] <wrn> (ipc-helper.c:266) no scheduling component specified, use comp 0x7
trace: [1756453535.401415] <inf> (handler.c:1661) rx    : 0x13010003|0
trace: [1756453535.401508] <wrn> (ipc-helper.c:266) no scheduling component specified, use comp 0x9c
trace: [1756453535.401578] <inf> (handler.c:1661) rx    : 0x13000004|0
trace: [1756453535.401672] <inf> (src.c:45) src_prepare()
trace: [1756453535.401739] <inf> (src_common.c:488) src_params()
trace: [1756453535.402040] <inf> (src_common.c:502) src_params(), source_rate = 44100, sink_rate = 48000
trace: [1756453535.402150] <inf> (pipeline-stream.c:413) pipe trigger cmd 7
trace: [1756453535.402199] <inf> (handler.c:1661) rx    : 0x13010004|0
trace: [1756453535.402242] <inf> (pipeline-stream.c:413) pipe trigger cmd 7
trace: [1756453535.402311] <err> (handler.c:491) unexpected delayed reply
trace: [1756453535.402375] <err> (handler.c:491) unexpected delayed reply
trace: [1756453535.517424] <inf> (handler.c:1661) rx    : 0x13000003|0
trace: [1756453535.517456] <inf> (pipeline-stream.c:413) pipe trigger cmd 2
trace: [1756453535.517470] <inf> (handler.c:1661) rx    : 0x13010003|0
trace: [1756453535.517483] <inf> (pipeline-stream.c:413) pipe trigger cmd 2
trace: [1756453535.517496] <err> (handler.c:491) unexpected delayed reply
trace: [1756453535.517517] <err> (handler.c:491) unexpected delayed reply
trace: [1756453535.517539] <inf> (handler.c:1661) rx    : 0x13000002|0
trace: [1756453535.517552] <inf> (pipeline-stream.c:413) pipe trigger cmd 0
trace: [1756453535.517571] <inf> (src_common.c:696) src_reset()
trace: [1756453535.517589] <inf> (handler.c:1661) rx    : 0x13010002|0
trace: [1756453535.517614] <inf> (pipeline-stream.c:413) pipe trigger cmd 0
==========================================================
                           Test Summary 1
==========================================================
pipeline 1
file in.raw: id 154: type 22: samples 142084 copies 1605
pipeline 2
file chirp_test_out_693542.raw: id 156: type 22: samples 154048 copies 1606
Input bit format: S32_LE
Input sample rate: 44100
Output sample rate: 48000
Input sample (frame) count: 142084 (71042)
Output sample (frame) count: 154048 (77024)
Total execution time: 115115 us, 13.94 x realtime

trace: [1756453535.517779] <inf> (handler.c:1661) rx    : 0x46000007|0x9c
trace: [1756453535.517800] <inf> (handler.c:1661) rx    : 0x12000000|0
trace: [1756453535.517829] <inf> (src_common.c:708) src_free()
trace: [1756453535.517843] <inf> (handler.c:1661) rx    : 0x12010000|0
oku@jsarha-mobl4:~/work/sof-zephyr/sof/tools/test/audio$ valgrind ../../testbench/build_testbench/install/bin/sof-testbench4 -r 44100 -R 48000 -c 2 -n 2 -b S32_LE -p 1,2 -t ../../build_tools/topology/topology2/development/sof-hda-benchmark-src32.tplg -C 300000 -i in.raw -o chirp_test_out_693542.raw
==1357185== Memcheck, a memory error detector
==1357185== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1357185== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==1357185== Command: ../../testbench/build_testbench/install/bin/sof-testbench4 -r 44100 -R 48000 -c 2 -n 2 -b S32_LE -p 1,2 -t ../../build_tools/topology/topology2/development/sof-hda-benchmark-src32.tplg -C 300000 -i in.raw -o chirp_test_out_693542.raw
==1357185== 
trace: [1756453547.769636] <inf> (ll_schedule.c:114) ll_scheduler_init()
trace: [1756453547.788801] <inf> (edf_schedule.c:112) edf_scheduler_init()
pipeline run 0/1
==========================================================
                           Test Start 0
==========================================================
debug: loading comp_id 1: pipeline_id 0: widget iDisp3 Tx type 5 size 132 at offset 322 is_pages 0
debug: loading comp_id 2: pipeline_id 1: widget codec0_in type 0 size 132 at offset 490 is_pages 0
debug: loading comp_id 3: pipeline_id 1: widget iDisp2 Tx type 5 size 132 at offset 622 is_pages 0
debug: loading comp_id 4: pipeline_id 1: widget src.1.1 type 20 size 132 at offset 2250 is_pages 0
debug: loading comp_id 5: pipeline_id 1: widget host-copier.0.playback type 11 size 132 at offset 8046 is_pages 1
debug: loading comp_id 7: pipeline_id 2: widget codec1_in type 0 size 132 at offset 8418 is_pages 0
debug: loading comp_id 8: pipeline_id 2: widget iDisp1 Tx type 5 size 132 at offset 8550 is_pages 0
debug: loading comp_id 9: pipeline_id 2: widget dai-copier.HDA.Analog.playback type 13 size 132 at offset 9622 is_pages 1
debug: loading comp_id 11: pipeline_id 3: widget codec0_out type 1 size 132 at offset 9994 is_pages 0
debug: loading comp_id 12: pipeline_id 3: widget Analog CPU Playback type 5 size 132 at offset 10126 is_pages 0
debug: loading comp_id 13: pipeline_id 3: widget src.3.2 type 20 size 132 at offset 11754 is_pages 0
debug: loading comp_id 14: pipeline_id 3: widget host-copier.0.capture type 12 size 132 at offset 17918 is_pages 1
debug: loading comp_id 16: pipeline_id 4: widget codec1_out type 1 size 132 at offset 18290 is_pages 0
debug: loading comp_id 17: pipeline_id 4: widget Digital CPU Playback type 5 size 132 at offset 18422 is_pages 0
debug: loading comp_id 18: pipeline_id 4: widget dai-copier.HDA.Analog.capture type 14 size 132 at offset 19126 is_pages 1
debug: loading comp_id 20: pipeline_id 5: widget codec2_in type 0 size 132 at offset 19498 is_pages 0
debug: loading comp_id 21: pipeline_id 5: widget Alt Analog CPU Playback type 5 size 132 at offset 19630 is_pages 0
debug: loading comp_id 22: pipeline_id 6: widget codec2_out type 1 size 132 at offset 19798 is_pages 0
debug: loading comp_id 23: pipeline_id 6: widget Analog CPU Capture type 0 size 132 at offset 19930 is_pages 0
debug: loading comp_id 24: pipeline_id 7: widget iDisp1_out type 1 size 132 at offset 20098 is_pages 0
debug: loading comp_id 25: pipeline_id 7: widget Digital CPU Capture type 0 size 132 at offset 20230 is_pages 0
debug: loading comp_id 26: pipeline_id 8: widget iDisp2_out type 1 size 132 at offset 20398 is_pages 0
debug: loading comp_id 27: pipeline_id 8: widget Alt Analog CPU Capture type 0 size 132 at offset 20530 is_pages 0
debug: loading comp_id 28: pipeline_id 9: widget iDisp3_out type 1 size 132 at offset 20698 is_pages 0
debug: loading comp_id 29: pipeline_id 50: widget host-copier.3.playback type 11 size 132 at offset 21378 is_pages 1
debug: loading comp_id 31: pipeline_id 51: widget dai-copier.HDA.iDisp1.playback type 13 size 132 at offset 22710 is_pages 1
debug: loading comp_id 33: pipeline_id 60: widget host-copier.4.playback type 11 size 132 at offset 23614 is_pages 1
debug: loading comp_id 35: pipeline_id 61: widget dai-copier.HDA.iDisp2.playback type 13 size 132 at offset 24946 is_pages 1
debug: loading comp_id 37: pipeline_id 70: widget host-copier.5.playback type 11 size 132 at offset 25850 is_pages 1
debug: loading comp_id 39: pipeline_id 71: widget dai-copier.HDA.iDisp3.playback type 13 size 132 at offset 27182 is_pages 1
warning: failed  assigning pipeline for iDisp3 Tx
warning: failed  assigning pipeline for codec2_in
warning: failed  assigning pipeline for Alt Analog CPU Playback
warning: failed  assigning pipeline for codec2_out
warning: failed  assigning pipeline for Analog CPU Capture
warning: failed  assigning pipeline for iDisp1_out
warning: failed  assigning pipeline for Digital CPU Capture
warning: failed  assigning pipeline for iDisp2_out
warning: failed  assigning pipeline for Alt Analog CPU Capture
warning: failed  assigning pipeline for iDisp3_out
trace: [1756453547.867637] <inf> (handler.c:1661) rx    : 0x11000004|0
trace: [1756453547.871779] <inf> (pipeline-graph.c:116) pipeline new pipe_id 0 priority 0
trace: [1756453547.879215] <inf> (handler.c:1661) rx    : 0x4000009a|0x16
trace: [1756453547.893448] <inf> (handler.c:1661) rx    : 0x40000007|0xf
trace: [1756453547.897652] <inf> (handler.c:1661) rx    : 0x4500009a|0x7
trace: [1756453547.900794] <inf> (ipc-helper.c:60) buffer new size 0x580 id 0.0 flags 0x0
trace: [1756453547.908601] <inf> (pipeline-graph.c:182) connect buffer 0 as sink
trace: [1756453547.910115] <inf> (pipeline-graph.c:184) connect buffer 0 as source
trace: [1756453547.917367] <inf> (handler.c:1661) rx    : 0x11010002|0
trace: [1756453547.917472] <inf> (pipeline-graph.c:116) pipeline new pipe_id 1 priority 0
trace: [1756453547.917768] <inf> (handler.c:1661) rx    : 0x4000009c|0x10016
trace: [1756453547.920538] <inf> (handler.c:1661) rx    : 0x45000007|0x9c
trace: [1756453547.920681] <inf> (ipc-helper.c:60) buffer new size 0x580 id 0.0 flags 0x0
trace: [1756453547.920843] <inf> (pipeline-graph.c:182) connect buffer 0 as sink
trace: [1756453547.920936] <inf> (pipeline-graph.c:184) connect buffer 0 as source
trace: [1756453547.924334] <inf> (handler.c:1661) rx    : 0x13000003|0
trace: [1756453547.931323] <wrn> (ipc-helper.c:266) no scheduling component specified, use comp 0x7
trace: [1756453547.941278] <inf> (handler.c:1661) rx    : 0x13010003|0
trace: [1756453547.942143] <wrn> (ipc-helper.c:266) no scheduling component specified, use comp 0x9c
trace: [1756453547.943109] <inf> (handler.c:1661) rx    : 0x13000004|0
trace: [1756453547.956148] <inf> (src.c:45) src_prepare()
trace: [1756453547.960905] <inf> (src_common.c:488) src_params()
trace: [1756453547.965971] <inf> (src_common.c:502) src_params(), source_rate = 44100, sink_rate = 48000
trace: [1756453547.975811] <inf> (pipeline-stream.c:413) pipe trigger cmd 7
trace: [1756453547.982114] <inf> (handler.c:1661) rx    : 0x13010004|0
trace: [1756453547.982908] <inf> (pipeline-stream.c:413) pipe trigger cmd 7
trace: [1756453547.994522] <err> (handler.c:491) unexpected delayed reply
trace: [1756453548.004588] <err> (handler.c:491) unexpected delayed reply
trace: [1756453548.418558] <inf> (handler.c:1661) rx    : 0x13000003|0
trace: [1756453548.419022] <inf> (pipeline-stream.c:413) pipe trigger cmd 2
trace: [1756453548.420233] <inf> (handler.c:1661) rx    : 0x13010003|0
trace: [1756453548.420339] <inf> (pipeline-stream.c:413) pipe trigger cmd 2
trace: [1756453548.421706] <err> (handler.c:491) unexpected delayed reply
trace: [1756453548.421966] <err> (handler.c:491) unexpected delayed reply
trace: [1756453548.422322] <inf> (handler.c:1661) rx    : 0x13000002|0
trace: [1756453548.422740] <inf> (pipeline-stream.c:413) pipe trigger cmd 0
trace: [1756453548.429931] <inf> (src_common.c:696) src_reset()
trace: [1756453548.431557] <inf> (handler.c:1661) rx    : 0x13010002|0
trace: [1756453548.431675] <inf> (pipeline-stream.c:413) pipe trigger cmd 0
==========================================================
                           Test Summary 1
==========================================================
pipeline 1
file in.raw: id 154: type 22: samples 142084 copies 1605
pipeline 2
file chirp_test_out_693542.raw: id 156: type 22: samples 154048 copies 1606
Input bit format: S32_LE
Input sample rate: 44100
Output sample rate: 48000
Input sample (frame) count: 142084 (71042)
Output sample (frame) count: 154048 (77024)
Total execution time: 430332 us, 3.73 x realtime

trace: [1756453548.454154] <inf> (handler.c:1661) rx    : 0x46000007|0x9c
trace: [1756453548.462556] <inf> (handler.c:1661) rx    : 0x12000000|0
trace: [1756453548.469144] <inf> (src_common.c:708) src_free()
trace: [1756453548.473370] <inf> (handler.c:1661) rx    : 0x12010000|0
==1357185== 
==1357185== HEAP SUMMARY:
==1357185==     in use at exit: 0 bytes in 0 blocks
==1357185==   total heap usage: 234 allocs, 234 frees, 173,638 bytes allocated
==1357185== 
==1357185== All heap blocks were freed -- no leaks are possible
==1357185== 
==1357185== For lists of detected and suppressed errors, rerun with: -s
==1357185== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Change all comp id prints from %d to %#x for better readability.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@singalsu
Copy link
Collaborator

singalsu commented Sep 1, 2025

About the CI issues, the eq_fir and eq_iir cmocka failures are probably not related to this PR (they appear also on this test PR, tha only has the first commit of this PR and eq_fir or eq_iir modules have not yet been converted): #10196

Ack - @singalsu can you take care of the EQ bug.

Yep, I think some module/buffers API related changes have been left out from EQ cmocka test code. The segfault in x86 run happens in module adapter with a null pointer.

@kv2019i kv2019i merged commit cf01b6c into thesofproject:main Sep 1, 2025
37 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants