Skip to content

Commit 5096112

Browse files
committed
Call lib_manager_start_agent for llext too
1 parent 28d9337 commit 5096112

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

src/library_manager/lib_manager.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -543,12 +543,14 @@ static int lib_manager_start_agent(const struct comp_driver *drv,
543543
return ret;
544544
}
545545
#endif /* CONFIG_SOF_USERSPACE_PROXY */
546+
if (agent) {
547+
ret = agent(&agent_params, agent_interface);
548+
if (ret)
549+
tr_err(&lib_manager_tr, "System agent start failed %d!", ret);
550+
return ret;
551+
}
546552

547-
ret = agent(&agent_params, agent_interface);
548-
if (ret)
549-
tr_err(&lib_manager_tr, "System agent start failed %d!", ret);
550-
551-
return ret;
553+
return 0;
552554
}
553555

554556
enum buildinfo_mod_type { MOD_TYPE_INVALID, MOD_TYPE_IADK, MOD_TYPE_LMDK, MOD_TYPE_LLEXT };
@@ -656,6 +658,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
656658
tr_err(&lib_manager_tr, "MOD_TYPE_LLEXT");
657659
agent = NULL;
658660
ops = (const struct module_interface *)module_entry_point;
661+
agent_iface = NULL;
659662
break;
660663
case MOD_TYPE_LMDK:
661664
tr_err(&lib_manager_tr, "MOD_TYPE_LMDK");
@@ -675,12 +678,10 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
675678
}
676679

677680
/* At this point module resources are allocated and it is moved to L2 memory. */
678-
if (agent) {
679-
ret = lib_manager_start_agent(drv, config, mod, args, module_entry_point, agent,
680-
agent_iface, &userspace, &ops);
681-
if (ret)
682-
goto err;
683-
}
681+
ret = lib_manager_start_agent(drv, config, mod, args, module_entry_point, agent,
682+
agent_iface, &userspace, &ops);
683+
if (ret)
684+
goto err;
684685

685686
if (comp_set_adapter_ops(drv, ops) < 0)
686687
goto err;

0 commit comments

Comments
 (0)