From f64f07173ddea104a8aeabf81afaedadaf5dd692 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 10 Jan 2008 14:39:01 +0100 Subject: [PATCH] --- yaml --- r: 81608 b: refs/heads/master c: 4ccab3e72e211c40d868045c7d3216948999bcf7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/sound/soc.h | 3 +++ trunk/sound/soc/soc-core.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2edb0583f865..ab62f952c62a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3c1c47e0eb92264d555003ee2003f836e432615b +refs/heads/master: 4ccab3e72e211c40d868045c7d3216948999bcf7 diff --git a/trunk/include/sound/soc.h b/trunk/include/sound/soc.h index 0afcdfe42a46..6b51ff2269b4 100644 --- a/trunk/include/sound/soc.h +++ b/trunk/include/sound/soc.h @@ -447,6 +447,9 @@ struct snd_soc_dai_link { /* codec/machine specific init - e.g. add machine controls */ int (*init)(struct snd_soc_codec *codec); + + /* DAI pcm */ + struct snd_pcm *pcm; }; /* SoC machine */ diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 7d51be8ee069..5f86e033098f 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -645,6 +645,10 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state) 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 @@ static int soc_new_pcm(struct snd_soc_device *socdev, 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;