fix compiler warning
[minix.git] / drivers / audio / AC97.h
blobbcb8945dee27d6f4e7742104b19fb97b79acd5a9
1 #ifndef AC97_MIXER_H
2 #define AC97_MIXER_H
4 /* This is a main memory cache copy of the codec's ac97 configuration
5 registers. See Intel's Audio Codec 97 standard (rev2.3) for info. */
7 typedef struct ac97_struct {
8 u16_t Reset; /* 0x00 */
9 u16_t MasterVolume; /* 0x02 */
10 u16_t AUXOutVolume; /* 0x04 */
11 u16_t MonoVolume; /* 0x06 */
12 u16_t MasterTone; /* 0x08 */
13 u16_t PCBeepVolume; /* 0x0A */
14 u16_t PhoneVolume; /* 0x0C */
15 u16_t MicVolume; /* 0x0E */
16 u16_t LineInVolume; /* 0x10 */
17 u16_t CDVolume; /* 0x12 */
18 u16_t VideoVolume; /* 0x14 */
19 u16_t AUXInVolume; /* 0x16 */
20 u16_t PCMOutVolume; /* 0x18 */
21 u16_t RecordSelect; /* 0x1A */
22 u16_t RecordGain; /* 0x1C */
23 u16_t RecordGainMic; /* 0x1E */
24 u16_t GeneralPurpose; /* 0x20 */
25 u16_t Control3D; /* 0x22 */
26 u16_t AudioIntAndPaging; /* 0x24 */
27 u16_t PowerdownControlAndStat; /* 0x26 */
28 u16_t ExtendedAudio1; /* 0x28 */
29 u16_t ExtendedAudio2; /* 0x2A */
30 /* ... */
31 u16_t VendorID1; /* 0x7C */
32 u16_t VendorID2; /* 0x7E */
33 } ac97_t;
37 /* Source and output volume control register defines */
38 #define AC97_MASTER_VOLUME 0x02U /* Master out */
39 #define AC97_AUX_OUT_VOLUME 0x04U /* Auxiliary out volume */
40 #define AC97_MONO_VOLUME 0x06U /* Mono out volume */
41 #define AC97_MASTER_TONE 0x08U /* high byte= bass, low byte= treble*/
42 #define AC97_PC_BEEP_VOLUME 0x0aU /* PC speaker volume */
43 #define AC97_PHONE_VOLUME 0x0cU /* Phone volume */
44 #define AC97_MIC_VOLUME 0x0eU /* Mic, mono */
45 #define AC97_LINE_IN_VOLUME 0x10U /* Line volume */
46 #define AC97_CD_VOLUME 0x12U /* CD audio volume */
47 #define AC97_VIDEO_VOLUME 0x14U /* Video (TV) volume */
48 #define AC97_AUX_IN_VOLUME 0x16U /* Aux line source, left */
49 #define AC97_PCM_OUT_VOLUME 0x18U /* The DACs - wav+synth */
50 #define AC97_RECORD_GAIN_VOLUME 0x1cU /* Record input level */
52 /* Other CODEC control register defines */
53 #define AC97_RESET 0x00U /* any write here to reset CODEC */
54 #define AC97_GENERAL_PURPOSE 0x20U /* */
55 #define AC97_POWERDOWN_CONTROL_STAT 0x26U /* */
56 #define AC97_RECORD_SELECT 0x1aU /* record mux select */
57 #define AC97_VENDOR_ID1 0x7cU /* 1st two Vendor ID bytes */
58 #define AC97_VENDOR_ID2 0x7eU /* last Vendor ID byte plus rev. number */
60 /* Record Select defines */
61 #define AC97_RECORD_MIC 0
62 #define AC97_RECORD_CD 1
63 #define AC97_RECORD_VIDEO 2
64 #define AC97_RECORD_AUX 3
65 #define AC97_RECORD_LINE 4
66 #define AC97_RECORD_STEREO_MIX 5
67 #define AC97_RECORD_MONO_MIX 6
68 #define AC97_RECORD_PHONE 7
70 #define MASTER_VOL_MASK 0x1F
71 #define DAC_VOL_MASK 0x1F
72 #define AUX_IN_VOL_MASK 0x1F
73 #define MUTE_MASK 0x8000
74 #endif /* AC97_MIXER_H */