Annotation of sys/arch/arm/xscale/pxa2x0_i2s.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: pxa2x0_i2s.h,v 1.3 2006/04/04 11:45:40 pascoe Exp $ */
2:
3: /*
4: * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
5: *
6: * Permission to use, copy, modify, and distribute this software for any
7: * purpose with or without fee is hereby granted, provided that the above
8: * copyright notice and this permission notice appear in all copies.
9: *
10: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14: * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15: * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16: * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17: */
18:
19: #ifndef _PXA2X0_I2S_H_
20: #define _PXA2X0_I2S_H_
21:
22: #include <machine/bus.h>
23:
24: struct pxa2x0_i2s_dma;
25:
26: struct pxa2x0_i2s_softc {
27: bus_space_tag_t sc_iot;
28: bus_space_handle_t sc_ioh;
29: bus_size_t sc_size;
30: bus_dma_tag_t sc_dmat;
31:
32: int sc_open;
33: u_int32_t sc_sadiv;
34:
35: struct pxa2x0_i2s_dma *sc_dmas;
36: };
37:
38: void pxa2x0_i2s_init(struct pxa2x0_i2s_softc *sc);
39: int pxa2x0_i2s_attach_sub(struct pxa2x0_i2s_softc *);
40: int pxa2x0_i2s_detach_sub(struct pxa2x0_i2s_softc *);
41: void pxa2x0_i2s_open(struct pxa2x0_i2s_softc *);
42: void pxa2x0_i2s_close(struct pxa2x0_i2s_softc *);
43: void pxa2x0_i2s_write(struct pxa2x0_i2s_softc *, u_int32_t);
44:
45: void pxa2x0_i2s_setspeed(struct pxa2x0_i2s_softc *, u_long *);
46:
47: void * pxa2x0_i2s_allocm(void *, int, size_t, int, int);
48: void pxa2x0_i2s_freem(void *, void *, int);
49: paddr_t pxa2x0_i2s_mappage(void *, void *, off_t, int);
50: int pxa2x0_i2s_round_blocksize(void *, int);
51: size_t pxa2x0_i2s_round_buffersize(void *, int, size_t);
52:
53: int pxa2x0_i2s_start_output(struct pxa2x0_i2s_softc *, void *, int,
54: void (*)(void *), void *);
55: int pxa2x0_i2s_start_input(struct pxa2x0_i2s_softc *, void *, int,
56: void (*)(void *), void *);
57:
58: #endif
CVSweb