summaryrefslogtreecommitdiff
path: root/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2007-11-10 15:55:53 +0000
committerGraeme Gregory <dp@xora.org.uk>2007-11-10 15:55:53 +0000
commitf46445137b031f605491b39cbb43a7716a11ab30 (patch)
tree42f44f560998d0c68b90c08b6b19477ebfc7c639 /packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch
parent601498dea4d09a88926c3f6200e7618b4f4fdfef (diff)
linux-openmoko_2.6.22.5.bb : update for kernel, gta02 sound support,
fixed suspend/resume while playing sound. fixed suspend/resume for vibrator. Moved SCRREV onwards.
Diffstat (limited to 'packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch')
-rw-r--r--packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch b/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch
new file mode 100644
index 0000000000..fffc685a4e
--- /dev/null
+++ b/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch
@@ -0,0 +1,73 @@
+Index: linux-2.6.22/sound/soc/s3c24xx/s3c24xx-pcm.c
+===================================================================
+--- linux-2.6.22.orig/sound/soc/s3c24xx/s3c24xx-pcm.c 2007-11-09 16:28:43.000000000 +0000
++++ linux-2.6.22/sound/soc/s3c24xx/s3c24xx-pcm.c 2007-11-09 16:33:05.000000000 +0000
+@@ -49,7 +49,9 @@
+ .info = SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_BLOCK_TRANSFER |
+ SNDRV_PCM_INFO_MMAP |
+- SNDRV_PCM_INFO_MMAP_VALID,
++ SNDRV_PCM_INFO_MMAP_VALID |
++ SNDRV_PCM_INFO_PAUSE |
++ SNDRV_PCM_INFO_RESUME,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE |
+ SNDRV_PCM_FMTBIT_U16_LE |
+ SNDRV_PCM_FMTBIT_U8 |
+@@ -176,28 +178,6 @@
+ }
+ }
+
+- /* channel needs configuring for mem=>device, increment memory addr,
+- * sync to pclk, half-word transfers to the IIS-FIFO. */
+- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+- s3c2410_dma_devconfig(prtd->params->channel,
+- S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC |
+- S3C2410_DISRCC_APB, prtd->params->dma_addr);
+-
+- s3c2410_dma_config(prtd->params->channel,
+- prtd->params->dma_size,
+- S3C2410_DCON_SYNC_PCLK |
+- S3C2410_DCON_HANDSHAKE);
+- } else {
+- s3c2410_dma_config(prtd->params->channel,
+- prtd->params->dma_size,
+- S3C2410_DCON_HANDSHAKE |
+- S3C2410_DCON_SYNC_PCLK);
+-
+- s3c2410_dma_devconfig(prtd->params->channel,
+- S3C2410_DMASRC_HW, 0x3,
+- prtd->params->dma_addr);
+- }
+-
+ s3c2410_dma_set_buffdone_fn(prtd->params->channel,
+ s3c24xx_audio_buffdone);
+
+@@ -246,6 +226,28 @@
+ if (!prtd->params)
+ return 0;
+
++ /* channel needs configuring for mem=>device, increment memory addr,
++ * sync to pclk, half-word transfers to the IIS-FIFO. */
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ s3c2410_dma_devconfig(prtd->params->channel,
++ S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC |
++ S3C2410_DISRCC_APB, prtd->params->dma_addr);
++
++ s3c2410_dma_config(prtd->params->channel,
++ prtd->params->dma_size,
++ S3C2410_DCON_SYNC_PCLK |
++ S3C2410_DCON_HANDSHAKE);
++ } else {
++ s3c2410_dma_config(prtd->params->channel,
++ prtd->params->dma_size,
++ S3C2410_DCON_HANDSHAKE |
++ S3C2410_DCON_SYNC_PCLK);
++
++ s3c2410_dma_devconfig(prtd->params->channel,
++ S3C2410_DMASRC_HW, 0x3,
++ prtd->params->dma_addr);
++ }
++
+ /* flush the DMA channel */
+ s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
+ prtd->dma_loaded = 0;