Uh oh!
There was an error while loading. Please reload this page.
Module api conversion of mixer, mixin mixout, and mux modules - #10294
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the memory management approach for mixer, mixin_mixout, and mux audio modules by converting them to use the module API for allocation and deallocation. This simplifies the code by removing manual memory management responsibilities from the components.
- Replaced manual memory allocation (
rzalloc) with module-managed allocation (mod_zalloc) - Eliminated manual cleanup code in free functions since module API handles deallocation automatically
- Updated data blob handler creation to use module API (
mod_data_blob_handler_new)
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/audio/mux/mux.c | Converted to module API allocation, simplified error handling by removing cleanup paths |
| src/audio/mixin_mixout/mixin_mixout.c | Updated memory allocation to use module API for both mixin and mixout components |
| src/audio/mixer/mixer.c | Switched to module-managed memory allocation and removed manual cleanup |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
fad5221 to
e999fdeComparelgirdwood
commented
Oct 22, 2025
SOFCI TEST |
lgirdwood
commented
Oct 22, 2025
rerun CI as no data or not run on several duts |
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
e999fde to
13f248fComparejsarha
commented
Oct 31, 2025
These new versions of module conversions use module API to allocate the resources, but the code still has all the resource freeing code in place. |
| cd->model_handler = mod_data_blob_handler_new(mod); | ||
| if (!cd->model_handler) { | ||
| comp_err(dev, "comp_data_blob_handler_new() failed."); | ||
| comp_err(dev, "mod_data_blob_handler_new() failed."); |
There was a problem hiding this comment.
module data blob handler creation failed.
There was a problem hiding this comment.
we remove function names from prints, that refer to the function where the print is called, because that's already printed automatically. But I think it's ok to refer to other functions in prints like in this case - it refers to the function that has failed, not to the one, that's calling the print.
Uh oh!
There was an error while loading. Please reload this page.
No description provided.