aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/at91/at91-pcm.h
diff options
context:
space:
mode:
authorFrank Mandarino <fmandarino@endrelia.com>2006-11-24 09:49:39 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:01:56 -0500
commit9f0ac6e1a8677ac509821f4ff0c77d39b1d63125 (patch)
treef3e48e71bc77dbe85c5d582b06bb780842226771 /sound/soc/at91/at91-pcm.h
parenta9e996604f77be6f1f4deb0eb1cc2652000054f1 (diff)
[ALSA] Update AT91 ASoC driver for 2.6.19 kernel.
Changes were required to support latest AT91 header files. Also updated to remove AT91RM9200-specific code in the ASoC platform drivers to support the AT91SAM9260 and AT91SAM9261 chips, but no testing was performed on these chips. Signed-off-by: Frank Mandarino <fmandarino@endrelia.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/at91/at91-pcm.h')
-rw-r--r--sound/soc/at91/at91-pcm.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/sound/soc/at91/at91-pcm.h b/sound/soc/at91/at91-pcm.h
new file mode 100644
index 000000000000..6c3b095725c8
--- /dev/null
+++ b/sound/soc/at91/at91-pcm.h
@@ -0,0 +1,71 @@
1/*
2 * at91-pcm.h - ALSA PCM interface for the Atmel AT91 SoC
3 *
4 * Author: Frank Mandarino <fmandarino@endrelia.com>
5 * Endrelia Technologies Inc.
6 * Created: Mar 3, 2006
7 *
8 * Based on pxa2xx-pcm.h by:
9 *
10 * Author: Nicolas Pitre
11 * Created: Nov 30, 2004
12 * Copyright: MontaVista Software, Inc.
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#include <asm/arch/hardware.h>
20
21struct at91_ssc_periph {
22 void __iomem *base;
23 u32 pid;
24};
25
26
27/*
28 * Registers and status bits that are required by the PCM driver.
29 */
30struct at91_pdc_regs {
31 unsigned int xpr; /* PDC recv/trans pointer */
32 unsigned int xcr; /* PDC recv/trans counter */
33 unsigned int xnpr; /* PDC next recv/trans pointer */
34 unsigned int xncr; /* PDC next recv/trans counter */
35 unsigned int ptcr; /* PDC transfer control */
36};
37
38struct at91_ssc_mask {
39 u32 ssc_enable; /* SSC recv/trans enable */
40 u32 ssc_disable; /* SSC recv/trans disable */
41 u32 ssc_endx; /* SSC ENDTX or ENDRX */
42 u32 ssc_endbuf; /* SSC TXBUFE or RXBUFF */
43 u32 pdc_enable; /* PDC recv/trans enable */
44 u32 pdc_disable; /* PDC recv/trans disable */
45};
46
47
48/*
49 * This structure, shared between the PCM driver and the interface,
50 * contains all information required by the PCM driver to perform the
51 * PDC DMA operation. All fields except dma_intr_handler() are initialized
52 * by the interface. The dms_intr_handler() pointer is set by the PCM
53 * driver and called by the interface SSC interrupt handler if it is
54 * non-NULL.
55 */
56struct at91_pcm_dma_params {
57 char *name; /* stream identifier */
58 int pdc_xfer_size; /* PDC counter increment in bytes */
59 void __iomem *ssc_base; /* SSC base address */
60 struct at91_pdc_regs *pdc; /* PDC receive or transmit registers */
61 struct at91_ssc_mask *mask;/* SSC & PDC status bits */
62 struct snd_pcm_substream *substream;
63 void (*dma_intr_handler)(u32, struct snd_pcm_substream *);
64};
65
66extern struct snd_soc_cpu_dai at91_i2s_dai[3];
67extern struct snd_soc_platform at91_soc_platform;
68
69
70#define at91_ssc_read(a) ((unsigned long) __raw_readl(a))
71#define at91_ssc_write(a,v) __raw_writel((v),(a))