[ALSA] soc - Ensure PCMs are suspended

This fixes a bug whereby PCMs were not being suspended when the rest of the
audio subsystem was suspended.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 7d51be8..5f86e03 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -645,6 +645,10 @@
 			dai->dai_ops.digital_mute(dai, 1);
 	}
 
+	/* suspend all pcms */
+	for (i = 0; i < machine->num_links; i++)
+		snd_pcm_suspend_all(machine->dai_link[i].pcm);
+
 	if (machine->suspend_pre)
 		machine->suspend_pre(pdev, state);
 
@@ -879,6 +883,7 @@
 		return ret;
 	}
 
+	dai_link->pcm = pcm;
 	pcm->private_data = rtd;
 	soc_pcm_ops.mmap = socdev->platform->pcm_ops->mmap;
 	soc_pcm_ops.pointer = socdev->platform->pcm_ops->pointer;