r3588 - branches/src/target/kernel/2.6.24.x/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Thu Dec 6 07:32:21 CET 2007
Author: laforge
Date: 2007-12-06 07:32:14 +0100 (Thu, 06 Dec 2007)
New Revision: 3588
Added:
branches/src/target/kernel/2.6.24.x/patches/asoc-core-suspend_resume.patch
branches/src/target/kernel/2.6.24.x/patches/asoc-s3c24xx-iis-suspend_resume.patch
Modified:
branches/src/target/kernel/2.6.24.x/patches/series
Log:
add two more ASOC core fixes
Added: branches/src/target/kernel/2.6.24.x/patches/asoc-core-suspend_resume.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/asoc-core-suspend_resume.patch 2007-12-06 06:14:02 UTC (rev 3587)
+++ branches/src/target/kernel/2.6.24.x/patches/asoc-core-suspend_resume.patch 2007-12-06 06:32:14 UTC (rev 3588)
@@ -0,0 +1,47 @@
+From 6c868238a5e083dca4d74439a7fd467b5c7726b0 Mon Sep 17 00:00:00 2001
+From: Liam Girdwood <liam at localhost.localdomain>
+Date: Fri, 1 Jun 2007 12:56:55 +0100
+Subject: [PATCH] This fixes a bug whereby PCM's were not being suspended when the rest of the audio subsystem was suspended.
+
+---
+ include/sound/soc.h | 3 +++
+ sound/soc/soc-core.c | 8 ++++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+Index: linux-2.6.22/include/sound/soc.h
+===================================================================
+--- linux-2.6.22.orig/include/sound/soc.h 2007-07-09 00:32:17.000000000 +0100
++++ linux-2.6.22/include/sound/soc.h 2007-11-09 16:13:08.000000000 +0000
+@@ -411,6 +411,9 @@
+
+ /* codec/machine specific init - e.g. add machine controls */
+ int (*init)(struct snd_soc_codec *codec);
++
++ /* DAI pcm */
++ struct snd_pcm *pcm;
+ };
+
+ /* SoC machine */
+Index: linux-2.6.22/sound/soc/soc-core.c
+===================================================================
+--- linux-2.6.22.orig/sound/soc/soc-core.c 2007-07-09 00:32:17.000000000 +0100
++++ linux-2.6.22/sound/soc/soc-core.c 2007-11-09 16:18:45.000000000 +0000
+@@ -639,6 +639,10 @@
+ dai->dai_ops.digital_mute(dai, 1);
+ }
+
++ /* suspend all pcm's */
++ 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);
+
+@@ -873,6 +877,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;
Added: branches/src/target/kernel/2.6.24.x/patches/asoc-s3c24xx-iis-suspend_resume.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/asoc-s3c24xx-iis-suspend_resume.patch 2007-12-06 06:14:02 UTC (rev 3587)
+++ branches/src/target/kernel/2.6.24.x/patches/asoc-s3c24xx-iis-suspend_resume.patch 2007-12-06 06:32:14 UTC (rev 3588)
@@ -0,0 +1,63 @@
+Index: linux-2.6/sound/soc/s3c24xx/s3c24xx-i2s.c
+===================================================================
+--- linux-2.6.orig/sound/soc/s3c24xx/s3c24xx-i2s.c
++++ linux-2.6/sound/soc/s3c24xx/s3c24xx-i2s.c
+@@ -75,6 +75,10 @@
+ struct s3c24xx_i2s_info {
+ void __iomem *regs;
+ struct clk *iis_clk;
++ u32 iiscon;
++ u32 iismod;
++ u32 iisfcon;
++ u32 iispsr;
+ };
+ static struct s3c24xx_i2s_info s3c24xx_i2s;
+
+@@ -405,6 +409,38 @@
+ return 0;
+ }
+
++#ifdef CONFIG_PM
++static int s3c24xx_i2s_suspend(struct platform_device *pdev,
++ struct snd_soc_cpu_dai *cpu_dai)
++{
++ s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
++ s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
++ s3c24xx_i2s.iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON);
++ s3c24xx_i2s.iispsr = readl(s3c24xx_i2s.regs + S3C2410_IISPSR);
++
++ clk_disable(s3c24xx_i2s.iis_clk);
++
++ return 0;
++}
++
++static int s3c24xx_i2s_resume(struct platform_device *pdev,
++ struct snd_soc_cpu_dai *cpu_dai)
++{
++ clk_enable(s3c24xx_i2s.iis_clk);
++
++ writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON);
++ writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
++ writel(s3c24xx_i2s.iisfcon, s3c24xx_i2s.regs + S3C2410_IISFCON);
++ writel(s3c24xx_i2s.iispsr, s3c24xx_i2s.regs + S3C2410_IISPSR);
++
++ return 0;
++}
++#else
++#define s3c24xx_i2s_suspend NULL
++#define s3c24xx_i2s_resume NULL
++#endif
++
++
+ #define S3C24XX_I2S_RATES \
+ (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_16000 | \
+ SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
+@@ -415,6 +451,8 @@
+ .id = 0,
+ .type = SND_SOC_DAI_I2S,
+ .probe = s3c24xx_i2s_probe,
++ .suspend = s3c24xx_i2s_suspend,
++ .resume = s3c24xx_i2s_resume,
+ .playback = {
+ .channels_min = 2,
+ .channels_max = 2,
Modified: branches/src/target/kernel/2.6.24.x/patches/series
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/series 2007-12-06 06:14:02 UTC (rev 3587)
+++ branches/src/target/kernel/2.6.24.x/patches/series 2007-12-06 06:32:14 UTC (rev 3588)
@@ -1,4 +1,6 @@
asoc-neo1973_wm8753-power.patch
+asoc-s3c24xx-iis-suspend_resume.patch
+asoc-core-suspend_resume.patch
missing_defs.patch
openmoko-logo.patch
yaffs2-20070905.patch
More information about the commitlog
mailing list