aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pxa2xx-lib.h
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2008-09-09 21:01:20 -0400
committerJaroslav Kysela <perex@perex.cz>2008-09-23 02:18:10 -0400
commita6d77317678148c973bb0131cc5a3a772f756d23 (patch)
tree09cf4c825ce49eccef121d4ad133cfec20246248 /include/sound/pxa2xx-lib.h
parent9d1cf39be6709761be3ce0a00e5c9ee5dc805ac5 (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/pxa2xx-lib.h')
-rw-r--r--include/sound/pxa2xx-lib.h25
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
9struct 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
16extern int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
17 struct snd_pcm_hw_params *params);
18extern int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream);
19extern int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
20extern snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream);
21extern int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream);
22extern void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id);
23extern int __pxa2xx_pcm_open(struct snd_pcm_substream *substream);
24extern int __pxa2xx_pcm_close(struct snd_pcm_substream *substream);
25extern int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream,
26 struct vm_area_struct *vma);
27extern int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream);
28extern void pxa2xx_pcm_free_dma_buffers(struct snd_pcm *pcm);
29
30/* AC97 */
31
7extern unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg); 32extern unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
8extern void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val); 33extern void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val);
9 34