Skip to content

Commit

Permalink
ASoC: SOF: append extended data to sof_ipc_comp_process
Browse files Browse the repository at this point in the history
Append the extended data to the end of the struct sof_ipc_comp_process,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
  • Loading branch information
keyonjie committed Aug 12, 2020
1 parent 34a79a6 commit bd4ae28
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -2223,18 +2223,15 @@ static int sof_process_load(struct snd_soc_component *scomp, int index,
ipc_data_size = 0;
}

process = kzalloc(ipc_size, GFP_KERNEL);
process = (struct sof_ipc_comp_process *)
sof_comp_alloc(swidget, &ipc_size, index, 0);
if (!process) {
ret = -ENOMEM;
goto out;
}

/* configure iir IPC message */
process->comp.hdr.size = ipc_size;
process->comp.hdr.cmd = SOF_IPC_GLB_TPLG_MSG | SOF_IPC_TPLG_COMP_NEW;
process->comp.id = swidget->comp_id;
process->comp.type = type;
process->comp.pipeline_id = index;
process->config.hdr.size = sizeof(process->config);

ret = sof_parse_tokens(scomp, &process->config, comp_tokens,
Expand Down

0 comments on commit bd4ae28

Please sign in to comment.