Skip to content

Commit

Permalink
ipc: ipcv4: Add remote free of components
Browse files Browse the repository at this point in the history
For delete pipeline operation this patch adds deletion of
modules added to given pipeline but executed on different
core. This case could appear only for DP processing modules.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
  • Loading branch information
jxstelter committed Nov 2, 2023
1 parent e56dce5 commit bad3b68
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/ipc/ipc4/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ int ipc_pipeline_new(struct ipc *ipc, ipc_pipe_new *_pipe_desc)
return ipc4_create_pipeline(pipe_desc);
}

static inline int ipc_comp_free_remote(struct comp_dev *dev)
{
struct idc_msg msg = { IDC_MSG_FREE, IDC_MSG_FREE_EXT(dev->ipc_config.id),
dev->ipc_config.core,};

return idc_send_msg(&msg, IDC_BLOCKING);
}

static int ipc_pipeline_module_free(uint32_t pipeline_id)
{
struct ipc *ipc = ipc_get();
Expand Down Expand Up @@ -285,7 +293,11 @@ static int ipc_pipeline_module_free(uint32_t pipeline_id)
buffer_free(buffer);
}

ret = ipc_comp_free(ipc, icd->id);
if (!cpu_is_me(icd->core))
ret = ipc_comp_free_remote(icd->cd);
else
ret = ipc_comp_free(ipc, icd->id);

if (ret)
return IPC4_INVALID_RESOURCE_STATE;

Expand Down

0 comments on commit bad3b68

Please sign in to comment.