-
Notifications
You must be signed in to change notification settings - Fork 349
library-manager: use Kconfig for INTEL_MODULES #9936
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -485,7 +485,6 @@ const struct sof_man_module *lib_manager_get_module_manifest(const uint32_t modu | |
| SOF_MAN_MODULE_OFFSET(entry_index)); | ||
| } | ||
|
|
||
| #if CONFIG_INTEL_MODULES | ||
| /* | ||
| * \brief Load module code, allocate its instance and create a module adapter component. | ||
| * \param[in] drv - component driver pointer. | ||
|
|
@@ -584,7 +583,9 @@ static void lib_manager_prepare_module_adapter(struct comp_driver *drv, const st | |
| drv->ops.dai_ts_start = module_adapter_ts_start_op; | ||
| drv->ops.dai_ts_stop = module_adapter_ts_stop_op; | ||
| drv->ops.dai_ts_get = module_adapter_ts_get_op; | ||
| #if CONFIG_INTEL_MODULES | ||
| drv->adapter_ops = &processing_module_adapter_interface; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can't just not assign a
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @softwarecki IADK libraries cannot be loaded with firmware built with
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lyakh Attempting to load a iadk module in firmware built with
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @softwarecki aha, this is interesting! We'd expect an error response instead of a crash. Let's try to fix this, thanks!
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@softwarecki should be fixed in the updated version |
||
| #endif | ||
| } | ||
|
|
||
| int lib_manager_register_module(const uint32_t component_id) | ||
|
|
@@ -649,7 +650,8 @@ int lib_manager_register_module(const uint32_t component_id) | |
| build_info->format); | ||
|
|
||
| /* Check if module is IADK */ | ||
| if (build_info->format == IADK_MODULE_API_BUILD_INFO_FORMAT && | ||
| if (IS_ENABLED(CONFIG_INTEL_MODULES) && | ||
| build_info->format == IADK_MODULE_API_BUILD_INFO_FORMAT && | ||
| build_info->api_version_number.full == IADK_MODULE_API_CURRENT_VERSION) { | ||
| /* Use module_adapter functions */ | ||
| drv->ops.create = module_adapter_new; | ||
|
|
@@ -679,14 +681,6 @@ int lib_manager_register_module(const uint32_t component_id) | |
| return ret; | ||
| } | ||
|
|
||
| #else /* CONFIG_INTEL_MODULES */ | ||
| int lib_manager_register_module(const uint32_t component_id) | ||
| { | ||
| tr_err(&lib_manager_tr, "Dynamic module loading is not supported"); | ||
| return -ENOTSUP; | ||
| } | ||
| #endif /* CONFIG_INTEL_MODULES */ | ||
|
|
||
| static int lib_manager_dma_buffer_alloc(struct lib_manager_dma_ext *dma_ext, | ||
| uint32_t size) | ||
| { | ||
|
|
||
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.
Would this not be something like the original CONFIG ? Dont we want to preserve the original Kconfig to select IADK API ?
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.
@lgirdwood not sure I understand correctly. Currently my understanding is, that
CONFIG_LIBRARY_MANAGERis needed always when using the library manager, i.e. for both LLEXT and IADK. WhileCONFIG_INTEL_MODULESis only needed for IADK. So, here I change it to the former to make LLEXT usable without the latter enabled.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.
So we need sof/audio/module_adapter/iadk/ directory just with CONFIG_LIBRARY_MANAGER=y?
looks like it should be included only with CONFIG_INTEL_MODULES=y
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.
@abonislawski unfortunately yes. Obviously, I tried building SOF with LLEXT modules with
CONFIG_INTEL_MODULES=nand then I got errors about headers not being found. When I removed IADK headers, I got undefined types for some structures. We can work more on this to decouple non-IADK use-cases from IADK headers, but in this first step I didn't go all the way to do that, it would involve for me making less trivial changes to code that I cannot test locally