1
2 #ifndef WM9081_H
3 #define WM9081_H
4
5
6
7
8
9
10
11
12
13 #include <sound/soc.h>
14
15
16
17
18 #define WM9081_SYSCLK_MCLK 1
19 #define WM9081_SYSCLK_FLL_MCLK 2
20
21
22
23
24 #define WM9081_SOFTWARE_RESET 0x00
25 #define WM9081_ANALOGUE_LINEOUT 0x02
26 #define WM9081_ANALOGUE_SPEAKER_PGA 0x03
27 #define WM9081_VMID_CONTROL 0x04
28 #define WM9081_BIAS_CONTROL_1 0x05
29 #define WM9081_ANALOGUE_MIXER 0x07
30 #define WM9081_ANTI_POP_CONTROL 0x08
31 #define WM9081_ANALOGUE_SPEAKER_1 0x09
32 #define WM9081_ANALOGUE_SPEAKER_2 0x0A
33 #define WM9081_POWER_MANAGEMENT 0x0B
34 #define WM9081_CLOCK_CONTROL_1 0x0C
35 #define WM9081_CLOCK_CONTROL_2 0x0D
36 #define WM9081_CLOCK_CONTROL_3 0x0E
37 #define WM9081_FLL_CONTROL_1 0x10
38 #define WM9081_FLL_CONTROL_2 0x11
39 #define WM9081_FLL_CONTROL_3 0x12
40 #define WM9081_FLL_CONTROL_4 0x13
41 #define WM9081_FLL_CONTROL_5 0x14
42 #define WM9081_AUDIO_INTERFACE_1 0x16
43 #define WM9081_AUDIO_INTERFACE_2 0x17
44 #define WM9081_AUDIO_INTERFACE_3 0x18
45 #define WM9081_AUDIO_INTERFACE_4 0x19
46 #define WM9081_INTERRUPT_STATUS 0x1A
47 #define WM9081_INTERRUPT_STATUS_MASK 0x1B
48 #define WM9081_INTERRUPT_POLARITY 0x1C
49 #define WM9081_INTERRUPT_CONTROL 0x1D
50 #define WM9081_DAC_DIGITAL_1 0x1E
51 #define WM9081_DAC_DIGITAL_2 0x1F
52 #define WM9081_DRC_1 0x20
53 #define WM9081_DRC_2 0x21
54 #define WM9081_DRC_3 0x22
55 #define WM9081_DRC_4 0x23
56 #define WM9081_WRITE_SEQUENCER_1 0x26
57 #define WM9081_WRITE_SEQUENCER_2 0x27
58 #define WM9081_MW_SLAVE_1 0x28
59 #define WM9081_EQ_1 0x2A
60 #define WM9081_EQ_2 0x2B
61 #define WM9081_EQ_3 0x2C
62 #define WM9081_EQ_4 0x2D
63 #define WM9081_EQ_5 0x2E
64 #define WM9081_EQ_6 0x2F
65 #define WM9081_EQ_7 0x30
66 #define WM9081_EQ_8 0x31
67 #define WM9081_EQ_9 0x32
68 #define WM9081_EQ_10 0x33
69 #define WM9081_EQ_11 0x34
70 #define WM9081_EQ_12 0x35
71 #define WM9081_EQ_13 0x36
72 #define WM9081_EQ_14 0x37
73 #define WM9081_EQ_15 0x38
74 #define WM9081_EQ_16 0x39
75 #define WM9081_EQ_17 0x3A
76 #define WM9081_EQ_18 0x3B
77 #define WM9081_EQ_19 0x3C
78 #define WM9081_EQ_20 0x3D
79
80 #define WM9081_REGISTER_COUNT 55
81 #define WM9081_MAX_REGISTER 0x3D
82
83
84
85
86
87
88
89
90 #define WM9081_SW_RST_DEV_ID1_MASK 0xFFFF
91 #define WM9081_SW_RST_DEV_ID1_SHIFT 0
92 #define WM9081_SW_RST_DEV_ID1_WIDTH 16
93
94
95
96
97 #define WM9081_LINEOUT_MUTE 0x0080
98 #define WM9081_LINEOUT_MUTE_MASK 0x0080
99 #define WM9081_LINEOUT_MUTE_SHIFT 7
100 #define WM9081_LINEOUT_MUTE_WIDTH 1
101 #define WM9081_LINEOUTZC 0x0040
102 #define WM9081_LINEOUTZC_MASK 0x0040
103 #define WM9081_LINEOUTZC_SHIFT 6
104 #define WM9081_LINEOUTZC_WIDTH 1
105 #define WM9081_LINEOUT_VOL_MASK 0x003F
106 #define WM9081_LINEOUT_VOL_SHIFT 0
107 #define WM9081_LINEOUT_VOL_WIDTH 6
108
109
110
111
112 #define WM9081_SPKPGA_MUTE 0x0080
113 #define WM9081_SPKPGA_MUTE_MASK 0x0080
114 #define WM9081_SPKPGA_MUTE_SHIFT 7
115 #define WM9081_SPKPGA_MUTE_WIDTH 1
116 #define WM9081_SPKPGAZC 0x0040
117 #define WM9081_SPKPGAZC_MASK 0x0040
118 #define WM9081_SPKPGAZC_SHIFT 6
119 #define WM9081_SPKPGAZC_WIDTH 1
120 #define WM9081_SPKPGA_VOL_MASK 0x003F
121 #define WM9081_SPKPGA_VOL_SHIFT 0
122 #define WM9081_SPKPGA_VOL_WIDTH 6
123
124
125
126
127 #define WM9081_VMID_BUF_ENA 0x0020
128 #define WM9081_VMID_BUF_ENA_MASK 0x0020
129 #define WM9081_VMID_BUF_ENA_SHIFT 5
130 #define WM9081_VMID_BUF_ENA_WIDTH 1
131 #define WM9081_VMID_RAMP 0x0008
132 #define WM9081_VMID_RAMP_MASK 0x0008
133 #define WM9081_VMID_RAMP_SHIFT 3
134 #define WM9081_VMID_RAMP_WIDTH 1
135 #define WM9081_VMID_SEL_MASK 0x0006
136 #define WM9081_VMID_SEL_SHIFT 1
137 #define WM9081_VMID_SEL_WIDTH 2
138 #define WM9081_VMID_FAST_ST 0x0001
139 #define WM9081_VMID_FAST_ST_MASK 0x0001
140 #define WM9081_VMID_FAST_ST_SHIFT 0
141 #define WM9081_VMID_FAST_ST_WIDTH 1
142
143
144
145
146 #define WM9081_BIAS_SRC 0x0040
147 #define WM9081_BIAS_SRC_MASK 0x0040
148 #define WM9081_BIAS_SRC_SHIFT 6
149 #define WM9081_BIAS_SRC_WIDTH 1
150 #define WM9081_STBY_BIAS_LVL 0x0020
151 #define WM9081_STBY_BIAS_LVL_MASK 0x0020
152 #define WM9081_STBY_BIAS_LVL_SHIFT 5
153 #define WM9081_STBY_BIAS_LVL_WIDTH 1
154 #define WM9081_STBY_BIAS_ENA 0x0010
155 #define WM9081_STBY_BIAS_ENA_MASK 0x0010
156 #define WM9081_STBY_BIAS_ENA_SHIFT 4
157 #define WM9081_STBY_BIAS_ENA_WIDTH 1
158 #define WM9081_BIAS_LVL_MASK 0x000C
159 #define WM9081_BIAS_LVL_SHIFT 2
160 #define WM9081_BIAS_LVL_WIDTH 2
161 #define WM9081_BIAS_ENA 0x0002
162 #define WM9081_BIAS_ENA_MASK 0x0002
163 #define WM9081_BIAS_ENA_SHIFT 1
164 #define WM9081_BIAS_ENA_WIDTH 1
165 #define WM9081_STARTUP_BIAS_ENA 0x0001
166 #define WM9081_STARTUP_BIAS_ENA_MASK 0x0001
167 #define WM9081_STARTUP_BIAS_ENA_SHIFT 0
168 #define WM9081_STARTUP_BIAS_ENA_WIDTH 1
169
170
171
172
173 #define WM9081_DAC_SEL 0x0010
174 #define WM9081_DAC_SEL_MASK 0x0010
175 #define WM9081_DAC_SEL_SHIFT 4
176 #define WM9081_DAC_SEL_WIDTH 1
177 #define WM9081_IN2_VOL 0x0008
178 #define WM9081_IN2_VOL_MASK 0x0008
179 #define WM9081_IN2_VOL_SHIFT 3
180 #define WM9081_IN2_VOL_WIDTH 1
181 #define WM9081_IN2_ENA 0x0004
182 #define WM9081_IN2_ENA_MASK 0x0004
183 #define WM9081_IN2_ENA_SHIFT 2
184 #define WM9081_IN2_ENA_WIDTH 1
185 #define WM9081_IN1_VOL 0x0002
186 #define WM9081_IN1_VOL_MASK 0x0002
187 #define WM9081_IN1_VOL_SHIFT 1
188 #define WM9081_IN1_VOL_WIDTH 1
189 #define WM9081_IN1_ENA 0x0001
190 #define WM9081_IN1_ENA_MASK 0x0001
191 #define WM9081_IN1_ENA_SHIFT 0
192 #define WM9081_IN1_ENA_WIDTH 1
193
194
195
196
197 #define WM9081_LINEOUT_DISCH 0x0004
198 #define WM9081_LINEOUT_DISCH_MASK 0x0004
199 #define WM9081_LINEOUT_DISCH_SHIFT 2
200 #define WM9081_LINEOUT_DISCH_WIDTH 1
201 #define WM9081_LINEOUT_VROI 0x0002
202 #define WM9081_LINEOUT_VROI_MASK 0x0002
203 #define WM9081_LINEOUT_VROI_SHIFT 1
204 #define WM9081_LINEOUT_VROI_WIDTH 1
205 #define WM9081_LINEOUT_CLAMP 0x0001
206 #define WM9081_LINEOUT_CLAMP_MASK 0x0001
207 #define WM9081_LINEOUT_CLAMP_SHIFT 0
208 #define WM9081_LINEOUT_CLAMP_WIDTH 1
209
210
211
212
213 #define WM9081_SPK_DCGAIN_MASK 0x0038
214 #define WM9081_SPK_DCGAIN_SHIFT 3
215 #define WM9081_SPK_DCGAIN_WIDTH 3
216 #define WM9081_SPK_ACGAIN_MASK 0x0007
217 #define WM9081_SPK_ACGAIN_SHIFT 0
218 #define WM9081_SPK_ACGAIN_WIDTH 3
219
220
221
222
223 #define WM9081_SPK_MODE 0x0040
224 #define WM9081_SPK_MODE_MASK 0x0040
225 #define WM9081_SPK_MODE_SHIFT 6
226 #define WM9081_SPK_MODE_WIDTH 1
227 #define WM9081_SPK_INV_MUTE 0x0010
228 #define WM9081_SPK_INV_MUTE_MASK 0x0010
229 #define WM9081_SPK_INV_MUTE_SHIFT 4
230 #define WM9081_SPK_INV_MUTE_WIDTH 1
231 #define WM9081_OUT_SPK_CTRL 0x0008
232 #define WM9081_OUT_SPK_CTRL_MASK 0x0008
233 #define WM9081_OUT_SPK_CTRL_SHIFT 3
234 #define WM9081_OUT_SPK_CTRL_WIDTH 1
235
236
237
238
239 #define WM9081_TSHUT_ENA 0x0100
240 #define WM9081_TSHUT_ENA_MASK 0x0100
241 #define WM9081_TSHUT_ENA_SHIFT 8
242 #define WM9081_TSHUT_ENA_WIDTH 1
243 #define WM9081_TSENSE_ENA 0x0080
244 #define WM9081_TSENSE_ENA_MASK 0x0080
245 #define WM9081_TSENSE_ENA_SHIFT 7
246 #define WM9081_TSENSE_ENA_WIDTH 1
247 #define WM9081_TEMP_SHUT 0x0040
248 #define WM9081_TEMP_SHUT_MASK 0x0040
249 #define WM9081_TEMP_SHUT_SHIFT 6
250 #define WM9081_TEMP_SHUT_WIDTH 1
251 #define WM9081_LINEOUT_ENA 0x0010
252 #define WM9081_LINEOUT_ENA_MASK 0x0010
253 #define WM9081_LINEOUT_ENA_SHIFT 4
254 #define WM9081_LINEOUT_ENA_WIDTH 1
255 #define WM9081_SPKPGA_ENA 0x0004
256 #define WM9081_SPKPGA_ENA_MASK 0x0004
257 #define WM9081_SPKPGA_ENA_SHIFT 2
258 #define WM9081_SPKPGA_ENA_WIDTH 1
259 #define WM9081_SPK_ENA 0x0002
260 #define WM9081_SPK_ENA_MASK 0x0002
261 #define WM9081_SPK_ENA_SHIFT 1
262 #define WM9081_SPK_ENA_WIDTH 1
263 #define WM9081_DAC_ENA 0x0001
264 #define WM9081_DAC_ENA_MASK 0x0001
265 #define WM9081_DAC_ENA_SHIFT 0
266 #define WM9081_DAC_ENA_WIDTH 1
267
268
269
270
271 #define WM9081_CLK_OP_DIV_MASK 0x1C00
272 #define WM9081_CLK_OP_DIV_SHIFT 10
273 #define WM9081_CLK_OP_DIV_WIDTH 3
274 #define WM9081_CLK_TO_DIV_MASK 0x0300
275 #define WM9081_CLK_TO_DIV_SHIFT 8
276 #define WM9081_CLK_TO_DIV_WIDTH 2
277 #define WM9081_MCLKDIV2 0x0080
278 #define WM9081_MCLKDIV2_MASK 0x0080
279 #define WM9081_MCLKDIV2_SHIFT 7
280 #define WM9081_MCLKDIV2_WIDTH 1
281
282
283
284
285 #define WM9081_CLK_SYS_RATE_MASK 0x00F0
286 #define WM9081_CLK_SYS_RATE_SHIFT 4
287 #define WM9081_CLK_SYS_RATE_WIDTH 4
288 #define WM9081_SAMPLE_RATE_MASK 0x000F
289 #define WM9081_SAMPLE_RATE_SHIFT 0
290 #define WM9081_SAMPLE_RATE_WIDTH 4
291
292
293
294
295 #define WM9081_CLK_SRC_SEL 0x2000
296 #define WM9081_CLK_SRC_SEL_MASK 0x2000
297 #define WM9081_CLK_SRC_SEL_SHIFT 13
298 #define WM9081_CLK_SRC_SEL_WIDTH 1
299 #define WM9081_CLK_OP_ENA 0x0020
300 #define WM9081_CLK_OP_ENA_MASK 0x0020
301 #define WM9081_CLK_OP_ENA_SHIFT 5
302 #define WM9081_CLK_OP_ENA_WIDTH 1
303 #define WM9081_CLK_TO_ENA 0x0004
304 #define WM9081_CLK_TO_ENA_MASK 0x0004
305 #define WM9081_CLK_TO_ENA_SHIFT 2
306 #define WM9081_CLK_TO_ENA_WIDTH 1
307 #define WM9081_CLK_DSP_ENA 0x0002
308 #define WM9081_CLK_DSP_ENA_MASK 0x0002
309 #define WM9081_CLK_DSP_ENA_SHIFT 1
310 #define WM9081_CLK_DSP_ENA_WIDTH 1
311 #define WM9081_CLK_SYS_ENA 0x0001
312 #define WM9081_CLK_SYS_ENA_MASK 0x0001
313 #define WM9081_CLK_SYS_ENA_SHIFT 0
314 #define WM9081_CLK_SYS_ENA_WIDTH 1
315
316
317
318
319 #define WM9081_FLL_HOLD 0x0008
320 #define WM9081_FLL_HOLD_MASK 0x0008
321 #define WM9081_FLL_HOLD_SHIFT 3
322 #define WM9081_FLL_HOLD_WIDTH 1
323 #define WM9081_FLL_FRAC 0x0004
324 #define WM9081_FLL_FRAC_MASK 0x0004
325 #define WM9081_FLL_FRAC_SHIFT 2
326 #define WM9081_FLL_FRAC_WIDTH 1
327 #define WM9081_FLL_ENA 0x0001
328 #define WM9081_FLL_ENA_MASK 0x0001
329 #define WM9081_FLL_ENA_SHIFT 0
330 #define WM9081_FLL_ENA_WIDTH 1
331
332
333
334
335 #define WM9081_FLL_OUTDIV_MASK 0x0700
336 #define WM9081_FLL_OUTDIV_SHIFT 8
337 #define WM9081_FLL_OUTDIV_WIDTH 3
338 #define WM9081_FLL_CTRL_RATE_MASK 0x0070
339 #define WM9081_FLL_CTRL_RATE_SHIFT 4
340 #define WM9081_FLL_CTRL_RATE_WIDTH 3
341 #define WM9081_FLL_FRATIO_MASK 0x0007
342 #define WM9081_FLL_FRATIO_SHIFT 0
343 #define WM9081_FLL_FRATIO_WIDTH 3
344
345
346
347
348 #define WM9081_FLL_K_MASK 0xFFFF
349 #define WM9081_FLL_K_SHIFT 0
350 #define WM9081_FLL_K_WIDTH 16
351
352
353
354
355 #define WM9081_FLL_N_MASK 0x7FE0
356 #define WM9081_FLL_N_SHIFT 5
357 #define WM9081_FLL_N_WIDTH 10
358 #define WM9081_FLL_GAIN_MASK 0x000F
359 #define WM9081_FLL_GAIN_SHIFT 0
360 #define WM9081_FLL_GAIN_WIDTH 4
361
362
363
364
365 #define WM9081_FLL_CLK_REF_DIV_MASK 0x0018
366 #define WM9081_FLL_CLK_REF_DIV_SHIFT 3
367 #define WM9081_FLL_CLK_REF_DIV_WIDTH 2
368 #define WM9081_FLL_CLK_SRC_MASK 0x0003
369 #define WM9081_FLL_CLK_SRC_SHIFT 0
370 #define WM9081_FLL_CLK_SRC_WIDTH 2
371
372
373
374
375 #define WM9081_AIFDAC_CHAN 0x0040
376 #define WM9081_AIFDAC_CHAN_MASK 0x0040
377 #define WM9081_AIFDAC_CHAN_SHIFT 6
378 #define WM9081_AIFDAC_CHAN_WIDTH 1
379 #define WM9081_AIFDAC_TDM_SLOT_MASK 0x0030
380 #define WM9081_AIFDAC_TDM_SLOT_SHIFT 4
381 #define WM9081_AIFDAC_TDM_SLOT_WIDTH 2
382 #define WM9081_AIFDAC_TDM_MODE_MASK 0x000C
383 #define WM9081_AIFDAC_TDM_MODE_SHIFT 2
384 #define WM9081_AIFDAC_TDM_MODE_WIDTH 2
385 #define WM9081_DAC_COMP 0x0002
386 #define WM9081_DAC_COMP_MASK 0x0002
387 #define WM9081_DAC_COMP_SHIFT 1
388 #define WM9081_DAC_COMP_WIDTH 1
389 #define WM9081_DAC_COMPMODE 0x0001
390 #define WM9081_DAC_COMPMODE_MASK 0x0001
391 #define WM9081_DAC_COMPMODE_SHIFT 0
392 #define WM9081_DAC_COMPMODE_WIDTH 1
393
394
395
396
397 #define WM9081_AIF_TRIS 0x0200
398 #define WM9081_AIF_TRIS_MASK 0x0200
399 #define WM9081_AIF_TRIS_SHIFT 9
400 #define WM9081_AIF_TRIS_WIDTH 1
401 #define WM9081_DAC_DAT_INV 0x0100
402 #define WM9081_DAC_DAT_INV_MASK 0x0100
403 #define WM9081_DAC_DAT_INV_SHIFT 8
404 #define WM9081_DAC_DAT_INV_WIDTH 1
405 #define WM9081_AIF_BCLK_INV 0x0080
406 #define WM9081_AIF_BCLK_INV_MASK 0x0080
407 #define WM9081_AIF_BCLK_INV_SHIFT 7
408 #define WM9081_AIF_BCLK_INV_WIDTH 1
409 #define WM9081_BCLK_DIR 0x0040
410 #define WM9081_BCLK_DIR_MASK 0x0040
411 #define WM9081_BCLK_DIR_SHIFT 6
412 #define WM9081_BCLK_DIR_WIDTH 1
413 #define WM9081_LRCLK_DIR 0x0020
414 #define WM9081_LRCLK_DIR_MASK 0x0020
415 #define WM9081_LRCLK_DIR_SHIFT 5
416 #define WM9081_LRCLK_DIR_WIDTH 1
417 #define WM9081_AIF_LRCLK_INV 0x0010
418 #define WM9081_AIF_LRCLK_INV_MASK 0x0010
419 #define WM9081_AIF_LRCLK_INV_SHIFT 4
420 #define WM9081_AIF_LRCLK_INV_WIDTH 1
421 #define WM9081_AIF_WL_MASK 0x000C
422 #define WM9081_AIF_WL_SHIFT 2
423 #define WM9081_AIF_WL_WIDTH 2
424 #define WM9081_AIF_FMT_MASK 0x0003
425 #define WM9081_AIF_FMT_SHIFT 0
426 #define WM9081_AIF_FMT_WIDTH 2
427
428
429
430
431 #define WM9081_BCLK_DIV_MASK 0x001F
432 #define WM9081_BCLK_DIV_SHIFT 0
433 #define WM9081_BCLK_DIV_WIDTH 5
434
435
436
437
438 #define WM9081_LRCLK_RATE_MASK 0x07FF
439 #define WM9081_LRCLK_RATE_SHIFT 0
440 #define WM9081_LRCLK_RATE_WIDTH 11
441
442
443
444
445 #define WM9081_WSEQ_BUSY_EINT 0x0004
446 #define WM9081_WSEQ_BUSY_EINT_MASK 0x0004
447 #define WM9081_WSEQ_BUSY_EINT_SHIFT 2
448 #define WM9081_WSEQ_BUSY_EINT_WIDTH 1
449 #define WM9081_TSHUT_EINT 0x0001
450 #define WM9081_TSHUT_EINT_MASK 0x0001
451 #define WM9081_TSHUT_EINT_SHIFT 0
452 #define WM9081_TSHUT_EINT_WIDTH 1
453
454
455
456
457 #define WM9081_IM_WSEQ_BUSY_EINT 0x0004
458 #define WM9081_IM_WSEQ_BUSY_EINT_MASK 0x0004
459 #define WM9081_IM_WSEQ_BUSY_EINT_SHIFT 2
460 #define WM9081_IM_WSEQ_BUSY_EINT_WIDTH 1
461 #define WM9081_IM_TSHUT_EINT 0x0001
462 #define WM9081_IM_TSHUT_EINT_MASK 0x0001
463 #define WM9081_IM_TSHUT_EINT_SHIFT 0
464 #define WM9081_IM_TSHUT_EINT_WIDTH 1
465
466
467
468
469 #define WM9081_TSHUT_INV 0x0001
470 #define WM9081_TSHUT_INV_MASK 0x0001
471 #define WM9081_TSHUT_INV_SHIFT 0
472 #define WM9081_TSHUT_INV_WIDTH 1
473
474
475
476
477 #define WM9081_IRQ_POL 0x8000
478 #define WM9081_IRQ_POL_MASK 0x8000
479 #define WM9081_IRQ_POL_SHIFT 15
480 #define WM9081_IRQ_POL_WIDTH 1
481 #define WM9081_IRQ_OP_CTRL 0x0001
482 #define WM9081_IRQ_OP_CTRL_MASK 0x0001
483 #define WM9081_IRQ_OP_CTRL_SHIFT 0
484 #define WM9081_IRQ_OP_CTRL_WIDTH 1
485
486
487
488
489 #define WM9081_DAC_VOL_MASK 0x00FF
490 #define WM9081_DAC_VOL_SHIFT 0
491 #define WM9081_DAC_VOL_WIDTH 8
492
493
494
495
496 #define WM9081_DAC_MUTERATE 0x0400
497 #define WM9081_DAC_MUTERATE_MASK 0x0400
498 #define WM9081_DAC_MUTERATE_SHIFT 10
499 #define WM9081_DAC_MUTERATE_WIDTH 1
500 #define WM9081_DAC_MUTEMODE 0x0200
501 #define WM9081_DAC_MUTEMODE_MASK 0x0200
502 #define WM9081_DAC_MUTEMODE_SHIFT 9
503 #define WM9081_DAC_MUTEMODE_WIDTH 1
504 #define WM9081_DAC_MUTE 0x0008
505 #define WM9081_DAC_MUTE_MASK 0x0008
506 #define WM9081_DAC_MUTE_SHIFT 3
507 #define WM9081_DAC_MUTE_WIDTH 1
508 #define WM9081_DEEMPH_MASK 0x0006
509 #define WM9081_DEEMPH_SHIFT 1
510 #define WM9081_DEEMPH_WIDTH 2
511
512
513
514
515 #define WM9081_DRC_ENA 0x8000
516 #define WM9081_DRC_ENA_MASK 0x8000
517 #define WM9081_DRC_ENA_SHIFT 15
518 #define WM9081_DRC_ENA_WIDTH 1
519 #define WM9081_DRC_STARTUP_GAIN_MASK 0x07C0
520 #define WM9081_DRC_STARTUP_GAIN_SHIFT 6
521 #define WM9081_DRC_STARTUP_GAIN_WIDTH 5
522 #define WM9081_DRC_FF_DLY 0x0020
523 #define WM9081_DRC_FF_DLY_MASK 0x0020
524 #define WM9081_DRC_FF_DLY_SHIFT 5
525 #define WM9081_DRC_FF_DLY_WIDTH 1
526 #define WM9081_DRC_QR 0x0004
527 #define WM9081_DRC_QR_MASK 0x0004
528 #define WM9081_DRC_QR_SHIFT 2
529 #define WM9081_DRC_QR_WIDTH 1
530 #define WM9081_DRC_ANTICLIP 0x0002
531 #define WM9081_DRC_ANTICLIP_MASK 0x0002
532 #define WM9081_DRC_ANTICLIP_SHIFT 1
533 #define WM9081_DRC_ANTICLIP_WIDTH 1
534
535
536
537
538 #define WM9081_DRC_ATK_MASK 0xF000
539 #define WM9081_DRC_ATK_SHIFT 12
540 #define WM9081_DRC_ATK_WIDTH 4
541 #define WM9081_DRC_DCY_MASK 0x0F00
542 #define WM9081_DRC_DCY_SHIFT 8
543 #define WM9081_DRC_DCY_WIDTH 4
544 #define WM9081_DRC_QR_THR_MASK 0x00C0
545 #define WM9081_DRC_QR_THR_SHIFT 6
546 #define WM9081_DRC_QR_THR_WIDTH 2
547 #define WM9081_DRC_QR_DCY_MASK 0x0030
548 #define WM9081_DRC_QR_DCY_SHIFT 4
549 #define WM9081_DRC_QR_DCY_WIDTH 2
550 #define WM9081_DRC_MINGAIN_MASK 0x000C
551 #define WM9081_DRC_MINGAIN_SHIFT 2
552 #define WM9081_DRC_MINGAIN_WIDTH 2
553 #define WM9081_DRC_MAXGAIN_MASK 0x0003
554 #define WM9081_DRC_MAXGAIN_SHIFT 0
555 #define WM9081_DRC_MAXGAIN_WIDTH 2
556
557
558
559
560 #define WM9081_DRC_HI_COMP_MASK 0x0038
561 #define WM9081_DRC_HI_COMP_SHIFT 3
562 #define WM9081_DRC_HI_COMP_WIDTH 3
563 #define WM9081_DRC_LO_COMP_MASK 0x0007
564 #define WM9081_DRC_LO_COMP_SHIFT 0
565 #define WM9081_DRC_LO_COMP_WIDTH 3
566
567
568
569
570 #define WM9081_DRC_KNEE_IP_MASK 0x07E0
571 #define WM9081_DRC_KNEE_IP_SHIFT 5
572 #define WM9081_DRC_KNEE_IP_WIDTH 6
573 #define WM9081_DRC_KNEE_OP_MASK 0x001F
574 #define WM9081_DRC_KNEE_OP_SHIFT 0
575 #define WM9081_DRC_KNEE_OP_WIDTH 5
576
577
578
579
580 #define WM9081_WSEQ_ENA 0x8000
581 #define WM9081_WSEQ_ENA_MASK 0x8000
582 #define WM9081_WSEQ_ENA_SHIFT 15
583 #define WM9081_WSEQ_ENA_WIDTH 1
584 #define WM9081_WSEQ_ABORT 0x0200
585 #define WM9081_WSEQ_ABORT_MASK 0x0200
586 #define WM9081_WSEQ_ABORT_SHIFT 9
587 #define WM9081_WSEQ_ABORT_WIDTH 1
588 #define WM9081_WSEQ_START 0x0100
589 #define WM9081_WSEQ_START_MASK 0x0100
590 #define WM9081_WSEQ_START_SHIFT 8
591 #define WM9081_WSEQ_START_WIDTH 1
592 #define WM9081_WSEQ_START_INDEX_MASK 0x007F
593 #define WM9081_WSEQ_START_INDEX_SHIFT 0
594 #define WM9081_WSEQ_START_INDEX_WIDTH 7
595
596
597
598
599 #define WM9081_WSEQ_CURRENT_INDEX_MASK 0x07F0
600 #define WM9081_WSEQ_CURRENT_INDEX_SHIFT 4
601 #define WM9081_WSEQ_CURRENT_INDEX_WIDTH 7
602 #define WM9081_WSEQ_BUSY 0x0001
603 #define WM9081_WSEQ_BUSY_MASK 0x0001
604 #define WM9081_WSEQ_BUSY_SHIFT 0
605 #define WM9081_WSEQ_BUSY_WIDTH 1
606
607
608
609
610 #define WM9081_SPI_CFG 0x0020
611 #define WM9081_SPI_CFG_MASK 0x0020
612 #define WM9081_SPI_CFG_SHIFT 5
613 #define WM9081_SPI_CFG_WIDTH 1
614 #define WM9081_SPI_4WIRE 0x0010
615 #define WM9081_SPI_4WIRE_MASK 0x0010
616 #define WM9081_SPI_4WIRE_SHIFT 4
617 #define WM9081_SPI_4WIRE_WIDTH 1
618 #define WM9081_ARA_ENA 0x0008
619 #define WM9081_ARA_ENA_MASK 0x0008
620 #define WM9081_ARA_ENA_SHIFT 3
621 #define WM9081_ARA_ENA_WIDTH 1
622 #define WM9081_AUTO_INC 0x0002
623 #define WM9081_AUTO_INC_MASK 0x0002
624 #define WM9081_AUTO_INC_SHIFT 1
625 #define WM9081_AUTO_INC_WIDTH 1
626
627
628
629
630 #define WM9081_EQ_B1_GAIN_MASK 0xF800
631 #define WM9081_EQ_B1_GAIN_SHIFT 11
632 #define WM9081_EQ_B1_GAIN_WIDTH 5
633 #define WM9081_EQ_B2_GAIN_MASK 0x07C0
634 #define WM9081_EQ_B2_GAIN_SHIFT 6
635 #define WM9081_EQ_B2_GAIN_WIDTH 5
636 #define WM9081_EQ_B4_GAIN_MASK 0x003E
637 #define WM9081_EQ_B4_GAIN_SHIFT 1
638 #define WM9081_EQ_B4_GAIN_WIDTH 5
639 #define WM9081_EQ_ENA 0x0001
640 #define WM9081_EQ_ENA_MASK 0x0001
641 #define WM9081_EQ_ENA_SHIFT 0
642 #define WM9081_EQ_ENA_WIDTH 1
643
644
645
646
647 #define WM9081_EQ_B3_GAIN_MASK 0xF800
648 #define WM9081_EQ_B3_GAIN_SHIFT 11
649 #define WM9081_EQ_B3_GAIN_WIDTH 5
650 #define WM9081_EQ_B5_GAIN_MASK 0x07C0
651 #define WM9081_EQ_B5_GAIN_SHIFT 6
652 #define WM9081_EQ_B5_GAIN_WIDTH 5
653
654
655
656
657 #define WM9081_EQ_B1_A_MASK 0xFFFF
658 #define WM9081_EQ_B1_A_SHIFT 0
659 #define WM9081_EQ_B1_A_WIDTH 16
660
661
662
663
664 #define WM9081_EQ_B1_B_MASK 0xFFFF
665 #define WM9081_EQ_B1_B_SHIFT 0
666 #define WM9081_EQ_B1_B_WIDTH 16
667
668
669
670
671 #define WM9081_EQ_B1_PG_MASK 0xFFFF
672 #define WM9081_EQ_B1_PG_SHIFT 0
673 #define WM9081_EQ_B1_PG_WIDTH 16
674
675
676
677
678 #define WM9081_EQ_B2_A_MASK 0xFFFF
679 #define WM9081_EQ_B2_A_SHIFT 0
680 #define WM9081_EQ_B2_A_WIDTH 16
681
682
683
684
685 #define WM9081_EQ_B2_B_MASK 0xFFFF
686 #define WM9081_EQ_B2_B_SHIFT 0
687 #define WM9081_EQ_B2_B_WIDTH 16
688
689
690
691
692 #define WM9081_EQ_B2_C_MASK 0xFFFF
693 #define WM9081_EQ_B2_C_SHIFT 0
694 #define WM9081_EQ_B2_C_WIDTH 16
695
696
697
698
699 #define WM9081_EQ_B2_PG_MASK 0xFFFF
700 #define WM9081_EQ_B2_PG_SHIFT 0
701 #define WM9081_EQ_B2_PG_WIDTH 16
702
703
704
705
706 #define WM9081_EQ_B4_A_MASK 0xFFFF
707 #define WM9081_EQ_B4_A_SHIFT 0
708 #define WM9081_EQ_B4_A_WIDTH 16
709
710
711
712
713 #define WM9081_EQ_B4_B_MASK 0xFFFF
714 #define WM9081_EQ_B4_B_SHIFT 0
715 #define WM9081_EQ_B4_B_WIDTH 16
716
717
718
719
720 #define WM9081_EQ_B4_C_MASK 0xFFFF
721 #define WM9081_EQ_B4_C_SHIFT 0
722 #define WM9081_EQ_B4_C_WIDTH 16
723
724
725
726
727 #define WM9081_EQ_B4_PG_MASK 0xFFFF
728 #define WM9081_EQ_B4_PG_SHIFT 0
729 #define WM9081_EQ_B4_PG_WIDTH 16
730
731
732
733
734 #define WM9081_EQ_B3_A_MASK 0xFFFF
735 #define WM9081_EQ_B3_A_SHIFT 0
736 #define WM9081_EQ_B3_A_WIDTH 16
737
738
739
740
741 #define WM9081_EQ_B3_B_MASK 0xFFFF
742 #define WM9081_EQ_B3_B_SHIFT 0
743 #define WM9081_EQ_B3_B_WIDTH 16
744
745
746
747
748 #define WM9081_EQ_B3_C_MASK 0xFFFF
749 #define WM9081_EQ_B3_C_SHIFT 0
750 #define WM9081_EQ_B3_C_WIDTH 16
751
752
753
754
755 #define WM9081_EQ_B3_PG_MASK 0xFFFF
756 #define WM9081_EQ_B3_PG_SHIFT 0
757 #define WM9081_EQ_B3_PG_WIDTH 16
758
759
760
761
762 #define WM9081_EQ_B5_A_MASK 0xFFFF
763 #define WM9081_EQ_B5_A_SHIFT 0
764 #define WM9081_EQ_B5_A_WIDTH 16
765
766
767
768
769 #define WM9081_EQ_B5_B_MASK 0xFFFF
770 #define WM9081_EQ_B5_B_SHIFT 0
771 #define WM9081_EQ_B5_B_WIDTH 16
772
773
774
775
776 #define WM9081_EQ_B5_PG_MASK 0xFFFF
777 #define WM9081_EQ_B5_PG_SHIFT 0
778 #define WM9081_EQ_B5_PG_WIDTH 16
779
780
781 #endif