-
Notifications
You must be signed in to change notification settings - Fork 350
Smart amp to module #10490
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?
Smart amp to module #10490
Conversation
Zephyr and broken pass through configuration fixes. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
There is for no apparent reason a blob handler pointer model_handler in component data, remove it and remove select COMP_BLOB from Kconfig. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
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 converts the smart_amp component from the legacy component driver model to the new module adapter framework, removing dependencies on component-specific APIs and updating to use processing_module infrastructure.
Changes:
- Replaced component driver interface with module adapter interface
- Updated memory allocation from legacy
rballoc/rfreeto module APImod_alloc/mod_free - Migrated IPC command handlers to new configuration APIs (
set_configuration/get_configuration)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/audio/smart_amp/smart_amp.c | Main conversion to module adapter interface, replacing component driver functions with module interface implementations |
| src/audio/smart_amp/smart_amp_passthru.c | Added LOG_MODULE_DECLARE and removed unused sof/bit.h include |
| src/audio/smart_amp/smart_amp_maxim_dsm.c | Added LOG_MODULE_DECLARE for logging integration |
| src/audio/smart_amp/Kconfig | Removed COMP_BLOB dependency no longer needed with module adapter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NOTE: This change has not been tested in any functional setup
For smart_amp to remain compatible with developing SOF it has to be
converted to use module API. The component API as such does not allow
llext loading or user-space usage. However, its unlikely the module
will work out of the box after this change, but in any case this
should make it easier to take smart_amp again into use.
This patch converts this component to module adapter API.
- New() becomes simpler init()
- Params() is handled in module adapter, in init()
"mod->verify_params_flags = BUFF_PARAMS_CHANNELS;" replaces
smart_amp_verify_params()
- Channels check in params() is placed to separate function
smart_amp_ipc4_params() to be called from prepare()
- cmd() handler is changed to module adapter client style with
smart_amp_set_configuration() and smart_amp_get_configuration().
- smart_amp_copy() becomes module API smart_amp_process() function
- smart_amo_prepare() picks sources and sink and does other
preparations for processing
- smart_amp_trigger() does the same thing as before, zeroes feedback
buffer at playback start
- Preliminary IPC4 support added
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Replace all rbmalloc() and rfree() usage with mod_alloc() and mod_free(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix a simple typo inherited from the component version. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
bd043d5 to
22b7368
Compare
The llext stuff is still missing, but I had to go to sleep.
Anyway the conversion is ready AFAICT. The llext stuff can be added in separate PR.