diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-31 18:16:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-31 18:16:28 -0500 |
commit | e1a9c9872dd004617555dff079b357a6ffd945e9 (patch) | |
tree | c34779e59712ff345f8e4ee97e74086a85b34974 /sound/soc/s3c24xx/s3c24xx-pcm.c | |
parent | fcc3ff4f9d695a80dc6e6058e0d631a3026ed4c3 (diff) | |
parent | 2ecba4ffbbc6c85fce8c3878514be415edace413 (diff) |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa: (299 commits)
[ALSA] version 1.0.16rc2
[ALSA] hda: fix Mic in as output
[ALSA] emu10k1 - Another EMU0404 Board ID
[ALSA] emu10k1 - Fix kthread handling at resume
[ALSA] emu10k1: General cleanup, add new locks, fix alsa bug#3501, kernel bug#9304.
[ALSA] emu10k1 - Use enum for emu_model types
[ALSA] emu10k1 - Don't create emu1010 controls for non-emu boards
[ALSA] emu10k1 - 1616(M) cardbus improvements
[ALSA] snd:emu10k1: E-Mu updates. Fixes to firmware loading and support for 0404.
[ALSA] emu10k1: Add comments regarding E-Mu ins and outs.
[ALSA] oxygen: revert SPI clock frequency change for AK4396/WM8785
[ALSA] es1938 - improve capture hw pointer reads
[ALSA] HDA-Intel - Add support for Intel SCH
[ALSA] hda: Add GPIO mute support to STAC9205
[ALSA] hda-codec - Add Dell T3400 support
[ALSA] hda-codec - Add model for HP DV9553EG laptop
[ALSA] hda-codec - Control SPDIF as slave
[ALSA] hda_intel: ALSA HD Audio patch for Intel ICH10 DeviceID's
[ALSA] Fix Oops with PCM OSS sync
[ALSA] hda-codec - Add speaker automute to ALC262 HP models
...
Diffstat (limited to 'sound/soc/s3c24xx/s3c24xx-pcm.c')
-rw-r--r-- | sound/soc/s3c24xx/s3c24xx-pcm.c | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c index 4107a87d4de3..29a6c82f873a 100644 --- a/sound/soc/s3c24xx/s3c24xx-pcm.c +++ b/sound/soc/s3c24xx/s3c24xx-pcm.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | 26 | ||
27 | #include <sound/driver.h> | ||
28 | #include <sound/core.h> | 27 | #include <sound/core.h> |
29 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
30 | #include <sound/pcm_params.h> | 29 | #include <sound/pcm_params.h> |
@@ -49,7 +48,9 @@ static const struct snd_pcm_hardware s3c24xx_pcm_hardware = { | |||
49 | .info = SNDRV_PCM_INFO_INTERLEAVED | | 48 | .info = SNDRV_PCM_INFO_INTERLEAVED | |
50 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 49 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
51 | SNDRV_PCM_INFO_MMAP | | 50 | SNDRV_PCM_INFO_MMAP | |
52 | SNDRV_PCM_INFO_MMAP_VALID, | 51 | SNDRV_PCM_INFO_MMAP_VALID | |
52 | SNDRV_PCM_INFO_PAUSE | | ||
53 | SNDRV_PCM_INFO_RESUME, | ||
53 | .formats = SNDRV_PCM_FMTBIT_S16_LE | | 54 | .formats = SNDRV_PCM_FMTBIT_S16_LE | |
54 | SNDRV_PCM_FMTBIT_U16_LE | | 55 | SNDRV_PCM_FMTBIT_U16_LE | |
55 | SNDRV_PCM_FMTBIT_U8 | | 56 | SNDRV_PCM_FMTBIT_U8 | |
@@ -176,28 +177,6 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
176 | } | 177 | } |
177 | } | 178 | } |
178 | 179 | ||
179 | /* channel needs configuring for mem=>device, increment memory addr, | ||
180 | * sync to pclk, half-word transfers to the IIS-FIFO. */ | ||
181 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
182 | s3c2410_dma_devconfig(prtd->params->channel, | ||
183 | S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC | | ||
184 | S3C2410_DISRCC_APB, prtd->params->dma_addr); | ||
185 | |||
186 | s3c2410_dma_config(prtd->params->channel, | ||
187 | prtd->params->dma_size, | ||
188 | S3C2410_DCON_SYNC_PCLK | | ||
189 | S3C2410_DCON_HANDSHAKE); | ||
190 | } else { | ||
191 | s3c2410_dma_config(prtd->params->channel, | ||
192 | prtd->params->dma_size, | ||
193 | S3C2410_DCON_HANDSHAKE | | ||
194 | S3C2410_DCON_SYNC_PCLK); | ||
195 | |||
196 | s3c2410_dma_devconfig(prtd->params->channel, | ||
197 | S3C2410_DMASRC_HW, 0x3, | ||
198 | prtd->params->dma_addr); | ||
199 | } | ||
200 | |||
201 | s3c2410_dma_set_buffdone_fn(prtd->params->channel, | 180 | s3c2410_dma_set_buffdone_fn(prtd->params->channel, |
202 | s3c24xx_audio_buffdone); | 181 | s3c24xx_audio_buffdone); |
203 | 182 | ||
@@ -246,6 +225,28 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream) | |||
246 | if (!prtd->params) | 225 | if (!prtd->params) |
247 | return 0; | 226 | return 0; |
248 | 227 | ||
228 | /* channel needs configuring for mem=>device, increment memory addr, | ||
229 | * sync to pclk, half-word transfers to the IIS-FIFO. */ | ||
230 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
231 | s3c2410_dma_devconfig(prtd->params->channel, | ||
232 | S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC | | ||
233 | S3C2410_DISRCC_APB, prtd->params->dma_addr); | ||
234 | |||
235 | s3c2410_dma_config(prtd->params->channel, | ||
236 | prtd->params->dma_size, | ||
237 | S3C2410_DCON_SYNC_PCLK | | ||
238 | S3C2410_DCON_HANDSHAKE); | ||
239 | } else { | ||
240 | s3c2410_dma_config(prtd->params->channel, | ||
241 | prtd->params->dma_size, | ||
242 | S3C2410_DCON_HANDSHAKE | | ||
243 | S3C2410_DCON_SYNC_PCLK); | ||
244 | |||
245 | s3c2410_dma_devconfig(prtd->params->channel, | ||
246 | S3C2410_DMASRC_HW, 0x3, | ||
247 | prtd->params->dma_addr); | ||
248 | } | ||
249 | |||
249 | /* flush the DMA channel */ | 250 | /* flush the DMA channel */ |
250 | s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH); | 251 | s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH); |
251 | prtd->dma_loaded = 0; | 252 | prtd->dma_loaded = 0; |