1
2
3
4
5
6
7
8
9
10 #ifndef _WM8991_H
11 #define _WM8991_H
12
13
14
15
16 #define WM8991_RESET 0x00
17 #define WM8991_POWER_MANAGEMENT_1 0x01
18 #define WM8991_POWER_MANAGEMENT_2 0x02
19 #define WM8991_POWER_MANAGEMENT_3 0x03
20 #define WM8991_AUDIO_INTERFACE_1 0x04
21 #define WM8991_AUDIO_INTERFACE_2 0x05
22 #define WM8991_CLOCKING_1 0x06
23 #define WM8991_CLOCKING_2 0x07
24 #define WM8991_AUDIO_INTERFACE_3 0x08
25 #define WM8991_AUDIO_INTERFACE_4 0x09
26 #define WM8991_DAC_CTRL 0x0A
27 #define WM8991_LEFT_DAC_DIGITAL_VOLUME 0x0B
28 #define WM8991_RIGHT_DAC_DIGITAL_VOLUME 0x0C
29 #define WM8991_DIGITAL_SIDE_TONE 0x0D
30 #define WM8991_ADC_CTRL 0x0E
31 #define WM8991_LEFT_ADC_DIGITAL_VOLUME 0x0F
32 #define WM8991_RIGHT_ADC_DIGITAL_VOLUME 0x10
33 #define WM8991_GPIO_CTRL_1 0x12
34 #define WM8991_GPIO1_GPIO2 0x13
35 #define WM8991_GPIO3_GPIO4 0x14
36 #define WM8991_GPIO5_GPIO6 0x15
37 #define WM8991_GPIOCTRL_2 0x16
38 #define WM8991_GPIO_POL 0x17
39 #define WM8991_LEFT_LINE_INPUT_1_2_VOLUME 0x18
40 #define WM8991_LEFT_LINE_INPUT_3_4_VOLUME 0x19
41 #define WM8991_RIGHT_LINE_INPUT_1_2_VOLUME 0x1A
42 #define WM8991_RIGHT_LINE_INPUT_3_4_VOLUME 0x1B
43 #define WM8991_LEFT_OUTPUT_VOLUME 0x1C
44 #define WM8991_RIGHT_OUTPUT_VOLUME 0x1D
45 #define WM8991_LINE_OUTPUTS_VOLUME 0x1E
46 #define WM8991_OUT3_4_VOLUME 0x1F
47 #define WM8991_LEFT_OPGA_VOLUME 0x20
48 #define WM8991_RIGHT_OPGA_VOLUME 0x21
49 #define WM8991_SPEAKER_VOLUME 0x22
50 #define WM8991_CLASSD1 0x23
51 #define WM8991_CLASSD3 0x25
52 #define WM8991_INPUT_MIXER1 0x27
53 #define WM8991_INPUT_MIXER2 0x28
54 #define WM8991_INPUT_MIXER3 0x29
55 #define WM8991_INPUT_MIXER4 0x2A
56 #define WM8991_INPUT_MIXER5 0x2B
57 #define WM8991_INPUT_MIXER6 0x2C
58 #define WM8991_OUTPUT_MIXER1 0x2D
59 #define WM8991_OUTPUT_MIXER2 0x2E
60 #define WM8991_OUTPUT_MIXER3 0x2F
61 #define WM8991_OUTPUT_MIXER4 0x30
62 #define WM8991_OUTPUT_MIXER5 0x31
63 #define WM8991_OUTPUT_MIXER6 0x32
64 #define WM8991_OUT3_4_MIXER 0x33
65 #define WM8991_LINE_MIXER1 0x34
66 #define WM8991_LINE_MIXER2 0x35
67 #define WM8991_SPEAKER_MIXER 0x36
68 #define WM8991_ADDITIONAL_CONTROL 0x37
69 #define WM8991_ANTIPOP1 0x38
70 #define WM8991_ANTIPOP2 0x39
71 #define WM8991_MICBIAS 0x3A
72 #define WM8991_PLL1 0x3C
73 #define WM8991_PLL2 0x3D
74 #define WM8991_PLL3 0x3E
75
76 #define WM8991_REGISTER_COUNT 60
77 #define WM8991_MAX_REGISTER 0x3F
78
79
80
81
82
83
84
85
86 #define WM8991_SW_RESET_CHIP_ID_MASK 0xFFFF
87
88
89
90
91 #define WM8991_SPK_ENA 0x1000
92 #define WM8991_SPK_ENA_BIT 12
93 #define WM8991_OUT3_ENA 0x0800
94 #define WM8991_OUT3_ENA_BIT 11
95 #define WM8991_OUT4_ENA 0x0400
96 #define WM8991_OUT4_ENA_BIT 10
97 #define WM8991_LOUT_ENA 0x0200
98 #define WM8991_LOUT_ENA_BIT 9
99 #define WM8991_ROUT_ENA 0x0100
100 #define WM8991_ROUT_ENA_BIT 8
101 #define WM8991_MICBIAS_ENA 0x0010
102 #define WM8991_MICBIAS_ENA_BIT 4
103 #define WM8991_VMID_MODE_MASK 0x0006
104 #define WM8991_VREF_ENA 0x0001
105 #define WM8991_VREF_ENA_BIT 0
106
107
108
109
110 #define WM8991_PLL_ENA 0x8000
111 #define WM8991_PLL_ENA_BIT 15
112 #define WM8991_TSHUT_ENA 0x4000
113 #define WM8991_TSHUT_ENA_BIT 14
114 #define WM8991_TSHUT_OPDIS 0x2000
115 #define WM8991_TSHUT_OPDIS_BIT 13
116 #define WM8991_OPCLK_ENA 0x0800
117 #define WM8991_OPCLK_ENA_BIT 11
118 #define WM8991_AINL_ENA 0x0200
119 #define WM8991_AINL_ENA_BIT 9
120 #define WM8991_AINR_ENA 0x0100
121 #define WM8991_AINR_ENA_BIT 8
122 #define WM8991_LIN34_ENA 0x0080
123 #define WM8991_LIN34_ENA_BIT 7
124 #define WM8991_LIN12_ENA 0x0040
125 #define WM8991_LIN12_ENA_BIT 6
126 #define WM8991_RIN34_ENA 0x0020
127 #define WM8991_RIN34_ENA_BIT 5
128 #define WM8991_RIN12_ENA 0x0010
129 #define WM8991_RIN12_ENA_BIT 4
130 #define WM8991_ADCL_ENA 0x0002
131 #define WM8991_ADCL_ENA_BIT 1
132 #define WM8991_ADCR_ENA 0x0001
133 #define WM8991_ADCR_ENA_BIT 0
134
135
136
137
138 #define WM8991_LON_ENA 0x2000
139 #define WM8991_LON_ENA_BIT 13
140 #define WM8991_LOP_ENA 0x1000
141 #define WM8991_LOP_ENA_BIT 12
142 #define WM8991_RON_ENA 0x0800
143 #define WM8991_RON_ENA_BIT 11
144 #define WM8991_ROP_ENA 0x0400
145 #define WM8991_ROP_ENA_BIT 10
146 #define WM8991_LOPGA_ENA 0x0080
147 #define WM8991_LOPGA_ENA_BIT 7
148 #define WM8991_ROPGA_ENA 0x0040
149 #define WM8991_ROPGA_ENA_BIT 6
150 #define WM8991_LOMIX_ENA 0x0020
151 #define WM8991_LOMIX_ENA_BIT 5
152 #define WM8991_ROMIX_ENA 0x0010
153 #define WM8991_ROMIX_ENA_BIT 4
154 #define WM8991_DACL_ENA 0x0002
155 #define WM8991_DACL_ENA_BIT 1
156 #define WM8991_DACR_ENA 0x0001
157 #define WM8991_DACR_ENA_BIT 0
158
159
160
161
162 #define WM8991_AIFADCL_SRC 0x8000
163 #define WM8991_AIFADCR_SRC 0x4000
164 #define WM8991_AIFADC_TDM 0x2000
165 #define WM8991_AIFADC_TDM_CHAN 0x1000
166 #define WM8991_AIF_BCLK_INV 0x0100
167 #define WM8991_AIF_LRCLK_INV 0x0080
168 #define WM8991_AIF_WL_MASK 0x0060
169 #define WM8991_AIF_WL_16BITS (0 << 5)
170 #define WM8991_AIF_WL_20BITS (1 << 5)
171 #define WM8991_AIF_WL_24BITS (2 << 5)
172 #define WM8991_AIF_WL_32BITS (3 << 5)
173 #define WM8991_AIF_FMT_MASK 0x0018
174 #define WM8991_AIF_TMF_RIGHTJ (0 << 3)
175 #define WM8991_AIF_TMF_LEFTJ (1 << 3)
176 #define WM8991_AIF_TMF_I2S (2 << 3)
177 #define WM8991_AIF_TMF_DSP (3 << 3)
178
179
180
181
182 #define WM8991_DACL_SRC 0x8000
183 #define WM8991_DACR_SRC 0x4000
184 #define WM8991_AIFDAC_TDM 0x2000
185 #define WM8991_AIFDAC_TDM_CHAN 0x1000
186 #define WM8991_DAC_BOOST_MASK 0x0C00
187 #define WM8991_DAC_COMP 0x0010
188 #define WM8991_DAC_COMPMODE 0x0008
189 #define WM8991_ADC_COMP 0x0004
190 #define WM8991_ADC_COMPMODE 0x0002
191 #define WM8991_LOOPBACK 0x0001
192
193
194
195
196 #define WM8991_TOCLK_RATE 0x8000
197 #define WM8991_TOCLK_ENA 0x4000
198 #define WM8991_OPCLKDIV_MASK 0x1E00
199 #define WM8991_DCLKDIV_MASK 0x01C0
200 #define WM8991_BCLK_DIV_MASK 0x001E
201 #define WM8991_BCLK_DIV_1 (0x0 << 1)
202 #define WM8991_BCLK_DIV_1_5 (0x1 << 1)
203 #define WM8991_BCLK_DIV_2 (0x2 << 1)
204 #define WM8991_BCLK_DIV_3 (0x3 << 1)
205 #define WM8991_BCLK_DIV_4 (0x4 << 1)
206 #define WM8991_BCLK_DIV_5_5 (0x5 << 1)
207 #define WM8991_BCLK_DIV_6 (0x6 << 1)
208 #define WM8991_BCLK_DIV_8 (0x7 << 1)
209 #define WM8991_BCLK_DIV_11 (0x8 << 1)
210 #define WM8991_BCLK_DIV_12 (0x9 << 1)
211 #define WM8991_BCLK_DIV_16 (0xA << 1)
212 #define WM8991_BCLK_DIV_22 (0xB << 1)
213 #define WM8991_BCLK_DIV_24 (0xC << 1)
214 #define WM8991_BCLK_DIV_32 (0xD << 1)
215 #define WM8991_BCLK_DIV_44 (0xE << 1)
216 #define WM8991_BCLK_DIV_48 (0xF << 1)
217
218
219
220
221 #define WM8991_MCLK_SRC 0x8000
222 #define WM8991_SYSCLK_SRC 0x4000
223 #define WM8991_CLK_FORCE 0x2000
224 #define WM8991_MCLK_DIV_MASK 0x1800
225 #define WM8991_MCLK_DIV_1 (0 << 11)
226 #define WM8991_MCLK_DIV_2 ( 2 << 11)
227 #define WM8991_MCLK_INV 0x0400
228 #define WM8991_ADC_CLKDIV_MASK 0x00E0
229 #define WM8991_ADC_CLKDIV_1 (0 << 5)
230 #define WM8991_ADC_CLKDIV_1_5 (1 << 5)
231 #define WM8991_ADC_CLKDIV_2 (2 << 5)
232 #define WM8991_ADC_CLKDIV_3 (3 << 5)
233 #define WM8991_ADC_CLKDIV_4 (4 << 5)
234 #define WM8991_ADC_CLKDIV_5_5 (5 << 5)
235 #define WM8991_ADC_CLKDIV_6 (6 << 5)
236 #define WM8991_DAC_CLKDIV_MASK 0x001C
237 #define WM8991_DAC_CLKDIV_1 (0 << 2)
238 #define WM8991_DAC_CLKDIV_1_5 (1 << 2)
239 #define WM8991_DAC_CLKDIV_2 (2 << 2)
240 #define WM8991_DAC_CLKDIV_3 (3 << 2)
241 #define WM8991_DAC_CLKDIV_4 (4 << 2)
242 #define WM8991_DAC_CLKDIV_5_5 (5 << 2)
243 #define WM8991_DAC_CLKDIV_6 (6 << 2)
244
245
246
247
248 #define WM8991_AIF_MSTR1 0x8000
249 #define WM8991_AIF_MSTR2 0x4000
250 #define WM8991_AIF_SEL 0x2000
251 #define WM8991_ADCLRC_DIR 0x0800
252 #define WM8991_ADCLRC_RATE_MASK 0x07FF
253
254
255
256
257 #define WM8991_ALRCGPIO1 0x8000
258 #define WM8991_ALRCBGPIO6 0x4000
259 #define WM8991_AIF_TRIS 0x2000
260 #define WM8991_DACLRC_DIR 0x0800
261 #define WM8991_DACLRC_RATE_MASK 0x07FF
262
263
264
265
266 #define WM8991_AIF_LRCLKRATE 0x0400
267 #define WM8991_DAC_MONO 0x0200
268 #define WM8991_DAC_SB_FILT 0x0100
269 #define WM8991_DAC_MUTERATE 0x0080
270 #define WM8991_DAC_MUTEMODE 0x0040
271 #define WM8991_DEEMP_MASK 0x0030
272 #define WM8991_DAC_MUTE 0x0004
273 #define WM8991_DACL_DATINV 0x0002
274 #define WM8991_DACR_DATINV 0x0001
275
276
277
278
279 #define WM8991_DAC_VU 0x0100
280 #define WM8991_DACL_VOL_MASK 0x00FF
281 #define WM8991_DACL_VOL_SHIFT 0
282
283
284
285 #define WM8991_DAC_VU 0x0100
286 #define WM8991_DACR_VOL_MASK 0x00FF
287 #define WM8991_DACR_VOL_SHIFT 0
288
289
290
291 #define WM8991_ADCL_DAC_SVOL_MASK 0x0F
292 #define WM8991_ADCL_DAC_SVOL_SHIFT 9
293 #define WM8991_ADCR_DAC_SVOL_MASK 0x0F
294 #define WM8991_ADCR_DAC_SVOL_SHIFT 5
295 #define WM8991_ADC_TO_DACL_MASK 0x03
296 #define WM8991_ADC_TO_DACL_SHIFT 2
297 #define WM8991_ADC_TO_DACR_MASK 0x03
298 #define WM8991_ADC_TO_DACR_SHIFT 0
299
300
301
302
303 #define WM8991_ADC_HPF_ENA 0x0100
304 #define WM8991_ADC_HPF_ENA_BIT 8
305 #define WM8991_ADC_HPF_CUT_MASK 0x03
306 #define WM8991_ADC_HPF_CUT_SHIFT 5
307 #define WM8991_ADCL_DATINV 0x0002
308 #define WM8991_ADCL_DATINV_BIT 1
309 #define WM8991_ADCR_DATINV 0x0001
310 #define WM8991_ADCR_DATINV_BIT 0
311
312
313
314
315 #define WM8991_ADC_VU 0x0100
316 #define WM8991_ADCL_VOL_MASK 0x00FF
317 #define WM8991_ADCL_VOL_SHIFT 0
318
319
320
321
322 #define WM8991_ADC_VU 0x0100
323 #define WM8991_ADCR_VOL_MASK 0x00FF
324 #define WM8991_ADCR_VOL_SHIFT 0
325
326
327
328
329 #define WM8991_IRQ 0x1000
330 #define WM8991_TEMPOK 0x0800
331 #define WM8991_MICSHRT 0x0400
332 #define WM8991_MICDET 0x0200
333 #define WM8991_PLL_LCK 0x0100
334 #define WM8991_GPI8_STATUS 0x0080
335 #define WM8991_GPI7_STATUS 0x0040
336 #define WM8991_GPIO6_STATUS 0x0020
337 #define WM8991_GPIO5_STATUS 0x0010
338 #define WM8991_GPIO4_STATUS 0x0008
339 #define WM8991_GPIO3_STATUS 0x0004
340 #define WM8991_GPIO2_STATUS 0x0002
341 #define WM8991_GPIO1_STATUS 0x0001
342
343
344
345
346 #define WM8991_GPIO2_DEB_ENA 0x8000
347 #define WM8991_GPIO2_IRQ_ENA 0x4000
348 #define WM8991_GPIO2_PU 0x2000
349 #define WM8991_GPIO2_PD 0x1000
350 #define WM8991_GPIO2_SEL_MASK 0x0F00
351 #define WM8991_GPIO1_DEB_ENA 0x0080
352 #define WM8991_GPIO1_IRQ_ENA 0x0040
353 #define WM8991_GPIO1_PU 0x0020
354 #define WM8991_GPIO1_PD 0x0010
355 #define WM8991_GPIO1_SEL_MASK 0x000F
356
357
358
359
360 #define WM8991_GPIO4_DEB_ENA 0x8000
361 #define WM8991_GPIO4_IRQ_ENA 0x4000
362 #define WM8991_GPIO4_PU 0x2000
363 #define WM8991_GPIO4_PD 0x1000
364 #define WM8991_GPIO4_SEL_MASK 0x0F00
365 #define WM8991_GPIO3_DEB_ENA 0x0080
366 #define WM8991_GPIO3_IRQ_ENA 0x0040
367 #define WM8991_GPIO3_PU 0x0020
368 #define WM8991_GPIO3_PD 0x0010
369 #define WM8991_GPIO3_SEL_MASK 0x000F
370
371
372
373
374 #define WM8991_GPIO6_DEB_ENA 0x8000
375 #define WM8991_GPIO6_IRQ_ENA 0x4000
376 #define WM8991_GPIO6_PU 0x2000
377 #define WM8991_GPIO6_PD 0x1000
378 #define WM8991_GPIO6_SEL_MASK 0x0F00
379 #define WM8991_GPIO5_DEB_ENA 0x0080
380 #define WM8991_GPIO5_IRQ_ENA 0x0040
381 #define WM8991_GPIO5_PU 0x0020
382 #define WM8991_GPIO5_PD 0x0010
383 #define WM8991_GPIO5_SEL_MASK 0x000F
384
385
386
387
388 #define WM8991_RD_3W_ENA 0x8000
389 #define WM8991_MODE_3W4W 0x4000
390 #define WM8991_TEMPOK_IRQ_ENA 0x0800
391 #define WM8991_MICSHRT_IRQ_ENA 0x0400
392 #define WM8991_MICDET_IRQ_ENA 0x0200
393 #define WM8991_PLL_LCK_IRQ_ENA 0x0100
394 #define WM8991_GPI8_DEB_ENA 0x0080
395 #define WM8991_GPI8_IRQ_ENA 0x0040
396 #define WM8991_GPI8_ENA 0x0010
397 #define WM8991_GPI7_DEB_ENA 0x0008
398 #define WM8991_GPI7_IRQ_ENA 0x0004
399 #define WM8991_GPI7_ENA 0x0001
400
401
402
403
404 #define WM8991_IRQ_INV 0x1000
405 #define WM8991_TEMPOK_POL 0x0800
406 #define WM8991_MICSHRT_POL 0x0400
407 #define WM8991_MICDET_POL 0x0200
408 #define WM8991_PLL_LCK_POL 0x0100
409 #define WM8991_GPI8_POL 0x0080
410 #define WM8991_GPI7_POL 0x0040
411 #define WM8991_GPIO6_POL 0x0020
412 #define WM8991_GPIO5_POL 0x0010
413 #define WM8991_GPIO4_POL 0x0008
414 #define WM8991_GPIO3_POL 0x0004
415 #define WM8991_GPIO2_POL 0x0002
416 #define WM8991_GPIO1_POL 0x0001
417
418
419
420
421 #define WM8991_IPVU 0x0100
422 #define WM8991_LI12MUTE 0x0080
423 #define WM8991_LI12MUTE_BIT 7
424 #define WM8991_LI12ZC 0x0040
425 #define WM8991_LI12ZC_BIT 6
426 #define WM8991_LIN12VOL_MASK 0x001F
427 #define WM8991_LIN12VOL_SHIFT 0
428
429
430
431 #define WM8991_IPVU 0x0100
432 #define WM8991_LI34MUTE 0x0080
433 #define WM8991_LI34MUTE_BIT 7
434 #define WM8991_LI34ZC 0x0040
435 #define WM8991_LI34ZC_BIT 6
436 #define WM8991_LIN34VOL_MASK 0x001F
437 #define WM8991_LIN34VOL_SHIFT 0
438
439
440
441
442 #define WM8991_IPVU 0x0100
443 #define WM8991_RI12MUTE 0x0080
444 #define WM8991_RI12MUTE_BIT 7
445 #define WM8991_RI12ZC 0x0040
446 #define WM8991_RI12ZC_BIT 6
447 #define WM8991_RIN12VOL_MASK 0x001F
448 #define WM8991_RIN12VOL_SHIFT 0
449
450
451
452
453 #define WM8991_IPVU 0x0100
454 #define WM8991_RI34MUTE 0x0080
455 #define WM8991_RI34MUTE_BIT 7
456 #define WM8991_RI34ZC 0x0040
457 #define WM8991_RI34ZC_BIT 6
458 #define WM8991_RIN34VOL_MASK 0x001F
459 #define WM8991_RIN34VOL_SHIFT 0
460
461
462
463
464 #define WM8991_OPVU 0x0100
465 #define WM8991_LOZC 0x0080
466 #define WM8991_LOZC_BIT 7
467 #define WM8991_LOUTVOL_MASK 0x007F
468 #define WM8991_LOUTVOL_SHIFT 0
469
470
471
472 #define WM8991_OPVU 0x0100
473 #define WM8991_ROZC 0x0080
474 #define WM8991_ROZC_BIT 7
475 #define WM8991_ROUTVOL_MASK 0x007F
476 #define WM8991_ROUTVOL_SHIFT 0
477
478
479
480 #define WM8991_LONMUTE 0x0040
481 #define WM8991_LONMUTE_BIT 6
482 #define WM8991_LOPMUTE 0x0020
483 #define WM8991_LOPMUTE_BIT 5
484 #define WM8991_LOATTN 0x0010
485 #define WM8991_LOATTN_BIT 4
486 #define WM8991_RONMUTE 0x0004
487 #define WM8991_RONMUTE_BIT 2
488 #define WM8991_ROPMUTE 0x0002
489 #define WM8991_ROPMUTE_BIT 1
490 #define WM8991_ROATTN 0x0001
491 #define WM8991_ROATTN_BIT 0
492
493
494
495
496 #define WM8991_OUT3MUTE 0x0020
497 #define WM8991_OUT3MUTE_BIT 5
498 #define WM8991_OUT3ATTN 0x0010
499 #define WM8991_OUT3ATTN_BIT 4
500 #define WM8991_OUT4MUTE 0x0002
501 #define WM8991_OUT4MUTE_BIT 1
502 #define WM8991_OUT4ATTN 0x0001
503 #define WM8991_OUT4ATTN_BIT 0
504
505
506
507
508 #define WM8991_OPVU 0x0100
509 #define WM8991_LOPGAZC 0x0080
510 #define WM8991_LOPGAZC_BIT 7
511 #define WM8991_LOPGAVOL_MASK 0x007F
512 #define WM8991_LOPGAVOL_SHIFT 0
513
514
515
516
517 #define WM8991_OPVU 0x0100
518 #define WM8991_ROPGAZC 0x0080
519 #define WM8991_ROPGAZC_BIT 7
520 #define WM8991_ROPGAVOL_MASK 0x007F
521 #define WM8991_ROPGAVOL_SHIFT 0
522
523
524
525 #define WM8991_SPKVOL_MASK 0x0003
526 #define WM8991_SPKVOL_SHIFT 0
527
528
529
530
531 #define WM8991_CDMODE 0x0100
532 #define WM8991_CDMODE_BIT 8
533
534
535
536
537 #define WM8991_DCGAIN_MASK 0x0007
538 #define WM8991_DCGAIN_SHIFT 3
539 #define WM8991_ACGAIN_MASK 0x0007
540 #define WM8991_ACGAIN_SHIFT 0
541
542
543
544 #define WM8991_AINLMODE_MASK 0x000C
545 #define WM8991_AINLMODE_SHIFT 2
546 #define WM8991_AINRMODE_MASK 0x0003
547 #define WM8991_AINRMODE_SHIFT 0
548
549
550
551
552 #define WM8991_LMP4 0x0080
553 #define WM8991_LMP4_BIT 7
554 #define WM8991_LMN3 0x0040
555 #define WM8991_LMN3_BIT 6
556 #define WM8991_LMP2 0x0020
557 #define WM8991_LMP2_BIT 5
558 #define WM8991_LMN1 0x0010
559 #define WM8991_LMN1_BIT 4
560 #define WM8991_RMP4 0x0008
561 #define WM8991_RMP4_BIT 3
562 #define WM8991_RMN3 0x0004
563 #define WM8991_RMN3_BIT 2
564 #define WM8991_RMP2 0x0002
565 #define WM8991_RMP2_BIT 1
566 #define WM8991_RMN1 0x0001
567 #define WM8991_RMN1_BIT 0
568
569
570
571
572 #define WM8991_L34MNB 0x0100
573 #define WM8991_L34MNB_BIT 8
574 #define WM8991_L34MNBST 0x0080
575 #define WM8991_L34MNBST_BIT 7
576 #define WM8991_L12MNB 0x0020
577 #define WM8991_L12MNB_BIT 5
578 #define WM8991_L12MNBST 0x0010
579 #define WM8991_L12MNBST_BIT 4
580 #define WM8991_LDBVOL_MASK 0x0007
581 #define WM8991_LDBVOL_SHIFT 0
582
583
584
585
586 #define WM8991_R34MNB 0x0100
587 #define WM8991_R34MNB_BIT 8
588 #define WM8991_R34MNBST 0x0080
589 #define WM8991_R34MNBST_BIT 7
590 #define WM8991_R12MNB 0x0020
591 #define WM8991_R12MNB_BIT 5
592 #define WM8991_R12MNBST 0x0010
593 #define WM8991_R12MNBST_BIT 4
594 #define WM8991_RDBVOL_MASK 0x0007
595 #define WM8991_RDBVOL_SHIFT 0
596
597
598
599
600 #define WM8991_LI2BVOL_MASK 0x07
601 #define WM8991_LI2BVOL_SHIFT 6
602 #define WM8991_LR4BVOL_MASK 0x07
603 #define WM8991_LR4BVOL_SHIFT 3
604 #define WM8991_LL4BVOL_MASK 0x07
605 #define WM8991_LL4BVOL_SHIFT 0
606
607
608
609
610 #define WM8991_RI2BVOL_MASK 0x07
611 #define WM8991_RI2BVOL_SHIFT 6
612 #define WM8991_RL4BVOL_MASK 0x07
613 #define WM8991_RL4BVOL_SHIFT 3
614 #define WM8991_RR4BVOL_MASK 0x07
615 #define WM8991_RR4BVOL_SHIFT 0
616
617
618
619
620 #define WM8991_LRBLO 0x0080
621 #define WM8991_LRBLO_BIT 7
622 #define WM8991_LLBLO 0x0040
623 #define WM8991_LLBLO_BIT 6
624 #define WM8991_LRI3LO 0x0020
625 #define WM8991_LRI3LO_BIT 5
626 #define WM8991_LLI3LO 0x0010
627 #define WM8991_LLI3LO_BIT 4
628 #define WM8991_LR12LO 0x0008
629 #define WM8991_LR12LO_BIT 3
630 #define WM8991_LL12LO 0x0004
631 #define WM8991_LL12LO_BIT 2
632 #define WM8991_LDLO 0x0001
633 #define WM8991_LDLO_BIT 0
634
635
636
637
638 #define WM8991_RLBRO 0x0080
639 #define WM8991_RLBRO_BIT 7
640 #define WM8991_RRBRO 0x0040
641 #define WM8991_RRBRO_BIT 6
642 #define WM8991_RLI3RO 0x0020
643 #define WM8991_RLI3RO_BIT 5
644 #define WM8991_RRI3RO 0x0010
645 #define WM8991_RRI3RO_BIT 4
646 #define WM8991_RL12RO 0x0008
647 #define WM8991_RL12RO_BIT 3
648 #define WM8991_RR12RO 0x0004
649 #define WM8991_RR12RO_BIT 2
650 #define WM8991_RDRO 0x0001
651 #define WM8991_RDRO_BIT 0
652
653
654
655
656 #define WM8991_LLI3LOVOL_MASK 0x07
657 #define WM8991_LLI3LOVOL_SHIFT 6
658 #define WM8991_LR12LOVOL_MASK 0x07
659 #define WM8991_LR12LOVOL_SHIFT 3
660 #define WM8991_LL12LOVOL_MASK 0x07
661 #define WM8991_LL12LOVOL_SHIFT 0
662
663
664
665
666 #define WM8991_RRI3ROVOL_MASK 0x07
667 #define WM8991_RRI3ROVOL_SHIFT 6
668 #define WM8991_RL12ROVOL_MASK 0x07
669 #define WM8991_RL12ROVOL_SHIFT 3
670 #define WM8991_RR12ROVOL_MASK 0x07
671 #define WM8991_RR12ROVOL_SHIFT 0
672
673
674
675
676 #define WM8991_LRI3LOVOL_MASK 0x07
677 #define WM8991_LRI3LOVOL_SHIFT 6
678 #define WM8991_LRBLOVOL_MASK 0x07
679 #define WM8991_LRBLOVOL_SHIFT 3
680 #define WM8991_LLBLOVOL_MASK 0x07
681 #define WM8991_LLBLOVOL_SHIFT 0
682
683
684
685
686 #define WM8991_RLI3ROVOL_MASK 0x07
687 #define WM8991_RLI3ROVOL_SHIFT 6
688 #define WM8991_RLBROVOL_MASK 0x07
689 #define WM8991_RLBROVOL_SHIFT 3
690 #define WM8991_RRBROVOL_MASK 0x07
691 #define WM8991_RRBROVOL_SHIFT 0
692
693
694
695
696 #define WM8991_VSEL_MASK 0x0180
697 #define WM8991_LI4O3 0x0020
698 #define WM8991_LI4O3_BIT 5
699 #define WM8991_LPGAO3 0x0010
700 #define WM8991_LPGAO3_BIT 4
701 #define WM8991_RI4O4 0x0002
702 #define WM8991_RI4O4_BIT 1
703 #define WM8991_RPGAO4 0x0001
704 #define WM8991_RPGAO4_BIT 0
705
706
707
708 #define WM8991_LLOPGALON 0x0040
709 #define WM8991_LLOPGALON_BIT 6
710 #define WM8991_LROPGALON 0x0020
711 #define WM8991_LROPGALON_BIT 5
712 #define WM8991_LOPLON 0x0010
713 #define WM8991_LOPLON_BIT 4
714 #define WM8991_LR12LOP 0x0004
715 #define WM8991_LR12LOP_BIT 2
716 #define WM8991_LL12LOP 0x0002
717 #define WM8991_LL12LOP_BIT 1
718 #define WM8991_LLOPGALOP 0x0001
719 #define WM8991_LLOPGALOP_BIT 0
720
721
722
723 #define WM8991_RROPGARON 0x0040
724 #define WM8991_RROPGARON_BIT 6
725 #define WM8991_RLOPGARON 0x0020
726 #define WM8991_RLOPGARON_BIT 5
727 #define WM8991_ROPRON 0x0010
728 #define WM8991_ROPRON_BIT 4
729 #define WM8991_RL12ROP 0x0004
730 #define WM8991_RL12ROP_BIT 2
731 #define WM8991_RR12ROP 0x0002
732 #define WM8991_RR12ROP_BIT 1
733 #define WM8991_RROPGAROP 0x0001
734 #define WM8991_RROPGAROP_BIT 0
735
736
737
738
739 #define WM8991_LB2SPK 0x0080
740 #define WM8991_LB2SPK_BIT 7
741 #define WM8991_RB2SPK 0x0040
742 #define WM8991_RB2SPK_BIT 6
743 #define WM8991_LI2SPK 0x0020
744 #define WM8991_LI2SPK_BIT 5
745 #define WM8991_RI2SPK 0x0010
746 #define WM8991_RI2SPK_BIT 4
747 #define WM8991_LOPGASPK 0x0008
748 #define WM8991_LOPGASPK_BIT 3
749 #define WM8991_ROPGASPK 0x0004
750 #define WM8991_ROPGASPK_BIT 2
751 #define WM8991_LDSPK 0x0002
752 #define WM8991_LDSPK_BIT 1
753 #define WM8991_RDSPK 0x0001
754 #define WM8991_RDSPK_BIT 0
755
756
757
758
759 #define WM8991_VROI 0x0001
760
761
762
763
764 #define WM8991_DIS_LLINE 0x0020
765 #define WM8991_DIS_RLINE 0x0010
766 #define WM8991_DIS_OUT3 0x0008
767 #define WM8991_DIS_OUT4 0x0004
768 #define WM8991_DIS_LOUT 0x0002
769 #define WM8991_DIS_ROUT 0x0001
770
771
772
773
774 #define WM8991_SOFTST 0x0040
775 #define WM8991_BUFIOEN 0x0008
776 #define WM8991_BUFDCOPEN 0x0004
777 #define WM8991_POBCTRL 0x0002
778 #define WM8991_VMIDTOG 0x0001
779
780
781
782
783 #define WM8991_MCDSCTH_MASK 0x00C0
784 #define WM8991_MCDTHR_MASK 0x0038
785 #define WM8991_MCD 0x0004
786 #define WM8991_MBSEL 0x0001
787
788
789
790
791 #define WM8991_SDM 0x0080
792 #define WM8991_PRESCALE 0x0040
793 #define WM8991_PLLN_MASK 0x000F
794
795
796
797
798 #define WM8991_PLLK1_MASK 0x00FF
799
800
801
802
803 #define WM8991_PLLK2_MASK 0x00FF
804
805 #define WM8991_MCLK_DIV 0
806 #define WM8991_DACCLK_DIV 1
807 #define WM8991_ADCCLK_DIV 2
808 #define WM8991_BCLK_DIV 3
809
810 #define SOC_WM899X_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert,\
811 tlv_array) \
812 SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, \
813 snd_soc_get_volsw, wm899x_outpga_put_volsw_vu, tlv_array)
814
815 #endif