Skip to content

Commit 8e29557

Browse files
committed
proxy: llext load sections
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 27c0f84 commit 8e29557

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/audio/module_adapter/library/userspace_proxy.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <stdint.h>
2727

2828
#include <sof/lib_manager.h>
29+
#include <sof/llext_manager.h>
2930
#include <sof/audio/component.h>
3031
#include <sof/schedule/dp_schedule.h>
3132
#include <rtos/userspace_helper.h>
@@ -163,6 +164,7 @@ static int user_work_item_init(struct userspace_context *user_ctx, struct k_heap
163164
work_item->event = &worker.event;
164165
#endif
165166
work_item->params.context = user_ctx;
167+
work_item->params.mod = NULL;
166168
user_ctx->work_item = work_item;
167169

168170
return 0;
@@ -382,7 +384,7 @@ static int userspace_proxy_start_agent(struct userspace_context *user_ctx,
382384
}
383385

384386
int userspace_proxy_create(struct userspace_context **user_ctx, const struct comp_driver *drv,
385-
const struct sof_man_module *manifest, system_agent_start_fn start_fn,
387+
const struct sof_man_module *manifest, system_agent_start_fn agent_fn,
386388
const struct system_agent_params *agent_params,
387389
const void **agent_interface, const struct module_interface **ops)
388390
{
@@ -410,15 +412,20 @@ int userspace_proxy_create(struct userspace_context **user_ctx, const struct com
410412
if (ret)
411413
goto error_dom;
412414

413-
ret = userspace_proxy_add_sections(context, agent_params->instance_id, manifest);
415+
if (agent_fn)
416+
ret = userspace_proxy_add_sections(context, agent_params->instance_id, manifest);
417+
else
418+
/* llext modules do not use the system agent. */
419+
ret = llext_manager_add_domain(agent_params->module_id, domain);
420+
414421
if (ret)
415422
goto error_dom;
416423

417424
ret = user_work_item_init(context, drv->user_heap);
418425
if (ret)
419426
goto error_dom;
420427

421-
ret = userspace_proxy_start_agent(context, start_fn, agent_params, agent_interface);
428+
ret = userspace_proxy_start_agent(context, agent_fn, agent_params, agent_interface);
422429
if (ret) {
423430
tr_err(&userspace_proxy_tr, "System agent failed with error %d.", ret);
424431
goto error_work_item;

0 commit comments

Comments
 (0)