1
2
3
4
5
6
7
8
9
10
11
12
13 #define AC97_RESET 0x00
14 #define AC97_MASTER 0x02
15 #define AC97_HEADPHONE 0x04
16 #define AC97_MASTER_MONO 0x06
17 #define AC97_MASTER_TONE 0x08
18 #define AC97_PC_BEEP 0x0a
19 #define AC97_PHONE 0x0c
20 #define AC97_MIC 0x0e
21 #define AC97_LINE 0x10
22 #define AC97_CD 0x12
23 #define AC97_VIDEO 0x14
24 #define AC97_AUX 0x16
25 #define AC97_PCM 0x18
26 #define AC97_REC_SEL 0x1a
27 #define AC97_REC_GAIN 0x1c
28 #define AC97_REC_GAIN_MIC 0x1e
29 #define AC97_GENERAL_PURPOSE 0x20
30 #define AC97_3D_CONTROL 0x22
31 #define AC97_INT_PAGING 0x24
32 #define AC97_POWERDOWN 0x26
33
34 #define AC97_EXTENDED_ID 0x28
35 #define AC97_EXTENDED_STATUS 0x2a
36 #define AC97_PCM_FRONT_DAC_RATE 0x2c
37 #define AC97_PCM_SURR_DAC_RATE 0x2e
38 #define AC97_PCM_LFE_DAC_RATE 0x30
39 #define AC97_PCM_LR_ADC_RATE 0x32
40 #define AC97_PCM_MIC_ADC_RATE 0x34
41 #define AC97_CENTER_LFE_MASTER 0x36
42 #define AC97_SURROUND_MASTER 0x38
43 #define AC97_SPDIF 0x3a
44
45 #define AC97_EXTENDED_MID 0x3c
46 #define AC97_EXTENDED_MSTATUS 0x3e
47 #define AC97_LINE1_RATE 0x40
48 #define AC97_LINE2_RATE 0x42
49 #define AC97_HANDSET_RATE 0x44
50 #define AC97_LINE1_LEVEL 0x46
51 #define AC97_LINE2_LEVEL 0x48
52 #define AC97_HANDSET_LEVEL 0x4a
53 #define AC97_GPIO_CFG 0x4c
54 #define AC97_GPIO_POLARITY 0x4e
55 #define AC97_GPIO_STICKY 0x50
56 #define AC97_GPIO_WAKEUP 0x52
57 #define AC97_GPIO_STATUS 0x54
58 #define AC97_MISC_AFE 0x56
59
60 #define AC97_VENDOR_ID1 0x7c
61 #define AC97_VENDOR_ID2 0x7e
62
63 #define AC97_CODEC_CLASS_REV 0x60
64 #define AC97_PCI_SVID 0x62
65 #define AC97_PCI_SID 0x64
66 #define AC97_FUNC_SELECT 0x66
67 #define AC97_FUNC_INFO 0x68
68 #define AC97_SENSE_INFO 0x6a
69
70
71 #define AC97_MUTE_MASK_MONO 0x8000
72 #define AC97_MUTE_MASK_STEREO 0x8080
73
74
75 #define AC97_SLOT_TAG 0
76 #define AC97_SLOT_CMD_ADDR 1
77 #define AC97_SLOT_CMD_DATA 2
78 #define AC97_SLOT_PCM_LEFT 3
79 #define AC97_SLOT_PCM_RIGHT 4
80 #define AC97_SLOT_MODEM_LINE1 5
81 #define AC97_SLOT_PCM_CENTER 6
82 #define AC97_SLOT_MIC 6
83 #define AC97_SLOT_SPDIF_LEFT1 6
84 #define AC97_SLOT_PCM_SLEFT 7
85 #define AC97_SLOT_PCM_LEFT_0 7
86 #define AC97_SLOT_SPDIF_LEFT 7
87 #define AC97_SLOT_PCM_SRIGHT 8
88 #define AC97_SLOT_PCM_RIGHT_0 8
89 #define AC97_SLOT_SPDIF_RIGHT 8
90 #define AC97_SLOT_LFE 9
91 #define AC97_SLOT_SPDIF_RIGHT1 9
92 #define AC97_SLOT_MODEM_LINE2 10
93 #define AC97_SLOT_PCM_LEFT_1 10
94 #define AC97_SLOT_SPDIF_LEFT2 10
95 #define AC97_SLOT_HANDSET 11
96 #define AC97_SLOT_PCM_RIGHT_1 11
97 #define AC97_SLOT_SPDIF_RIGHT2 11
98 #define AC97_SLOT_MODEM_GPIO 12
99 #define AC97_SLOT_PCM_CENTER_1 12
100
101
102 #define AC97_BC_DEDICATED_MIC 0x0001
103 #define AC97_BC_RESERVED1 0x0002
104 #define AC97_BC_BASS_TREBLE 0x0004
105 #define AC97_BC_SIM_STEREO 0x0008
106 #define AC97_BC_HEADPHONE 0x0010
107 #define AC97_BC_LOUDNESS 0x0020
108 #define AC97_BC_16BIT_DAC 0x0000
109 #define AC97_BC_18BIT_DAC 0x0040
110 #define AC97_BC_20BIT_DAC 0x0080
111 #define AC97_BC_DAC_MASK 0x00c0
112 #define AC97_BC_16BIT_ADC 0x0000
113 #define AC97_BC_18BIT_ADC 0x0100
114 #define AC97_BC_20BIT_ADC 0x0200
115 #define AC97_BC_ADC_MASK 0x0300
116 #define AC97_BC_3D_TECH_ID_MASK 0x7c00
117
118
119 #define AC97_GP_DRSS_MASK 0x0c00
120 #define AC97_GP_DRSS_1011 0x0000
121 #define AC97_GP_DRSS_78 0x0400
122
123
124 #define AC97_PD_ADC_STATUS 0x0001
125 #define AC97_PD_DAC_STATUS 0x0002
126 #define AC97_PD_MIXER_STATUS 0x0004
127 #define AC97_PD_VREF_STATUS 0x0008
128 #define AC97_PD_PR0 0x0100
129 #define AC97_PD_PR1 0x0200
130 #define AC97_PD_PR2 0x0400
131 #define AC97_PD_PR3 0x0800
132 #define AC97_PD_PR4 0x1000
133 #define AC97_PD_PR5 0x2000
134 #define AC97_PD_PR6 0x4000
135 #define AC97_PD_EAPD 0x8000
136
137
138 #define AC97_EI_VRA 0x0001
139 #define AC97_EI_DRA 0x0002
140 #define AC97_EI_SPDIF 0x0004
141 #define AC97_EI_VRM 0x0008
142 #define AC97_EI_DACS_SLOT_MASK 0x0030
143 #define AC97_EI_DACS_SLOT_SHIFT 4
144 #define AC97_EI_CDAC 0x0040
145 #define AC97_EI_SDAC 0x0080
146 #define AC97_EI_LDAC 0x0100
147 #define AC97_EI_AMAP 0x0200
148 #define AC97_EI_REV_MASK 0x0c00
149 #define AC97_EI_REV_22 0x0400
150 #define AC97_EI_REV_23 0x0800
151 #define AC97_EI_REV_SHIFT 10
152 #define AC97_EI_ADDR_MASK 0xc000
153 #define AC97_EI_ADDR_SHIFT 14
154
155
156 #define AC97_EA_VRA 0x0001
157 #define AC97_EA_DRA 0x0002
158 #define AC97_EA_SPDIF 0x0004
159 #define AC97_EA_VRM 0x0008
160 #define AC97_EA_SPSA_SLOT_MASK 0x0030
161 #define AC97_EA_SPSA_SLOT_SHIFT 4
162 #define AC97_EA_SPSA_3_4 0x0000
163 #define AC97_EA_SPSA_7_8 0x0010
164 #define AC97_EA_SPSA_6_9 0x0020
165 #define AC97_EA_SPSA_10_11 0x0030
166 #define AC97_EA_CDAC 0x0040
167 #define AC97_EA_SDAC 0x0080
168 #define AC97_EA_LDAC 0x0100
169 #define AC97_EA_MDAC 0x0200
170 #define AC97_EA_SPCV 0x0400
171 #define AC97_EA_PRI 0x0800
172 #define AC97_EA_PRJ 0x1000
173 #define AC97_EA_PRK 0x2000
174 #define AC97_EA_PRL 0x4000
175
176
177 #define AC97_SC_PRO 0x0001
178 #define AC97_SC_NAUDIO 0x0002
179 #define AC97_SC_COPY 0x0004
180 #define AC97_SC_PRE 0x0008
181 #define AC97_SC_CC_MASK 0x07f0
182 #define AC97_SC_CC_SHIFT 4
183 #define AC97_SC_L 0x0800
184 #define AC97_SC_SPSR_MASK 0x3000
185 #define AC97_SC_SPSR_SHIFT 12
186 #define AC97_SC_SPSR_44K 0x0000
187 #define AC97_SC_SPSR_48K 0x2000
188 #define AC97_SC_SPSR_32K 0x3000
189 #define AC97_SC_DRS 0x4000
190 #define AC97_SC_V 0x8000
191
192
193 #define AC97_PAGE_MASK 0x000f
194 #define AC97_PAGE_VENDOR 0
195 #define AC97_PAGE_1 1
196 #define AC97_INT_ENABLE 0x0800
197 #define AC97_INT_SENSE 0x1000
198 #define AC97_INT_CAUSE_SENSE 0x2000
199 #define AC97_INT_CAUSE_GPIO 0x4000
200 #define AC97_INT_STATUS 0x8000
201
202
203 #define AC97_MEI_LINE1 0x0001
204 #define AC97_MEI_LINE2 0x0002
205 #define AC97_MEI_HANDSET 0x0004
206 #define AC97_MEI_CID1 0x0008
207 #define AC97_MEI_CID2 0x0010
208 #define AC97_MEI_ADDR_MASK 0xc000
209 #define AC97_MEI_ADDR_SHIFT 14
210
211
212 #define AC97_MEA_GPIO 0x0001
213 #define AC97_MEA_MREF 0x0002
214 #define AC97_MEA_ADC1 0x0004
215 #define AC97_MEA_DAC1 0x0008
216 #define AC97_MEA_ADC2 0x0010
217 #define AC97_MEA_DAC2 0x0020
218 #define AC97_MEA_HADC 0x0040
219 #define AC97_MEA_HDAC 0x0080
220 #define AC97_MEA_PRA 0x0100
221 #define AC97_MEA_PRB 0x0200
222 #define AC97_MEA_PRC 0x0400
223 #define AC97_MEA_PRD 0x0800
224 #define AC97_MEA_PRE 0x1000
225 #define AC97_MEA_PRF 0x2000
226 #define AC97_MEA_PRG 0x4000
227 #define AC97_MEA_PRH 0x8000
228
229
230 #define AC97_GPIO_LINE1_OH 0x0001
231 #define AC97_GPIO_LINE1_RI 0x0002
232 #define AC97_GPIO_LINE1_CID 0x0004
233 #define AC97_GPIO_LINE1_LCS 0x0008
234 #define AC97_GPIO_LINE1_PULSE 0x0010
235 #define AC97_GPIO_LINE1_HL1R 0x0020
236 #define AC97_GPIO_LINE1_HOHD 0x0040
237 #define AC97_GPIO_LINE12_AC 0x0080
238 #define AC97_GPIO_LINE12_DC 0x0100
239 #define AC97_GPIO_LINE12_RS 0x0200
240 #define AC97_GPIO_LINE2_OH 0x0400
241 #define AC97_GPIO_LINE2_RI 0x0800
242 #define AC97_GPIO_LINE2_CID 0x1000
243 #define AC97_GPIO_LINE2_LCS 0x2000
244 #define AC97_GPIO_LINE2_PULSE 0x4000
245 #define AC97_GPIO_LINE2_HL1R 0x8000
246