[ar71xx] ag71xx driver: forgot to add a new file
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1060-s3c24xx-pcm-suspend.patch.patch
1 From 1179eb1bf9d827aaa2b4b6adc4ba135bf9074bcc Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Sun, 13 Apr 2008 07:23:53 +0100
4 Subject: [PATCH] s3c24xx-pcm-suspend.patch
5
6 ---
7 sound/soc/s3c24xx/s3c24xx-pcm.c | 48 ++++++++++++++++++++------------------
8 1 files changed, 25 insertions(+), 23 deletions(-)
9
10 diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
11 index 4107a87..e9f3b60 100644
12 --- a/sound/soc/s3c24xx/s3c24xx-pcm.c
13 +++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
14 @@ -49,7 +49,9 @@ static const struct snd_pcm_hardware s3c24xx_pcm_hardware = {
15 .info = SNDRV_PCM_INFO_INTERLEAVED |
16 SNDRV_PCM_INFO_BLOCK_TRANSFER |
17 SNDRV_PCM_INFO_MMAP |
18 - SNDRV_PCM_INFO_MMAP_VALID,
19 + SNDRV_PCM_INFO_MMAP_VALID |
20 + SNDRV_PCM_INFO_PAUSE |
21 + SNDRV_PCM_INFO_RESUME,
22 .formats = SNDRV_PCM_FMTBIT_S16_LE |
23 SNDRV_PCM_FMTBIT_U16_LE |
24 SNDRV_PCM_FMTBIT_U8 |
25 @@ -176,28 +178,6 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
26 }
27 }
28
29 - /* channel needs configuring for mem=>device, increment memory addr,
30 - * sync to pclk, half-word transfers to the IIS-FIFO. */
31 - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
32 - s3c2410_dma_devconfig(prtd->params->channel,
33 - S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC |
34 - S3C2410_DISRCC_APB, prtd->params->dma_addr);
35 -
36 - s3c2410_dma_config(prtd->params->channel,
37 - prtd->params->dma_size,
38 - S3C2410_DCON_SYNC_PCLK |
39 - S3C2410_DCON_HANDSHAKE);
40 - } else {
41 - s3c2410_dma_config(prtd->params->channel,
42 - prtd->params->dma_size,
43 - S3C2410_DCON_HANDSHAKE |
44 - S3C2410_DCON_SYNC_PCLK);
45 -
46 - s3c2410_dma_devconfig(prtd->params->channel,
47 - S3C2410_DMASRC_HW, 0x3,
48 - prtd->params->dma_addr);
49 - }
50 -
51 s3c2410_dma_set_buffdone_fn(prtd->params->channel,
52 s3c24xx_audio_buffdone);
53
54 @@ -246,6 +226,28 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream)
55 if (!prtd->params)
56 return 0;
57
58 + /* channel needs configuring for mem=>device, increment memory addr,
59 + * sync to pclk, half-word transfers to the IIS-FIFO. */
60 + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
61 + s3c2410_dma_devconfig(prtd->params->channel,
62 + S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC |
63 + S3C2410_DISRCC_APB, prtd->params->dma_addr);
64 +
65 + s3c2410_dma_config(prtd->params->channel,
66 + prtd->params->dma_size,
67 + S3C2410_DCON_SYNC_PCLK |
68 + S3C2410_DCON_HANDSHAKE);
69 + } else {
70 + s3c2410_dma_config(prtd->params->channel,
71 + prtd->params->dma_size,
72 + S3C2410_DCON_HANDSHAKE |
73 + S3C2410_DCON_SYNC_PCLK);
74 +
75 + s3c2410_dma_devconfig(prtd->params->channel,
76 + S3C2410_DMASRC_HW, 0x3,
77 + prtd->params->dma_addr);
78 + }
79 +
80 /* flush the DMA channel */
81 s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
82 prtd->dma_loaded = 0;
83 --
84 1.5.6.5
85
This page took 0.044036 seconds and 5 git commands to generate.