Subversion Repositories shark

Rev

Rev 1063 | 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
 */
18
 
1689 fabio 19
#include <arch/sys/cdefs.h>
80 pj 20
 
21
__BEGIN_DECLS
22
 
2 pj 23
/*      DSP Registers   */
24
#define RESET                   0x06
25
#define READDATA                0x0A
26
#define WRITEBUFFERSTATUS       0x0C
27
#define DATAAVAILABLE           0x0E
28
#define ACK8                    0x0E
29
#define ACK16                   0x0F
30
 
31
/*      DSP Commands    */
32
#define DSPCMD_DIRECTOUT        0x10
33
#define DSPCMD_DIRECTIN         0x20
34
#define DSPCMD_SETOUTRATE       0x41
35
#define DSPCMD_SETINRATE        0x42
36
#define DSPCMD_16BITIO          0xb0
37
#define DSPCMD_8BITIO           0xC0
38
        #define SBIO_FIFOON     0x02
39
        #define SBIO_AUTOINIT   0x04
40
        #define SBIO_OUT        0x00
41
        #define SBIO_IN         0x08
42
        #define IOMODE_UNSIGNED 0x00
43
        #define IOMODE_SIGNED   0x10
44
        #define IOMODE_MONO     0x00
45
        #define IOMODE_STEREO   0x20
46
#define DSPCMD_GETVER           0xE1
47
#define DSPCMD_SPKON            0xD1
48
#define DSPCMD_SPKOFF           0xD3
49
#define DSPCMD_EXIT8            0xDA
50
#define DSPCMD_EXIT16           0xD9
51
 
52
/*      Mixer I/O registers     */
53
#define MIXERREGISTER           0x04
54
#define MIXERDATA               0x05
55
 
56
/*      Mixer Registers         */
57
#define MIXER_RESET             0x00
58
#define MIXER_OUTCTR            0x3c
59
#define MIXER_INCTRLEFT         0x3d
60
#define MIXER_INCTRRIGHT        0x3e
61
#define MIXER_MICLEV            0x3a
62
#define MIXER_AGC               0x43
63
#define MIXER_IGCLEFT           0x3F
64
#define MIXER_IGCRIGHT          0x40
65
 
66
#define MIXER_IRQREG            0x80
67
#define MIXER_DMAREG            0x81
68
#define MIXER_INTSTATUS         0x82
69
 
70
WORD sb_probe (void);
71
BYTE sbdsp_read (WORD base);
72
void sbdsp_write (WORD base, BYTE c );
73
BYTE sbmixer_read(WORD base, BYTE index);
74
void sbmixer_write(WORD base, BYTE index, BYTE c);
75
BYTE sbdsp_reset(WORD base);
76
 
77
/* OKKIO!!!! vanno tolti da qui!!!! */
78
BYTE inpb(WORD addr);
79
void outpb(WORD addr, BYTE val);
80
 
80 pj 81
__END_DECLS
82