-
Notifications
You must be signed in to change notification settings - Fork 350
userspace: proxy: Add support for llext modules #10643
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?
Changes from all commits
748a0c6
658944a
f966a95
9e41394
e6690d7
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 |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
| #ifndef MODULE_LLEXT_H | ||
| #define MODULE_LLEXT_H | ||
|
|
||
| #define SOF_LLEXT_MODULE_MANIFEST(manifest_name, entry, affinity, mod_uuid, instances) \ | ||
| #define SOF_LLEXT_MODULE_MANIFEST(manifest_name, entry, affinity, mod_uuid, instances, ...) \ | ||
| { \ | ||
| .module = { \ | ||
| .name = manifest_name, \ | ||
|
|
@@ -16,6 +16,8 @@ | |
| .type = { \ | ||
| .load_type = SOF_MAN_MOD_TYPE_LLEXT, \ | ||
| .domain_ll = 1, \ | ||
| .user_mode = COND_CODE_0(NUM_VA_ARGS_LESS_1(_, ##__VA_ARGS__), (0), \ | ||
| (GET_ARG_N(1, __VA_ARGS__))), \ | ||
|
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. does this mean that you only ever use the first of the variadic parameters? Then maybe just add one
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. @softwarecki please, don't resolve comments without addressing or replying to them |
||
| }, \ | ||
| .affinity_mask = (affinity), \ | ||
| } \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -543,12 +543,14 @@ static int lib_manager_start_agent(const struct comp_driver *drv, | |
| return ret; | ||
| } | ||
| #endif /* CONFIG_SOF_USERSPACE_PROXY */ | ||
| if (agent) { | ||
|
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. so, if |
||
| ret = agent(&agent_params, agent_interface); | ||
| if (ret) | ||
| tr_err(&lib_manager_tr, "System agent start failed %d!", ret); | ||
| return ret; | ||
| } | ||
|
|
||
| ret = agent(&agent_params, agent_interface); | ||
| if (ret) | ||
| tr_err(&lib_manager_tr, "System agent start failed %d!", ret); | ||
|
|
||
| return ret; | ||
| return 0; | ||
| } | ||
|
|
||
| enum buildinfo_mod_type { MOD_TYPE_INVALID, MOD_TYPE_IADK, MOD_TYPE_LMDK, MOD_TYPE_LLEXT }; | ||
|
|
@@ -654,6 +656,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv, | |
| case MOD_TYPE_LLEXT: | ||
| agent = NULL; | ||
| ops = (const struct module_interface *)module_entry_point; | ||
| agent_iface = NULL; | ||
| break; | ||
| case MOD_TYPE_LMDK: | ||
| agent = &native_system_agent_start; | ||
|
|
@@ -671,12 +674,10 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv, | |
| } | ||
|
|
||
| /* At this point module resources are allocated and it is moved to L2 memory. */ | ||
| if (agent) { | ||
|
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. maybe we can change the above condition to |
||
| ret = lib_manager_start_agent(drv, config, mod, args, module_entry_point, agent, | ||
| agent_iface, &userspace, &ops); | ||
| if (ret) | ||
| goto err; | ||
| } | ||
| ret = lib_manager_start_agent(drv, config, mod, args, module_entry_point, agent, | ||
| agent_iface, &userspace, &ops); | ||
| if (ret) | ||
| goto err; | ||
|
|
||
| if (comp_set_adapter_ops(drv, ops) < 0) | ||
| goto err; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.