1
2
3
4
5
6
7
8
9 #ifndef _WM8903_H
10 #define _WM8903_H
11
12 #include <linux/i2c.h>
13
14 extern int wm8903_mic_detect(struct snd_soc_component *component,
15 struct snd_soc_jack *jack,
16 int det, int shrt);
17
18
19
20
21
22 #define WM8903_SW_RESET_AND_ID 0x00
23 #define WM8903_REVISION_NUMBER 0x01
24 #define WM8903_BIAS_CONTROL_0 0x04
25 #define WM8903_VMID_CONTROL_0 0x05
26 #define WM8903_MIC_BIAS_CONTROL_0 0x06
27 #define WM8903_ANALOGUE_DAC_0 0x08
28 #define WM8903_ANALOGUE_ADC_0 0x0A
29 #define WM8903_POWER_MANAGEMENT_0 0x0C
30 #define WM8903_POWER_MANAGEMENT_1 0x0D
31 #define WM8903_POWER_MANAGEMENT_2 0x0E
32 #define WM8903_POWER_MANAGEMENT_3 0x0F
33 #define WM8903_POWER_MANAGEMENT_4 0x10
34 #define WM8903_POWER_MANAGEMENT_5 0x11
35 #define WM8903_POWER_MANAGEMENT_6 0x12
36 #define WM8903_CLOCK_RATES_0 0x14
37 #define WM8903_CLOCK_RATES_1 0x15
38 #define WM8903_CLOCK_RATES_2 0x16
39 #define WM8903_AUDIO_INTERFACE_0 0x18
40 #define WM8903_AUDIO_INTERFACE_1 0x19
41 #define WM8903_AUDIO_INTERFACE_2 0x1A
42 #define WM8903_AUDIO_INTERFACE_3 0x1B
43 #define WM8903_DAC_DIGITAL_VOLUME_LEFT 0x1E
44 #define WM8903_DAC_DIGITAL_VOLUME_RIGHT 0x1F
45 #define WM8903_DAC_DIGITAL_0 0x20
46 #define WM8903_DAC_DIGITAL_1 0x21
47 #define WM8903_ADC_DIGITAL_VOLUME_LEFT 0x24
48 #define WM8903_ADC_DIGITAL_VOLUME_RIGHT 0x25
49 #define WM8903_ADC_DIGITAL_0 0x26
50 #define WM8903_DIGITAL_MICROPHONE_0 0x27
51 #define WM8903_DRC_0 0x28
52 #define WM8903_DRC_1 0x29
53 #define WM8903_DRC_2 0x2A
54 #define WM8903_DRC_3 0x2B
55 #define WM8903_ANALOGUE_LEFT_INPUT_0 0x2C
56 #define WM8903_ANALOGUE_RIGHT_INPUT_0 0x2D
57 #define WM8903_ANALOGUE_LEFT_INPUT_1 0x2E
58 #define WM8903_ANALOGUE_RIGHT_INPUT_1 0x2F
59 #define WM8903_ANALOGUE_LEFT_MIX_0 0x32
60 #define WM8903_ANALOGUE_RIGHT_MIX_0 0x33
61 #define WM8903_ANALOGUE_SPK_MIX_LEFT_0 0x34
62 #define WM8903_ANALOGUE_SPK_MIX_LEFT_1 0x35
63 #define WM8903_ANALOGUE_SPK_MIX_RIGHT_0 0x36
64 #define WM8903_ANALOGUE_SPK_MIX_RIGHT_1 0x37
65 #define WM8903_ANALOGUE_OUT1_LEFT 0x39
66 #define WM8903_ANALOGUE_OUT1_RIGHT 0x3A
67 #define WM8903_ANALOGUE_OUT2_LEFT 0x3B
68 #define WM8903_ANALOGUE_OUT2_RIGHT 0x3C
69 #define WM8903_ANALOGUE_OUT3_LEFT 0x3E
70 #define WM8903_ANALOGUE_OUT3_RIGHT 0x3F
71 #define WM8903_ANALOGUE_SPK_OUTPUT_CONTROL_0 0x41
72 #define WM8903_DC_SERVO_0 0x43
73 #define WM8903_DC_SERVO_2 0x45
74 #define WM8903_DC_SERVO_4 0x47
75 #define WM8903_DC_SERVO_5 0x48
76 #define WM8903_DC_SERVO_6 0x49
77 #define WM8903_DC_SERVO_7 0x4A
78 #define WM8903_DC_SERVO_READBACK_1 0x51
79 #define WM8903_DC_SERVO_READBACK_2 0x52
80 #define WM8903_DC_SERVO_READBACK_3 0x53
81 #define WM8903_DC_SERVO_READBACK_4 0x54
82 #define WM8903_ANALOGUE_HP_0 0x5A
83 #define WM8903_ANALOGUE_LINEOUT_0 0x5E
84 #define WM8903_CHARGE_PUMP_0 0x62
85 #define WM8903_CLASS_W_0 0x68
86 #define WM8903_WRITE_SEQUENCER_0 0x6C
87 #define WM8903_WRITE_SEQUENCER_1 0x6D
88 #define WM8903_WRITE_SEQUENCER_2 0x6E
89 #define WM8903_WRITE_SEQUENCER_3 0x6F
90 #define WM8903_WRITE_SEQUENCER_4 0x70
91 #define WM8903_CONTROL_INTERFACE 0x72
92 #define WM8903_GPIO_CONTROL_1 0x74
93 #define WM8903_GPIO_CONTROL_2 0x75
94 #define WM8903_GPIO_CONTROL_3 0x76
95 #define WM8903_GPIO_CONTROL_4 0x77
96 #define WM8903_GPIO_CONTROL_5 0x78
97 #define WM8903_INTERRUPT_STATUS_1 0x79
98 #define WM8903_INTERRUPT_STATUS_1_MASK 0x7A
99 #define WM8903_INTERRUPT_POLARITY_1 0x7B
100 #define WM8903_INTERRUPT_CONTROL 0x7E
101 #define WM8903_CLOCK_RATE_TEST_4 0xA4
102 #define WM8903_ANALOGUE_OUTPUT_BIAS_0 0xAC
103
104 #define WM8903_REGISTER_COUNT 75
105 #define WM8903_MAX_REGISTER 0xAC
106
107
108
109
110
111
112
113
114 #define WM8903_SW_RESET_DEV_ID1_MASK 0xFFFF
115 #define WM8903_SW_RESET_DEV_ID1_SHIFT 0
116 #define WM8903_SW_RESET_DEV_ID1_WIDTH 16
117
118
119
120
121 #define WM8903_CHIP_REV_MASK 0x000F
122 #define WM8903_CHIP_REV_SHIFT 0
123 #define WM8903_CHIP_REV_WIDTH 4
124
125
126
127
128 #define WM8903_POBCTRL 0x0010
129 #define WM8903_POBCTRL_MASK 0x0010
130 #define WM8903_POBCTRL_SHIFT 4
131 #define WM8903_POBCTRL_WIDTH 1
132 #define WM8903_ISEL_MASK 0x000C
133 #define WM8903_ISEL_SHIFT 2
134 #define WM8903_ISEL_WIDTH 2
135 #define WM8903_STARTUP_BIAS_ENA 0x0002
136 #define WM8903_STARTUP_BIAS_ENA_MASK 0x0002
137 #define WM8903_STARTUP_BIAS_ENA_SHIFT 1
138 #define WM8903_STARTUP_BIAS_ENA_WIDTH 1
139 #define WM8903_BIAS_ENA 0x0001
140 #define WM8903_BIAS_ENA_MASK 0x0001
141 #define WM8903_BIAS_ENA_SHIFT 0
142 #define WM8903_BIAS_ENA_WIDTH 1
143
144
145
146
147 #define WM8903_VMID_TIE_ENA 0x0080
148 #define WM8903_VMID_TIE_ENA_MASK 0x0080
149 #define WM8903_VMID_TIE_ENA_SHIFT 7
150 #define WM8903_VMID_TIE_ENA_WIDTH 1
151 #define WM8903_BUFIO_ENA 0x0040
152 #define WM8903_BUFIO_ENA_MASK 0x0040
153 #define WM8903_BUFIO_ENA_SHIFT 6
154 #define WM8903_BUFIO_ENA_WIDTH 1
155 #define WM8903_VMID_IO_ENA 0x0020
156 #define WM8903_VMID_IO_ENA_MASK 0x0020
157 #define WM8903_VMID_IO_ENA_SHIFT 5
158 #define WM8903_VMID_IO_ENA_WIDTH 1
159 #define WM8903_VMID_SOFT_MASK 0x0018
160 #define WM8903_VMID_SOFT_SHIFT 3
161 #define WM8903_VMID_SOFT_WIDTH 2
162 #define WM8903_VMID_RES_MASK 0x0006
163 #define WM8903_VMID_RES_SHIFT 1
164 #define WM8903_VMID_RES_WIDTH 2
165 #define WM8903_VMID_BUF_ENA 0x0001
166 #define WM8903_VMID_BUF_ENA_MASK 0x0001
167 #define WM8903_VMID_BUF_ENA_SHIFT 0
168 #define WM8903_VMID_BUF_ENA_WIDTH 1
169
170 #define WM8903_VMID_RES_50K 2
171 #define WM8903_VMID_RES_250K 4
172 #define WM8903_VMID_RES_5K 6
173
174
175
176
177 #define WM8903_DACBIAS_SEL_MASK 0x0018
178 #define WM8903_DACBIAS_SEL_SHIFT 3
179 #define WM8903_DACBIAS_SEL_WIDTH 2
180 #define WM8903_DACVMID_BIAS_SEL_MASK 0x0006
181 #define WM8903_DACVMID_BIAS_SEL_SHIFT 1
182 #define WM8903_DACVMID_BIAS_SEL_WIDTH 2
183
184
185
186
187 #define WM8903_ADC_OSR128 0x0001
188 #define WM8903_ADC_OSR128_MASK 0x0001
189 #define WM8903_ADC_OSR128_SHIFT 0
190 #define WM8903_ADC_OSR128_WIDTH 1
191
192
193
194
195 #define WM8903_INL_ENA 0x0002
196 #define WM8903_INL_ENA_MASK 0x0002
197 #define WM8903_INL_ENA_SHIFT 1
198 #define WM8903_INL_ENA_WIDTH 1
199 #define WM8903_INR_ENA 0x0001
200 #define WM8903_INR_ENA_MASK 0x0001
201 #define WM8903_INR_ENA_SHIFT 0
202 #define WM8903_INR_ENA_WIDTH 1
203
204
205
206
207 #define WM8903_MIXOUTL_ENA 0x0002
208 #define WM8903_MIXOUTL_ENA_MASK 0x0002
209 #define WM8903_MIXOUTL_ENA_SHIFT 1
210 #define WM8903_MIXOUTL_ENA_WIDTH 1
211 #define WM8903_MIXOUTR_ENA 0x0001
212 #define WM8903_MIXOUTR_ENA_MASK 0x0001
213 #define WM8903_MIXOUTR_ENA_SHIFT 0
214 #define WM8903_MIXOUTR_ENA_WIDTH 1
215
216
217
218
219 #define WM8903_HPL_PGA_ENA 0x0002
220 #define WM8903_HPL_PGA_ENA_MASK 0x0002
221 #define WM8903_HPL_PGA_ENA_SHIFT 1
222 #define WM8903_HPL_PGA_ENA_WIDTH 1
223 #define WM8903_HPR_PGA_ENA 0x0001
224 #define WM8903_HPR_PGA_ENA_MASK 0x0001
225 #define WM8903_HPR_PGA_ENA_SHIFT 0
226 #define WM8903_HPR_PGA_ENA_WIDTH 1
227
228
229
230
231 #define WM8903_LINEOUTL_PGA_ENA 0x0002
232 #define WM8903_LINEOUTL_PGA_ENA_MASK 0x0002
233 #define WM8903_LINEOUTL_PGA_ENA_SHIFT 1
234 #define WM8903_LINEOUTL_PGA_ENA_WIDTH 1
235 #define WM8903_LINEOUTR_PGA_ENA 0x0001
236 #define WM8903_LINEOUTR_PGA_ENA_MASK 0x0001
237 #define WM8903_LINEOUTR_PGA_ENA_SHIFT 0
238 #define WM8903_LINEOUTR_PGA_ENA_WIDTH 1
239
240
241
242
243 #define WM8903_MIXSPKL_ENA 0x0002
244 #define WM8903_MIXSPKL_ENA_MASK 0x0002
245 #define WM8903_MIXSPKL_ENA_SHIFT 1
246 #define WM8903_MIXSPKL_ENA_WIDTH 1
247 #define WM8903_MIXSPKR_ENA 0x0001
248 #define WM8903_MIXSPKR_ENA_MASK 0x0001
249 #define WM8903_MIXSPKR_ENA_SHIFT 0
250 #define WM8903_MIXSPKR_ENA_WIDTH 1
251
252
253
254
255 #define WM8903_SPKL_ENA 0x0002
256 #define WM8903_SPKL_ENA_MASK 0x0002
257 #define WM8903_SPKL_ENA_SHIFT 1
258 #define WM8903_SPKL_ENA_WIDTH 1
259 #define WM8903_SPKR_ENA 0x0001
260 #define WM8903_SPKR_ENA_MASK 0x0001
261 #define WM8903_SPKR_ENA_SHIFT 0
262 #define WM8903_SPKR_ENA_WIDTH 1
263
264
265
266
267 #define WM8903_DACL_ENA 0x0008
268 #define WM8903_DACL_ENA_MASK 0x0008
269 #define WM8903_DACL_ENA_SHIFT 3
270 #define WM8903_DACL_ENA_WIDTH 1
271 #define WM8903_DACR_ENA 0x0004
272 #define WM8903_DACR_ENA_MASK 0x0004
273 #define WM8903_DACR_ENA_SHIFT 2
274 #define WM8903_DACR_ENA_WIDTH 1
275 #define WM8903_ADCL_ENA 0x0002
276 #define WM8903_ADCL_ENA_MASK 0x0002
277 #define WM8903_ADCL_ENA_SHIFT 1
278 #define WM8903_ADCL_ENA_WIDTH 1
279 #define WM8903_ADCR_ENA 0x0001
280 #define WM8903_ADCR_ENA_MASK 0x0001
281 #define WM8903_ADCR_ENA_SHIFT 0
282 #define WM8903_ADCR_ENA_WIDTH 1
283
284
285
286
287 #define WM8903_MCLKDIV2 0x0001
288 #define WM8903_MCLKDIV2_MASK 0x0001
289 #define WM8903_MCLKDIV2_SHIFT 0
290 #define WM8903_MCLKDIV2_WIDTH 1
291
292
293
294
295 #define WM8903_CLK_SYS_RATE_MASK 0x3C00
296 #define WM8903_CLK_SYS_RATE_SHIFT 10
297 #define WM8903_CLK_SYS_RATE_WIDTH 4
298 #define WM8903_CLK_SYS_MODE_MASK 0x0300
299 #define WM8903_CLK_SYS_MODE_SHIFT 8
300 #define WM8903_CLK_SYS_MODE_WIDTH 2
301 #define WM8903_SAMPLE_RATE_MASK 0x000F
302 #define WM8903_SAMPLE_RATE_SHIFT 0
303 #define WM8903_SAMPLE_RATE_WIDTH 4
304
305
306
307
308 #define WM8903_CLK_SYS_ENA 0x0004
309 #define WM8903_CLK_SYS_ENA_MASK 0x0004
310 #define WM8903_CLK_SYS_ENA_SHIFT 2
311 #define WM8903_CLK_SYS_ENA_WIDTH 1
312 #define WM8903_CLK_DSP_ENA 0x0002
313 #define WM8903_CLK_DSP_ENA_MASK 0x0002
314 #define WM8903_CLK_DSP_ENA_SHIFT 1
315 #define WM8903_CLK_DSP_ENA_WIDTH 1
316 #define WM8903_TO_ENA 0x0001
317 #define WM8903_TO_ENA_MASK 0x0001
318 #define WM8903_TO_ENA_SHIFT 0
319 #define WM8903_TO_ENA_WIDTH 1
320
321
322
323
324 #define WM8903_DACL_DATINV 0x1000
325 #define WM8903_DACL_DATINV_MASK 0x1000
326 #define WM8903_DACL_DATINV_SHIFT 12
327 #define WM8903_DACL_DATINV_WIDTH 1
328 #define WM8903_DACR_DATINV 0x0800
329 #define WM8903_DACR_DATINV_MASK 0x0800
330 #define WM8903_DACR_DATINV_SHIFT 11
331 #define WM8903_DACR_DATINV_WIDTH 1
332 #define WM8903_DAC_BOOST_MASK 0x0600
333 #define WM8903_DAC_BOOST_SHIFT 9
334 #define WM8903_DAC_BOOST_WIDTH 2
335 #define WM8903_LOOPBACK 0x0100
336 #define WM8903_LOOPBACK_MASK 0x0100
337 #define WM8903_LOOPBACK_SHIFT 8
338 #define WM8903_LOOPBACK_WIDTH 1
339 #define WM8903_AIFADCL_SRC 0x0080
340 #define WM8903_AIFADCL_SRC_MASK 0x0080
341 #define WM8903_AIFADCL_SRC_SHIFT 7
342 #define WM8903_AIFADCL_SRC_WIDTH 1
343 #define WM8903_AIFADCR_SRC 0x0040
344 #define WM8903_AIFADCR_SRC_MASK 0x0040
345 #define WM8903_AIFADCR_SRC_SHIFT 6
346 #define WM8903_AIFADCR_SRC_WIDTH 1
347 #define WM8903_AIFDACL_SRC 0x0020
348 #define WM8903_AIFDACL_SRC_MASK 0x0020
349 #define WM8903_AIFDACL_SRC_SHIFT 5
350 #define WM8903_AIFDACL_SRC_WIDTH 1
351 #define WM8903_AIFDACR_SRC 0x0010
352 #define WM8903_AIFDACR_SRC_MASK 0x0010
353 #define WM8903_AIFDACR_SRC_SHIFT 4
354 #define WM8903_AIFDACR_SRC_WIDTH 1
355 #define WM8903_ADC_COMP 0x0008
356 #define WM8903_ADC_COMP_MASK 0x0008
357 #define WM8903_ADC_COMP_SHIFT 3
358 #define WM8903_ADC_COMP_WIDTH 1
359 #define WM8903_ADC_COMPMODE 0x0004
360 #define WM8903_ADC_COMPMODE_MASK 0x0004
361 #define WM8903_ADC_COMPMODE_SHIFT 2
362 #define WM8903_ADC_COMPMODE_WIDTH 1
363 #define WM8903_DAC_COMP 0x0002
364 #define WM8903_DAC_COMP_MASK 0x0002
365 #define WM8903_DAC_COMP_SHIFT 1
366 #define WM8903_DAC_COMP_WIDTH 1
367 #define WM8903_DAC_COMPMODE 0x0001
368 #define WM8903_DAC_COMPMODE_MASK 0x0001
369 #define WM8903_DAC_COMPMODE_SHIFT 0
370 #define WM8903_DAC_COMPMODE_WIDTH 1
371
372
373
374
375 #define WM8903_AIFDAC_TDM 0x2000
376 #define WM8903_AIFDAC_TDM_MASK 0x2000
377 #define WM8903_AIFDAC_TDM_SHIFT 13
378 #define WM8903_AIFDAC_TDM_WIDTH 1
379 #define WM8903_AIFDAC_TDM_CHAN 0x1000
380 #define WM8903_AIFDAC_TDM_CHAN_MASK 0x1000
381 #define WM8903_AIFDAC_TDM_CHAN_SHIFT 12
382 #define WM8903_AIFDAC_TDM_CHAN_WIDTH 1
383 #define WM8903_AIFADC_TDM 0x0800
384 #define WM8903_AIFADC_TDM_MASK 0x0800
385 #define WM8903_AIFADC_TDM_SHIFT 11
386 #define WM8903_AIFADC_TDM_WIDTH 1
387 #define WM8903_AIFADC_TDM_CHAN 0x0400
388 #define WM8903_AIFADC_TDM_CHAN_MASK 0x0400
389 #define WM8903_AIFADC_TDM_CHAN_SHIFT 10
390 #define WM8903_AIFADC_TDM_CHAN_WIDTH 1
391 #define WM8903_LRCLK_DIR 0x0200
392 #define WM8903_LRCLK_DIR_MASK 0x0200
393 #define WM8903_LRCLK_DIR_SHIFT 9
394 #define WM8903_LRCLK_DIR_WIDTH 1
395 #define WM8903_AIF_BCLK_INV 0x0080
396 #define WM8903_AIF_BCLK_INV_MASK 0x0080
397 #define WM8903_AIF_BCLK_INV_SHIFT 7
398 #define WM8903_AIF_BCLK_INV_WIDTH 1
399 #define WM8903_BCLK_DIR 0x0040
400 #define WM8903_BCLK_DIR_MASK 0x0040
401 #define WM8903_BCLK_DIR_SHIFT 6
402 #define WM8903_BCLK_DIR_WIDTH 1
403 #define WM8903_AIF_LRCLK_INV 0x0010
404 #define WM8903_AIF_LRCLK_INV_MASK 0x0010
405 #define WM8903_AIF_LRCLK_INV_SHIFT 4
406 #define WM8903_AIF_LRCLK_INV_WIDTH 1
407 #define WM8903_AIF_WL_MASK 0x000C
408 #define WM8903_AIF_WL_SHIFT 2
409 #define WM8903_AIF_WL_WIDTH 2
410 #define WM8903_AIF_FMT_MASK 0x0003
411 #define WM8903_AIF_FMT_SHIFT 0
412 #define WM8903_AIF_FMT_WIDTH 2
413
414
415
416
417 #define WM8903_BCLK_DIV_MASK 0x001F
418 #define WM8903_BCLK_DIV_SHIFT 0
419 #define WM8903_BCLK_DIV_WIDTH 5
420
421
422
423
424 #define WM8903_LRCLK_RATE_MASK 0x07FF
425 #define WM8903_LRCLK_RATE_SHIFT 0
426 #define WM8903_LRCLK_RATE_WIDTH 11
427
428
429
430
431 #define WM8903_DACVU 0x0100
432 #define WM8903_DACVU_MASK 0x0100
433 #define WM8903_DACVU_SHIFT 8
434 #define WM8903_DACVU_WIDTH 1
435 #define WM8903_DACL_VOL_MASK 0x00FF
436 #define WM8903_DACL_VOL_SHIFT 0
437 #define WM8903_DACL_VOL_WIDTH 8
438
439
440
441
442 #define WM8903_DACVU 0x0100
443 #define WM8903_DACVU_MASK 0x0100
444 #define WM8903_DACVU_SHIFT 8
445 #define WM8903_DACVU_WIDTH 1
446 #define WM8903_DACR_VOL_MASK 0x00FF
447 #define WM8903_DACR_VOL_SHIFT 0
448 #define WM8903_DACR_VOL_WIDTH 8
449
450
451
452
453 #define WM8903_ADCL_DAC_SVOL_MASK 0x0F00
454 #define WM8903_ADCL_DAC_SVOL_SHIFT 8
455 #define WM8903_ADCL_DAC_SVOL_WIDTH 4
456 #define WM8903_ADCR_DAC_SVOL_MASK 0x00F0
457 #define WM8903_ADCR_DAC_SVOL_SHIFT 4
458 #define WM8903_ADCR_DAC_SVOL_WIDTH 4
459 #define WM8903_ADC_TO_DACL_MASK 0x000C
460 #define WM8903_ADC_TO_DACL_SHIFT 2
461 #define WM8903_ADC_TO_DACL_WIDTH 2
462 #define WM8903_ADC_TO_DACR_MASK 0x0003
463 #define WM8903_ADC_TO_DACR_SHIFT 0
464 #define WM8903_ADC_TO_DACR_WIDTH 2
465
466
467
468
469 #define WM8903_DAC_MONO 0x1000
470 #define WM8903_DAC_MONO_MASK 0x1000
471 #define WM8903_DAC_MONO_SHIFT 12
472 #define WM8903_DAC_MONO_WIDTH 1
473 #define WM8903_DAC_SB_FILT 0x0800
474 #define WM8903_DAC_SB_FILT_MASK 0x0800
475 #define WM8903_DAC_SB_FILT_SHIFT 11
476 #define WM8903_DAC_SB_FILT_WIDTH 1
477 #define WM8903_DAC_MUTERATE 0x0400
478 #define WM8903_DAC_MUTERATE_MASK 0x0400
479 #define WM8903_DAC_MUTERATE_SHIFT 10
480 #define WM8903_DAC_MUTERATE_WIDTH 1
481 #define WM8903_DAC_MUTEMODE 0x0200
482 #define WM8903_DAC_MUTEMODE_MASK 0x0200
483 #define WM8903_DAC_MUTEMODE_SHIFT 9
484 #define WM8903_DAC_MUTEMODE_WIDTH 1
485 #define WM8903_DAC_MUTE 0x0008
486 #define WM8903_DAC_MUTE_MASK 0x0008
487 #define WM8903_DAC_MUTE_SHIFT 3
488 #define WM8903_DAC_MUTE_WIDTH 1
489 #define WM8903_DEEMPH_MASK 0x0006
490 #define WM8903_DEEMPH_SHIFT 1
491 #define WM8903_DEEMPH_WIDTH 2
492
493
494
495
496 #define WM8903_ADCVU 0x0100
497 #define WM8903_ADCVU_MASK 0x0100
498 #define WM8903_ADCVU_SHIFT 8
499 #define WM8903_ADCVU_WIDTH 1
500 #define WM8903_ADCL_VOL_MASK 0x00FF
501 #define WM8903_ADCL_VOL_SHIFT 0
502 #define WM8903_ADCL_VOL_WIDTH 8
503
504
505
506
507 #define WM8903_ADCVU 0x0100
508 #define WM8903_ADCVU_MASK 0x0100
509 #define WM8903_ADCVU_SHIFT 8
510 #define WM8903_ADCVU_WIDTH 1
511 #define WM8903_ADCR_VOL_MASK 0x00FF
512 #define WM8903_ADCR_VOL_SHIFT 0
513 #define WM8903_ADCR_VOL_WIDTH 8
514
515
516
517
518 #define WM8903_ADC_HPF_CUT_MASK 0x0060
519 #define WM8903_ADC_HPF_CUT_SHIFT 5
520 #define WM8903_ADC_HPF_CUT_WIDTH 2
521 #define WM8903_ADC_HPF_ENA 0x0010
522 #define WM8903_ADC_HPF_ENA_MASK 0x0010
523 #define WM8903_ADC_HPF_ENA_SHIFT 4
524 #define WM8903_ADC_HPF_ENA_WIDTH 1
525 #define WM8903_ADCL_DATINV 0x0002
526 #define WM8903_ADCL_DATINV_MASK 0x0002
527 #define WM8903_ADCL_DATINV_SHIFT 1
528 #define WM8903_ADCL_DATINV_WIDTH 1
529 #define WM8903_ADCR_DATINV 0x0001
530 #define WM8903_ADCR_DATINV_MASK 0x0001
531 #define WM8903_ADCR_DATINV_SHIFT 0
532 #define WM8903_ADCR_DATINV_WIDTH 1
533
534
535
536
537 #define WM8903_DIGMIC_MODE_SEL 0x0100
538 #define WM8903_DIGMIC_MODE_SEL_MASK 0x0100
539 #define WM8903_DIGMIC_MODE_SEL_SHIFT 8
540 #define WM8903_DIGMIC_MODE_SEL_WIDTH 1
541 #define WM8903_DIGMIC_CLK_SEL_L_MASK 0x00C0
542 #define WM8903_DIGMIC_CLK_SEL_L_SHIFT 6
543 #define WM8903_DIGMIC_CLK_SEL_L_WIDTH 2
544 #define WM8903_DIGMIC_CLK_SEL_R_MASK 0x0030
545 #define WM8903_DIGMIC_CLK_SEL_R_SHIFT 4
546 #define WM8903_DIGMIC_CLK_SEL_R_WIDTH 2
547 #define WM8903_DIGMIC_CLK_SEL_RT_MASK 0x000C
548 #define WM8903_DIGMIC_CLK_SEL_RT_SHIFT 2
549 #define WM8903_DIGMIC_CLK_SEL_RT_WIDTH 2
550 #define WM8903_DIGMIC_CLK_SEL_MASK 0x0003
551 #define WM8903_DIGMIC_CLK_SEL_SHIFT 0
552 #define WM8903_DIGMIC_CLK_SEL_WIDTH 2
553
554
555
556
557 #define WM8903_DRC_ENA 0x8000
558 #define WM8903_DRC_ENA_MASK 0x8000
559 #define WM8903_DRC_ENA_SHIFT 15
560 #define WM8903_DRC_ENA_WIDTH 1
561 #define WM8903_DRC_THRESH_HYST_MASK 0x1800
562 #define WM8903_DRC_THRESH_HYST_SHIFT 11
563 #define WM8903_DRC_THRESH_HYST_WIDTH 2
564 #define WM8903_DRC_STARTUP_GAIN_MASK 0x07C0
565 #define WM8903_DRC_STARTUP_GAIN_SHIFT 6
566 #define WM8903_DRC_STARTUP_GAIN_WIDTH 5
567 #define WM8903_DRC_FF_DELAY 0x0020
568 #define WM8903_DRC_FF_DELAY_MASK 0x0020
569 #define WM8903_DRC_FF_DELAY_SHIFT 5
570 #define WM8903_DRC_FF_DELAY_WIDTH 1
571 #define WM8903_DRC_SMOOTH_ENA 0x0008
572 #define WM8903_DRC_SMOOTH_ENA_MASK 0x0008
573 #define WM8903_DRC_SMOOTH_ENA_SHIFT 3
574 #define WM8903_DRC_SMOOTH_ENA_WIDTH 1
575 #define WM8903_DRC_QR_ENA 0x0004
576 #define WM8903_DRC_QR_ENA_MASK 0x0004
577 #define WM8903_DRC_QR_ENA_SHIFT 2
578 #define WM8903_DRC_QR_ENA_WIDTH 1
579 #define WM8903_DRC_ANTICLIP_ENA 0x0002
580 #define WM8903_DRC_ANTICLIP_ENA_MASK 0x0002
581 #define WM8903_DRC_ANTICLIP_ENA_SHIFT 1
582 #define WM8903_DRC_ANTICLIP_ENA_WIDTH 1
583 #define WM8903_DRC_HYST_ENA 0x0001
584 #define WM8903_DRC_HYST_ENA_MASK 0x0001
585 #define WM8903_DRC_HYST_ENA_SHIFT 0
586 #define WM8903_DRC_HYST_ENA_WIDTH 1
587
588
589
590
591 #define WM8903_DRC_ATTACK_RATE_MASK 0xF000
592 #define WM8903_DRC_ATTACK_RATE_SHIFT 12
593 #define WM8903_DRC_ATTACK_RATE_WIDTH 4
594 #define WM8903_DRC_DECAY_RATE_MASK 0x0F00
595 #define WM8903_DRC_DECAY_RATE_SHIFT 8
596 #define WM8903_DRC_DECAY_RATE_WIDTH 4
597 #define WM8903_DRC_THRESH_QR_MASK 0x00C0
598 #define WM8903_DRC_THRESH_QR_SHIFT 6
599 #define WM8903_DRC_THRESH_QR_WIDTH 2
600 #define WM8903_DRC_RATE_QR_MASK 0x0030
601 #define WM8903_DRC_RATE_QR_SHIFT 4
602 #define WM8903_DRC_RATE_QR_WIDTH 2
603 #define WM8903_DRC_MINGAIN_MASK 0x000C
604 #define WM8903_DRC_MINGAIN_SHIFT 2
605 #define WM8903_DRC_MINGAIN_WIDTH 2
606 #define WM8903_DRC_MAXGAIN_MASK 0x0003
607 #define WM8903_DRC_MAXGAIN_SHIFT 0
608 #define WM8903_DRC_MAXGAIN_WIDTH 2
609
610
611
612
613 #define WM8903_DRC_R0_SLOPE_COMP_MASK 0x0038
614 #define WM8903_DRC_R0_SLOPE_COMP_SHIFT 3
615 #define WM8903_DRC_R0_SLOPE_COMP_WIDTH 3
616 #define WM8903_DRC_R1_SLOPE_COMP_MASK 0x0007
617 #define WM8903_DRC_R1_SLOPE_COMP_SHIFT 0
618 #define WM8903_DRC_R1_SLOPE_COMP_WIDTH 3
619
620
621
622
623 #define WM8903_DRC_THRESH_COMP_MASK 0x07E0
624 #define WM8903_DRC_THRESH_COMP_SHIFT 5
625 #define WM8903_DRC_THRESH_COMP_WIDTH 6
626 #define WM8903_DRC_AMP_COMP_MASK 0x001F
627 #define WM8903_DRC_AMP_COMP_SHIFT 0
628 #define WM8903_DRC_AMP_COMP_WIDTH 5
629
630
631
632
633 #define WM8903_LINMUTE 0x0080
634 #define WM8903_LINMUTE_MASK 0x0080
635 #define WM8903_LINMUTE_SHIFT 7
636 #define WM8903_LINMUTE_WIDTH 1
637 #define WM8903_LIN_VOL_MASK 0x001F
638 #define WM8903_LIN_VOL_SHIFT 0
639 #define WM8903_LIN_VOL_WIDTH 5
640
641
642
643
644 #define WM8903_RINMUTE 0x0080
645 #define WM8903_RINMUTE_MASK 0x0080
646 #define WM8903_RINMUTE_SHIFT 7
647 #define WM8903_RINMUTE_WIDTH 1
648 #define WM8903_RIN_VOL_MASK 0x001F
649 #define WM8903_RIN_VOL_SHIFT 0
650 #define WM8903_RIN_VOL_WIDTH 5
651
652
653
654
655 #define WM8903_INL_CM_ENA 0x0040
656 #define WM8903_INL_CM_ENA_MASK 0x0040
657 #define WM8903_INL_CM_ENA_SHIFT 6
658 #define WM8903_INL_CM_ENA_WIDTH 1
659 #define WM8903_L_IP_SEL_N_MASK 0x0030
660 #define WM8903_L_IP_SEL_N_SHIFT 4
661 #define WM8903_L_IP_SEL_N_WIDTH 2
662 #define WM8903_L_IP_SEL_P_MASK 0x000C
663 #define WM8903_L_IP_SEL_P_SHIFT 2
664 #define WM8903_L_IP_SEL_P_WIDTH 2
665 #define WM8903_L_MODE_MASK 0x0003
666 #define WM8903_L_MODE_SHIFT 0
667 #define WM8903_L_MODE_WIDTH 2
668
669
670
671
672 #define WM8903_INR_CM_ENA 0x0040
673 #define WM8903_INR_CM_ENA_MASK 0x0040
674 #define WM8903_INR_CM_ENA_SHIFT 6
675 #define WM8903_INR_CM_ENA_WIDTH 1
676 #define WM8903_R_IP_SEL_N_MASK 0x0030
677 #define WM8903_R_IP_SEL_N_SHIFT 4
678 #define WM8903_R_IP_SEL_N_WIDTH 2
679 #define WM8903_R_IP_SEL_P_MASK 0x000C
680 #define WM8903_R_IP_SEL_P_SHIFT 2
681 #define WM8903_R_IP_SEL_P_WIDTH 2
682 #define WM8903_R_MODE_MASK 0x0003
683 #define WM8903_R_MODE_SHIFT 0
684 #define WM8903_R_MODE_WIDTH 2
685
686
687
688
689 #define WM8903_DACL_TO_MIXOUTL 0x0008
690 #define WM8903_DACL_TO_MIXOUTL_MASK 0x0008
691 #define WM8903_DACL_TO_MIXOUTL_SHIFT 3
692 #define WM8903_DACL_TO_MIXOUTL_WIDTH 1
693 #define WM8903_DACR_TO_MIXOUTL 0x0004
694 #define WM8903_DACR_TO_MIXOUTL_MASK 0x0004
695 #define WM8903_DACR_TO_MIXOUTL_SHIFT 2
696 #define WM8903_DACR_TO_MIXOUTL_WIDTH 1
697 #define WM8903_BYPASSL_TO_MIXOUTL 0x0002
698 #define WM8903_BYPASSL_TO_MIXOUTL_MASK 0x0002
699 #define WM8903_BYPASSL_TO_MIXOUTL_SHIFT 1
700 #define WM8903_BYPASSL_TO_MIXOUTL_WIDTH 1
701 #define WM8903_BYPASSR_TO_MIXOUTL 0x0001
702 #define WM8903_BYPASSR_TO_MIXOUTL_MASK 0x0001
703 #define WM8903_BYPASSR_TO_MIXOUTL_SHIFT 0
704 #define WM8903_BYPASSR_TO_MIXOUTL_WIDTH 1
705
706
707
708
709 #define WM8903_DACL_TO_MIXOUTR 0x0008
710 #define WM8903_DACL_TO_MIXOUTR_MASK 0x0008
711 #define WM8903_DACL_TO_MIXOUTR_SHIFT 3
712 #define WM8903_DACL_TO_MIXOUTR_WIDTH 1
713 #define WM8903_DACR_TO_MIXOUTR 0x0004
714 #define WM8903_DACR_TO_MIXOUTR_MASK 0x0004
715 #define WM8903_DACR_TO_MIXOUTR_SHIFT 2
716 #define WM8903_DACR_TO_MIXOUTR_WIDTH 1
717 #define WM8903_BYPASSL_TO_MIXOUTR 0x0002
718 #define WM8903_BYPASSL_TO_MIXOUTR_MASK 0x0002
719 #define WM8903_BYPASSL_TO_MIXOUTR_SHIFT 1
720 #define WM8903_BYPASSL_TO_MIXOUTR_WIDTH 1
721 #define WM8903_BYPASSR_TO_MIXOUTR 0x0001
722 #define WM8903_BYPASSR_TO_MIXOUTR_MASK 0x0001
723 #define WM8903_BYPASSR_TO_MIXOUTR_SHIFT 0
724 #define WM8903_BYPASSR_TO_MIXOUTR_WIDTH 1
725
726
727
728
729 #define WM8903_DACL_TO_MIXSPKL 0x0008
730 #define WM8903_DACL_TO_MIXSPKL_MASK 0x0008
731 #define WM8903_DACL_TO_MIXSPKL_SHIFT 3
732 #define WM8903_DACL_TO_MIXSPKL_WIDTH 1
733 #define WM8903_DACR_TO_MIXSPKL 0x0004
734 #define WM8903_DACR_TO_MIXSPKL_MASK 0x0004
735 #define WM8903_DACR_TO_MIXSPKL_SHIFT 2
736 #define WM8903_DACR_TO_MIXSPKL_WIDTH 1
737 #define WM8903_BYPASSL_TO_MIXSPKL 0x0002
738 #define WM8903_BYPASSL_TO_MIXSPKL_MASK 0x0002
739 #define WM8903_BYPASSL_TO_MIXSPKL_SHIFT 1
740 #define WM8903_BYPASSL_TO_MIXSPKL_WIDTH 1
741 #define WM8903_BYPASSR_TO_MIXSPKL 0x0001
742 #define WM8903_BYPASSR_TO_MIXSPKL_MASK 0x0001
743 #define WM8903_BYPASSR_TO_MIXSPKL_SHIFT 0
744 #define WM8903_BYPASSR_TO_MIXSPKL_WIDTH 1
745
746
747
748
749 #define WM8903_DACL_MIXSPKL_VOL 0x0008
750 #define WM8903_DACL_MIXSPKL_VOL_MASK 0x0008
751 #define WM8903_DACL_MIXSPKL_VOL_SHIFT 3
752 #define WM8903_DACL_MIXSPKL_VOL_WIDTH 1
753 #define WM8903_DACR_MIXSPKL_VOL 0x0004
754 #define WM8903_DACR_MIXSPKL_VOL_MASK 0x0004
755 #define WM8903_DACR_MIXSPKL_VOL_SHIFT 2
756 #define WM8903_DACR_MIXSPKL_VOL_WIDTH 1
757 #define WM8903_BYPASSL_MIXSPKL_VOL 0x0002
758 #define WM8903_BYPASSL_MIXSPKL_VOL_MASK 0x0002
759 #define WM8903_BYPASSL_MIXSPKL_VOL_SHIFT 1
760 #define WM8903_BYPASSL_MIXSPKL_VOL_WIDTH 1
761 #define WM8903_BYPASSR_MIXSPKL_VOL 0x0001
762 #define WM8903_BYPASSR_MIXSPKL_VOL_MASK 0x0001
763 #define WM8903_BYPASSR_MIXSPKL_VOL_SHIFT 0
764 #define WM8903_BYPASSR_MIXSPKL_VOL_WIDTH 1
765
766
767
768
769 #define WM8903_DACL_TO_MIXSPKR 0x0008
770 #define WM8903_DACL_TO_MIXSPKR_MASK 0x0008
771 #define WM8903_DACL_TO_MIXSPKR_SHIFT 3
772 #define WM8903_DACL_TO_MIXSPKR_WIDTH 1
773 #define WM8903_DACR_TO_MIXSPKR 0x0004
774 #define WM8903_DACR_TO_MIXSPKR_MASK 0x0004
775 #define WM8903_DACR_TO_MIXSPKR_SHIFT 2
776 #define WM8903_DACR_TO_MIXSPKR_WIDTH 1
777 #define WM8903_BYPASSL_TO_MIXSPKR 0x0002
778 #define WM8903_BYPASSL_TO_MIXSPKR_MASK 0x0002
779 #define WM8903_BYPASSL_TO_MIXSPKR_SHIFT 1
780 #define WM8903_BYPASSL_TO_MIXSPKR_WIDTH 1
781 #define WM8903_BYPASSR_TO_MIXSPKR 0x0001
782 #define WM8903_BYPASSR_TO_MIXSPKR_MASK 0x0001
783 #define WM8903_BYPASSR_TO_MIXSPKR_SHIFT 0
784 #define WM8903_BYPASSR_TO_MIXSPKR_WIDTH 1
785
786
787
788
789 #define WM8903_DACL_MIXSPKR_VOL 0x0008
790 #define WM8903_DACL_MIXSPKR_VOL_MASK 0x0008
791 #define WM8903_DACL_MIXSPKR_VOL_SHIFT 3
792 #define WM8903_DACL_MIXSPKR_VOL_WIDTH 1
793 #define WM8903_DACR_MIXSPKR_VOL 0x0004
794 #define WM8903_DACR_MIXSPKR_VOL_MASK 0x0004
795 #define WM8903_DACR_MIXSPKR_VOL_SHIFT 2
796 #define WM8903_DACR_MIXSPKR_VOL_WIDTH 1
797 #define WM8903_BYPASSL_MIXSPKR_VOL 0x0002
798 #define WM8903_BYPASSL_MIXSPKR_VOL_MASK 0x0002
799 #define WM8903_BYPASSL_MIXSPKR_VOL_SHIFT 1
800 #define WM8903_BYPASSL_MIXSPKR_VOL_WIDTH 1
801 #define WM8903_BYPASSR_MIXSPKR_VOL 0x0001
802 #define WM8903_BYPASSR_MIXSPKR_VOL_MASK 0x0001
803 #define WM8903_BYPASSR_MIXSPKR_VOL_SHIFT 0
804 #define WM8903_BYPASSR_MIXSPKR_VOL_WIDTH 1
805
806
807
808
809 #define WM8903_HPL_MUTE 0x0100
810 #define WM8903_HPL_MUTE_MASK 0x0100
811 #define WM8903_HPL_MUTE_SHIFT 8
812 #define WM8903_HPL_MUTE_WIDTH 1
813 #define WM8903_HPOUTVU 0x0080
814 #define WM8903_HPOUTVU_MASK 0x0080
815 #define WM8903_HPOUTVU_SHIFT 7
816 #define WM8903_HPOUTVU_WIDTH 1
817 #define WM8903_HPOUTLZC 0x0040
818 #define WM8903_HPOUTLZC_MASK 0x0040
819 #define WM8903_HPOUTLZC_SHIFT 6
820 #define WM8903_HPOUTLZC_WIDTH 1
821 #define WM8903_HPOUTL_VOL_MASK 0x003F
822 #define WM8903_HPOUTL_VOL_SHIFT 0
823 #define WM8903_HPOUTL_VOL_WIDTH 6
824
825
826
827
828 #define WM8903_HPR_MUTE 0x0100
829 #define WM8903_HPR_MUTE_MASK 0x0100
830 #define WM8903_HPR_MUTE_SHIFT 8
831 #define WM8903_HPR_MUTE_WIDTH 1
832 #define WM8903_HPOUTVU 0x0080
833 #define WM8903_HPOUTVU_MASK 0x0080
834 #define WM8903_HPOUTVU_SHIFT 7
835 #define WM8903_HPOUTVU_WIDTH 1
836 #define WM8903_HPOUTRZC 0x0040
837 #define WM8903_HPOUTRZC_MASK 0x0040
838 #define WM8903_HPOUTRZC_SHIFT 6
839 #define WM8903_HPOUTRZC_WIDTH 1
840 #define WM8903_HPOUTR_VOL_MASK 0x003F
841 #define WM8903_HPOUTR_VOL_SHIFT 0
842 #define WM8903_HPOUTR_VOL_WIDTH 6
843
844
845
846
847 #define WM8903_LINEOUTL_MUTE 0x0100
848 #define WM8903_LINEOUTL_MUTE_MASK 0x0100
849 #define WM8903_LINEOUTL_MUTE_SHIFT 8
850 #define WM8903_LINEOUTL_MUTE_WIDTH 1
851 #define WM8903_LINEOUTVU 0x0080
852 #define WM8903_LINEOUTVU_MASK 0x0080
853 #define WM8903_LINEOUTVU_SHIFT 7
854 #define WM8903_LINEOUTVU_WIDTH 1
855 #define WM8903_LINEOUTLZC 0x0040
856 #define WM8903_LINEOUTLZC_MASK 0x0040
857 #define WM8903_LINEOUTLZC_SHIFT 6
858 #define WM8903_LINEOUTLZC_WIDTH 1
859 #define WM8903_LINEOUTL_VOL_MASK 0x003F
860 #define WM8903_LINEOUTL_VOL_SHIFT 0
861 #define WM8903_LINEOUTL_VOL_WIDTH 6
862
863
864
865
866 #define WM8903_LINEOUTR_MUTE 0x0100
867 #define WM8903_LINEOUTR_MUTE_MASK 0x0100
868 #define WM8903_LINEOUTR_MUTE_SHIFT 8
869 #define WM8903_LINEOUTR_MUTE_WIDTH 1
870 #define WM8903_LINEOUTVU 0x0080
871 #define WM8903_LINEOUTVU_MASK 0x0080
872 #define WM8903_LINEOUTVU_SHIFT 7
873 #define WM8903_LINEOUTVU_WIDTH 1
874 #define WM8903_LINEOUTRZC 0x0040
875 #define WM8903_LINEOUTRZC_MASK 0x0040
876 #define WM8903_LINEOUTRZC_SHIFT 6
877 #define WM8903_LINEOUTRZC_WIDTH 1
878 #define WM8903_LINEOUTR_VOL_MASK 0x003F
879 #define WM8903_LINEOUTR_VOL_SHIFT 0
880 #define WM8903_LINEOUTR_VOL_WIDTH 6
881
882
883
884
885 #define WM8903_SPKL_MUTE 0x0100
886 #define WM8903_SPKL_MUTE_MASK 0x0100
887 #define WM8903_SPKL_MUTE_SHIFT 8
888 #define WM8903_SPKL_MUTE_WIDTH 1
889 #define WM8903_SPKVU 0x0080
890 #define WM8903_SPKVU_MASK 0x0080
891 #define WM8903_SPKVU_SHIFT 7
892 #define WM8903_SPKVU_WIDTH 1
893 #define WM8903_SPKLZC 0x0040
894 #define WM8903_SPKLZC_MASK 0x0040
895 #define WM8903_SPKLZC_SHIFT 6
896 #define WM8903_SPKLZC_WIDTH 1
897 #define WM8903_SPKL_VOL_MASK 0x003F
898 #define WM8903_SPKL_VOL_SHIFT 0
899 #define WM8903_SPKL_VOL_WIDTH 6
900
901
902
903
904 #define WM8903_SPKR_MUTE 0x0100
905 #define WM8903_SPKR_MUTE_MASK 0x0100
906 #define WM8903_SPKR_MUTE_SHIFT 8
907 #define WM8903_SPKR_MUTE_WIDTH 1
908 #define WM8903_SPKVU 0x0080
909 #define WM8903_SPKVU_MASK 0x0080
910 #define WM8903_SPKVU_SHIFT 7
911 #define WM8903_SPKVU_WIDTH 1
912 #define WM8903_SPKRZC 0x0040
913 #define WM8903_SPKRZC_MASK 0x0040
914 #define WM8903_SPKRZC_SHIFT 6
915 #define WM8903_SPKRZC_WIDTH 1
916 #define WM8903_SPKR_VOL_MASK 0x003F
917 #define WM8903_SPKR_VOL_SHIFT 0
918 #define WM8903_SPKR_VOL_WIDTH 6
919
920
921
922
923 #define WM8903_SPK_DISCHARGE 0x0002
924 #define WM8903_SPK_DISCHARGE_MASK 0x0002
925 #define WM8903_SPK_DISCHARGE_SHIFT 1
926 #define WM8903_SPK_DISCHARGE_WIDTH 1
927 #define WM8903_VROI 0x0001
928 #define WM8903_VROI_MASK 0x0001
929 #define WM8903_VROI_SHIFT 0
930 #define WM8903_VROI_WIDTH 1
931
932
933
934
935 #define WM8903_DCS_MASTER_ENA 0x0010
936 #define WM8903_DCS_MASTER_ENA_MASK 0x0010
937 #define WM8903_DCS_MASTER_ENA_SHIFT 4
938 #define WM8903_DCS_MASTER_ENA_WIDTH 1
939 #define WM8903_DCS_ENA_MASK 0x000F
940 #define WM8903_DCS_ENA_SHIFT 0
941 #define WM8903_DCS_ENA_WIDTH 4
942
943
944
945
946 #define WM8903_DCS_MODE_MASK 0x0003
947 #define WM8903_DCS_MODE_SHIFT 0
948 #define WM8903_DCS_MODE_WIDTH 2
949
950
951
952
953 #define WM8903_HPL_RMV_SHORT 0x0080
954 #define WM8903_HPL_RMV_SHORT_MASK 0x0080
955 #define WM8903_HPL_RMV_SHORT_SHIFT 7
956 #define WM8903_HPL_RMV_SHORT_WIDTH 1
957 #define WM8903_HPL_ENA_OUTP 0x0040
958 #define WM8903_HPL_ENA_OUTP_MASK 0x0040
959 #define WM8903_HPL_ENA_OUTP_SHIFT 6
960 #define WM8903_HPL_ENA_OUTP_WIDTH 1
961 #define WM8903_HPL_ENA_DLY 0x0020
962 #define WM8903_HPL_ENA_DLY_MASK 0x0020
963 #define WM8903_HPL_ENA_DLY_SHIFT 5
964 #define WM8903_HPL_ENA_DLY_WIDTH 1
965 #define WM8903_HPL_ENA 0x0010
966 #define WM8903_HPL_ENA_MASK 0x0010
967 #define WM8903_HPL_ENA_SHIFT 4
968 #define WM8903_HPL_ENA_WIDTH 1
969 #define WM8903_HPR_RMV_SHORT 0x0008
970 #define WM8903_HPR_RMV_SHORT_MASK 0x0008
971 #define WM8903_HPR_RMV_SHORT_SHIFT 3
972 #define WM8903_HPR_RMV_SHORT_WIDTH 1
973 #define WM8903_HPR_ENA_OUTP 0x0004
974 #define WM8903_HPR_ENA_OUTP_MASK 0x0004
975 #define WM8903_HPR_ENA_OUTP_SHIFT 2
976 #define WM8903_HPR_ENA_OUTP_WIDTH 1
977 #define WM8903_HPR_ENA_DLY 0x0002
978 #define WM8903_HPR_ENA_DLY_MASK 0x0002
979 #define WM8903_HPR_ENA_DLY_SHIFT 1
980 #define WM8903_HPR_ENA_DLY_WIDTH 1
981 #define WM8903_HPR_ENA 0x0001
982 #define WM8903_HPR_ENA_MASK 0x0001
983 #define WM8903_HPR_ENA_SHIFT 0
984 #define WM8903_HPR_ENA_WIDTH 1
985
986
987
988
989 #define WM8903_LINEOUTL_RMV_SHORT 0x0080
990 #define WM8903_LINEOUTL_RMV_SHORT_MASK 0x0080
991 #define WM8903_LINEOUTL_RMV_SHORT_SHIFT 7
992 #define WM8903_LINEOUTL_RMV_SHORT_WIDTH 1
993 #define WM8903_LINEOUTL_ENA_OUTP 0x0040
994 #define WM8903_LINEOUTL_ENA_OUTP_MASK 0x0040
995 #define WM8903_LINEOUTL_ENA_OUTP_SHIFT 6
996 #define WM8903_LINEOUTL_ENA_OUTP_WIDTH 1
997 #define WM8903_LINEOUTL_ENA_DLY 0x0020
998 #define WM8903_LINEOUTL_ENA_DLY_MASK 0x0020
999 #define WM8903_LINEOUTL_ENA_DLY_SHIFT 5
1000 #define WM8903_LINEOUTL_ENA_DLY_WIDTH 1
1001 #define WM8903_LINEOUTL_ENA 0x0010
1002 #define WM8903_LINEOUTL_ENA_MASK 0x0010
1003 #define WM8903_LINEOUTL_ENA_SHIFT 4
1004 #define WM8903_LINEOUTL_ENA_WIDTH 1
1005 #define WM8903_LINEOUTR_RMV_SHORT 0x0008
1006 #define WM8903_LINEOUTR_RMV_SHORT_MASK 0x0008
1007 #define WM8903_LINEOUTR_RMV_SHORT_SHIFT 3
1008 #define WM8903_LINEOUTR_RMV_SHORT_WIDTH 1
1009 #define WM8903_LINEOUTR_ENA_OUTP 0x0004
1010 #define WM8903_LINEOUTR_ENA_OUTP_MASK 0x0004
1011 #define WM8903_LINEOUTR_ENA_OUTP_SHIFT 2
1012 #define WM8903_LINEOUTR_ENA_OUTP_WIDTH 1
1013 #define WM8903_LINEOUTR_ENA_DLY 0x0002
1014 #define WM8903_LINEOUTR_ENA_DLY_MASK 0x0002
1015 #define WM8903_LINEOUTR_ENA_DLY_SHIFT 1
1016 #define WM8903_LINEOUTR_ENA_DLY_WIDTH 1
1017 #define WM8903_LINEOUTR_ENA 0x0001
1018 #define WM8903_LINEOUTR_ENA_MASK 0x0001
1019 #define WM8903_LINEOUTR_ENA_SHIFT 0
1020 #define WM8903_LINEOUTR_ENA_WIDTH 1
1021
1022
1023
1024
1025 #define WM8903_CP_ENA 0x0001
1026 #define WM8903_CP_ENA_MASK 0x0001
1027 #define WM8903_CP_ENA_SHIFT 0
1028 #define WM8903_CP_ENA_WIDTH 1
1029
1030
1031
1032
1033 #define WM8903_CP_DYN_FREQ 0x0002
1034 #define WM8903_CP_DYN_FREQ_MASK 0x0002
1035 #define WM8903_CP_DYN_FREQ_SHIFT 1
1036 #define WM8903_CP_DYN_FREQ_WIDTH 1
1037 #define WM8903_CP_DYN_V 0x0001
1038 #define WM8903_CP_DYN_V_MASK 0x0001
1039 #define WM8903_CP_DYN_V_SHIFT 0
1040 #define WM8903_CP_DYN_V_WIDTH 1
1041
1042
1043
1044
1045 #define WM8903_WSEQ_ENA 0x0100
1046 #define WM8903_WSEQ_ENA_MASK 0x0100
1047 #define WM8903_WSEQ_ENA_SHIFT 8
1048 #define WM8903_WSEQ_ENA_WIDTH 1
1049 #define WM8903_WSEQ_WRITE_INDEX_MASK 0x001F
1050 #define WM8903_WSEQ_WRITE_INDEX_SHIFT 0
1051 #define WM8903_WSEQ_WRITE_INDEX_WIDTH 5
1052
1053
1054
1055
1056 #define WM8903_WSEQ_DATA_WIDTH_MASK 0x7000
1057 #define WM8903_WSEQ_DATA_WIDTH_SHIFT 12
1058 #define WM8903_WSEQ_DATA_WIDTH_WIDTH 3
1059 #define WM8903_WSEQ_DATA_START_MASK 0x0F00
1060 #define WM8903_WSEQ_DATA_START_SHIFT 8
1061 #define WM8903_WSEQ_DATA_START_WIDTH 4
1062 #define WM8903_WSEQ_ADDR_MASK 0x00FF
1063 #define WM8903_WSEQ_ADDR_SHIFT 0
1064 #define WM8903_WSEQ_ADDR_WIDTH 8
1065
1066
1067
1068
1069 #define WM8903_WSEQ_EOS 0x4000
1070 #define WM8903_WSEQ_EOS_MASK 0x4000
1071 #define WM8903_WSEQ_EOS_SHIFT 14
1072 #define WM8903_WSEQ_EOS_WIDTH 1
1073 #define WM8903_WSEQ_DELAY_MASK 0x0F00
1074 #define WM8903_WSEQ_DELAY_SHIFT 8
1075 #define WM8903_WSEQ_DELAY_WIDTH 4
1076 #define WM8903_WSEQ_DATA_MASK 0x00FF
1077 #define WM8903_WSEQ_DATA_SHIFT 0
1078 #define WM8903_WSEQ_DATA_WIDTH 8
1079
1080
1081
1082
1083 #define WM8903_WSEQ_ABORT 0x0200
1084 #define WM8903_WSEQ_ABORT_MASK 0x0200
1085 #define WM8903_WSEQ_ABORT_SHIFT 9
1086 #define WM8903_WSEQ_ABORT_WIDTH 1
1087 #define WM8903_WSEQ_START 0x0100
1088 #define WM8903_WSEQ_START_MASK 0x0100
1089 #define WM8903_WSEQ_START_SHIFT 8
1090 #define WM8903_WSEQ_START_WIDTH 1
1091 #define WM8903_WSEQ_START_INDEX_MASK 0x003F
1092 #define WM8903_WSEQ_START_INDEX_SHIFT 0
1093 #define WM8903_WSEQ_START_INDEX_WIDTH 6
1094
1095
1096
1097
1098 #define WM8903_WSEQ_CURRENT_INDEX_MASK 0x03F0
1099 #define WM8903_WSEQ_CURRENT_INDEX_SHIFT 4
1100 #define WM8903_WSEQ_CURRENT_INDEX_WIDTH 6
1101 #define WM8903_WSEQ_BUSY 0x0001
1102 #define WM8903_WSEQ_BUSY_MASK 0x0001
1103 #define WM8903_WSEQ_BUSY_SHIFT 0
1104 #define WM8903_WSEQ_BUSY_WIDTH 1
1105
1106
1107
1108
1109 #define WM8903_MASK_WRITE_ENA 0x0001
1110 #define WM8903_MASK_WRITE_ENA_MASK 0x0001
1111 #define WM8903_MASK_WRITE_ENA_SHIFT 0
1112 #define WM8903_MASK_WRITE_ENA_WIDTH 1
1113
1114
1115
1116
1117 #define WM8903_MICSHRT_EINT 0x8000
1118 #define WM8903_MICSHRT_EINT_MASK 0x8000
1119 #define WM8903_MICSHRT_EINT_SHIFT 15
1120 #define WM8903_MICSHRT_EINT_WIDTH 1
1121 #define WM8903_MICDET_EINT 0x4000
1122 #define WM8903_MICDET_EINT_MASK 0x4000
1123 #define WM8903_MICDET_EINT_SHIFT 14
1124 #define WM8903_MICDET_EINT_WIDTH 1
1125 #define WM8903_WSEQ_BUSY_EINT 0x2000
1126 #define WM8903_WSEQ_BUSY_EINT_MASK 0x2000
1127 #define WM8903_WSEQ_BUSY_EINT_SHIFT 13
1128 #define WM8903_WSEQ_BUSY_EINT_WIDTH 1
1129 #define WM8903_GP5_EINT 0x0010
1130 #define WM8903_GP5_EINT_MASK 0x0010
1131 #define WM8903_GP5_EINT_SHIFT 4
1132 #define WM8903_GP5_EINT_WIDTH 1
1133 #define WM8903_GP4_EINT 0x0008
1134 #define WM8903_GP4_EINT_MASK 0x0008
1135 #define WM8903_GP4_EINT_SHIFT 3
1136 #define WM8903_GP4_EINT_WIDTH 1
1137 #define WM8903_GP3_EINT 0x0004
1138 #define WM8903_GP3_EINT_MASK 0x0004
1139 #define WM8903_GP3_EINT_SHIFT 2
1140 #define WM8903_GP3_EINT_WIDTH 1
1141 #define WM8903_GP2_EINT 0x0002
1142 #define WM8903_GP2_EINT_MASK 0x0002
1143 #define WM8903_GP2_EINT_SHIFT 1
1144 #define WM8903_GP2_EINT_WIDTH 1
1145 #define WM8903_GP1_EINT 0x0001
1146 #define WM8903_GP1_EINT_MASK 0x0001
1147 #define WM8903_GP1_EINT_SHIFT 0
1148 #define WM8903_GP1_EINT_WIDTH 1
1149
1150
1151
1152
1153 #define WM8903_IM_MICSHRT_EINT 0x8000
1154 #define WM8903_IM_MICSHRT_EINT_MASK 0x8000
1155 #define WM8903_IM_MICSHRT_EINT_SHIFT 15
1156 #define WM8903_IM_MICSHRT_EINT_WIDTH 1
1157 #define WM8903_IM_MICDET_EINT 0x4000
1158 #define WM8903_IM_MICDET_EINT_MASK 0x4000
1159 #define WM8903_IM_MICDET_EINT_SHIFT 14
1160 #define WM8903_IM_MICDET_EINT_WIDTH 1
1161 #define WM8903_IM_WSEQ_BUSY_EINT 0x2000
1162 #define WM8903_IM_WSEQ_BUSY_EINT_MASK 0x2000
1163 #define WM8903_IM_WSEQ_BUSY_EINT_SHIFT 13
1164 #define WM8903_IM_WSEQ_BUSY_EINT_WIDTH 1
1165 #define WM8903_IM_GP5_EINT 0x0010
1166 #define WM8903_IM_GP5_EINT_MASK 0x0010
1167 #define WM8903_IM_GP5_EINT_SHIFT 4
1168 #define WM8903_IM_GP5_EINT_WIDTH 1
1169 #define WM8903_IM_GP4_EINT 0x0008
1170 #define WM8903_IM_GP4_EINT_MASK 0x0008
1171 #define WM8903_IM_GP4_EINT_SHIFT 3
1172 #define WM8903_IM_GP4_EINT_WIDTH 1
1173 #define WM8903_IM_GP3_EINT 0x0004
1174 #define WM8903_IM_GP3_EINT_MASK 0x0004
1175 #define WM8903_IM_GP3_EINT_SHIFT 2
1176 #define WM8903_IM_GP3_EINT_WIDTH 1
1177 #define WM8903_IM_GP2_EINT 0x0002
1178 #define WM8903_IM_GP2_EINT_MASK 0x0002
1179 #define WM8903_IM_GP2_EINT_SHIFT 1
1180 #define WM8903_IM_GP2_EINT_WIDTH 1
1181 #define WM8903_IM_GP1_EINT 0x0001
1182 #define WM8903_IM_GP1_EINT_MASK 0x0001
1183 #define WM8903_IM_GP1_EINT_SHIFT 0
1184 #define WM8903_IM_GP1_EINT_WIDTH 1
1185
1186
1187
1188
1189 #define WM8903_MICSHRT_INV 0x8000
1190 #define WM8903_MICSHRT_INV_MASK 0x8000
1191 #define WM8903_MICSHRT_INV_SHIFT 15
1192 #define WM8903_MICSHRT_INV_WIDTH 1
1193 #define WM8903_MICDET_INV 0x4000
1194 #define WM8903_MICDET_INV_MASK 0x4000
1195 #define WM8903_MICDET_INV_SHIFT 14
1196 #define WM8903_MICDET_INV_WIDTH 1
1197
1198
1199
1200
1201 #define WM8903_IRQ_POL 0x0001
1202 #define WM8903_IRQ_POL_MASK 0x0001
1203 #define WM8903_IRQ_POL_SHIFT 0
1204 #define WM8903_IRQ_POL_WIDTH 1
1205
1206
1207
1208
1209 #define WM8903_ADC_DIG_MIC 0x0200
1210 #define WM8903_ADC_DIG_MIC_MASK 0x0200
1211 #define WM8903_ADC_DIG_MIC_SHIFT 9
1212 #define WM8903_ADC_DIG_MIC_WIDTH 1
1213
1214
1215
1216
1217 #define WM8903_PGA_BIAS_MASK 0x0070
1218 #define WM8903_PGA_BIAS_SHIFT 4
1219 #define WM8903_PGA_BIAS_WIDTH 3
1220
1221 #endif