r3908 - branches/src/target/kernel/2.6.24.x/patches

werner at sita.openmoko.org werner at sita.openmoko.org
Mon Jan 21 22:49:09 CET 2008


Author: werner
Date: 2008-01-21 22:49:04 +0100 (Mon, 21 Jan 2008)
New Revision: 3908

Added:
   branches/src/target/kernel/2.6.24.x/patches/s3c24xx-pcm-suspend.patch
Modified:
   branches/src/target/kernel/2.6.24.x/patches/series
Log:
"Lost OE" patch s3c24xx-pcm-suspend.patch (by Graeme Gregory)

This one changes the DMA initialization in s3c24xx-pcm.c kernel.org driver.

s3c24xx-pcm-suspend.patch:
- sound/soc/s3c24xx/s3c24xx-pcm.c (s3c24xx_pcm_hardware): added
  SNDRV_PCM_INFO_PAUSE and SNDRV_PCM_INFO_RESUME
- sound/soc/s3c24xx/s3c24xx-pcm.c (s3c24xx_pcm_hw_params): move DMA setup to
  s3c24xx_pcm_prepare



Added: branches/src/target/kernel/2.6.24.x/patches/s3c24xx-pcm-suspend.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/s3c24xx-pcm-suspend.patch	2008-01-21 21:37:46 UTC (rev 3907)
+++ branches/src/target/kernel/2.6.24.x/patches/s3c24xx-pcm-suspend.patch	2008-01-21 21:49:04 UTC (rev 3908)
@@ -0,0 +1,73 @@
+Index: linux-2.6.24-rc7/sound/soc/s3c24xx/s3c24xx-pcm.c
+===================================================================
+--- linux-2.6.24-rc7.orig/sound/soc/s3c24xx/s3c24xx-pcm.c
++++ linux-2.6.24-rc7/sound/soc/s3c24xx/s3c24xx-pcm.c
+@@ -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;

Modified: branches/src/target/kernel/2.6.24.x/patches/series
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/series	2008-01-21 21:37:46 UTC (rev 3907)
+++ branches/src/target/kernel/2.6.24.x/patches/series	2008-01-21 21:49:04 UTC (rev 3908)
@@ -73,6 +73,7 @@
 # OE patches
 fix-EVIOCGRAB-semantics.patch
 iis-suspend.patch
+s3c24xx-pcm-suspend.patch
 
 # Atheros WLAN driver
 pnp_fixes.patch





More information about the commitlog mailing list