0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _WM8991_H
0011 #define _WM8991_H
0012
0013
0014
0015
0016 #define WM8991_RESET 0x00
0017 #define WM8991_POWER_MANAGEMENT_1 0x01
0018 #define WM8991_POWER_MANAGEMENT_2 0x02
0019 #define WM8991_POWER_MANAGEMENT_3 0x03
0020 #define WM8991_AUDIO_INTERFACE_1 0x04
0021 #define WM8991_AUDIO_INTERFACE_2 0x05
0022 #define WM8991_CLOCKING_1 0x06
0023 #define WM8991_CLOCKING_2 0x07
0024 #define WM8991_AUDIO_INTERFACE_3 0x08
0025 #define WM8991_AUDIO_INTERFACE_4 0x09
0026 #define WM8991_DAC_CTRL 0x0A
0027 #define WM8991_LEFT_DAC_DIGITAL_VOLUME 0x0B
0028 #define WM8991_RIGHT_DAC_DIGITAL_VOLUME 0x0C
0029 #define WM8991_DIGITAL_SIDE_TONE 0x0D
0030 #define WM8991_ADC_CTRL 0x0E
0031 #define WM8991_LEFT_ADC_DIGITAL_VOLUME 0x0F
0032 #define WM8991_RIGHT_ADC_DIGITAL_VOLUME 0x10
0033 #define WM8991_GPIO_CTRL_1 0x12
0034 #define WM8991_GPIO1_GPIO2 0x13
0035 #define WM8991_GPIO3_GPIO4 0x14
0036 #define WM8991_GPIO5_GPIO6 0x15
0037 #define WM8991_GPIOCTRL_2 0x16
0038 #define WM8991_GPIO_POL 0x17
0039 #define WM8991_LEFT_LINE_INPUT_1_2_VOLUME 0x18
0040 #define WM8991_LEFT_LINE_INPUT_3_4_VOLUME 0x19
0041 #define WM8991_RIGHT_LINE_INPUT_1_2_VOLUME 0x1A
0042 #define WM8991_RIGHT_LINE_INPUT_3_4_VOLUME 0x1B
0043 #define WM8991_LEFT_OUTPUT_VOLUME 0x1C
0044 #define WM8991_RIGHT_OUTPUT_VOLUME 0x1D
0045 #define WM8991_LINE_OUTPUTS_VOLUME 0x1E
0046 #define WM8991_OUT3_4_VOLUME 0x1F
0047 #define WM8991_LEFT_OPGA_VOLUME 0x20
0048 #define WM8991_RIGHT_OPGA_VOLUME 0x21
0049 #define WM8991_SPEAKER_VOLUME 0x22
0050 #define WM8991_CLASSD1 0x23
0051 #define WM8991_CLASSD3 0x25
0052 #define WM8991_INPUT_MIXER1 0x27
0053 #define WM8991_INPUT_MIXER2 0x28
0054 #define WM8991_INPUT_MIXER3 0x29
0055 #define WM8991_INPUT_MIXER4 0x2A
0056 #define WM8991_INPUT_MIXER5 0x2B
0057 #define WM8991_INPUT_MIXER6 0x2C
0058 #define WM8991_OUTPUT_MIXER1 0x2D
0059 #define WM8991_OUTPUT_MIXER2 0x2E
0060 #define WM8991_OUTPUT_MIXER3 0x2F
0061 #define WM8991_OUTPUT_MIXER4 0x30
0062 #define WM8991_OUTPUT_MIXER5 0x31
0063 #define WM8991_OUTPUT_MIXER6 0x32
0064 #define WM8991_OUT3_4_MIXER 0x33
0065 #define WM8991_LINE_MIXER1 0x34
0066 #define WM8991_LINE_MIXER2 0x35
0067 #define WM8991_SPEAKER_MIXER 0x36
0068 #define WM8991_ADDITIONAL_CONTROL 0x37
0069 #define WM8991_ANTIPOP1 0x38
0070 #define WM8991_ANTIPOP2 0x39
0071 #define WM8991_MICBIAS 0x3A
0072 #define WM8991_PLL1 0x3C
0073 #define WM8991_PLL2 0x3D
0074 #define WM8991_PLL3 0x3E
0075
0076 #define WM8991_REGISTER_COUNT 60
0077 #define WM8991_MAX_REGISTER 0x3F
0078
0079
0080
0081
0082
0083
0084
0085
0086 #define WM8991_SW_RESET_CHIP_ID_MASK 0xFFFF
0087
0088
0089
0090
0091 #define WM8991_SPK_ENA 0x1000
0092 #define WM8991_SPK_ENA_BIT 12
0093 #define WM8991_OUT3_ENA 0x0800
0094 #define WM8991_OUT3_ENA_BIT 11
0095 #define WM8991_OUT4_ENA 0x0400
0096 #define WM8991_OUT4_ENA_BIT 10
0097 #define WM8991_LOUT_ENA 0x0200
0098 #define WM8991_LOUT_ENA_BIT 9
0099 #define WM8991_ROUT_ENA 0x0100
0100 #define WM8991_ROUT_ENA_BIT 8
0101 #define WM8991_MICBIAS_ENA 0x0010
0102 #define WM8991_MICBIAS_ENA_BIT 4
0103 #define WM8991_VMID_MODE_MASK 0x0006
0104 #define WM8991_VREF_ENA 0x0001
0105 #define WM8991_VREF_ENA_BIT 0
0106
0107
0108
0109
0110 #define WM8991_PLL_ENA 0x8000
0111 #define WM8991_PLL_ENA_BIT 15
0112 #define WM8991_TSHUT_ENA 0x4000
0113 #define WM8991_TSHUT_ENA_BIT 14
0114 #define WM8991_TSHUT_OPDIS 0x2000
0115 #define WM8991_TSHUT_OPDIS_BIT 13
0116 #define WM8991_OPCLK_ENA 0x0800
0117 #define WM8991_OPCLK_ENA_BIT 11
0118 #define WM8991_AINL_ENA 0x0200
0119 #define WM8991_AINL_ENA_BIT 9
0120 #define WM8991_AINR_ENA 0x0100
0121 #define WM8991_AINR_ENA_BIT 8
0122 #define WM8991_LIN34_ENA 0x0080
0123 #define WM8991_LIN34_ENA_BIT 7
0124 #define WM8991_LIN12_ENA 0x0040
0125 #define WM8991_LIN12_ENA_BIT 6
0126 #define WM8991_RIN34_ENA 0x0020
0127 #define WM8991_RIN34_ENA_BIT 5
0128 #define WM8991_RIN12_ENA 0x0010
0129 #define WM8991_RIN12_ENA_BIT 4
0130 #define WM8991_ADCL_ENA 0x0002
0131 #define WM8991_ADCL_ENA_BIT 1
0132 #define WM8991_ADCR_ENA 0x0001
0133 #define WM8991_ADCR_ENA_BIT 0
0134
0135
0136
0137
0138 #define WM8991_LON_ENA 0x2000
0139 #define WM8991_LON_ENA_BIT 13
0140 #define WM8991_LOP_ENA 0x1000
0141 #define WM8991_LOP_ENA_BIT 12
0142 #define WM8991_RON_ENA 0x0800
0143 #define WM8991_RON_ENA_BIT 11
0144 #define WM8991_ROP_ENA 0x0400
0145 #define WM8991_ROP_ENA_BIT 10
0146 #define WM8991_LOPGA_ENA 0x0080
0147 #define WM8991_LOPGA_ENA_BIT 7
0148 #define WM8991_ROPGA_ENA 0x0040
0149 #define WM8991_ROPGA_ENA_BIT 6
0150 #define WM8991_LOMIX_ENA 0x0020
0151 #define WM8991_LOMIX_ENA_BIT 5
0152 #define WM8991_ROMIX_ENA 0x0010
0153 #define WM8991_ROMIX_ENA_BIT 4
0154 #define WM8991_DACL_ENA 0x0002
0155 #define WM8991_DACL_ENA_BIT 1
0156 #define WM8991_DACR_ENA 0x0001
0157 #define WM8991_DACR_ENA_BIT 0
0158
0159
0160
0161
0162 #define WM8991_AIFADCL_SRC 0x8000
0163 #define WM8991_AIFADCR_SRC 0x4000
0164 #define WM8991_AIFADC_TDM 0x2000
0165 #define WM8991_AIFADC_TDM_CHAN 0x1000
0166 #define WM8991_AIF_BCLK_INV 0x0100
0167 #define WM8991_AIF_LRCLK_INV 0x0080
0168 #define WM8991_AIF_WL_MASK 0x0060
0169 #define WM8991_AIF_WL_16BITS (0 << 5)
0170 #define WM8991_AIF_WL_20BITS (1 << 5)
0171 #define WM8991_AIF_WL_24BITS (2 << 5)
0172 #define WM8991_AIF_WL_32BITS (3 << 5)
0173 #define WM8991_AIF_FMT_MASK 0x0018
0174 #define WM8991_AIF_TMF_RIGHTJ (0 << 3)
0175 #define WM8991_AIF_TMF_LEFTJ (1 << 3)
0176 #define WM8991_AIF_TMF_I2S (2 << 3)
0177 #define WM8991_AIF_TMF_DSP (3 << 3)
0178
0179
0180
0181
0182 #define WM8991_DACL_SRC 0x8000
0183 #define WM8991_DACR_SRC 0x4000
0184 #define WM8991_AIFDAC_TDM 0x2000
0185 #define WM8991_AIFDAC_TDM_CHAN 0x1000
0186 #define WM8991_DAC_BOOST_MASK 0x0C00
0187 #define WM8991_DAC_COMP 0x0010
0188 #define WM8991_DAC_COMPMODE 0x0008
0189 #define WM8991_ADC_COMP 0x0004
0190 #define WM8991_ADC_COMPMODE 0x0002
0191 #define WM8991_LOOPBACK 0x0001
0192
0193
0194
0195
0196 #define WM8991_TOCLK_RATE 0x8000
0197 #define WM8991_TOCLK_ENA 0x4000
0198 #define WM8991_OPCLKDIV_MASK 0x1E00
0199 #define WM8991_DCLKDIV_MASK 0x01C0
0200 #define WM8991_BCLK_DIV_MASK 0x001E
0201 #define WM8991_BCLK_DIV_1 (0x0 << 1)
0202 #define WM8991_BCLK_DIV_1_5 (0x1 << 1)
0203 #define WM8991_BCLK_DIV_2 (0x2 << 1)
0204 #define WM8991_BCLK_DIV_3 (0x3 << 1)
0205 #define WM8991_BCLK_DIV_4 (0x4 << 1)
0206 #define WM8991_BCLK_DIV_5_5 (0x5 << 1)
0207 #define WM8991_BCLK_DIV_6 (0x6 << 1)
0208 #define WM8991_BCLK_DIV_8 (0x7 << 1)
0209 #define WM8991_BCLK_DIV_11 (0x8 << 1)
0210 #define WM8991_BCLK_DIV_12 (0x9 << 1)
0211 #define WM8991_BCLK_DIV_16 (0xA << 1)
0212 #define WM8991_BCLK_DIV_22 (0xB << 1)
0213 #define WM8991_BCLK_DIV_24 (0xC << 1)
0214 #define WM8991_BCLK_DIV_32 (0xD << 1)
0215 #define WM8991_BCLK_DIV_44 (0xE << 1)
0216 #define WM8991_BCLK_DIV_48 (0xF << 1)
0217
0218
0219
0220
0221 #define WM8991_MCLK_SRC 0x8000
0222 #define WM8991_SYSCLK_SRC 0x4000
0223 #define WM8991_CLK_FORCE 0x2000
0224 #define WM8991_MCLK_DIV_MASK 0x1800
0225 #define WM8991_MCLK_DIV_1 (0 << 11)
0226 #define WM8991_MCLK_DIV_2 ( 2 << 11)
0227 #define WM8991_MCLK_INV 0x0400
0228 #define WM8991_ADC_CLKDIV_MASK 0x00E0
0229 #define WM8991_ADC_CLKDIV_1 (0 << 5)
0230 #define WM8991_ADC_CLKDIV_1_5 (1 << 5)
0231 #define WM8991_ADC_CLKDIV_2 (2 << 5)
0232 #define WM8991_ADC_CLKDIV_3 (3 << 5)
0233 #define WM8991_ADC_CLKDIV_4 (4 << 5)
0234 #define WM8991_ADC_CLKDIV_5_5 (5 << 5)
0235 #define WM8991_ADC_CLKDIV_6 (6 << 5)
0236 #define WM8991_DAC_CLKDIV_MASK 0x001C
0237 #define WM8991_DAC_CLKDIV_1 (0 << 2)
0238 #define WM8991_DAC_CLKDIV_1_5 (1 << 2)
0239 #define WM8991_DAC_CLKDIV_2 (2 << 2)
0240 #define WM8991_DAC_CLKDIV_3 (3 << 2)
0241 #define WM8991_DAC_CLKDIV_4 (4 << 2)
0242 #define WM8991_DAC_CLKDIV_5_5 (5 << 2)
0243 #define WM8991_DAC_CLKDIV_6 (6 << 2)
0244
0245
0246
0247
0248 #define WM8991_AIF_MSTR1 0x8000
0249 #define WM8991_AIF_MSTR2 0x4000
0250 #define WM8991_AIF_SEL 0x2000
0251 #define WM8991_ADCLRC_DIR 0x0800
0252 #define WM8991_ADCLRC_RATE_MASK 0x07FF
0253
0254
0255
0256
0257 #define WM8991_ALRCGPIO1 0x8000
0258 #define WM8991_ALRCBGPIO6 0x4000
0259 #define WM8991_AIF_TRIS 0x2000
0260 #define WM8991_DACLRC_DIR 0x0800
0261 #define WM8991_DACLRC_RATE_MASK 0x07FF
0262
0263
0264
0265
0266 #define WM8991_AIF_LRCLKRATE 0x0400
0267 #define WM8991_DAC_MONO 0x0200
0268 #define WM8991_DAC_SB_FILT 0x0100
0269 #define WM8991_DAC_MUTERATE 0x0080
0270 #define WM8991_DAC_MUTEMODE 0x0040
0271 #define WM8991_DEEMP_MASK 0x0030
0272 #define WM8991_DAC_MUTE 0x0004
0273 #define WM8991_DACL_DATINV 0x0002
0274 #define WM8991_DACR_DATINV 0x0001
0275
0276
0277
0278
0279 #define WM8991_DAC_VU 0x0100
0280 #define WM8991_DACL_VOL_MASK 0x00FF
0281 #define WM8991_DACL_VOL_SHIFT 0
0282
0283
0284
0285 #define WM8991_DAC_VU 0x0100
0286 #define WM8991_DACR_VOL_MASK 0x00FF
0287 #define WM8991_DACR_VOL_SHIFT 0
0288
0289
0290
0291 #define WM8991_ADCL_DAC_SVOL_MASK 0x0F
0292 #define WM8991_ADCL_DAC_SVOL_SHIFT 9
0293 #define WM8991_ADCR_DAC_SVOL_MASK 0x0F
0294 #define WM8991_ADCR_DAC_SVOL_SHIFT 5
0295 #define WM8991_ADC_TO_DACL_MASK 0x03
0296 #define WM8991_ADC_TO_DACL_SHIFT 2
0297 #define WM8991_ADC_TO_DACR_MASK 0x03
0298 #define WM8991_ADC_TO_DACR_SHIFT 0
0299
0300
0301
0302
0303 #define WM8991_ADC_HPF_ENA 0x0100
0304 #define WM8991_ADC_HPF_ENA_BIT 8
0305 #define WM8991_ADC_HPF_CUT_MASK 0x03
0306 #define WM8991_ADC_HPF_CUT_SHIFT 5
0307 #define WM8991_ADCL_DATINV 0x0002
0308 #define WM8991_ADCL_DATINV_BIT 1
0309 #define WM8991_ADCR_DATINV 0x0001
0310 #define WM8991_ADCR_DATINV_BIT 0
0311
0312
0313
0314
0315 #define WM8991_ADC_VU 0x0100
0316 #define WM8991_ADCL_VOL_MASK 0x00FF
0317 #define WM8991_ADCL_VOL_SHIFT 0
0318
0319
0320
0321
0322 #define WM8991_ADC_VU 0x0100
0323 #define WM8991_ADCR_VOL_MASK 0x00FF
0324 #define WM8991_ADCR_VOL_SHIFT 0
0325
0326
0327
0328
0329 #define WM8991_IRQ 0x1000
0330 #define WM8991_TEMPOK 0x0800
0331 #define WM8991_MICSHRT 0x0400
0332 #define WM8991_MICDET 0x0200
0333 #define WM8991_PLL_LCK 0x0100
0334 #define WM8991_GPI8_STATUS 0x0080
0335 #define WM8991_GPI7_STATUS 0x0040
0336 #define WM8991_GPIO6_STATUS 0x0020
0337 #define WM8991_GPIO5_STATUS 0x0010
0338 #define WM8991_GPIO4_STATUS 0x0008
0339 #define WM8991_GPIO3_STATUS 0x0004
0340 #define WM8991_GPIO2_STATUS 0x0002
0341 #define WM8991_GPIO1_STATUS 0x0001
0342
0343
0344
0345
0346 #define WM8991_GPIO2_DEB_ENA 0x8000
0347 #define WM8991_GPIO2_IRQ_ENA 0x4000
0348 #define WM8991_GPIO2_PU 0x2000
0349 #define WM8991_GPIO2_PD 0x1000
0350 #define WM8991_GPIO2_SEL_MASK 0x0F00
0351 #define WM8991_GPIO1_DEB_ENA 0x0080
0352 #define WM8991_GPIO1_IRQ_ENA 0x0040
0353 #define WM8991_GPIO1_PU 0x0020
0354 #define WM8991_GPIO1_PD 0x0010
0355 #define WM8991_GPIO1_SEL_MASK 0x000F
0356
0357
0358
0359
0360 #define WM8991_GPIO4_DEB_ENA 0x8000
0361 #define WM8991_GPIO4_IRQ_ENA 0x4000
0362 #define WM8991_GPIO4_PU 0x2000
0363 #define WM8991_GPIO4_PD 0x1000
0364 #define WM8991_GPIO4_SEL_MASK 0x0F00
0365 #define WM8991_GPIO3_DEB_ENA 0x0080
0366 #define WM8991_GPIO3_IRQ_ENA 0x0040
0367 #define WM8991_GPIO3_PU 0x0020
0368 #define WM8991_GPIO3_PD 0x0010
0369 #define WM8991_GPIO3_SEL_MASK 0x000F
0370
0371
0372
0373
0374 #define WM8991_GPIO6_DEB_ENA 0x8000
0375 #define WM8991_GPIO6_IRQ_ENA 0x4000
0376 #define WM8991_GPIO6_PU 0x2000
0377 #define WM8991_GPIO6_PD 0x1000
0378 #define WM8991_GPIO6_SEL_MASK 0x0F00
0379 #define WM8991_GPIO5_DEB_ENA 0x0080
0380 #define WM8991_GPIO5_IRQ_ENA 0x0040
0381 #define WM8991_GPIO5_PU 0x0020
0382 #define WM8991_GPIO5_PD 0x0010
0383 #define WM8991_GPIO5_SEL_MASK 0x000F
0384
0385
0386
0387
0388 #define WM8991_RD_3W_ENA 0x8000
0389 #define WM8991_MODE_3W4W 0x4000
0390 #define WM8991_TEMPOK_IRQ_ENA 0x0800
0391 #define WM8991_MICSHRT_IRQ_ENA 0x0400
0392 #define WM8991_MICDET_IRQ_ENA 0x0200
0393 #define WM8991_PLL_LCK_IRQ_ENA 0x0100
0394 #define WM8991_GPI8_DEB_ENA 0x0080
0395 #define WM8991_GPI8_IRQ_ENA 0x0040
0396 #define WM8991_GPI8_ENA 0x0010
0397 #define WM8991_GPI7_DEB_ENA 0x0008
0398 #define WM8991_GPI7_IRQ_ENA 0x0004
0399 #define WM8991_GPI7_ENA 0x0001
0400
0401
0402
0403
0404 #define WM8991_IRQ_INV 0x1000
0405 #define WM8991_TEMPOK_POL 0x0800
0406 #define WM8991_MICSHRT_POL 0x0400
0407 #define WM8991_MICDET_POL 0x0200
0408 #define WM8991_PLL_LCK_POL 0x0100
0409 #define WM8991_GPI8_POL 0x0080
0410 #define WM8991_GPI7_POL 0x0040
0411 #define WM8991_GPIO6_POL 0x0020
0412 #define WM8991_GPIO5_POL 0x0010
0413 #define WM8991_GPIO4_POL 0x0008
0414 #define WM8991_GPIO3_POL 0x0004
0415 #define WM8991_GPIO2_POL 0x0002
0416 #define WM8991_GPIO1_POL 0x0001
0417
0418
0419
0420
0421 #define WM8991_IPVU 0x0100
0422 #define WM8991_LI12MUTE 0x0080
0423 #define WM8991_LI12MUTE_BIT 7
0424 #define WM8991_LI12ZC 0x0040
0425 #define WM8991_LI12ZC_BIT 6
0426 #define WM8991_LIN12VOL_MASK 0x001F
0427 #define WM8991_LIN12VOL_SHIFT 0
0428
0429
0430
0431 #define WM8991_IPVU 0x0100
0432 #define WM8991_LI34MUTE 0x0080
0433 #define WM8991_LI34MUTE_BIT 7
0434 #define WM8991_LI34ZC 0x0040
0435 #define WM8991_LI34ZC_BIT 6
0436 #define WM8991_LIN34VOL_MASK 0x001F
0437 #define WM8991_LIN34VOL_SHIFT 0
0438
0439
0440
0441
0442 #define WM8991_IPVU 0x0100
0443 #define WM8991_RI12MUTE 0x0080
0444 #define WM8991_RI12MUTE_BIT 7
0445 #define WM8991_RI12ZC 0x0040
0446 #define WM8991_RI12ZC_BIT 6
0447 #define WM8991_RIN12VOL_MASK 0x001F
0448 #define WM8991_RIN12VOL_SHIFT 0
0449
0450
0451
0452
0453 #define WM8991_IPVU 0x0100
0454 #define WM8991_RI34MUTE 0x0080
0455 #define WM8991_RI34MUTE_BIT 7
0456 #define WM8991_RI34ZC 0x0040
0457 #define WM8991_RI34ZC_BIT 6
0458 #define WM8991_RIN34VOL_MASK 0x001F
0459 #define WM8991_RIN34VOL_SHIFT 0
0460
0461
0462
0463
0464 #define WM8991_OPVU 0x0100
0465 #define WM8991_LOZC 0x0080
0466 #define WM8991_LOZC_BIT 7
0467 #define WM8991_LOUTVOL_MASK 0x007F
0468 #define WM8991_LOUTVOL_SHIFT 0
0469
0470
0471
0472 #define WM8991_OPVU 0x0100
0473 #define WM8991_ROZC 0x0080
0474 #define WM8991_ROZC_BIT 7
0475 #define WM8991_ROUTVOL_MASK 0x007F
0476 #define WM8991_ROUTVOL_SHIFT 0
0477
0478
0479
0480 #define WM8991_LONMUTE 0x0040
0481 #define WM8991_LONMUTE_BIT 6
0482 #define WM8991_LOPMUTE 0x0020
0483 #define WM8991_LOPMUTE_BIT 5
0484 #define WM8991_LOATTN 0x0010
0485 #define WM8991_LOATTN_BIT 4
0486 #define WM8991_RONMUTE 0x0004
0487 #define WM8991_RONMUTE_BIT 2
0488 #define WM8991_ROPMUTE 0x0002
0489 #define WM8991_ROPMUTE_BIT 1
0490 #define WM8991_ROATTN 0x0001
0491 #define WM8991_ROATTN_BIT 0
0492
0493
0494
0495
0496 #define WM8991_OUT3MUTE 0x0020
0497 #define WM8991_OUT3MUTE_BIT 5
0498 #define WM8991_OUT3ATTN 0x0010
0499 #define WM8991_OUT3ATTN_BIT 4
0500 #define WM8991_OUT4MUTE 0x0002
0501 #define WM8991_OUT4MUTE_BIT 1
0502 #define WM8991_OUT4ATTN 0x0001
0503 #define WM8991_OUT4ATTN_BIT 0
0504
0505
0506
0507
0508 #define WM8991_OPVU 0x0100
0509 #define WM8991_LOPGAZC 0x0080
0510 #define WM8991_LOPGAZC_BIT 7
0511 #define WM8991_LOPGAVOL_MASK 0x007F
0512 #define WM8991_LOPGAVOL_SHIFT 0
0513
0514
0515
0516
0517 #define WM8991_OPVU 0x0100
0518 #define WM8991_ROPGAZC 0x0080
0519 #define WM8991_ROPGAZC_BIT 7
0520 #define WM8991_ROPGAVOL_MASK 0x007F
0521 #define WM8991_ROPGAVOL_SHIFT 0
0522
0523
0524
0525 #define WM8991_SPKVOL_MASK 0x0003
0526 #define WM8991_SPKVOL_SHIFT 0
0527
0528
0529
0530
0531 #define WM8991_CDMODE 0x0100
0532 #define WM8991_CDMODE_BIT 8
0533
0534
0535
0536
0537 #define WM8991_DCGAIN_MASK 0x0007
0538 #define WM8991_DCGAIN_SHIFT 3
0539 #define WM8991_ACGAIN_MASK 0x0007
0540 #define WM8991_ACGAIN_SHIFT 0
0541
0542
0543
0544 #define WM8991_AINLMODE_MASK 0x000C
0545 #define WM8991_AINLMODE_SHIFT 2
0546 #define WM8991_AINRMODE_MASK 0x0003
0547 #define WM8991_AINRMODE_SHIFT 0
0548
0549
0550
0551
0552 #define WM8991_LMP4 0x0080
0553 #define WM8991_LMP4_BIT 7
0554 #define WM8991_LMN3 0x0040
0555 #define WM8991_LMN3_BIT 6
0556 #define WM8991_LMP2 0x0020
0557 #define WM8991_LMP2_BIT 5
0558 #define WM8991_LMN1 0x0010
0559 #define WM8991_LMN1_BIT 4
0560 #define WM8991_RMP4 0x0008
0561 #define WM8991_RMP4_BIT 3
0562 #define WM8991_RMN3 0x0004
0563 #define WM8991_RMN3_BIT 2
0564 #define WM8991_RMP2 0x0002
0565 #define WM8991_RMP2_BIT 1
0566 #define WM8991_RMN1 0x0001
0567 #define WM8991_RMN1_BIT 0
0568
0569
0570
0571
0572 #define WM8991_L34MNB 0x0100
0573 #define WM8991_L34MNB_BIT 8
0574 #define WM8991_L34MNBST 0x0080
0575 #define WM8991_L34MNBST_BIT 7
0576 #define WM8991_L12MNB 0x0020
0577 #define WM8991_L12MNB_BIT 5
0578 #define WM8991_L12MNBST 0x0010
0579 #define WM8991_L12MNBST_BIT 4
0580 #define WM8991_LDBVOL_MASK 0x0007
0581 #define WM8991_LDBVOL_SHIFT 0
0582
0583
0584
0585
0586 #define WM8991_R34MNB 0x0100
0587 #define WM8991_R34MNB_BIT 8
0588 #define WM8991_R34MNBST 0x0080
0589 #define WM8991_R34MNBST_BIT 7
0590 #define WM8991_R12MNB 0x0020
0591 #define WM8991_R12MNB_BIT 5
0592 #define WM8991_R12MNBST 0x0010
0593 #define WM8991_R12MNBST_BIT 4
0594 #define WM8991_RDBVOL_MASK 0x0007
0595 #define WM8991_RDBVOL_SHIFT 0
0596
0597
0598
0599
0600 #define WM8991_LI2BVOL_MASK 0x07
0601 #define WM8991_LI2BVOL_SHIFT 6
0602 #define WM8991_LR4BVOL_MASK 0x07
0603 #define WM8991_LR4BVOL_SHIFT 3
0604 #define WM8991_LL4BVOL_MASK 0x07
0605 #define WM8991_LL4BVOL_SHIFT 0
0606
0607
0608
0609
0610 #define WM8991_RI2BVOL_MASK 0x07
0611 #define WM8991_RI2BVOL_SHIFT 6
0612 #define WM8991_RL4BVOL_MASK 0x07
0613 #define WM8991_RL4BVOL_SHIFT 3
0614 #define WM8991_RR4BVOL_MASK 0x07
0615 #define WM8991_RR4BVOL_SHIFT 0
0616
0617
0618
0619
0620 #define WM8991_LRBLO 0x0080
0621 #define WM8991_LRBLO_BIT 7
0622 #define WM8991_LLBLO 0x0040
0623 #define WM8991_LLBLO_BIT 6
0624 #define WM8991_LRI3LO 0x0020
0625 #define WM8991_LRI3LO_BIT 5
0626 #define WM8991_LLI3LO 0x0010
0627 #define WM8991_LLI3LO_BIT 4
0628 #define WM8991_LR12LO 0x0008
0629 #define WM8991_LR12LO_BIT 3
0630 #define WM8991_LL12LO 0x0004
0631 #define WM8991_LL12LO_BIT 2
0632 #define WM8991_LDLO 0x0001
0633 #define WM8991_LDLO_BIT 0
0634
0635
0636
0637
0638 #define WM8991_RLBRO 0x0080
0639 #define WM8991_RLBRO_BIT 7
0640 #define WM8991_RRBRO 0x0040
0641 #define WM8991_RRBRO_BIT 6
0642 #define WM8991_RLI3RO 0x0020
0643 #define WM8991_RLI3RO_BIT 5
0644 #define WM8991_RRI3RO 0x0010
0645 #define WM8991_RRI3RO_BIT 4
0646 #define WM8991_RL12RO 0x0008
0647 #define WM8991_RL12RO_BIT 3
0648 #define WM8991_RR12RO 0x0004
0649 #define WM8991_RR12RO_BIT 2
0650 #define WM8991_RDRO 0x0001
0651 #define WM8991_RDRO_BIT 0
0652
0653
0654
0655
0656 #define WM8991_LLI3LOVOL_MASK 0x07
0657 #define WM8991_LLI3LOVOL_SHIFT 6
0658 #define WM8991_LR12LOVOL_MASK 0x07
0659 #define WM8991_LR12LOVOL_SHIFT 3
0660 #define WM8991_LL12LOVOL_MASK 0x07
0661 #define WM8991_LL12LOVOL_SHIFT 0
0662
0663
0664
0665
0666 #define WM8991_RRI3ROVOL_MASK 0x07
0667 #define WM8991_RRI3ROVOL_SHIFT 6
0668 #define WM8991_RL12ROVOL_MASK 0x07
0669 #define WM8991_RL12ROVOL_SHIFT 3
0670 #define WM8991_RR12ROVOL_MASK 0x07
0671 #define WM8991_RR12ROVOL_SHIFT 0
0672
0673
0674
0675
0676 #define WM8991_LRI3LOVOL_MASK 0x07
0677 #define WM8991_LRI3LOVOL_SHIFT 6
0678 #define WM8991_LRBLOVOL_MASK 0x07
0679 #define WM8991_LRBLOVOL_SHIFT 3
0680 #define WM8991_LLBLOVOL_MASK 0x07
0681 #define WM8991_LLBLOVOL_SHIFT 0
0682
0683
0684
0685
0686 #define WM8991_RLI3ROVOL_MASK 0x07
0687 #define WM8991_RLI3ROVOL_SHIFT 6
0688 #define WM8991_RLBROVOL_MASK 0x07
0689 #define WM8991_RLBROVOL_SHIFT 3
0690 #define WM8991_RRBROVOL_MASK 0x07
0691 #define WM8991_RRBROVOL_SHIFT 0
0692
0693
0694
0695
0696 #define WM8991_VSEL_MASK 0x0180
0697 #define WM8991_LI4O3 0x0020
0698 #define WM8991_LI4O3_BIT 5
0699 #define WM8991_LPGAO3 0x0010
0700 #define WM8991_LPGAO3_BIT 4
0701 #define WM8991_RI4O4 0x0002
0702 #define WM8991_RI4O4_BIT 1
0703 #define WM8991_RPGAO4 0x0001
0704 #define WM8991_RPGAO4_BIT 0
0705
0706
0707
0708 #define WM8991_LLOPGALON 0x0040
0709 #define WM8991_LLOPGALON_BIT 6
0710 #define WM8991_LROPGALON 0x0020
0711 #define WM8991_LROPGALON_BIT 5
0712 #define WM8991_LOPLON 0x0010
0713 #define WM8991_LOPLON_BIT 4
0714 #define WM8991_LR12LOP 0x0004
0715 #define WM8991_LR12LOP_BIT 2
0716 #define WM8991_LL12LOP 0x0002
0717 #define WM8991_LL12LOP_BIT 1
0718 #define WM8991_LLOPGALOP 0x0001
0719 #define WM8991_LLOPGALOP_BIT 0
0720
0721
0722
0723 #define WM8991_RROPGARON 0x0040
0724 #define WM8991_RROPGARON_BIT 6
0725 #define WM8991_RLOPGARON 0x0020
0726 #define WM8991_RLOPGARON_BIT 5
0727 #define WM8991_ROPRON 0x0010
0728 #define WM8991_ROPRON_BIT 4
0729 #define WM8991_RL12ROP 0x0004
0730 #define WM8991_RL12ROP_BIT 2
0731 #define WM8991_RR12ROP 0x0002
0732 #define WM8991_RR12ROP_BIT 1
0733 #define WM8991_RROPGAROP 0x0001
0734 #define WM8991_RROPGAROP_BIT 0
0735
0736
0737
0738
0739 #define WM8991_LB2SPK 0x0080
0740 #define WM8991_LB2SPK_BIT 7
0741 #define WM8991_RB2SPK 0x0040
0742 #define WM8991_RB2SPK_BIT 6
0743 #define WM8991_LI2SPK 0x0020
0744 #define WM8991_LI2SPK_BIT 5
0745 #define WM8991_RI2SPK 0x0010
0746 #define WM8991_RI2SPK_BIT 4
0747 #define WM8991_LOPGASPK 0x0008
0748 #define WM8991_LOPGASPK_BIT 3
0749 #define WM8991_ROPGASPK 0x0004
0750 #define WM8991_ROPGASPK_BIT 2
0751 #define WM8991_LDSPK 0x0002
0752 #define WM8991_LDSPK_BIT 1
0753 #define WM8991_RDSPK 0x0001
0754 #define WM8991_RDSPK_BIT 0
0755
0756
0757
0758
0759 #define WM8991_VROI 0x0001
0760
0761
0762
0763
0764 #define WM8991_DIS_LLINE 0x0020
0765 #define WM8991_DIS_RLINE 0x0010
0766 #define WM8991_DIS_OUT3 0x0008
0767 #define WM8991_DIS_OUT4 0x0004
0768 #define WM8991_DIS_LOUT 0x0002
0769 #define WM8991_DIS_ROUT 0x0001
0770
0771
0772
0773
0774 #define WM8991_SOFTST 0x0040
0775 #define WM8991_BUFIOEN 0x0008
0776 #define WM8991_BUFDCOPEN 0x0004
0777 #define WM8991_POBCTRL 0x0002
0778 #define WM8991_VMIDTOG 0x0001
0779
0780
0781
0782
0783 #define WM8991_MCDSCTH_MASK 0x00C0
0784 #define WM8991_MCDTHR_MASK 0x0038
0785 #define WM8991_MCD 0x0004
0786 #define WM8991_MBSEL 0x0001
0787
0788
0789
0790
0791 #define WM8991_SDM 0x0080
0792 #define WM8991_PRESCALE 0x0040
0793 #define WM8991_PLLN_MASK 0x000F
0794
0795
0796
0797
0798 #define WM8991_PLLK1_MASK 0x00FF
0799
0800
0801
0802
0803 #define WM8991_PLLK2_MASK 0x00FF
0804
0805 #define WM8991_MCLK_DIV 0
0806 #define WM8991_DACCLK_DIV 1
0807 #define WM8991_ADCCLK_DIV 2
0808 #define WM8991_BCLK_DIV 3
0809
0810 #define SOC_WM899X_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert,\
0811 tlv_array) \
0812 SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, \
0813 snd_soc_get_volsw, wm899x_outpga_put_volsw_vu, tlv_array)
0814
0815 #endif