struct snd_soc_dai_link_component *dlc;
int ret;
- /* link + cpu + codec */
- link = kzalloc(sizeof(*link) + (2 * sizeof(*dlc)), GFP_KERNEL);
+ /* link + cpu + codec + platform */
+ link = kzalloc(sizeof(*link) + (3 * sizeof(*dlc)), GFP_KERNEL);
if (link == NULL)
return -ENOMEM;
link->cpus = &dlc[0];
link->codecs = &dlc[1];
+ link->platforms = &dlc[2];
link->num_cpus = 1;
link->num_codecs = 1;
+ link->num_platforms = 1;
if (strlen(pcm->pcm_name)) {
link->name = kstrdup(pcm->pcm_name, GFP_KERNEL);
link->codecs->name = "snd-soc-dummy";
link->codecs->dai_name = "snd-soc-dummy-dai";
+ link->platforms->name = "snd-soc-dummy";
+
/* enable DPCM */
link->dynamic = 1;
link->dpcm_playback = le32_to_cpu(pcm->playback);