{
        int ret = 0;
        const struct snd_soc_platform_driver *driver = platform->driver;
+       struct snd_soc_dai *dai;
 
        platform->card = card;
        platform->dapm.card = card;
                snd_soc_dapm_new_controls(&platform->dapm,
                        driver->dapm_widgets, driver->num_dapm_widgets);
 
+       /* Create DAPM widgets for each DAI stream */
+       list_for_each_entry(dai, &dai_list, list) {
+               if (dai->dev != platform->dev)
+                       continue;
+
+               snd_soc_dapm_new_dai_widgets(&platform->dapm, dai);
+       }
+
        if (driver->probe) {
                ret = driver->probe(platform);
                if (ret < 0) {
        /* probe the cpu_dai */
        if (!cpu_dai->probed &&
                        cpu_dai->driver->probe_order == order) {
+               cpu_dai->dapm.card = card;
                if (!try_module_get(cpu_dai->dev->driver->owner))
                        return -ENODEV;
 
+               snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai);
+
                if (cpu_dai->driver->probe) {
                        ret = cpu_dai->driver->probe(cpu_dai);
                        if (ret < 0) {
 
        dai->dev = dev;
        dai->driver = dai_drv;
+       dai->dapm.dev = dev;
        if (!dai->driver->ops)
                dai->driver->ops = &null_dai_ops;
 
                        dai->id = dai->driver->id;
                else
                        dai->id = i;
+               dai->dapm.dev = dev;
                if (!dai->driver->ops)
                        dai->driver->ops = &null_dai_ops;