1
2
3
4
5
6 #ifndef _WM8961_H
7 #define _WM8961_H
8
9 #include <sound/soc.h>
10
11 #define WM8961_BCLK 1
12 #define WM8961_LRCLK 2
13
14 #define WM8961_BCLK_DIV_1 0
15 #define WM8961_BCLK_DIV_1_5 1
16 #define WM8961_BCLK_DIV_2 2
17 #define WM8961_BCLK_DIV_3 3
18 #define WM8961_BCLK_DIV_4 4
19 #define WM8961_BCLK_DIV_5_5 5
20 #define WM8961_BCLK_DIV_6 6
21 #define WM8961_BCLK_DIV_8 7
22 #define WM8961_BCLK_DIV_11 8
23 #define WM8961_BCLK_DIV_12 9
24 #define WM8961_BCLK_DIV_16 10
25 #define WM8961_BCLK_DIV_24 11
26 #define WM8961_BCLK_DIV_32 13
27
28
29
30
31
32 #define WM8961_LEFT_INPUT_VOLUME 0x00
33 #define WM8961_RIGHT_INPUT_VOLUME 0x01
34 #define WM8961_LOUT1_VOLUME 0x02
35 #define WM8961_ROUT1_VOLUME 0x03
36 #define WM8961_CLOCKING1 0x04
37 #define WM8961_ADC_DAC_CONTROL_1 0x05
38 #define WM8961_ADC_DAC_CONTROL_2 0x06
39 #define WM8961_AUDIO_INTERFACE_0 0x07
40 #define WM8961_CLOCKING2 0x08
41 #define WM8961_AUDIO_INTERFACE_1 0x09
42 #define WM8961_LEFT_DAC_VOLUME 0x0A
43 #define WM8961_RIGHT_DAC_VOLUME 0x0B
44 #define WM8961_AUDIO_INTERFACE_2 0x0E
45 #define WM8961_SOFTWARE_RESET 0x0F
46 #define WM8961_ALC1 0x11
47 #define WM8961_ALC2 0x12
48 #define WM8961_ALC3 0x13
49 #define WM8961_NOISE_GATE 0x14
50 #define WM8961_LEFT_ADC_VOLUME 0x15
51 #define WM8961_RIGHT_ADC_VOLUME 0x16
52 #define WM8961_ADDITIONAL_CONTROL_1 0x17
53 #define WM8961_ADDITIONAL_CONTROL_2 0x18
54 #define WM8961_PWR_MGMT_1 0x19
55 #define WM8961_PWR_MGMT_2 0x1A
56 #define WM8961_ADDITIONAL_CONTROL_3 0x1B
57 #define WM8961_ANTI_POP 0x1C
58 #define WM8961_CLOCKING_3 0x1E
59 #define WM8961_ADCL_SIGNAL_PATH 0x20
60 #define WM8961_ADCR_SIGNAL_PATH 0x21
61 #define WM8961_LOUT2_VOLUME 0x28
62 #define WM8961_ROUT2_VOLUME 0x29
63 #define WM8961_PWR_MGMT_3 0x2F
64 #define WM8961_ADDITIONAL_CONTROL_4 0x30
65 #define WM8961_CLASS_D_CONTROL_1 0x31
66 #define WM8961_CLASS_D_CONTROL_2 0x33
67 #define WM8961_CLOCKING_4 0x38
68 #define WM8961_DSP_SIDETONE_0 0x39
69 #define WM8961_DSP_SIDETONE_1 0x3A
70 #define WM8961_DC_SERVO_0 0x3C
71 #define WM8961_DC_SERVO_1 0x3D
72 #define WM8961_DC_SERVO_3 0x3F
73 #define WM8961_DC_SERVO_5 0x41
74 #define WM8961_ANALOGUE_PGA_BIAS 0x44
75 #define WM8961_ANALOGUE_HP_0 0x45
76 #define WM8961_ANALOGUE_HP_2 0x47
77 #define WM8961_CHARGE_PUMP_1 0x48
78 #define WM8961_CHARGE_PUMP_B 0x52
79 #define WM8961_WRITE_SEQUENCER_1 0x57
80 #define WM8961_WRITE_SEQUENCER_2 0x58
81 #define WM8961_WRITE_SEQUENCER_3 0x59
82 #define WM8961_WRITE_SEQUENCER_4 0x5A
83 #define WM8961_WRITE_SEQUENCER_5 0x5B
84 #define WM8961_WRITE_SEQUENCER_6 0x5C
85 #define WM8961_WRITE_SEQUENCER_7 0x5D
86 #define WM8961_GENERAL_TEST_1 0xFC
87
88
89
90
91
92
93
94
95
96 #define WM8961_IPVU 0x0100
97 #define WM8961_IPVU_MASK 0x0100
98 #define WM8961_IPVU_SHIFT 8
99 #define WM8961_IPVU_WIDTH 1
100 #define WM8961_LINMUTE 0x0080
101 #define WM8961_LINMUTE_MASK 0x0080
102 #define WM8961_LINMUTE_SHIFT 7
103 #define WM8961_LINMUTE_WIDTH 1
104 #define WM8961_LIZC 0x0040
105 #define WM8961_LIZC_MASK 0x0040
106 #define WM8961_LIZC_SHIFT 6
107 #define WM8961_LIZC_WIDTH 1
108 #define WM8961_LINVOL_MASK 0x003F
109 #define WM8961_LINVOL_SHIFT 0
110 #define WM8961_LINVOL_WIDTH 6
111
112
113
114
115 #define WM8961_DEVICE_ID_MASK 0xF000
116 #define WM8961_DEVICE_ID_SHIFT 12
117 #define WM8961_DEVICE_ID_WIDTH 4
118 #define WM8961_CHIP_REV_MASK 0x0E00
119 #define WM8961_CHIP_REV_SHIFT 9
120 #define WM8961_CHIP_REV_WIDTH 3
121 #define WM8961_IPVU 0x0100
122 #define WM8961_IPVU_MASK 0x0100
123 #define WM8961_IPVU_SHIFT 8
124 #define WM8961_IPVU_WIDTH 1
125 #define WM8961_RINMUTE 0x0080
126 #define WM8961_RINMUTE_MASK 0x0080
127 #define WM8961_RINMUTE_SHIFT 7
128 #define WM8961_RINMUTE_WIDTH 1
129 #define WM8961_RIZC 0x0040
130 #define WM8961_RIZC_MASK 0x0040
131 #define WM8961_RIZC_SHIFT 6
132 #define WM8961_RIZC_WIDTH 1
133 #define WM8961_RINVOL_MASK 0x003F
134 #define WM8961_RINVOL_SHIFT 0
135 #define WM8961_RINVOL_WIDTH 6
136
137
138
139
140 #define WM8961_OUT1VU 0x0100
141 #define WM8961_OUT1VU_MASK 0x0100
142 #define WM8961_OUT1VU_SHIFT 8
143 #define WM8961_OUT1VU_WIDTH 1
144 #define WM8961_LO1ZC 0x0080
145 #define WM8961_LO1ZC_MASK 0x0080
146 #define WM8961_LO1ZC_SHIFT 7
147 #define WM8961_LO1ZC_WIDTH 1
148 #define WM8961_LOUT1VOL_MASK 0x007F
149 #define WM8961_LOUT1VOL_SHIFT 0
150 #define WM8961_LOUT1VOL_WIDTH 7
151
152
153
154
155 #define WM8961_OUT1VU 0x0100
156 #define WM8961_OUT1VU_MASK 0x0100
157 #define WM8961_OUT1VU_SHIFT 8
158 #define WM8961_OUT1VU_WIDTH 1
159 #define WM8961_RO1ZC 0x0080
160 #define WM8961_RO1ZC_MASK 0x0080
161 #define WM8961_RO1ZC_SHIFT 7
162 #define WM8961_RO1ZC_WIDTH 1
163 #define WM8961_ROUT1VOL_MASK 0x007F
164 #define WM8961_ROUT1VOL_SHIFT 0
165 #define WM8961_ROUT1VOL_WIDTH 7
166
167
168
169
170 #define WM8961_ADCDIV_MASK 0x01C0
171 #define WM8961_ADCDIV_SHIFT 6
172 #define WM8961_ADCDIV_WIDTH 3
173 #define WM8961_DACDIV_MASK 0x0038
174 #define WM8961_DACDIV_SHIFT 3
175 #define WM8961_DACDIV_WIDTH 3
176 #define WM8961_MCLKDIV 0x0004
177 #define WM8961_MCLKDIV_MASK 0x0004
178 #define WM8961_MCLKDIV_SHIFT 2
179 #define WM8961_MCLKDIV_WIDTH 1
180
181
182
183
184 #define WM8961_ADCPOL_MASK 0x0060
185 #define WM8961_ADCPOL_SHIFT 5
186 #define WM8961_ADCPOL_WIDTH 2
187 #define WM8961_DACMU 0x0008
188 #define WM8961_DACMU_MASK 0x0008
189 #define WM8961_DACMU_SHIFT 3
190 #define WM8961_DACMU_WIDTH 1
191 #define WM8961_DEEMPH_MASK 0x0006
192 #define WM8961_DEEMPH_SHIFT 1
193 #define WM8961_DEEMPH_WIDTH 2
194 #define WM8961_ADCHPD 0x0001
195 #define WM8961_ADCHPD_MASK 0x0001
196 #define WM8961_ADCHPD_SHIFT 0
197 #define WM8961_ADCHPD_WIDTH 1
198
199
200
201
202 #define WM8961_ADC_HPF_CUT_MASK 0x0180
203 #define WM8961_ADC_HPF_CUT_SHIFT 7
204 #define WM8961_ADC_HPF_CUT_WIDTH 2
205 #define WM8961_DACPOL_MASK 0x0060
206 #define WM8961_DACPOL_SHIFT 5
207 #define WM8961_DACPOL_WIDTH 2
208 #define WM8961_DACSMM 0x0008
209 #define WM8961_DACSMM_MASK 0x0008
210 #define WM8961_DACSMM_SHIFT 3
211 #define WM8961_DACSMM_WIDTH 1
212 #define WM8961_DACMR 0x0004
213 #define WM8961_DACMR_MASK 0x0004
214 #define WM8961_DACMR_SHIFT 2
215 #define WM8961_DACMR_WIDTH 1
216 #define WM8961_DACSLOPE 0x0002
217 #define WM8961_DACSLOPE_MASK 0x0002
218 #define WM8961_DACSLOPE_SHIFT 1
219 #define WM8961_DACSLOPE_WIDTH 1
220 #define WM8961_DAC_OSR128 0x0001
221 #define WM8961_DAC_OSR128_MASK 0x0001
222 #define WM8961_DAC_OSR128_SHIFT 0
223 #define WM8961_DAC_OSR128_WIDTH 1
224
225
226
227
228 #define WM8961_ALRSWAP 0x0100
229 #define WM8961_ALRSWAP_MASK 0x0100
230 #define WM8961_ALRSWAP_SHIFT 8
231 #define WM8961_ALRSWAP_WIDTH 1
232 #define WM8961_BCLKINV 0x0080
233 #define WM8961_BCLKINV_MASK 0x0080
234 #define WM8961_BCLKINV_SHIFT 7
235 #define WM8961_BCLKINV_WIDTH 1
236 #define WM8961_MS 0x0040
237 #define WM8961_MS_MASK 0x0040
238 #define WM8961_MS_SHIFT 6
239 #define WM8961_MS_WIDTH 1
240 #define WM8961_DLRSWAP 0x0020
241 #define WM8961_DLRSWAP_MASK 0x0020
242 #define WM8961_DLRSWAP_SHIFT 5
243 #define WM8961_DLRSWAP_WIDTH 1
244 #define WM8961_LRP 0x0010
245 #define WM8961_LRP_MASK 0x0010
246 #define WM8961_LRP_SHIFT 4
247 #define WM8961_LRP_WIDTH 1
248 #define WM8961_WL_MASK 0x000C
249 #define WM8961_WL_SHIFT 2
250 #define WM8961_WL_WIDTH 2
251 #define WM8961_FORMAT_MASK 0x0003
252 #define WM8961_FORMAT_SHIFT 0
253 #define WM8961_FORMAT_WIDTH 2
254
255
256
257
258 #define WM8961_DCLKDIV_MASK 0x01C0
259 #define WM8961_DCLKDIV_SHIFT 6
260 #define WM8961_DCLKDIV_WIDTH 3
261 #define WM8961_CLK_SYS_ENA 0x0020
262 #define WM8961_CLK_SYS_ENA_MASK 0x0020
263 #define WM8961_CLK_SYS_ENA_SHIFT 5
264 #define WM8961_CLK_SYS_ENA_WIDTH 1
265 #define WM8961_CLK_DSP_ENA 0x0010
266 #define WM8961_CLK_DSP_ENA_MASK 0x0010
267 #define WM8961_CLK_DSP_ENA_SHIFT 4
268 #define WM8961_CLK_DSP_ENA_WIDTH 1
269 #define WM8961_BCLKDIV_MASK 0x000F
270 #define WM8961_BCLKDIV_SHIFT 0
271 #define WM8961_BCLKDIV_WIDTH 4
272
273
274
275
276 #define WM8961_DACCOMP_MASK 0x0018
277 #define WM8961_DACCOMP_SHIFT 3
278 #define WM8961_DACCOMP_WIDTH 2
279 #define WM8961_ADCCOMP_MASK 0x0006
280 #define WM8961_ADCCOMP_SHIFT 1
281 #define WM8961_ADCCOMP_WIDTH 2
282 #define WM8961_LOOPBACK 0x0001
283 #define WM8961_LOOPBACK_MASK 0x0001
284 #define WM8961_LOOPBACK_SHIFT 0
285 #define WM8961_LOOPBACK_WIDTH 1
286
287
288
289
290 #define WM8961_DACVU 0x0100
291 #define WM8961_DACVU_MASK 0x0100
292 #define WM8961_DACVU_SHIFT 8
293 #define WM8961_DACVU_WIDTH 1
294 #define WM8961_LDACVOL_MASK 0x00FF
295 #define WM8961_LDACVOL_SHIFT 0
296 #define WM8961_LDACVOL_WIDTH 8
297
298
299
300
301 #define WM8961_DACVU 0x0100
302 #define WM8961_DACVU_MASK 0x0100
303 #define WM8961_DACVU_SHIFT 8
304 #define WM8961_DACVU_WIDTH 1
305 #define WM8961_RDACVOL_MASK 0x00FF
306 #define WM8961_RDACVOL_SHIFT 0
307 #define WM8961_RDACVOL_WIDTH 8
308
309
310
311
312 #define WM8961_LRCLK_RATE_MASK 0x01FF
313 #define WM8961_LRCLK_RATE_SHIFT 0
314 #define WM8961_LRCLK_RATE_WIDTH 9
315
316
317
318
319 #define WM8961_SW_RST_DEV_ID1_MASK 0xFFFF
320 #define WM8961_SW_RST_DEV_ID1_SHIFT 0
321 #define WM8961_SW_RST_DEV_ID1_WIDTH 16
322
323
324
325
326 #define WM8961_ALCSEL_MASK 0x0180
327 #define WM8961_ALCSEL_SHIFT 7
328 #define WM8961_ALCSEL_WIDTH 2
329 #define WM8961_MAXGAIN_MASK 0x0070
330 #define WM8961_MAXGAIN_SHIFT 4
331 #define WM8961_MAXGAIN_WIDTH 3
332 #define WM8961_ALCL_MASK 0x000F
333 #define WM8961_ALCL_SHIFT 0
334 #define WM8961_ALCL_WIDTH 4
335
336
337
338
339 #define WM8961_ALCZC 0x0080
340 #define WM8961_ALCZC_MASK 0x0080
341 #define WM8961_ALCZC_SHIFT 7
342 #define WM8961_ALCZC_WIDTH 1
343 #define WM8961_MINGAIN_MASK 0x0070
344 #define WM8961_MINGAIN_SHIFT 4
345 #define WM8961_MINGAIN_WIDTH 3
346 #define WM8961_HLD_MASK 0x000F
347 #define WM8961_HLD_SHIFT 0
348 #define WM8961_HLD_WIDTH 4
349
350
351
352
353 #define WM8961_ALCMODE 0x0100
354 #define WM8961_ALCMODE_MASK 0x0100
355 #define WM8961_ALCMODE_SHIFT 8
356 #define WM8961_ALCMODE_WIDTH 1
357 #define WM8961_DCY_MASK 0x00F0
358 #define WM8961_DCY_SHIFT 4
359 #define WM8961_DCY_WIDTH 4
360 #define WM8961_ATK_MASK 0x000F
361 #define WM8961_ATK_SHIFT 0
362 #define WM8961_ATK_WIDTH 4
363
364
365
366
367 #define WM8961_NGTH_MASK 0x00F8
368 #define WM8961_NGTH_SHIFT 3
369 #define WM8961_NGTH_WIDTH 5
370 #define WM8961_NGG 0x0002
371 #define WM8961_NGG_MASK 0x0002
372 #define WM8961_NGG_SHIFT 1
373 #define WM8961_NGG_WIDTH 1
374 #define WM8961_NGAT 0x0001
375 #define WM8961_NGAT_MASK 0x0001
376 #define WM8961_NGAT_SHIFT 0
377 #define WM8961_NGAT_WIDTH 1
378
379
380
381
382 #define WM8961_ADCVU 0x0100
383 #define WM8961_ADCVU_MASK 0x0100
384 #define WM8961_ADCVU_SHIFT 8
385 #define WM8961_ADCVU_WIDTH 1
386 #define WM8961_LADCVOL_MASK 0x00FF
387 #define WM8961_LADCVOL_SHIFT 0
388 #define WM8961_LADCVOL_WIDTH 8
389
390
391
392
393 #define WM8961_ADCVU 0x0100
394 #define WM8961_ADCVU_MASK 0x0100
395 #define WM8961_ADCVU_SHIFT 8
396 #define WM8961_ADCVU_WIDTH 1
397 #define WM8961_RADCVOL_MASK 0x00FF
398 #define WM8961_RADCVOL_SHIFT 0
399 #define WM8961_RADCVOL_WIDTH 8
400
401
402
403
404 #define WM8961_TSDEN 0x0100
405 #define WM8961_TSDEN_MASK 0x0100
406 #define WM8961_TSDEN_SHIFT 8
407 #define WM8961_TSDEN_WIDTH 1
408 #define WM8961_DMONOMIX 0x0010
409 #define WM8961_DMONOMIX_MASK 0x0010
410 #define WM8961_DMONOMIX_SHIFT 4
411 #define WM8961_DMONOMIX_WIDTH 1
412 #define WM8961_TOEN 0x0001
413 #define WM8961_TOEN_MASK 0x0001
414 #define WM8961_TOEN_SHIFT 0
415 #define WM8961_TOEN_WIDTH 1
416
417
418
419
420 #define WM8961_TRIS 0x0008
421 #define WM8961_TRIS_MASK 0x0008
422 #define WM8961_TRIS_SHIFT 3
423 #define WM8961_TRIS_WIDTH 1
424
425
426
427
428 #define WM8961_VMIDSEL_MASK 0x0180
429 #define WM8961_VMIDSEL_SHIFT 7
430 #define WM8961_VMIDSEL_WIDTH 2
431 #define WM8961_VREF 0x0040
432 #define WM8961_VREF_MASK 0x0040
433 #define WM8961_VREF_SHIFT 6
434 #define WM8961_VREF_WIDTH 1
435 #define WM8961_AINL 0x0020
436 #define WM8961_AINL_MASK 0x0020
437 #define WM8961_AINL_SHIFT 5
438 #define WM8961_AINL_WIDTH 1
439 #define WM8961_AINR 0x0010
440 #define WM8961_AINR_MASK 0x0010
441 #define WM8961_AINR_SHIFT 4
442 #define WM8961_AINR_WIDTH 1
443 #define WM8961_ADCL 0x0008
444 #define WM8961_ADCL_MASK 0x0008
445 #define WM8961_ADCL_SHIFT 3
446 #define WM8961_ADCL_WIDTH 1
447 #define WM8961_ADCR 0x0004
448 #define WM8961_ADCR_MASK 0x0004
449 #define WM8961_ADCR_SHIFT 2
450 #define WM8961_ADCR_WIDTH 1
451 #define WM8961_MICB 0x0002
452 #define WM8961_MICB_MASK 0x0002
453 #define WM8961_MICB_SHIFT 1
454 #define WM8961_MICB_WIDTH 1
455
456
457
458
459 #define WM8961_DACL 0x0100
460 #define WM8961_DACL_MASK 0x0100
461 #define WM8961_DACL_SHIFT 8
462 #define WM8961_DACL_WIDTH 1
463 #define WM8961_DACR 0x0080
464 #define WM8961_DACR_MASK 0x0080
465 #define WM8961_DACR_SHIFT 7
466 #define WM8961_DACR_WIDTH 1
467 #define WM8961_LOUT1_PGA 0x0040
468 #define WM8961_LOUT1_PGA_MASK 0x0040
469 #define WM8961_LOUT1_PGA_SHIFT 6
470 #define WM8961_LOUT1_PGA_WIDTH 1
471 #define WM8961_ROUT1_PGA 0x0020
472 #define WM8961_ROUT1_PGA_MASK 0x0020
473 #define WM8961_ROUT1_PGA_SHIFT 5
474 #define WM8961_ROUT1_PGA_WIDTH 1
475 #define WM8961_SPKL_PGA 0x0010
476 #define WM8961_SPKL_PGA_MASK 0x0010
477 #define WM8961_SPKL_PGA_SHIFT 4
478 #define WM8961_SPKL_PGA_WIDTH 1
479 #define WM8961_SPKR_PGA 0x0008
480 #define WM8961_SPKR_PGA_MASK 0x0008
481 #define WM8961_SPKR_PGA_SHIFT 3
482 #define WM8961_SPKR_PGA_WIDTH 1
483
484
485
486
487 #define WM8961_SAMPLE_RATE_MASK 0x0007
488 #define WM8961_SAMPLE_RATE_SHIFT 0
489 #define WM8961_SAMPLE_RATE_WIDTH 3
490
491
492
493
494 #define WM8961_BUFDCOPEN 0x0010
495 #define WM8961_BUFDCOPEN_MASK 0x0010
496 #define WM8961_BUFDCOPEN_SHIFT 4
497 #define WM8961_BUFDCOPEN_WIDTH 1
498 #define WM8961_BUFIOEN 0x0008
499 #define WM8961_BUFIOEN_MASK 0x0008
500 #define WM8961_BUFIOEN_SHIFT 3
501 #define WM8961_BUFIOEN_WIDTH 1
502 #define WM8961_SOFT_ST 0x0004
503 #define WM8961_SOFT_ST_MASK 0x0004
504 #define WM8961_SOFT_ST_SHIFT 2
505 #define WM8961_SOFT_ST_WIDTH 1
506
507
508
509
510 #define WM8961_CLK_TO_DIV_MASK 0x0180
511 #define WM8961_CLK_TO_DIV_SHIFT 7
512 #define WM8961_CLK_TO_DIV_WIDTH 2
513 #define WM8961_CLK_256K_DIV_MASK 0x007E
514 #define WM8961_CLK_256K_DIV_SHIFT 1
515 #define WM8961_CLK_256K_DIV_WIDTH 6
516 #define WM8961_MANUAL_MODE 0x0001
517 #define WM8961_MANUAL_MODE_MASK 0x0001
518 #define WM8961_MANUAL_MODE_SHIFT 0
519 #define WM8961_MANUAL_MODE_WIDTH 1
520
521
522
523
524 #define WM8961_LMICBOOST_MASK 0x0030
525 #define WM8961_LMICBOOST_SHIFT 4
526 #define WM8961_LMICBOOST_WIDTH 2
527
528
529
530
531 #define WM8961_RMICBOOST_MASK 0x0030
532 #define WM8961_RMICBOOST_SHIFT 4
533 #define WM8961_RMICBOOST_WIDTH 2
534
535
536
537
538 #define WM8961_SPKVU 0x0100
539 #define WM8961_SPKVU_MASK 0x0100
540 #define WM8961_SPKVU_SHIFT 8
541 #define WM8961_SPKVU_WIDTH 1
542 #define WM8961_SPKLZC 0x0080
543 #define WM8961_SPKLZC_MASK 0x0080
544 #define WM8961_SPKLZC_SHIFT 7
545 #define WM8961_SPKLZC_WIDTH 1
546 #define WM8961_SPKLVOL_MASK 0x007F
547 #define WM8961_SPKLVOL_SHIFT 0
548 #define WM8961_SPKLVOL_WIDTH 7
549
550
551
552
553 #define WM8961_SPKVU 0x0100
554 #define WM8961_SPKVU_MASK 0x0100
555 #define WM8961_SPKVU_SHIFT 8
556 #define WM8961_SPKVU_WIDTH 1
557 #define WM8961_SPKRZC 0x0080
558 #define WM8961_SPKRZC_MASK 0x0080
559 #define WM8961_SPKRZC_SHIFT 7
560 #define WM8961_SPKRZC_WIDTH 1
561 #define WM8961_SPKRVOL_MASK 0x007F
562 #define WM8961_SPKRVOL_SHIFT 0
563 #define WM8961_SPKRVOL_WIDTH 7
564
565
566
567
568 #define WM8961_TEMP_SHUT 0x0002
569 #define WM8961_TEMP_SHUT_MASK 0x0002
570 #define WM8961_TEMP_SHUT_SHIFT 1
571 #define WM8961_TEMP_SHUT_WIDTH 1
572 #define WM8961_TEMP_WARN 0x0001
573 #define WM8961_TEMP_WARN_MASK 0x0001
574 #define WM8961_TEMP_WARN_SHIFT 0
575 #define WM8961_TEMP_WARN_WIDTH 1
576
577
578
579
580 #define WM8961_TSENSEN 0x0002
581 #define WM8961_TSENSEN_MASK 0x0002
582 #define WM8961_TSENSEN_SHIFT 1
583 #define WM8961_TSENSEN_WIDTH 1
584 #define WM8961_MBSEL 0x0001
585 #define WM8961_MBSEL_MASK 0x0001
586 #define WM8961_MBSEL_SHIFT 0
587 #define WM8961_MBSEL_WIDTH 1
588
589
590
591
592 #define WM8961_SPKR_ENA 0x0080
593 #define WM8961_SPKR_ENA_MASK 0x0080
594 #define WM8961_SPKR_ENA_SHIFT 7
595 #define WM8961_SPKR_ENA_WIDTH 1
596 #define WM8961_SPKL_ENA 0x0040
597 #define WM8961_SPKL_ENA_MASK 0x0040
598 #define WM8961_SPKL_ENA_SHIFT 6
599 #define WM8961_SPKL_ENA_WIDTH 1
600
601
602
603
604 #define WM8961_CLASSD_ACGAIN_MASK 0x0007
605 #define WM8961_CLASSD_ACGAIN_SHIFT 0
606 #define WM8961_CLASSD_ACGAIN_WIDTH 3
607
608
609
610
611 #define WM8961_CLK_DCS_DIV_MASK 0x01E0
612 #define WM8961_CLK_DCS_DIV_SHIFT 5
613 #define WM8961_CLK_DCS_DIV_WIDTH 4
614 #define WM8961_CLK_SYS_RATE_MASK 0x001E
615 #define WM8961_CLK_SYS_RATE_SHIFT 1
616 #define WM8961_CLK_SYS_RATE_WIDTH 4
617
618
619
620
621 #define WM8961_ADCR_DAC_SVOL_MASK 0x00F0
622 #define WM8961_ADCR_DAC_SVOL_SHIFT 4
623 #define WM8961_ADCR_DAC_SVOL_WIDTH 4
624 #define WM8961_ADC_TO_DACR_MASK 0x000C
625 #define WM8961_ADC_TO_DACR_SHIFT 2
626 #define WM8961_ADC_TO_DACR_WIDTH 2
627
628
629
630
631 #define WM8961_ADCL_DAC_SVOL_MASK 0x00F0
632 #define WM8961_ADCL_DAC_SVOL_SHIFT 4
633 #define WM8961_ADCL_DAC_SVOL_WIDTH 4
634 #define WM8961_ADC_TO_DACL_MASK 0x000C
635 #define WM8961_ADC_TO_DACL_SHIFT 2
636 #define WM8961_ADC_TO_DACL_WIDTH 2
637
638
639
640
641 #define WM8961_DCS_ENA_CHAN_INL 0x0080
642 #define WM8961_DCS_ENA_CHAN_INL_MASK 0x0080
643 #define WM8961_DCS_ENA_CHAN_INL_SHIFT 7
644 #define WM8961_DCS_ENA_CHAN_INL_WIDTH 1
645 #define WM8961_DCS_TRIG_STARTUP_INL 0x0040
646 #define WM8961_DCS_TRIG_STARTUP_INL_MASK 0x0040
647 #define WM8961_DCS_TRIG_STARTUP_INL_SHIFT 6
648 #define WM8961_DCS_TRIG_STARTUP_INL_WIDTH 1
649 #define WM8961_DCS_TRIG_SERIES_INL 0x0010
650 #define WM8961_DCS_TRIG_SERIES_INL_MASK 0x0010
651 #define WM8961_DCS_TRIG_SERIES_INL_SHIFT 4
652 #define WM8961_DCS_TRIG_SERIES_INL_WIDTH 1
653 #define WM8961_DCS_ENA_CHAN_INR 0x0008
654 #define WM8961_DCS_ENA_CHAN_INR_MASK 0x0008
655 #define WM8961_DCS_ENA_CHAN_INR_SHIFT 3
656 #define WM8961_DCS_ENA_CHAN_INR_WIDTH 1
657 #define WM8961_DCS_TRIG_STARTUP_INR 0x0004
658 #define WM8961_DCS_TRIG_STARTUP_INR_MASK 0x0004
659 #define WM8961_DCS_TRIG_STARTUP_INR_SHIFT 2
660 #define WM8961_DCS_TRIG_STARTUP_INR_WIDTH 1
661 #define WM8961_DCS_TRIG_SERIES_INR 0x0001
662 #define WM8961_DCS_TRIG_SERIES_INR_MASK 0x0001
663 #define WM8961_DCS_TRIG_SERIES_INR_SHIFT 0
664 #define WM8961_DCS_TRIG_SERIES_INR_WIDTH 1
665
666
667
668
669 #define WM8961_DCS_ENA_CHAN_HPL 0x0080
670 #define WM8961_DCS_ENA_CHAN_HPL_MASK 0x0080
671 #define WM8961_DCS_ENA_CHAN_HPL_SHIFT 7
672 #define WM8961_DCS_ENA_CHAN_HPL_WIDTH 1
673 #define WM8961_DCS_TRIG_STARTUP_HPL 0x0040
674 #define WM8961_DCS_TRIG_STARTUP_HPL_MASK 0x0040
675 #define WM8961_DCS_TRIG_STARTUP_HPL_SHIFT 6
676 #define WM8961_DCS_TRIG_STARTUP_HPL_WIDTH 1
677 #define WM8961_DCS_TRIG_SERIES_HPL 0x0010
678 #define WM8961_DCS_TRIG_SERIES_HPL_MASK 0x0010
679 #define WM8961_DCS_TRIG_SERIES_HPL_SHIFT 4
680 #define WM8961_DCS_TRIG_SERIES_HPL_WIDTH 1
681 #define WM8961_DCS_ENA_CHAN_HPR 0x0008
682 #define WM8961_DCS_ENA_CHAN_HPR_MASK 0x0008
683 #define WM8961_DCS_ENA_CHAN_HPR_SHIFT 3
684 #define WM8961_DCS_ENA_CHAN_HPR_WIDTH 1
685 #define WM8961_DCS_TRIG_STARTUP_HPR 0x0004
686 #define WM8961_DCS_TRIG_STARTUP_HPR_MASK 0x0004
687 #define WM8961_DCS_TRIG_STARTUP_HPR_SHIFT 2
688 #define WM8961_DCS_TRIG_STARTUP_HPR_WIDTH 1
689 #define WM8961_DCS_TRIG_SERIES_HPR 0x0001
690 #define WM8961_DCS_TRIG_SERIES_HPR_MASK 0x0001
691 #define WM8961_DCS_TRIG_SERIES_HPR_SHIFT 0
692 #define WM8961_DCS_TRIG_SERIES_HPR_WIDTH 1
693
694
695
696
697 #define WM8961_DCS_FILT_BW_SERIES_MASK 0x0030
698 #define WM8961_DCS_FILT_BW_SERIES_SHIFT 4
699 #define WM8961_DCS_FILT_BW_SERIES_WIDTH 2
700
701
702
703
704 #define WM8961_DCS_SERIES_NO_HP_MASK 0x007F
705 #define WM8961_DCS_SERIES_NO_HP_SHIFT 0
706 #define WM8961_DCS_SERIES_NO_HP_WIDTH 7
707
708
709
710
711 #define WM8961_HP_PGAS_BIAS_MASK 0x0007
712 #define WM8961_HP_PGAS_BIAS_SHIFT 0
713 #define WM8961_HP_PGAS_BIAS_WIDTH 3
714
715
716
717
718 #define WM8961_HPL_RMV_SHORT 0x0080
719 #define WM8961_HPL_RMV_SHORT_MASK 0x0080
720 #define WM8961_HPL_RMV_SHORT_SHIFT 7
721 #define WM8961_HPL_RMV_SHORT_WIDTH 1
722 #define WM8961_HPL_ENA_OUTP 0x0040
723 #define WM8961_HPL_ENA_OUTP_MASK 0x0040
724 #define WM8961_HPL_ENA_OUTP_SHIFT 6
725 #define WM8961_HPL_ENA_OUTP_WIDTH 1
726 #define WM8961_HPL_ENA_DLY 0x0020
727 #define WM8961_HPL_ENA_DLY_MASK 0x0020
728 #define WM8961_HPL_ENA_DLY_SHIFT 5
729 #define WM8961_HPL_ENA_DLY_WIDTH 1
730 #define WM8961_HPL_ENA 0x0010
731 #define WM8961_HPL_ENA_MASK 0x0010
732 #define WM8961_HPL_ENA_SHIFT 4
733 #define WM8961_HPL_ENA_WIDTH 1
734 #define WM8961_HPR_RMV_SHORT 0x0008
735 #define WM8961_HPR_RMV_SHORT_MASK 0x0008
736 #define WM8961_HPR_RMV_SHORT_SHIFT 3
737 #define WM8961_HPR_RMV_SHORT_WIDTH 1
738 #define WM8961_HPR_ENA_OUTP 0x0004
739 #define WM8961_HPR_ENA_OUTP_MASK 0x0004
740 #define WM8961_HPR_ENA_OUTP_SHIFT 2
741 #define WM8961_HPR_ENA_OUTP_WIDTH 1
742 #define WM8961_HPR_ENA_DLY 0x0002
743 #define WM8961_HPR_ENA_DLY_MASK 0x0002
744 #define WM8961_HPR_ENA_DLY_SHIFT 1
745 #define WM8961_HPR_ENA_DLY_WIDTH 1
746 #define WM8961_HPR_ENA 0x0001
747 #define WM8961_HPR_ENA_MASK 0x0001
748 #define WM8961_HPR_ENA_SHIFT 0
749 #define WM8961_HPR_ENA_WIDTH 1
750
751
752
753
754 #define WM8961_HPL_VOL_MASK 0x01C0
755 #define WM8961_HPL_VOL_SHIFT 6
756 #define WM8961_HPL_VOL_WIDTH 3
757 #define WM8961_HPR_VOL_MASK 0x0038
758 #define WM8961_HPR_VOL_SHIFT 3
759 #define WM8961_HPR_VOL_WIDTH 3
760 #define WM8961_HP_BIAS_BOOST_MASK 0x0007
761 #define WM8961_HP_BIAS_BOOST_SHIFT 0
762 #define WM8961_HP_BIAS_BOOST_WIDTH 3
763
764
765
766
767 #define WM8961_CP_ENA 0x0001
768 #define WM8961_CP_ENA_MASK 0x0001
769 #define WM8961_CP_ENA_SHIFT 0
770 #define WM8961_CP_ENA_WIDTH 1
771
772
773
774
775 #define WM8961_CP_DYN_PWR_MASK 0x0003
776 #define WM8961_CP_DYN_PWR_SHIFT 0
777 #define WM8961_CP_DYN_PWR_WIDTH 2
778
779
780
781
782 #define WM8961_WSEQ_ENA 0x0020
783 #define WM8961_WSEQ_ENA_MASK 0x0020
784 #define WM8961_WSEQ_ENA_SHIFT 5
785 #define WM8961_WSEQ_ENA_WIDTH 1
786 #define WM8961_WSEQ_WRITE_INDEX_MASK 0x001F
787 #define WM8961_WSEQ_WRITE_INDEX_SHIFT 0
788 #define WM8961_WSEQ_WRITE_INDEX_WIDTH 5
789
790
791
792
793 #define WM8961_WSEQ_EOS 0x0100
794 #define WM8961_WSEQ_EOS_MASK 0x0100
795 #define WM8961_WSEQ_EOS_SHIFT 8
796 #define WM8961_WSEQ_EOS_WIDTH 1
797 #define WM8961_WSEQ_ADDR_MASK 0x00FF
798 #define WM8961_WSEQ_ADDR_SHIFT 0
799 #define WM8961_WSEQ_ADDR_WIDTH 8
800
801
802
803
804 #define WM8961_WSEQ_DATA_MASK 0x00FF
805 #define WM8961_WSEQ_DATA_SHIFT 0
806 #define WM8961_WSEQ_DATA_WIDTH 8
807
808
809
810
811 #define WM8961_WSEQ_ABORT 0x0100
812 #define WM8961_WSEQ_ABORT_MASK 0x0100
813 #define WM8961_WSEQ_ABORT_SHIFT 8
814 #define WM8961_WSEQ_ABORT_WIDTH 1
815 #define WM8961_WSEQ_START 0x0080
816 #define WM8961_WSEQ_START_MASK 0x0080
817 #define WM8961_WSEQ_START_SHIFT 7
818 #define WM8961_WSEQ_START_WIDTH 1
819 #define WM8961_WSEQ_START_INDEX_MASK 0x003F
820 #define WM8961_WSEQ_START_INDEX_SHIFT 0
821 #define WM8961_WSEQ_START_INDEX_WIDTH 6
822
823
824
825
826 #define WM8961_WSEQ_DATA_WIDTH_MASK 0x0070
827 #define WM8961_WSEQ_DATA_WIDTH_SHIFT 4
828 #define WM8961_WSEQ_DATA_WIDTH_WIDTH 3
829 #define WM8961_WSEQ_DATA_START_MASK 0x000F
830 #define WM8961_WSEQ_DATA_START_SHIFT 0
831 #define WM8961_WSEQ_DATA_START_WIDTH 4
832
833
834
835
836 #define WM8961_WSEQ_DELAY_MASK 0x000F
837 #define WM8961_WSEQ_DELAY_SHIFT 0
838 #define WM8961_WSEQ_DELAY_WIDTH 4
839
840
841
842
843 #define WM8961_WSEQ_BUSY 0x0001
844 #define WM8961_WSEQ_BUSY_MASK 0x0001
845 #define WM8961_WSEQ_BUSY_SHIFT 0
846 #define WM8961_WSEQ_BUSY_WIDTH 1
847
848
849
850
851 #define WM8961_ARA_ENA 0x0002
852 #define WM8961_ARA_ENA_MASK 0x0002
853 #define WM8961_ARA_ENA_SHIFT 1
854 #define WM8961_ARA_ENA_WIDTH 1
855 #define WM8961_AUTO_INC 0x0001
856 #define WM8961_AUTO_INC_MASK 0x0001
857 #define WM8961_AUTO_INC_SHIFT 0
858 #define WM8961_AUTO_INC_WIDTH 1
859
860 #endif