aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h3
-rw-r--r--sound/soc/soc-core.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 0afcdfe42a46..6b51ff2269b4 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -447,6 +447,9 @@ struct snd_soc_dai_link {
447 447
448 /* codec/machine specific init - e.g. add machine controls */ 448 /* codec/machine specific init - e.g. add machine controls */
449 int (*init)(struct snd_soc_codec *codec); 449 int (*init)(struct snd_soc_codec *codec);
450
451 /* DAI pcm */
452 struct snd_pcm *pcm;
450}; 453};
451 454
452/* SoC machine */ 455/* SoC machine */
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 7d51be8ee069..5f86e033098f 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -645,6 +645,10 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
645 dai->dai_ops.digital_mute(dai, 1); 645 dai->dai_ops.digital_mute(dai, 1);
646 } 646 }
647 647
648 /* suspend all pcms */
649 for (i = 0; i < machine->num_links; i++)
650 snd_pcm_suspend_all(machine->dai_link[i].pcm);
651
648 if (machine->suspend_pre) 652 if (machine->suspend_pre)
649 machine->suspend_pre(pdev, state); 653 machine->suspend_pre(pdev, state);
650 654
@@ -879,6 +883,7 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
879 return ret; 883 return ret;
880 } 884 }
881 885
886 dai_link->pcm = pcm;
882 pcm->private_data = rtd; 887 pcm->private_data = rtd;
883 soc_pcm_ops.mmap = socdev->platform->pcm_ops->mmap; 888 soc_pcm_ops.mmap = socdev->platform->pcm_ops->mmap;
884 soc_pcm_ops.pointer = socdev->platform->pcm_ops->pointer; 889 soc_pcm_ops.pointer = socdev->platform->pcm_ops->pointer;