[ar71xx] remove duplicated includes
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1005-asoc-core-suspend_resume.patch.patch
1 From 3ebb4e58d6f7a9f2710a4e174a3c8b59f9fa9bd5 Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Fri, 1 Jun 2007 12:56:55 +0100
4 Subject: [PATCH] asoc-core-suspend_resume.patch
5 From 6c868238a5e083dca4d74439a7fd467b5c7726b0 Mon Sep 17 00:00:00 2001
6 Subject: [PATCH] This fixes a bug whereby PCM's were not being suspended when the rest of the audio subsystem was suspended.
7
8 ---
9 include/sound/soc.h | 3 +++
10 sound/soc/soc-core.c | 5 +++++
11 2 files changed, 8 insertions(+), 0 deletions(-)
12
13 diff --git a/include/sound/soc.h b/include/sound/soc.h
14 index f47ef1f..aedb348 100644
15 --- a/include/sound/soc.h
16 +++ b/include/sound/soc.h
17 @@ -410,6 +410,9 @@ struct snd_soc_dai_link {
18
19 /* codec/machine specific init - e.g. add machine controls */
20 int (*init)(struct snd_soc_codec *codec);
21 +
22 + /* DAI pcm */
23 + struct snd_pcm *pcm;
24 };
25
26 /* SoC machine */
27 diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
28 index e6a67b5..25f7818 100644
29 --- a/sound/soc/soc-core.c
30 +++ b/sound/soc/soc-core.c
31 @@ -639,6 +639,10 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
32 dai->dai_ops.digital_mute(dai, 1);
33 }
34
35 + /* suspend all pcm's */
36 + for(i = 0; i < machine->num_links; i++)
37 + snd_pcm_suspend_all(machine->dai_link[i].pcm);
38 +
39 if (machine->suspend_pre)
40 machine->suspend_pre(pdev, state);
41
42 @@ -873,6 +877,7 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
43 return ret;
44 }
45
46 + dai_link->pcm = pcm;
47 pcm->private_data = rtd;
48 soc_pcm_ops.mmap = socdev->platform->pcm_ops->mmap;
49 soc_pcm_ops.pointer = socdev->platform->pcm_ops->pointer;
50 --
51 1.5.6.5
52
This page took 0.048885 seconds and 5 git commands to generate.