0001
0002
0003
0004
0005
0006 #ifndef _WM8961_H
0007 #define _WM8961_H
0008
0009 #include <sound/soc.h>
0010
0011 #define WM8961_BCLK 1
0012 #define WM8961_LRCLK 2
0013
0014 #define WM8961_BCLK_DIV_1 0
0015 #define WM8961_BCLK_DIV_1_5 1
0016 #define WM8961_BCLK_DIV_2 2
0017 #define WM8961_BCLK_DIV_3 3
0018 #define WM8961_BCLK_DIV_4 4
0019 #define WM8961_BCLK_DIV_5_5 5
0020 #define WM8961_BCLK_DIV_6 6
0021 #define WM8961_BCLK_DIV_8 7
0022 #define WM8961_BCLK_DIV_11 8
0023 #define WM8961_BCLK_DIV_12 9
0024 #define WM8961_BCLK_DIV_16 10
0025 #define WM8961_BCLK_DIV_24 11
0026 #define WM8961_BCLK_DIV_32 13
0027
0028
0029
0030
0031
0032 #define WM8961_LEFT_INPUT_VOLUME 0x00
0033 #define WM8961_RIGHT_INPUT_VOLUME 0x01
0034 #define WM8961_LOUT1_VOLUME 0x02
0035 #define WM8961_ROUT1_VOLUME 0x03
0036 #define WM8961_CLOCKING1 0x04
0037 #define WM8961_ADC_DAC_CONTROL_1 0x05
0038 #define WM8961_ADC_DAC_CONTROL_2 0x06
0039 #define WM8961_AUDIO_INTERFACE_0 0x07
0040 #define WM8961_CLOCKING2 0x08
0041 #define WM8961_AUDIO_INTERFACE_1 0x09
0042 #define WM8961_LEFT_DAC_VOLUME 0x0A
0043 #define WM8961_RIGHT_DAC_VOLUME 0x0B
0044 #define WM8961_AUDIO_INTERFACE_2 0x0E
0045 #define WM8961_SOFTWARE_RESET 0x0F
0046 #define WM8961_ALC1 0x11
0047 #define WM8961_ALC2 0x12
0048 #define WM8961_ALC3 0x13
0049 #define WM8961_NOISE_GATE 0x14
0050 #define WM8961_LEFT_ADC_VOLUME 0x15
0051 #define WM8961_RIGHT_ADC_VOLUME 0x16
0052 #define WM8961_ADDITIONAL_CONTROL_1 0x17
0053 #define WM8961_ADDITIONAL_CONTROL_2 0x18
0054 #define WM8961_PWR_MGMT_1 0x19
0055 #define WM8961_PWR_MGMT_2 0x1A
0056 #define WM8961_ADDITIONAL_CONTROL_3 0x1B
0057 #define WM8961_ANTI_POP 0x1C
0058 #define WM8961_CLOCKING_3 0x1E
0059 #define WM8961_ADCL_SIGNAL_PATH 0x20
0060 #define WM8961_ADCR_SIGNAL_PATH 0x21
0061 #define WM8961_LOUT2_VOLUME 0x28
0062 #define WM8961_ROUT2_VOLUME 0x29
0063 #define WM8961_PWR_MGMT_3 0x2F
0064 #define WM8961_ADDITIONAL_CONTROL_4 0x30
0065 #define WM8961_CLASS_D_CONTROL_1 0x31
0066 #define WM8961_CLASS_D_CONTROL_2 0x33
0067 #define WM8961_CLOCKING_4 0x38
0068 #define WM8961_DSP_SIDETONE_0 0x39
0069 #define WM8961_DSP_SIDETONE_1 0x3A
0070 #define WM8961_DC_SERVO_0 0x3C
0071 #define WM8961_DC_SERVO_1 0x3D
0072 #define WM8961_DC_SERVO_3 0x3F
0073 #define WM8961_DC_SERVO_5 0x41
0074 #define WM8961_ANALOGUE_PGA_BIAS 0x44
0075 #define WM8961_ANALOGUE_HP_0 0x45
0076 #define WM8961_ANALOGUE_HP_2 0x47
0077 #define WM8961_CHARGE_PUMP_1 0x48
0078 #define WM8961_CHARGE_PUMP_B 0x52
0079 #define WM8961_WRITE_SEQUENCER_1 0x57
0080 #define WM8961_WRITE_SEQUENCER_2 0x58
0081 #define WM8961_WRITE_SEQUENCER_3 0x59
0082 #define WM8961_WRITE_SEQUENCER_4 0x5A
0083 #define WM8961_WRITE_SEQUENCER_5 0x5B
0084 #define WM8961_WRITE_SEQUENCER_6 0x5C
0085 #define WM8961_WRITE_SEQUENCER_7 0x5D
0086 #define WM8961_GENERAL_TEST_1 0xFC
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096 #define WM8961_IPVU 0x0100
0097 #define WM8961_IPVU_MASK 0x0100
0098 #define WM8961_IPVU_SHIFT 8
0099 #define WM8961_IPVU_WIDTH 1
0100 #define WM8961_LINMUTE 0x0080
0101 #define WM8961_LINMUTE_MASK 0x0080
0102 #define WM8961_LINMUTE_SHIFT 7
0103 #define WM8961_LINMUTE_WIDTH 1
0104 #define WM8961_LIZC 0x0040
0105 #define WM8961_LIZC_MASK 0x0040
0106 #define WM8961_LIZC_SHIFT 6
0107 #define WM8961_LIZC_WIDTH 1
0108 #define WM8961_LINVOL_MASK 0x003F
0109 #define WM8961_LINVOL_SHIFT 0
0110 #define WM8961_LINVOL_WIDTH 6
0111
0112
0113
0114
0115 #define WM8961_DEVICE_ID_MASK 0xF000
0116 #define WM8961_DEVICE_ID_SHIFT 12
0117 #define WM8961_DEVICE_ID_WIDTH 4
0118 #define WM8961_CHIP_REV_MASK 0x0E00
0119 #define WM8961_CHIP_REV_SHIFT 9
0120 #define WM8961_CHIP_REV_WIDTH 3
0121 #define WM8961_IPVU 0x0100
0122 #define WM8961_IPVU_MASK 0x0100
0123 #define WM8961_IPVU_SHIFT 8
0124 #define WM8961_IPVU_WIDTH 1
0125 #define WM8961_RINMUTE 0x0080
0126 #define WM8961_RINMUTE_MASK 0x0080
0127 #define WM8961_RINMUTE_SHIFT 7
0128 #define WM8961_RINMUTE_WIDTH 1
0129 #define WM8961_RIZC 0x0040
0130 #define WM8961_RIZC_MASK 0x0040
0131 #define WM8961_RIZC_SHIFT 6
0132 #define WM8961_RIZC_WIDTH 1
0133 #define WM8961_RINVOL_MASK 0x003F
0134 #define WM8961_RINVOL_SHIFT 0
0135 #define WM8961_RINVOL_WIDTH 6
0136
0137
0138
0139
0140 #define WM8961_OUT1VU 0x0100
0141 #define WM8961_OUT1VU_MASK 0x0100
0142 #define WM8961_OUT1VU_SHIFT 8
0143 #define WM8961_OUT1VU_WIDTH 1
0144 #define WM8961_LO1ZC 0x0080
0145 #define WM8961_LO1ZC_MASK 0x0080
0146 #define WM8961_LO1ZC_SHIFT 7
0147 #define WM8961_LO1ZC_WIDTH 1
0148 #define WM8961_LOUT1VOL_MASK 0x007F
0149 #define WM8961_LOUT1VOL_SHIFT 0
0150 #define WM8961_LOUT1VOL_WIDTH 7
0151
0152
0153
0154
0155 #define WM8961_OUT1VU 0x0100
0156 #define WM8961_OUT1VU_MASK 0x0100
0157 #define WM8961_OUT1VU_SHIFT 8
0158 #define WM8961_OUT1VU_WIDTH 1
0159 #define WM8961_RO1ZC 0x0080
0160 #define WM8961_RO1ZC_MASK 0x0080
0161 #define WM8961_RO1ZC_SHIFT 7
0162 #define WM8961_RO1ZC_WIDTH 1
0163 #define WM8961_ROUT1VOL_MASK 0x007F
0164 #define WM8961_ROUT1VOL_SHIFT 0
0165 #define WM8961_ROUT1VOL_WIDTH 7
0166
0167
0168
0169
0170 #define WM8961_ADCDIV_MASK 0x01C0
0171 #define WM8961_ADCDIV_SHIFT 6
0172 #define WM8961_ADCDIV_WIDTH 3
0173 #define WM8961_DACDIV_MASK 0x0038
0174 #define WM8961_DACDIV_SHIFT 3
0175 #define WM8961_DACDIV_WIDTH 3
0176 #define WM8961_MCLKDIV 0x0004
0177 #define WM8961_MCLKDIV_MASK 0x0004
0178 #define WM8961_MCLKDIV_SHIFT 2
0179 #define WM8961_MCLKDIV_WIDTH 1
0180
0181
0182
0183
0184 #define WM8961_ADCPOL_MASK 0x0060
0185 #define WM8961_ADCPOL_SHIFT 5
0186 #define WM8961_ADCPOL_WIDTH 2
0187 #define WM8961_DACMU 0x0008
0188 #define WM8961_DACMU_MASK 0x0008
0189 #define WM8961_DACMU_SHIFT 3
0190 #define WM8961_DACMU_WIDTH 1
0191 #define WM8961_DEEMPH_MASK 0x0006
0192 #define WM8961_DEEMPH_SHIFT 1
0193 #define WM8961_DEEMPH_WIDTH 2
0194 #define WM8961_ADCHPD 0x0001
0195 #define WM8961_ADCHPD_MASK 0x0001
0196 #define WM8961_ADCHPD_SHIFT 0
0197 #define WM8961_ADCHPD_WIDTH 1
0198
0199
0200
0201
0202 #define WM8961_ADC_HPF_CUT_MASK 0x0180
0203 #define WM8961_ADC_HPF_CUT_SHIFT 7
0204 #define WM8961_ADC_HPF_CUT_WIDTH 2
0205 #define WM8961_DACPOL_MASK 0x0060
0206 #define WM8961_DACPOL_SHIFT 5
0207 #define WM8961_DACPOL_WIDTH 2
0208 #define WM8961_DACSMM 0x0008
0209 #define WM8961_DACSMM_MASK 0x0008
0210 #define WM8961_DACSMM_SHIFT 3
0211 #define WM8961_DACSMM_WIDTH 1
0212 #define WM8961_DACMR 0x0004
0213 #define WM8961_DACMR_MASK 0x0004
0214 #define WM8961_DACMR_SHIFT 2
0215 #define WM8961_DACMR_WIDTH 1
0216 #define WM8961_DACSLOPE 0x0002
0217 #define WM8961_DACSLOPE_MASK 0x0002
0218 #define WM8961_DACSLOPE_SHIFT 1
0219 #define WM8961_DACSLOPE_WIDTH 1
0220 #define WM8961_DAC_OSR128 0x0001
0221 #define WM8961_DAC_OSR128_MASK 0x0001
0222 #define WM8961_DAC_OSR128_SHIFT 0
0223 #define WM8961_DAC_OSR128_WIDTH 1
0224
0225
0226
0227
0228 #define WM8961_ALRSWAP 0x0100
0229 #define WM8961_ALRSWAP_MASK 0x0100
0230 #define WM8961_ALRSWAP_SHIFT 8
0231 #define WM8961_ALRSWAP_WIDTH 1
0232 #define WM8961_BCLKINV 0x0080
0233 #define WM8961_BCLKINV_MASK 0x0080
0234 #define WM8961_BCLKINV_SHIFT 7
0235 #define WM8961_BCLKINV_WIDTH 1
0236 #define WM8961_MS 0x0040
0237 #define WM8961_MS_MASK 0x0040
0238 #define WM8961_MS_SHIFT 6
0239 #define WM8961_MS_WIDTH 1
0240 #define WM8961_DLRSWAP 0x0020
0241 #define WM8961_DLRSWAP_MASK 0x0020
0242 #define WM8961_DLRSWAP_SHIFT 5
0243 #define WM8961_DLRSWAP_WIDTH 1
0244 #define WM8961_LRP 0x0010
0245 #define WM8961_LRP_MASK 0x0010
0246 #define WM8961_LRP_SHIFT 4
0247 #define WM8961_LRP_WIDTH 1
0248 #define WM8961_WL_MASK 0x000C
0249 #define WM8961_WL_SHIFT 2
0250 #define WM8961_WL_WIDTH 2
0251 #define WM8961_FORMAT_MASK 0x0003
0252 #define WM8961_FORMAT_SHIFT 0
0253 #define WM8961_FORMAT_WIDTH 2
0254
0255
0256
0257
0258 #define WM8961_DCLKDIV_MASK 0x01C0
0259 #define WM8961_DCLKDIV_SHIFT 6
0260 #define WM8961_DCLKDIV_WIDTH 3
0261 #define WM8961_CLK_SYS_ENA 0x0020
0262 #define WM8961_CLK_SYS_ENA_MASK 0x0020
0263 #define WM8961_CLK_SYS_ENA_SHIFT 5
0264 #define WM8961_CLK_SYS_ENA_WIDTH 1
0265 #define WM8961_CLK_DSP_ENA 0x0010
0266 #define WM8961_CLK_DSP_ENA_MASK 0x0010
0267 #define WM8961_CLK_DSP_ENA_SHIFT 4
0268 #define WM8961_CLK_DSP_ENA_WIDTH 1
0269 #define WM8961_BCLKDIV_MASK 0x000F
0270 #define WM8961_BCLKDIV_SHIFT 0
0271 #define WM8961_BCLKDIV_WIDTH 4
0272
0273
0274
0275
0276 #define WM8961_DACCOMP_MASK 0x0018
0277 #define WM8961_DACCOMP_SHIFT 3
0278 #define WM8961_DACCOMP_WIDTH 2
0279 #define WM8961_ADCCOMP_MASK 0x0006
0280 #define WM8961_ADCCOMP_SHIFT 1
0281 #define WM8961_ADCCOMP_WIDTH 2
0282 #define WM8961_LOOPBACK 0x0001
0283 #define WM8961_LOOPBACK_MASK 0x0001
0284 #define WM8961_LOOPBACK_SHIFT 0
0285 #define WM8961_LOOPBACK_WIDTH 1
0286
0287
0288
0289
0290 #define WM8961_DACVU 0x0100
0291 #define WM8961_DACVU_MASK 0x0100
0292 #define WM8961_DACVU_SHIFT 8
0293 #define WM8961_DACVU_WIDTH 1
0294 #define WM8961_LDACVOL_MASK 0x00FF
0295 #define WM8961_LDACVOL_SHIFT 0
0296 #define WM8961_LDACVOL_WIDTH 8
0297
0298
0299
0300
0301 #define WM8961_DACVU 0x0100
0302 #define WM8961_DACVU_MASK 0x0100
0303 #define WM8961_DACVU_SHIFT 8
0304 #define WM8961_DACVU_WIDTH 1
0305 #define WM8961_RDACVOL_MASK 0x00FF
0306 #define WM8961_RDACVOL_SHIFT 0
0307 #define WM8961_RDACVOL_WIDTH 8
0308
0309
0310
0311
0312 #define WM8961_LRCLK_RATE_MASK 0x01FF
0313 #define WM8961_LRCLK_RATE_SHIFT 0
0314 #define WM8961_LRCLK_RATE_WIDTH 9
0315
0316
0317
0318
0319 #define WM8961_SW_RST_DEV_ID1_MASK 0xFFFF
0320 #define WM8961_SW_RST_DEV_ID1_SHIFT 0
0321 #define WM8961_SW_RST_DEV_ID1_WIDTH 16
0322
0323
0324
0325
0326 #define WM8961_ALCSEL_MASK 0x0180
0327 #define WM8961_ALCSEL_SHIFT 7
0328 #define WM8961_ALCSEL_WIDTH 2
0329 #define WM8961_MAXGAIN_MASK 0x0070
0330 #define WM8961_MAXGAIN_SHIFT 4
0331 #define WM8961_MAXGAIN_WIDTH 3
0332 #define WM8961_ALCL_MASK 0x000F
0333 #define WM8961_ALCL_SHIFT 0
0334 #define WM8961_ALCL_WIDTH 4
0335
0336
0337
0338
0339 #define WM8961_ALCZC 0x0080
0340 #define WM8961_ALCZC_MASK 0x0080
0341 #define WM8961_ALCZC_SHIFT 7
0342 #define WM8961_ALCZC_WIDTH 1
0343 #define WM8961_MINGAIN_MASK 0x0070
0344 #define WM8961_MINGAIN_SHIFT 4
0345 #define WM8961_MINGAIN_WIDTH 3
0346 #define WM8961_HLD_MASK 0x000F
0347 #define WM8961_HLD_SHIFT 0
0348 #define WM8961_HLD_WIDTH 4
0349
0350
0351
0352
0353 #define WM8961_ALCMODE 0x0100
0354 #define WM8961_ALCMODE_MASK 0x0100
0355 #define WM8961_ALCMODE_SHIFT 8
0356 #define WM8961_ALCMODE_WIDTH 1
0357 #define WM8961_DCY_MASK 0x00F0
0358 #define WM8961_DCY_SHIFT 4
0359 #define WM8961_DCY_WIDTH 4
0360 #define WM8961_ATK_MASK 0x000F
0361 #define WM8961_ATK_SHIFT 0
0362 #define WM8961_ATK_WIDTH 4
0363
0364
0365
0366
0367 #define WM8961_NGTH_MASK 0x00F8
0368 #define WM8961_NGTH_SHIFT 3
0369 #define WM8961_NGTH_WIDTH 5
0370 #define WM8961_NGG 0x0002
0371 #define WM8961_NGG_MASK 0x0002
0372 #define WM8961_NGG_SHIFT 1
0373 #define WM8961_NGG_WIDTH 1
0374 #define WM8961_NGAT 0x0001
0375 #define WM8961_NGAT_MASK 0x0001
0376 #define WM8961_NGAT_SHIFT 0
0377 #define WM8961_NGAT_WIDTH 1
0378
0379
0380
0381
0382 #define WM8961_ADCVU 0x0100
0383 #define WM8961_ADCVU_MASK 0x0100
0384 #define WM8961_ADCVU_SHIFT 8
0385 #define WM8961_ADCVU_WIDTH 1
0386 #define WM8961_LADCVOL_MASK 0x00FF
0387 #define WM8961_LADCVOL_SHIFT 0
0388 #define WM8961_LADCVOL_WIDTH 8
0389
0390
0391
0392
0393 #define WM8961_ADCVU 0x0100
0394 #define WM8961_ADCVU_MASK 0x0100
0395 #define WM8961_ADCVU_SHIFT 8
0396 #define WM8961_ADCVU_WIDTH 1
0397 #define WM8961_RADCVOL_MASK 0x00FF
0398 #define WM8961_RADCVOL_SHIFT 0
0399 #define WM8961_RADCVOL_WIDTH 8
0400
0401
0402
0403
0404 #define WM8961_TSDEN 0x0100
0405 #define WM8961_TSDEN_MASK 0x0100
0406 #define WM8961_TSDEN_SHIFT 8
0407 #define WM8961_TSDEN_WIDTH 1
0408 #define WM8961_DMONOMIX 0x0010
0409 #define WM8961_DMONOMIX_MASK 0x0010
0410 #define WM8961_DMONOMIX_SHIFT 4
0411 #define WM8961_DMONOMIX_WIDTH 1
0412 #define WM8961_TOEN 0x0001
0413 #define WM8961_TOEN_MASK 0x0001
0414 #define WM8961_TOEN_SHIFT 0
0415 #define WM8961_TOEN_WIDTH 1
0416
0417
0418
0419
0420 #define WM8961_TRIS 0x0008
0421 #define WM8961_TRIS_MASK 0x0008
0422 #define WM8961_TRIS_SHIFT 3
0423 #define WM8961_TRIS_WIDTH 1
0424
0425
0426
0427
0428 #define WM8961_VMIDSEL_MASK 0x0180
0429 #define WM8961_VMIDSEL_SHIFT 7
0430 #define WM8961_VMIDSEL_WIDTH 2
0431 #define WM8961_VREF 0x0040
0432 #define WM8961_VREF_MASK 0x0040
0433 #define WM8961_VREF_SHIFT 6
0434 #define WM8961_VREF_WIDTH 1
0435 #define WM8961_AINL 0x0020
0436 #define WM8961_AINL_MASK 0x0020
0437 #define WM8961_AINL_SHIFT 5
0438 #define WM8961_AINL_WIDTH 1
0439 #define WM8961_AINR 0x0010
0440 #define WM8961_AINR_MASK 0x0010
0441 #define WM8961_AINR_SHIFT 4
0442 #define WM8961_AINR_WIDTH 1
0443 #define WM8961_ADCL 0x0008
0444 #define WM8961_ADCL_MASK 0x0008
0445 #define WM8961_ADCL_SHIFT 3
0446 #define WM8961_ADCL_WIDTH 1
0447 #define WM8961_ADCR 0x0004
0448 #define WM8961_ADCR_MASK 0x0004
0449 #define WM8961_ADCR_SHIFT 2
0450 #define WM8961_ADCR_WIDTH 1
0451 #define WM8961_MICB 0x0002
0452 #define WM8961_MICB_MASK 0x0002
0453 #define WM8961_MICB_SHIFT 1
0454 #define WM8961_MICB_WIDTH 1
0455
0456
0457
0458
0459 #define WM8961_DACL 0x0100
0460 #define WM8961_DACL_MASK 0x0100
0461 #define WM8961_DACL_SHIFT 8
0462 #define WM8961_DACL_WIDTH 1
0463 #define WM8961_DACR 0x0080
0464 #define WM8961_DACR_MASK 0x0080
0465 #define WM8961_DACR_SHIFT 7
0466 #define WM8961_DACR_WIDTH 1
0467 #define WM8961_LOUT1_PGA 0x0040
0468 #define WM8961_LOUT1_PGA_MASK 0x0040
0469 #define WM8961_LOUT1_PGA_SHIFT 6
0470 #define WM8961_LOUT1_PGA_WIDTH 1
0471 #define WM8961_ROUT1_PGA 0x0020
0472 #define WM8961_ROUT1_PGA_MASK 0x0020
0473 #define WM8961_ROUT1_PGA_SHIFT 5
0474 #define WM8961_ROUT1_PGA_WIDTH 1
0475 #define WM8961_SPKL_PGA 0x0010
0476 #define WM8961_SPKL_PGA_MASK 0x0010
0477 #define WM8961_SPKL_PGA_SHIFT 4
0478 #define WM8961_SPKL_PGA_WIDTH 1
0479 #define WM8961_SPKR_PGA 0x0008
0480 #define WM8961_SPKR_PGA_MASK 0x0008
0481 #define WM8961_SPKR_PGA_SHIFT 3
0482 #define WM8961_SPKR_PGA_WIDTH 1
0483
0484
0485
0486
0487 #define WM8961_SAMPLE_RATE_MASK 0x0007
0488 #define WM8961_SAMPLE_RATE_SHIFT 0
0489 #define WM8961_SAMPLE_RATE_WIDTH 3
0490
0491
0492
0493
0494 #define WM8961_BUFDCOPEN 0x0010
0495 #define WM8961_BUFDCOPEN_MASK 0x0010
0496 #define WM8961_BUFDCOPEN_SHIFT 4
0497 #define WM8961_BUFDCOPEN_WIDTH 1
0498 #define WM8961_BUFIOEN 0x0008
0499 #define WM8961_BUFIOEN_MASK 0x0008
0500 #define WM8961_BUFIOEN_SHIFT 3
0501 #define WM8961_BUFIOEN_WIDTH 1
0502 #define WM8961_SOFT_ST 0x0004
0503 #define WM8961_SOFT_ST_MASK 0x0004
0504 #define WM8961_SOFT_ST_SHIFT 2
0505 #define WM8961_SOFT_ST_WIDTH 1
0506
0507
0508
0509
0510 #define WM8961_CLK_TO_DIV_MASK 0x0180
0511 #define WM8961_CLK_TO_DIV_SHIFT 7
0512 #define WM8961_CLK_TO_DIV_WIDTH 2
0513 #define WM8961_CLK_256K_DIV_MASK 0x007E
0514 #define WM8961_CLK_256K_DIV_SHIFT 1
0515 #define WM8961_CLK_256K_DIV_WIDTH 6
0516 #define WM8961_MANUAL_MODE 0x0001
0517 #define WM8961_MANUAL_MODE_MASK 0x0001
0518 #define WM8961_MANUAL_MODE_SHIFT 0
0519 #define WM8961_MANUAL_MODE_WIDTH 1
0520
0521
0522
0523
0524 #define WM8961_LMICBOOST_MASK 0x0030
0525 #define WM8961_LMICBOOST_SHIFT 4
0526 #define WM8961_LMICBOOST_WIDTH 2
0527
0528
0529
0530
0531 #define WM8961_RMICBOOST_MASK 0x0030
0532 #define WM8961_RMICBOOST_SHIFT 4
0533 #define WM8961_RMICBOOST_WIDTH 2
0534
0535
0536
0537
0538 #define WM8961_SPKVU 0x0100
0539 #define WM8961_SPKVU_MASK 0x0100
0540 #define WM8961_SPKVU_SHIFT 8
0541 #define WM8961_SPKVU_WIDTH 1
0542 #define WM8961_SPKLZC 0x0080
0543 #define WM8961_SPKLZC_MASK 0x0080
0544 #define WM8961_SPKLZC_SHIFT 7
0545 #define WM8961_SPKLZC_WIDTH 1
0546 #define WM8961_SPKLVOL_MASK 0x007F
0547 #define WM8961_SPKLVOL_SHIFT 0
0548 #define WM8961_SPKLVOL_WIDTH 7
0549
0550
0551
0552
0553 #define WM8961_SPKVU 0x0100
0554 #define WM8961_SPKVU_MASK 0x0100
0555 #define WM8961_SPKVU_SHIFT 8
0556 #define WM8961_SPKVU_WIDTH 1
0557 #define WM8961_SPKRZC 0x0080
0558 #define WM8961_SPKRZC_MASK 0x0080
0559 #define WM8961_SPKRZC_SHIFT 7
0560 #define WM8961_SPKRZC_WIDTH 1
0561 #define WM8961_SPKRVOL_MASK 0x007F
0562 #define WM8961_SPKRVOL_SHIFT 0
0563 #define WM8961_SPKRVOL_WIDTH 7
0564
0565
0566
0567
0568 #define WM8961_TEMP_SHUT 0x0002
0569 #define WM8961_TEMP_SHUT_MASK 0x0002
0570 #define WM8961_TEMP_SHUT_SHIFT 1
0571 #define WM8961_TEMP_SHUT_WIDTH 1
0572 #define WM8961_TEMP_WARN 0x0001
0573 #define WM8961_TEMP_WARN_MASK 0x0001
0574 #define WM8961_TEMP_WARN_SHIFT 0
0575 #define WM8961_TEMP_WARN_WIDTH 1
0576
0577
0578
0579
0580 #define WM8961_TSENSEN 0x0002
0581 #define WM8961_TSENSEN_MASK 0x0002
0582 #define WM8961_TSENSEN_SHIFT 1
0583 #define WM8961_TSENSEN_WIDTH 1
0584 #define WM8961_MBSEL 0x0001
0585 #define WM8961_MBSEL_MASK 0x0001
0586 #define WM8961_MBSEL_SHIFT 0
0587 #define WM8961_MBSEL_WIDTH 1
0588
0589
0590
0591
0592 #define WM8961_SPKR_ENA 0x0080
0593 #define WM8961_SPKR_ENA_MASK 0x0080
0594 #define WM8961_SPKR_ENA_SHIFT 7
0595 #define WM8961_SPKR_ENA_WIDTH 1
0596 #define WM8961_SPKL_ENA 0x0040
0597 #define WM8961_SPKL_ENA_MASK 0x0040
0598 #define WM8961_SPKL_ENA_SHIFT 6
0599 #define WM8961_SPKL_ENA_WIDTH 1
0600
0601
0602
0603
0604 #define WM8961_CLASSD_ACGAIN_MASK 0x0007
0605 #define WM8961_CLASSD_ACGAIN_SHIFT 0
0606 #define WM8961_CLASSD_ACGAIN_WIDTH 3
0607
0608
0609
0610
0611 #define WM8961_CLK_DCS_DIV_MASK 0x01E0
0612 #define WM8961_CLK_DCS_DIV_SHIFT 5
0613 #define WM8961_CLK_DCS_DIV_WIDTH 4
0614 #define WM8961_CLK_SYS_RATE_MASK 0x001E
0615 #define WM8961_CLK_SYS_RATE_SHIFT 1
0616 #define WM8961_CLK_SYS_RATE_WIDTH 4
0617
0618
0619
0620
0621 #define WM8961_ADCR_DAC_SVOL_MASK 0x00F0
0622 #define WM8961_ADCR_DAC_SVOL_SHIFT 4
0623 #define WM8961_ADCR_DAC_SVOL_WIDTH 4
0624 #define WM8961_ADC_TO_DACR_MASK 0x000C
0625 #define WM8961_ADC_TO_DACR_SHIFT 2
0626 #define WM8961_ADC_TO_DACR_WIDTH 2
0627
0628
0629
0630
0631 #define WM8961_ADCL_DAC_SVOL_MASK 0x00F0
0632 #define WM8961_ADCL_DAC_SVOL_SHIFT 4
0633 #define WM8961_ADCL_DAC_SVOL_WIDTH 4
0634 #define WM8961_ADC_TO_DACL_MASK 0x000C
0635 #define WM8961_ADC_TO_DACL_SHIFT 2
0636 #define WM8961_ADC_TO_DACL_WIDTH 2
0637
0638
0639
0640
0641 #define WM8961_DCS_ENA_CHAN_INL 0x0080
0642 #define WM8961_DCS_ENA_CHAN_INL_MASK 0x0080
0643 #define WM8961_DCS_ENA_CHAN_INL_SHIFT 7
0644 #define WM8961_DCS_ENA_CHAN_INL_WIDTH 1
0645 #define WM8961_DCS_TRIG_STARTUP_INL 0x0040
0646 #define WM8961_DCS_TRIG_STARTUP_INL_MASK 0x0040
0647 #define WM8961_DCS_TRIG_STARTUP_INL_SHIFT 6
0648 #define WM8961_DCS_TRIG_STARTUP_INL_WIDTH 1
0649 #define WM8961_DCS_TRIG_SERIES_INL 0x0010
0650 #define WM8961_DCS_TRIG_SERIES_INL_MASK 0x0010
0651 #define WM8961_DCS_TRIG_SERIES_INL_SHIFT 4
0652 #define WM8961_DCS_TRIG_SERIES_INL_WIDTH 1
0653 #define WM8961_DCS_ENA_CHAN_INR 0x0008
0654 #define WM8961_DCS_ENA_CHAN_INR_MASK 0x0008
0655 #define WM8961_DCS_ENA_CHAN_INR_SHIFT 3
0656 #define WM8961_DCS_ENA_CHAN_INR_WIDTH 1
0657 #define WM8961_DCS_TRIG_STARTUP_INR 0x0004
0658 #define WM8961_DCS_TRIG_STARTUP_INR_MASK 0x0004
0659 #define WM8961_DCS_TRIG_STARTUP_INR_SHIFT 2
0660 #define WM8961_DCS_TRIG_STARTUP_INR_WIDTH 1
0661 #define WM8961_DCS_TRIG_SERIES_INR 0x0001
0662 #define WM8961_DCS_TRIG_SERIES_INR_MASK 0x0001
0663 #define WM8961_DCS_TRIG_SERIES_INR_SHIFT 0
0664 #define WM8961_DCS_TRIG_SERIES_INR_WIDTH 1
0665
0666
0667
0668
0669 #define WM8961_DCS_ENA_CHAN_HPL 0x0080
0670 #define WM8961_DCS_ENA_CHAN_HPL_MASK 0x0080
0671 #define WM8961_DCS_ENA_CHAN_HPL_SHIFT 7
0672 #define WM8961_DCS_ENA_CHAN_HPL_WIDTH 1
0673 #define WM8961_DCS_TRIG_STARTUP_HPL 0x0040
0674 #define WM8961_DCS_TRIG_STARTUP_HPL_MASK 0x0040
0675 #define WM8961_DCS_TRIG_STARTUP_HPL_SHIFT 6
0676 #define WM8961_DCS_TRIG_STARTUP_HPL_WIDTH 1
0677 #define WM8961_DCS_TRIG_SERIES_HPL 0x0010
0678 #define WM8961_DCS_TRIG_SERIES_HPL_MASK 0x0010
0679 #define WM8961_DCS_TRIG_SERIES_HPL_SHIFT 4
0680 #define WM8961_DCS_TRIG_SERIES_HPL_WIDTH 1
0681 #define WM8961_DCS_ENA_CHAN_HPR 0x0008
0682 #define WM8961_DCS_ENA_CHAN_HPR_MASK 0x0008
0683 #define WM8961_DCS_ENA_CHAN_HPR_SHIFT 3
0684 #define WM8961_DCS_ENA_CHAN_HPR_WIDTH 1
0685 #define WM8961_DCS_TRIG_STARTUP_HPR 0x0004
0686 #define WM8961_DCS_TRIG_STARTUP_HPR_MASK 0x0004
0687 #define WM8961_DCS_TRIG_STARTUP_HPR_SHIFT 2
0688 #define WM8961_DCS_TRIG_STARTUP_HPR_WIDTH 1
0689 #define WM8961_DCS_TRIG_SERIES_HPR 0x0001
0690 #define WM8961_DCS_TRIG_SERIES_HPR_MASK 0x0001
0691 #define WM8961_DCS_TRIG_SERIES_HPR_SHIFT 0
0692 #define WM8961_DCS_TRIG_SERIES_HPR_WIDTH 1
0693
0694
0695
0696
0697 #define WM8961_DCS_FILT_BW_SERIES_MASK 0x0030
0698 #define WM8961_DCS_FILT_BW_SERIES_SHIFT 4
0699 #define WM8961_DCS_FILT_BW_SERIES_WIDTH 2
0700
0701
0702
0703
0704 #define WM8961_DCS_SERIES_NO_HP_MASK 0x007F
0705 #define WM8961_DCS_SERIES_NO_HP_SHIFT 0
0706 #define WM8961_DCS_SERIES_NO_HP_WIDTH 7
0707
0708
0709
0710
0711 #define WM8961_HP_PGAS_BIAS_MASK 0x0007
0712 #define WM8961_HP_PGAS_BIAS_SHIFT 0
0713 #define WM8961_HP_PGAS_BIAS_WIDTH 3
0714
0715
0716
0717
0718 #define WM8961_HPL_RMV_SHORT 0x0080
0719 #define WM8961_HPL_RMV_SHORT_MASK 0x0080
0720 #define WM8961_HPL_RMV_SHORT_SHIFT 7
0721 #define WM8961_HPL_RMV_SHORT_WIDTH 1
0722 #define WM8961_HPL_ENA_OUTP 0x0040
0723 #define WM8961_HPL_ENA_OUTP_MASK 0x0040
0724 #define WM8961_HPL_ENA_OUTP_SHIFT 6
0725 #define WM8961_HPL_ENA_OUTP_WIDTH 1
0726 #define WM8961_HPL_ENA_DLY 0x0020
0727 #define WM8961_HPL_ENA_DLY_MASK 0x0020
0728 #define WM8961_HPL_ENA_DLY_SHIFT 5
0729 #define WM8961_HPL_ENA_DLY_WIDTH 1
0730 #define WM8961_HPL_ENA 0x0010
0731 #define WM8961_HPL_ENA_MASK 0x0010
0732 #define WM8961_HPL_ENA_SHIFT 4
0733 #define WM8961_HPL_ENA_WIDTH 1
0734 #define WM8961_HPR_RMV_SHORT 0x0008
0735 #define WM8961_HPR_RMV_SHORT_MASK 0x0008
0736 #define WM8961_HPR_RMV_SHORT_SHIFT 3
0737 #define WM8961_HPR_RMV_SHORT_WIDTH 1
0738 #define WM8961_HPR_ENA_OUTP 0x0004
0739 #define WM8961_HPR_ENA_OUTP_MASK 0x0004
0740 #define WM8961_HPR_ENA_OUTP_SHIFT 2
0741 #define WM8961_HPR_ENA_OUTP_WIDTH 1
0742 #define WM8961_HPR_ENA_DLY 0x0002
0743 #define WM8961_HPR_ENA_DLY_MASK 0x0002
0744 #define WM8961_HPR_ENA_DLY_SHIFT 1
0745 #define WM8961_HPR_ENA_DLY_WIDTH 1
0746 #define WM8961_HPR_ENA 0x0001
0747 #define WM8961_HPR_ENA_MASK 0x0001
0748 #define WM8961_HPR_ENA_SHIFT 0
0749 #define WM8961_HPR_ENA_WIDTH 1
0750
0751
0752
0753
0754 #define WM8961_HPL_VOL_MASK 0x01C0
0755 #define WM8961_HPL_VOL_SHIFT 6
0756 #define WM8961_HPL_VOL_WIDTH 3
0757 #define WM8961_HPR_VOL_MASK 0x0038
0758 #define WM8961_HPR_VOL_SHIFT 3
0759 #define WM8961_HPR_VOL_WIDTH 3
0760 #define WM8961_HP_BIAS_BOOST_MASK 0x0007
0761 #define WM8961_HP_BIAS_BOOST_SHIFT 0
0762 #define WM8961_HP_BIAS_BOOST_WIDTH 3
0763
0764
0765
0766
0767 #define WM8961_CP_ENA 0x0001
0768 #define WM8961_CP_ENA_MASK 0x0001
0769 #define WM8961_CP_ENA_SHIFT 0
0770 #define WM8961_CP_ENA_WIDTH 1
0771
0772
0773
0774
0775 #define WM8961_CP_DYN_PWR_MASK 0x0003
0776 #define WM8961_CP_DYN_PWR_SHIFT 0
0777 #define WM8961_CP_DYN_PWR_WIDTH 2
0778
0779
0780
0781
0782 #define WM8961_WSEQ_ENA 0x0020
0783 #define WM8961_WSEQ_ENA_MASK 0x0020
0784 #define WM8961_WSEQ_ENA_SHIFT 5
0785 #define WM8961_WSEQ_ENA_WIDTH 1
0786 #define WM8961_WSEQ_WRITE_INDEX_MASK 0x001F
0787 #define WM8961_WSEQ_WRITE_INDEX_SHIFT 0
0788 #define WM8961_WSEQ_WRITE_INDEX_WIDTH 5
0789
0790
0791
0792
0793 #define WM8961_WSEQ_EOS 0x0100
0794 #define WM8961_WSEQ_EOS_MASK 0x0100
0795 #define WM8961_WSEQ_EOS_SHIFT 8
0796 #define WM8961_WSEQ_EOS_WIDTH 1
0797 #define WM8961_WSEQ_ADDR_MASK 0x00FF
0798 #define WM8961_WSEQ_ADDR_SHIFT 0
0799 #define WM8961_WSEQ_ADDR_WIDTH 8
0800
0801
0802
0803
0804 #define WM8961_WSEQ_DATA_MASK 0x00FF
0805 #define WM8961_WSEQ_DATA_SHIFT 0
0806 #define WM8961_WSEQ_DATA_WIDTH 8
0807
0808
0809
0810
0811 #define WM8961_WSEQ_ABORT 0x0100
0812 #define WM8961_WSEQ_ABORT_MASK 0x0100
0813 #define WM8961_WSEQ_ABORT_SHIFT 8
0814 #define WM8961_WSEQ_ABORT_WIDTH 1
0815 #define WM8961_WSEQ_START 0x0080
0816 #define WM8961_WSEQ_START_MASK 0x0080
0817 #define WM8961_WSEQ_START_SHIFT 7
0818 #define WM8961_WSEQ_START_WIDTH 1
0819 #define WM8961_WSEQ_START_INDEX_MASK 0x003F
0820 #define WM8961_WSEQ_START_INDEX_SHIFT 0
0821 #define WM8961_WSEQ_START_INDEX_WIDTH 6
0822
0823
0824
0825
0826 #define WM8961_WSEQ_DATA_WIDTH_MASK 0x0070
0827 #define WM8961_WSEQ_DATA_WIDTH_SHIFT 4
0828 #define WM8961_WSEQ_DATA_WIDTH_WIDTH 3
0829 #define WM8961_WSEQ_DATA_START_MASK 0x000F
0830 #define WM8961_WSEQ_DATA_START_SHIFT 0
0831 #define WM8961_WSEQ_DATA_START_WIDTH 4
0832
0833
0834
0835
0836 #define WM8961_WSEQ_DELAY_MASK 0x000F
0837 #define WM8961_WSEQ_DELAY_SHIFT 0
0838 #define WM8961_WSEQ_DELAY_WIDTH 4
0839
0840
0841
0842
0843 #define WM8961_WSEQ_BUSY 0x0001
0844 #define WM8961_WSEQ_BUSY_MASK 0x0001
0845 #define WM8961_WSEQ_BUSY_SHIFT 0
0846 #define WM8961_WSEQ_BUSY_WIDTH 1
0847
0848
0849
0850
0851 #define WM8961_ARA_ENA 0x0002
0852 #define WM8961_ARA_ENA_MASK 0x0002
0853 #define WM8961_ARA_ENA_SHIFT 1
0854 #define WM8961_ARA_ENA_WIDTH 1
0855 #define WM8961_AUTO_INC 0x0001
0856 #define WM8961_AUTO_INC_MASK 0x0001
0857 #define WM8961_AUTO_INC_SHIFT 0
0858 #define WM8961_AUTO_INC_WIDTH 1
0859
0860 #endif