summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch')
-rw-r--r--meta/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch b/meta/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch
new file mode 100644
index 0000000000..fffc685a4e
--- /dev/null
+++ b/meta/packages/linux/linux-openmoko/s3c24xx-pcm-suspend.patch
@@ -0,0 +1,73 @@
1Index: linux-2.6.22/sound/soc/s3c24xx/s3c24xx-pcm.c
2===================================================================
3--- linux-2.6.22.orig/sound/soc/s3c24xx/s3c24xx-pcm.c 2007-11-09 16:28:43.000000000 +0000
4+++ linux-2.6.22/sound/soc/s3c24xx/s3c24xx-pcm.c 2007-11-09 16:33:05.000000000 +0000
5@@ -49,7 +49,9 @@
6 .info = SNDRV_PCM_INFO_INTERLEAVED |
7 SNDRV_PCM_INFO_BLOCK_TRANSFER |
8 SNDRV_PCM_INFO_MMAP |
9- SNDRV_PCM_INFO_MMAP_VALID,
10+ SNDRV_PCM_INFO_MMAP_VALID |
11+ SNDRV_PCM_INFO_PAUSE |
12+ SNDRV_PCM_INFO_RESUME,
13 .formats = SNDRV_PCM_FMTBIT_S16_LE |
14 SNDRV_PCM_FMTBIT_U16_LE |
15 SNDRV_PCM_FMTBIT_U8 |
16@@ -176,28 +178,6 @@
17 }
18 }
19
20- /* channel needs configuring for mem=>device, increment memory addr,
21- * sync to pclk, half-word transfers to the IIS-FIFO. */
22- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
23- s3c2410_dma_devconfig(prtd->params->channel,
24- S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC |
25- S3C2410_DISRCC_APB, prtd->params->dma_addr);
26-
27- s3c2410_dma_config(prtd->params->channel,
28- prtd->params->dma_size,
29- S3C2410_DCON_SYNC_PCLK |
30- S3C2410_DCON_HANDSHAKE);
31- } else {
32- s3c2410_dma_config(prtd->params->channel,
33- prtd->params->dma_size,
34- S3C2410_DCON_HANDSHAKE |
35- S3C2410_DCON_SYNC_PCLK);
36-
37- s3c2410_dma_devconfig(prtd->params->channel,
38- S3C2410_DMASRC_HW, 0x3,
39- prtd->params->dma_addr);
40- }
41-
42 s3c2410_dma_set_buffdone_fn(prtd->params->channel,
43 s3c24xx_audio_buffdone);
44
45@@ -246,6 +226,28 @@
46 if (!prtd->params)
47 return 0;
48
49+ /* channel needs configuring for mem=>device, increment memory addr,
50+ * sync to pclk, half-word transfers to the IIS-FIFO. */
51+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
52+ s3c2410_dma_devconfig(prtd->params->channel,
53+ S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC |
54+ S3C2410_DISRCC_APB, prtd->params->dma_addr);
55+
56+ s3c2410_dma_config(prtd->params->channel,
57+ prtd->params->dma_size,
58+ S3C2410_DCON_SYNC_PCLK |
59+ S3C2410_DCON_HANDSHAKE);
60+ } else {
61+ s3c2410_dma_config(prtd->params->channel,
62+ prtd->params->dma_size,
63+ S3C2410_DCON_HANDSHAKE |
64+ S3C2410_DCON_SYNC_PCLK);
65+
66+ s3c2410_dma_devconfig(prtd->params->channel,
67+ S3C2410_DMASRC_HW, 0x3,
68+ prtd->params->dma_addr);
69+ }
70+
71 /* flush the DMA channel */
72 s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
73 prtd->dma_loaded = 0;