diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2008-09-09 21:01:20 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-09-23 02:18:10 -0400 |
commit | a6d77317678148c973bb0131cc5a3a772f756d23 (patch) | |
tree | 09cf4c825ce49eccef121d4ad133cfec20246248 /include/sound | |
parent | 9d1cf39be6709761be3ce0a00e5c9ee5dc805ac5 (diff) |
ALSA: Separate common pxa2xx-pcm code
ASoC and non-ASoC drivers for PCM DMA on PXA share lots of common code.
Move it to pxa2xx-lib.
[Fixed some checkpatch warnings -- broonie]
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/pxa2xx-lib.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/sound/pxa2xx-lib.h b/include/sound/pxa2xx-lib.h index d18dd2d35978..2fd3d251d9a5 100644 --- a/include/sound/pxa2xx-lib.h +++ b/include/sound/pxa2xx-lib.h | |||
@@ -4,6 +4,31 @@ | |||
4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
5 | #include <sound/ac97_codec.h> | 5 | #include <sound/ac97_codec.h> |
6 | 6 | ||
7 | /* PCM */ | ||
8 | |||
9 | struct pxa2xx_pcm_dma_params { | ||
10 | char *name; /* stream identifier */ | ||
11 | u32 dcmd; /* DMA descriptor dcmd field */ | ||
12 | volatile u32 *drcmr; /* the DMA request channel to use */ | ||
13 | u32 dev_addr; /* device physical address for DMA */ | ||
14 | }; | ||
15 | |||
16 | extern int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | ||
17 | struct snd_pcm_hw_params *params); | ||
18 | extern int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream); | ||
19 | extern int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd); | ||
20 | extern snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream); | ||
21 | extern int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream); | ||
22 | extern void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id); | ||
23 | extern int __pxa2xx_pcm_open(struct snd_pcm_substream *substream); | ||
24 | extern int __pxa2xx_pcm_close(struct snd_pcm_substream *substream); | ||
25 | extern int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream, | ||
26 | struct vm_area_struct *vma); | ||
27 | extern int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream); | ||
28 | extern void pxa2xx_pcm_free_dma_buffers(struct snd_pcm *pcm); | ||
29 | |||
30 | /* AC97 */ | ||
31 | |||
7 | extern unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg); | 32 | extern unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg); |
8 | extern void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val); | 33 | extern void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val); |
9 | 34 | ||