Rev 1618 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1063 | tullio | 1 | |
2 | /* |
||
3 | * This program is free software; you can redistribute it and/or modify |
||
4 | * it under the terms of the GNU General Public License as published by |
||
5 | * the Free Software Foundation; either version 2 of the License, or |
||
6 | * (at your option) any later version. |
||
7 | * |
||
8 | * This program is distributed in the hope that it will be useful, |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
11 | * GNU General Public License for more details. |
||
12 | * |
||
13 | * You should have received a copy of the GNU General Public License |
||
14 | * along with this program; if not, write to the Free Software |
||
15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
16 | * |
||
17 | */ |
||
2 | pj | 18 | #include "semaphore.h" |
1621 | fabio | 19 | #include <arch/sys/cdefs.h> |
2 | pj | 20 | |
80 | pj | 21 | __BEGIN_DECLS |
2 | pj | 22 | |
80 | pj | 23 | |
2 | pj | 24 | typedef struct sb_device { |
25 | DWORD BaseAddress; |
||
26 | BYTE IntLine; |
||
27 | BYTE DMA8Channel; |
||
28 | BYTE DMA16Channel; |
||
29 | BYTE DSPVersionM; |
||
30 | BYTE DSPVersionm; |
||
31 | // WORD period; |
||
32 | // BYTE pwarning; |
||
33 | TASK_MODEL *m; |
||
34 | } SB_DEVICE; |
||
35 | |||
36 | typedef struct sound_buffer { |
||
37 | sem_t synchr; |
||
38 | BYTE synch; |
||
39 | struct dma_buff *sound_dma; |
||
40 | int (*fun)(struct dma_buff *buff); |
||
41 | } SOUND_BUFFER; |
||
42 | |||
43 | typedef struct rawfuncs { |
||
44 | int (*infun)(void *rawbuffer); |
||
45 | BYTE infunpresent; |
||
46 | int (*outfun)(void *rawbuffer); |
||
47 | BYTE outfunpresent; |
||
48 | } RAWFUNCS; |
||
49 | |||
50 | void sb_spkoff (void); |
||
51 | void sb_spkon (void); |
||
52 | int sb_init (void); // return 0 if ok or ENODEV otherwise |
||
53 | void sbmixer_setmiclev(BYTE level); |
||
54 | void sbmixer_setoutput(BYTE in, BYTE onoff); |
||
55 | void sbmixer_setinput(BYTE in, BYTE onoff); |
||
56 | void sbmixer_reset(void); |
||
57 | void sbmixer_setingainlev(BYTE level); |
||
58 | void sbmixer_setAGC(BYTE onoff); |
||
59 | void sb_setrate (int sps, BYTE i_o); |
||
60 | void sb_dmaop(BYTE i_o); |
||
61 | void sb_dma16op(BYTE i_o); |
||
62 | void sb_dmabuffop(BYTE i_o); |
||
63 | void sb_dma16buffop(BYTE i_o); |
||
64 | void sb_stopdsp(BYTE b); |
||
65 | void sb_show(void); |
||
80 | pj | 66 | |
67 | __END_DECLS |