-
Notifications
You must be signed in to change notification settings - Fork 347
Module api conversion of mixer, mixin mixout, and mux modules #10294
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
base: main
Are you sure you want to change the base?
Module api conversion of mixer, mixin mixout, and mux modules #10294
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.
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.
fad5221 to
e999fde
Compare
|
SOFCI TEST |
|
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 <[email protected]>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends. Signed-off-by: Jyri Sarha <[email protected]>
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends. Signed-off-by: Jyri Sarha <[email protected]>
e999fde to
13f248f
Compare
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module data blob handler creation failed.
No description provided.