Skip to content

Commit 8b51363

Browse files
committed
lib_manager: Replace component_id parameter with config
Change lib_manager_start_agent signature to accept a config object instead of component_id. Get core id from the ipc configuration and pass it to the system agent at startup. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 1cc29f0 commit 8b51363

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/library_manager/lib_manager.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ const struct sof_man_module *lib_manager_get_module_manifest(const uint32_t modu
498498
* \brief Starts system agent and returns module interface into agent_interface variable.
499499
*
500500
* \param[in] drv - Pointer to the component driver structure.
501-
* \param[in] component_id - Identifier of the component.
501+
* \param[in] config - Pointer to component ipc config structure
502502
* \param[in] args - Pointer to components' ipc configuration arguments.
503503
* \param[in] module_entry_point - Entry point address of the module.
504504
* \param[in] agent - Function pointer to the system agent start function.
@@ -508,7 +508,8 @@ const struct sof_man_module *lib_manager_get_module_manifest(const uint32_t modu
508508
*
509509
* \return Error code returned by the system agent, 0 on success.
510510
*/
511-
static int lib_manager_start_agent(const struct comp_driver *drv, const uint32_t component_id,
511+
static int lib_manager_start_agent(const struct comp_driver *drv,
512+
const struct comp_ipc_config *config,
512513
const struct sof_man_module *mod_manifest,
513514
const struct ipc_config_process *args,
514515
const uintptr_t module_entry_point,
@@ -526,9 +527,9 @@ static int lib_manager_start_agent(const struct comp_driver *drv, const uint32_t
526527
mod_cfg.size = args->size >> 2;
527528

528529
agent_params.entry_point = module_entry_point;
529-
agent_params.module_id = IPC4_MOD_ID(component_id);
530-
agent_params.instance_id = IPC4_INST_ID(component_id);
531-
agent_params.core_id = 0;
530+
agent_params.module_id = IPC4_MOD_ID(config->id);
531+
agent_params.instance_id = IPC4_INST_ID(config->id);
532+
agent_params.core_id = config->core;
532533
agent_params.log_handle = (uint32_t)drv->tctx;
533534
agent_params.mod_cfg = &mod_cfg;
534535

@@ -671,7 +672,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
671672

672673
/* At this point module resources are allocated and it is moved to L2 memory. */
673674
if (agent) {
674-
ret = lib_manager_start_agent(drv, config->id, mod, args, module_entry_point, agent,
675+
ret = lib_manager_start_agent(drv, config, mod, args, module_entry_point, agent,
675676
agent_iface, &userspace, &ops);
676677
if (ret)
677678
goto err;

0 commit comments

Comments
 (0)