]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: SOF: append extended data to sof_ipc_comp_process
authorKeyon Jie <yang.jie@linux.intel.com>
Fri, 4 Sep 2020 13:27:42 +0000 (16:27 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 7 Sep 2020 14:16:45 +0000 (15:16 +0100)
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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-15-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/topology.c

index c61f46350defc53c7ddd9a1f2dd89f968a5cd4b7..48ea3147124ddb3630551a1550e66f9a3deb1d0f 100644 (file)
@@ -2231,18 +2231,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,