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