Skip to content

Commit 8cc1eb9

Browse files
committed
Call lib_manager_start_agent for llext too
1 parent 65d65a5 commit 8cc1eb9

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 };
@@ -654,6 +656,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
654656
case MOD_TYPE_LLEXT:
655657
agent = NULL;
656658
ops = (const struct module_interface *)module_entry_point;
659+
agent_iface = NULL;
657660
break;
658661
case MOD_TYPE_LMDK:
659662
agent = &native_system_agent_start;
@@ -671,12 +674,10 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
671674
}
672675

673676
/* At this point module resources are allocated and it is moved to L2 memory. */
674-
if (agent) {
675-
ret = lib_manager_start_agent(drv, config, mod, args, module_entry_point, agent,
676-
agent_iface, &userspace, &ops);
677-
if (ret)
678-
goto err;
679-
}
677+
ret = lib_manager_start_agent(drv, config, mod, args, module_entry_point, agent,
678+
agent_iface, &userspace, &ops);
679+
if (ret)
680+
goto err;
680681

681682
if (comp_set_adapter_ops(drv, ops) < 0)
682683
goto err;

0 commit comments

Comments
 (0)