0001
0002 #ifndef WM9081_H
0003 #define WM9081_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <sound/soc.h>
0014
0015
0016
0017
0018 #define WM9081_SYSCLK_MCLK 1
0019 #define WM9081_SYSCLK_FLL_MCLK 2
0020
0021
0022
0023
0024 #define WM9081_SOFTWARE_RESET 0x00
0025 #define WM9081_ANALOGUE_LINEOUT 0x02
0026 #define WM9081_ANALOGUE_SPEAKER_PGA 0x03
0027 #define WM9081_VMID_CONTROL 0x04
0028 #define WM9081_BIAS_CONTROL_1 0x05
0029 #define WM9081_ANALOGUE_MIXER 0x07
0030 #define WM9081_ANTI_POP_CONTROL 0x08
0031 #define WM9081_ANALOGUE_SPEAKER_1 0x09
0032 #define WM9081_ANALOGUE_SPEAKER_2 0x0A
0033 #define WM9081_POWER_MANAGEMENT 0x0B
0034 #define WM9081_CLOCK_CONTROL_1 0x0C
0035 #define WM9081_CLOCK_CONTROL_2 0x0D
0036 #define WM9081_CLOCK_CONTROL_3 0x0E
0037 #define WM9081_FLL_CONTROL_1 0x10
0038 #define WM9081_FLL_CONTROL_2 0x11
0039 #define WM9081_FLL_CONTROL_3 0x12
0040 #define WM9081_FLL_CONTROL_4 0x13
0041 #define WM9081_FLL_CONTROL_5 0x14
0042 #define WM9081_AUDIO_INTERFACE_1 0x16
0043 #define WM9081_AUDIO_INTERFACE_2 0x17
0044 #define WM9081_AUDIO_INTERFACE_3 0x18
0045 #define WM9081_AUDIO_INTERFACE_4 0x19
0046 #define WM9081_INTERRUPT_STATUS 0x1A
0047 #define WM9081_INTERRUPT_STATUS_MASK 0x1B
0048 #define WM9081_INTERRUPT_POLARITY 0x1C
0049 #define WM9081_INTERRUPT_CONTROL 0x1D
0050 #define WM9081_DAC_DIGITAL_1 0x1E
0051 #define WM9081_DAC_DIGITAL_2 0x1F
0052 #define WM9081_DRC_1 0x20
0053 #define WM9081_DRC_2 0x21
0054 #define WM9081_DRC_3 0x22
0055 #define WM9081_DRC_4 0x23
0056 #define WM9081_WRITE_SEQUENCER_1 0x26
0057 #define WM9081_WRITE_SEQUENCER_2 0x27
0058 #define WM9081_MW_SLAVE_1 0x28
0059 #define WM9081_EQ_1 0x2A
0060 #define WM9081_EQ_2 0x2B
0061 #define WM9081_EQ_3 0x2C
0062 #define WM9081_EQ_4 0x2D
0063 #define WM9081_EQ_5 0x2E
0064 #define WM9081_EQ_6 0x2F
0065 #define WM9081_EQ_7 0x30
0066 #define WM9081_EQ_8 0x31
0067 #define WM9081_EQ_9 0x32
0068 #define WM9081_EQ_10 0x33
0069 #define WM9081_EQ_11 0x34
0070 #define WM9081_EQ_12 0x35
0071 #define WM9081_EQ_13 0x36
0072 #define WM9081_EQ_14 0x37
0073 #define WM9081_EQ_15 0x38
0074 #define WM9081_EQ_16 0x39
0075 #define WM9081_EQ_17 0x3A
0076 #define WM9081_EQ_18 0x3B
0077 #define WM9081_EQ_19 0x3C
0078 #define WM9081_EQ_20 0x3D
0079
0080 #define WM9081_REGISTER_COUNT 55
0081 #define WM9081_MAX_REGISTER 0x3D
0082
0083
0084
0085
0086
0087
0088
0089
0090 #define WM9081_SW_RST_DEV_ID1_MASK 0xFFFF
0091 #define WM9081_SW_RST_DEV_ID1_SHIFT 0
0092 #define WM9081_SW_RST_DEV_ID1_WIDTH 16
0093
0094
0095
0096
0097 #define WM9081_LINEOUT_MUTE 0x0080
0098 #define WM9081_LINEOUT_MUTE_MASK 0x0080
0099 #define WM9081_LINEOUT_MUTE_SHIFT 7
0100 #define WM9081_LINEOUT_MUTE_WIDTH 1
0101 #define WM9081_LINEOUTZC 0x0040
0102 #define WM9081_LINEOUTZC_MASK 0x0040
0103 #define WM9081_LINEOUTZC_SHIFT 6
0104 #define WM9081_LINEOUTZC_WIDTH 1
0105 #define WM9081_LINEOUT_VOL_MASK 0x003F
0106 #define WM9081_LINEOUT_VOL_SHIFT 0
0107 #define WM9081_LINEOUT_VOL_WIDTH 6
0108
0109
0110
0111
0112 #define WM9081_SPKPGA_MUTE 0x0080
0113 #define WM9081_SPKPGA_MUTE_MASK 0x0080
0114 #define WM9081_SPKPGA_MUTE_SHIFT 7
0115 #define WM9081_SPKPGA_MUTE_WIDTH 1
0116 #define WM9081_SPKPGAZC 0x0040
0117 #define WM9081_SPKPGAZC_MASK 0x0040
0118 #define WM9081_SPKPGAZC_SHIFT 6
0119 #define WM9081_SPKPGAZC_WIDTH 1
0120 #define WM9081_SPKPGA_VOL_MASK 0x003F
0121 #define WM9081_SPKPGA_VOL_SHIFT 0
0122 #define WM9081_SPKPGA_VOL_WIDTH 6
0123
0124
0125
0126
0127 #define WM9081_VMID_BUF_ENA 0x0020
0128 #define WM9081_VMID_BUF_ENA_MASK 0x0020
0129 #define WM9081_VMID_BUF_ENA_SHIFT 5
0130 #define WM9081_VMID_BUF_ENA_WIDTH 1
0131 #define WM9081_VMID_RAMP 0x0008
0132 #define WM9081_VMID_RAMP_MASK 0x0008
0133 #define WM9081_VMID_RAMP_SHIFT 3
0134 #define WM9081_VMID_RAMP_WIDTH 1
0135 #define WM9081_VMID_SEL_MASK 0x0006
0136 #define WM9081_VMID_SEL_SHIFT 1
0137 #define WM9081_VMID_SEL_WIDTH 2
0138 #define WM9081_VMID_FAST_ST 0x0001
0139 #define WM9081_VMID_FAST_ST_MASK 0x0001
0140 #define WM9081_VMID_FAST_ST_SHIFT 0
0141 #define WM9081_VMID_FAST_ST_WIDTH 1
0142
0143
0144
0145
0146 #define WM9081_BIAS_SRC 0x0040
0147 #define WM9081_BIAS_SRC_MASK 0x0040
0148 #define WM9081_BIAS_SRC_SHIFT 6
0149 #define WM9081_BIAS_SRC_WIDTH 1
0150 #define WM9081_STBY_BIAS_LVL 0x0020
0151 #define WM9081_STBY_BIAS_LVL_MASK 0x0020
0152 #define WM9081_STBY_BIAS_LVL_SHIFT 5
0153 #define WM9081_STBY_BIAS_LVL_WIDTH 1
0154 #define WM9081_STBY_BIAS_ENA 0x0010
0155 #define WM9081_STBY_BIAS_ENA_MASK 0x0010
0156 #define WM9081_STBY_BIAS_ENA_SHIFT 4
0157 #define WM9081_STBY_BIAS_ENA_WIDTH 1
0158 #define WM9081_BIAS_LVL_MASK 0x000C
0159 #define WM9081_BIAS_LVL_SHIFT 2
0160 #define WM9081_BIAS_LVL_WIDTH 2
0161 #define WM9081_BIAS_ENA 0x0002
0162 #define WM9081_BIAS_ENA_MASK 0x0002
0163 #define WM9081_BIAS_ENA_SHIFT 1
0164 #define WM9081_BIAS_ENA_WIDTH 1
0165 #define WM9081_STARTUP_BIAS_ENA 0x0001
0166 #define WM9081_STARTUP_BIAS_ENA_MASK 0x0001
0167 #define WM9081_STARTUP_BIAS_ENA_SHIFT 0
0168 #define WM9081_STARTUP_BIAS_ENA_WIDTH 1
0169
0170
0171
0172
0173 #define WM9081_DAC_SEL 0x0010
0174 #define WM9081_DAC_SEL_MASK 0x0010
0175 #define WM9081_DAC_SEL_SHIFT 4
0176 #define WM9081_DAC_SEL_WIDTH 1
0177 #define WM9081_IN2_VOL 0x0008
0178 #define WM9081_IN2_VOL_MASK 0x0008
0179 #define WM9081_IN2_VOL_SHIFT 3
0180 #define WM9081_IN2_VOL_WIDTH 1
0181 #define WM9081_IN2_ENA 0x0004
0182 #define WM9081_IN2_ENA_MASK 0x0004
0183 #define WM9081_IN2_ENA_SHIFT 2
0184 #define WM9081_IN2_ENA_WIDTH 1
0185 #define WM9081_IN1_VOL 0x0002
0186 #define WM9081_IN1_VOL_MASK 0x0002
0187 #define WM9081_IN1_VOL_SHIFT 1
0188 #define WM9081_IN1_VOL_WIDTH 1
0189 #define WM9081_IN1_ENA 0x0001
0190 #define WM9081_IN1_ENA_MASK 0x0001
0191 #define WM9081_IN1_ENA_SHIFT 0
0192 #define WM9081_IN1_ENA_WIDTH 1
0193
0194
0195
0196
0197 #define WM9081_LINEOUT_DISCH 0x0004
0198 #define WM9081_LINEOUT_DISCH_MASK 0x0004
0199 #define WM9081_LINEOUT_DISCH_SHIFT 2
0200 #define WM9081_LINEOUT_DISCH_WIDTH 1
0201 #define WM9081_LINEOUT_VROI 0x0002
0202 #define WM9081_LINEOUT_VROI_MASK 0x0002
0203 #define WM9081_LINEOUT_VROI_SHIFT 1
0204 #define WM9081_LINEOUT_VROI_WIDTH 1
0205 #define WM9081_LINEOUT_CLAMP 0x0001
0206 #define WM9081_LINEOUT_CLAMP_MASK 0x0001
0207 #define WM9081_LINEOUT_CLAMP_SHIFT 0
0208 #define WM9081_LINEOUT_CLAMP_WIDTH 1
0209
0210
0211
0212
0213 #define WM9081_SPK_DCGAIN_MASK 0x0038
0214 #define WM9081_SPK_DCGAIN_SHIFT 3
0215 #define WM9081_SPK_DCGAIN_WIDTH 3
0216 #define WM9081_SPK_ACGAIN_MASK 0x0007
0217 #define WM9081_SPK_ACGAIN_SHIFT 0
0218 #define WM9081_SPK_ACGAIN_WIDTH 3
0219
0220
0221
0222
0223 #define WM9081_SPK_MODE 0x0040
0224 #define WM9081_SPK_MODE_MASK 0x0040
0225 #define WM9081_SPK_MODE_SHIFT 6
0226 #define WM9081_SPK_MODE_WIDTH 1
0227 #define WM9081_SPK_INV_MUTE 0x0010
0228 #define WM9081_SPK_INV_MUTE_MASK 0x0010
0229 #define WM9081_SPK_INV_MUTE_SHIFT 4
0230 #define WM9081_SPK_INV_MUTE_WIDTH 1
0231 #define WM9081_OUT_SPK_CTRL 0x0008
0232 #define WM9081_OUT_SPK_CTRL_MASK 0x0008
0233 #define WM9081_OUT_SPK_CTRL_SHIFT 3
0234 #define WM9081_OUT_SPK_CTRL_WIDTH 1
0235
0236
0237
0238
0239 #define WM9081_TSHUT_ENA 0x0100
0240 #define WM9081_TSHUT_ENA_MASK 0x0100
0241 #define WM9081_TSHUT_ENA_SHIFT 8
0242 #define WM9081_TSHUT_ENA_WIDTH 1
0243 #define WM9081_TSENSE_ENA 0x0080
0244 #define WM9081_TSENSE_ENA_MASK 0x0080
0245 #define WM9081_TSENSE_ENA_SHIFT 7
0246 #define WM9081_TSENSE_ENA_WIDTH 1
0247 #define WM9081_TEMP_SHUT 0x0040
0248 #define WM9081_TEMP_SHUT_MASK 0x0040
0249 #define WM9081_TEMP_SHUT_SHIFT 6
0250 #define WM9081_TEMP_SHUT_WIDTH 1
0251 #define WM9081_LINEOUT_ENA 0x0010
0252 #define WM9081_LINEOUT_ENA_MASK 0x0010
0253 #define WM9081_LINEOUT_ENA_SHIFT 4
0254 #define WM9081_LINEOUT_ENA_WIDTH 1
0255 #define WM9081_SPKPGA_ENA 0x0004
0256 #define WM9081_SPKPGA_ENA_MASK 0x0004
0257 #define WM9081_SPKPGA_ENA_SHIFT 2
0258 #define WM9081_SPKPGA_ENA_WIDTH 1
0259 #define WM9081_SPK_ENA 0x0002
0260 #define WM9081_SPK_ENA_MASK 0x0002
0261 #define WM9081_SPK_ENA_SHIFT 1
0262 #define WM9081_SPK_ENA_WIDTH 1
0263 #define WM9081_DAC_ENA 0x0001
0264 #define WM9081_DAC_ENA_MASK 0x0001
0265 #define WM9081_DAC_ENA_SHIFT 0
0266 #define WM9081_DAC_ENA_WIDTH 1
0267
0268
0269
0270
0271 #define WM9081_CLK_OP_DIV_MASK 0x1C00
0272 #define WM9081_CLK_OP_DIV_SHIFT 10
0273 #define WM9081_CLK_OP_DIV_WIDTH 3
0274 #define WM9081_CLK_TO_DIV_MASK 0x0300
0275 #define WM9081_CLK_TO_DIV_SHIFT 8
0276 #define WM9081_CLK_TO_DIV_WIDTH 2
0277 #define WM9081_MCLKDIV2 0x0080
0278 #define WM9081_MCLKDIV2_MASK 0x0080
0279 #define WM9081_MCLKDIV2_SHIFT 7
0280 #define WM9081_MCLKDIV2_WIDTH 1
0281
0282
0283
0284
0285 #define WM9081_CLK_SYS_RATE_MASK 0x00F0
0286 #define WM9081_CLK_SYS_RATE_SHIFT 4
0287 #define WM9081_CLK_SYS_RATE_WIDTH 4
0288 #define WM9081_SAMPLE_RATE_MASK 0x000F
0289 #define WM9081_SAMPLE_RATE_SHIFT 0
0290 #define WM9081_SAMPLE_RATE_WIDTH 4
0291
0292
0293
0294
0295 #define WM9081_CLK_SRC_SEL 0x2000
0296 #define WM9081_CLK_SRC_SEL_MASK 0x2000
0297 #define WM9081_CLK_SRC_SEL_SHIFT 13
0298 #define WM9081_CLK_SRC_SEL_WIDTH 1
0299 #define WM9081_CLK_OP_ENA 0x0020
0300 #define WM9081_CLK_OP_ENA_MASK 0x0020
0301 #define WM9081_CLK_OP_ENA_SHIFT 5
0302 #define WM9081_CLK_OP_ENA_WIDTH 1
0303 #define WM9081_CLK_TO_ENA 0x0004
0304 #define WM9081_CLK_TO_ENA_MASK 0x0004
0305 #define WM9081_CLK_TO_ENA_SHIFT 2
0306 #define WM9081_CLK_TO_ENA_WIDTH 1
0307 #define WM9081_CLK_DSP_ENA 0x0002
0308 #define WM9081_CLK_DSP_ENA_MASK 0x0002
0309 #define WM9081_CLK_DSP_ENA_SHIFT 1
0310 #define WM9081_CLK_DSP_ENA_WIDTH 1
0311 #define WM9081_CLK_SYS_ENA 0x0001
0312 #define WM9081_CLK_SYS_ENA_MASK 0x0001
0313 #define WM9081_CLK_SYS_ENA_SHIFT 0
0314 #define WM9081_CLK_SYS_ENA_WIDTH 1
0315
0316
0317
0318
0319 #define WM9081_FLL_HOLD 0x0008
0320 #define WM9081_FLL_HOLD_MASK 0x0008
0321 #define WM9081_FLL_HOLD_SHIFT 3
0322 #define WM9081_FLL_HOLD_WIDTH 1
0323 #define WM9081_FLL_FRAC 0x0004
0324 #define WM9081_FLL_FRAC_MASK 0x0004
0325 #define WM9081_FLL_FRAC_SHIFT 2
0326 #define WM9081_FLL_FRAC_WIDTH 1
0327 #define WM9081_FLL_ENA 0x0001
0328 #define WM9081_FLL_ENA_MASK 0x0001
0329 #define WM9081_FLL_ENA_SHIFT 0
0330 #define WM9081_FLL_ENA_WIDTH 1
0331
0332
0333
0334
0335 #define WM9081_FLL_OUTDIV_MASK 0x0700
0336 #define WM9081_FLL_OUTDIV_SHIFT 8
0337 #define WM9081_FLL_OUTDIV_WIDTH 3
0338 #define WM9081_FLL_CTRL_RATE_MASK 0x0070
0339 #define WM9081_FLL_CTRL_RATE_SHIFT 4
0340 #define WM9081_FLL_CTRL_RATE_WIDTH 3
0341 #define WM9081_FLL_FRATIO_MASK 0x0007
0342 #define WM9081_FLL_FRATIO_SHIFT 0
0343 #define WM9081_FLL_FRATIO_WIDTH 3
0344
0345
0346
0347
0348 #define WM9081_FLL_K_MASK 0xFFFF
0349 #define WM9081_FLL_K_SHIFT 0
0350 #define WM9081_FLL_K_WIDTH 16
0351
0352
0353
0354
0355 #define WM9081_FLL_N_MASK 0x7FE0
0356 #define WM9081_FLL_N_SHIFT 5
0357 #define WM9081_FLL_N_WIDTH 10
0358 #define WM9081_FLL_GAIN_MASK 0x000F
0359 #define WM9081_FLL_GAIN_SHIFT 0
0360 #define WM9081_FLL_GAIN_WIDTH 4
0361
0362
0363
0364
0365 #define WM9081_FLL_CLK_REF_DIV_MASK 0x0018
0366 #define WM9081_FLL_CLK_REF_DIV_SHIFT 3
0367 #define WM9081_FLL_CLK_REF_DIV_WIDTH 2
0368 #define WM9081_FLL_CLK_SRC_MASK 0x0003
0369 #define WM9081_FLL_CLK_SRC_SHIFT 0
0370 #define WM9081_FLL_CLK_SRC_WIDTH 2
0371
0372
0373
0374
0375 #define WM9081_AIFDAC_CHAN 0x0040
0376 #define WM9081_AIFDAC_CHAN_MASK 0x0040
0377 #define WM9081_AIFDAC_CHAN_SHIFT 6
0378 #define WM9081_AIFDAC_CHAN_WIDTH 1
0379 #define WM9081_AIFDAC_TDM_SLOT_MASK 0x0030
0380 #define WM9081_AIFDAC_TDM_SLOT_SHIFT 4
0381 #define WM9081_AIFDAC_TDM_SLOT_WIDTH 2
0382 #define WM9081_AIFDAC_TDM_MODE_MASK 0x000C
0383 #define WM9081_AIFDAC_TDM_MODE_SHIFT 2
0384 #define WM9081_AIFDAC_TDM_MODE_WIDTH 2
0385 #define WM9081_DAC_COMP 0x0002
0386 #define WM9081_DAC_COMP_MASK 0x0002
0387 #define WM9081_DAC_COMP_SHIFT 1
0388 #define WM9081_DAC_COMP_WIDTH 1
0389 #define WM9081_DAC_COMPMODE 0x0001
0390 #define WM9081_DAC_COMPMODE_MASK 0x0001
0391 #define WM9081_DAC_COMPMODE_SHIFT 0
0392 #define WM9081_DAC_COMPMODE_WIDTH 1
0393
0394
0395
0396
0397 #define WM9081_AIF_TRIS 0x0200
0398 #define WM9081_AIF_TRIS_MASK 0x0200
0399 #define WM9081_AIF_TRIS_SHIFT 9
0400 #define WM9081_AIF_TRIS_WIDTH 1
0401 #define WM9081_DAC_DAT_INV 0x0100
0402 #define WM9081_DAC_DAT_INV_MASK 0x0100
0403 #define WM9081_DAC_DAT_INV_SHIFT 8
0404 #define WM9081_DAC_DAT_INV_WIDTH 1
0405 #define WM9081_AIF_BCLK_INV 0x0080
0406 #define WM9081_AIF_BCLK_INV_MASK 0x0080
0407 #define WM9081_AIF_BCLK_INV_SHIFT 7
0408 #define WM9081_AIF_BCLK_INV_WIDTH 1
0409 #define WM9081_BCLK_DIR 0x0040
0410 #define WM9081_BCLK_DIR_MASK 0x0040
0411 #define WM9081_BCLK_DIR_SHIFT 6
0412 #define WM9081_BCLK_DIR_WIDTH 1
0413 #define WM9081_LRCLK_DIR 0x0020
0414 #define WM9081_LRCLK_DIR_MASK 0x0020
0415 #define WM9081_LRCLK_DIR_SHIFT 5
0416 #define WM9081_LRCLK_DIR_WIDTH 1
0417 #define WM9081_AIF_LRCLK_INV 0x0010
0418 #define WM9081_AIF_LRCLK_INV_MASK 0x0010
0419 #define WM9081_AIF_LRCLK_INV_SHIFT 4
0420 #define WM9081_AIF_LRCLK_INV_WIDTH 1
0421 #define WM9081_AIF_WL_MASK 0x000C
0422 #define WM9081_AIF_WL_SHIFT 2
0423 #define WM9081_AIF_WL_WIDTH 2
0424 #define WM9081_AIF_FMT_MASK 0x0003
0425 #define WM9081_AIF_FMT_SHIFT 0
0426 #define WM9081_AIF_FMT_WIDTH 2
0427
0428
0429
0430
0431 #define WM9081_BCLK_DIV_MASK 0x001F
0432 #define WM9081_BCLK_DIV_SHIFT 0
0433 #define WM9081_BCLK_DIV_WIDTH 5
0434
0435
0436
0437
0438 #define WM9081_LRCLK_RATE_MASK 0x07FF
0439 #define WM9081_LRCLK_RATE_SHIFT 0
0440 #define WM9081_LRCLK_RATE_WIDTH 11
0441
0442
0443
0444
0445 #define WM9081_WSEQ_BUSY_EINT 0x0004
0446 #define WM9081_WSEQ_BUSY_EINT_MASK 0x0004
0447 #define WM9081_WSEQ_BUSY_EINT_SHIFT 2
0448 #define WM9081_WSEQ_BUSY_EINT_WIDTH 1
0449 #define WM9081_TSHUT_EINT 0x0001
0450 #define WM9081_TSHUT_EINT_MASK 0x0001
0451 #define WM9081_TSHUT_EINT_SHIFT 0
0452 #define WM9081_TSHUT_EINT_WIDTH 1
0453
0454
0455
0456
0457 #define WM9081_IM_WSEQ_BUSY_EINT 0x0004
0458 #define WM9081_IM_WSEQ_BUSY_EINT_MASK 0x0004
0459 #define WM9081_IM_WSEQ_BUSY_EINT_SHIFT 2
0460 #define WM9081_IM_WSEQ_BUSY_EINT_WIDTH 1
0461 #define WM9081_IM_TSHUT_EINT 0x0001
0462 #define WM9081_IM_TSHUT_EINT_MASK 0x0001
0463 #define WM9081_IM_TSHUT_EINT_SHIFT 0
0464 #define WM9081_IM_TSHUT_EINT_WIDTH 1
0465
0466
0467
0468
0469 #define WM9081_TSHUT_INV 0x0001
0470 #define WM9081_TSHUT_INV_MASK 0x0001
0471 #define WM9081_TSHUT_INV_SHIFT 0
0472 #define WM9081_TSHUT_INV_WIDTH 1
0473
0474
0475
0476
0477 #define WM9081_IRQ_POL 0x8000
0478 #define WM9081_IRQ_POL_MASK 0x8000
0479 #define WM9081_IRQ_POL_SHIFT 15
0480 #define WM9081_IRQ_POL_WIDTH 1
0481 #define WM9081_IRQ_OP_CTRL 0x0001
0482 #define WM9081_IRQ_OP_CTRL_MASK 0x0001
0483 #define WM9081_IRQ_OP_CTRL_SHIFT 0
0484 #define WM9081_IRQ_OP_CTRL_WIDTH 1
0485
0486
0487
0488
0489 #define WM9081_DAC_VOL_MASK 0x00FF
0490 #define WM9081_DAC_VOL_SHIFT 0
0491 #define WM9081_DAC_VOL_WIDTH 8
0492
0493
0494
0495
0496 #define WM9081_DAC_MUTERATE 0x0400
0497 #define WM9081_DAC_MUTERATE_MASK 0x0400
0498 #define WM9081_DAC_MUTERATE_SHIFT 10
0499 #define WM9081_DAC_MUTERATE_WIDTH 1
0500 #define WM9081_DAC_MUTEMODE 0x0200
0501 #define WM9081_DAC_MUTEMODE_MASK 0x0200
0502 #define WM9081_DAC_MUTEMODE_SHIFT 9
0503 #define WM9081_DAC_MUTEMODE_WIDTH 1
0504 #define WM9081_DAC_MUTE 0x0008
0505 #define WM9081_DAC_MUTE_MASK 0x0008
0506 #define WM9081_DAC_MUTE_SHIFT 3
0507 #define WM9081_DAC_MUTE_WIDTH 1
0508 #define WM9081_DEEMPH_MASK 0x0006
0509 #define WM9081_DEEMPH_SHIFT 1
0510 #define WM9081_DEEMPH_WIDTH 2
0511
0512
0513
0514
0515 #define WM9081_DRC_ENA 0x8000
0516 #define WM9081_DRC_ENA_MASK 0x8000
0517 #define WM9081_DRC_ENA_SHIFT 15
0518 #define WM9081_DRC_ENA_WIDTH 1
0519 #define WM9081_DRC_STARTUP_GAIN_MASK 0x07C0
0520 #define WM9081_DRC_STARTUP_GAIN_SHIFT 6
0521 #define WM9081_DRC_STARTUP_GAIN_WIDTH 5
0522 #define WM9081_DRC_FF_DLY 0x0020
0523 #define WM9081_DRC_FF_DLY_MASK 0x0020
0524 #define WM9081_DRC_FF_DLY_SHIFT 5
0525 #define WM9081_DRC_FF_DLY_WIDTH 1
0526 #define WM9081_DRC_QR 0x0004
0527 #define WM9081_DRC_QR_MASK 0x0004
0528 #define WM9081_DRC_QR_SHIFT 2
0529 #define WM9081_DRC_QR_WIDTH 1
0530 #define WM9081_DRC_ANTICLIP 0x0002
0531 #define WM9081_DRC_ANTICLIP_MASK 0x0002
0532 #define WM9081_DRC_ANTICLIP_SHIFT 1
0533 #define WM9081_DRC_ANTICLIP_WIDTH 1
0534
0535
0536
0537
0538 #define WM9081_DRC_ATK_MASK 0xF000
0539 #define WM9081_DRC_ATK_SHIFT 12
0540 #define WM9081_DRC_ATK_WIDTH 4
0541 #define WM9081_DRC_DCY_MASK 0x0F00
0542 #define WM9081_DRC_DCY_SHIFT 8
0543 #define WM9081_DRC_DCY_WIDTH 4
0544 #define WM9081_DRC_QR_THR_MASK 0x00C0
0545 #define WM9081_DRC_QR_THR_SHIFT 6
0546 #define WM9081_DRC_QR_THR_WIDTH 2
0547 #define WM9081_DRC_QR_DCY_MASK 0x0030
0548 #define WM9081_DRC_QR_DCY_SHIFT 4
0549 #define WM9081_DRC_QR_DCY_WIDTH 2
0550 #define WM9081_DRC_MINGAIN_MASK 0x000C
0551 #define WM9081_DRC_MINGAIN_SHIFT 2
0552 #define WM9081_DRC_MINGAIN_WIDTH 2
0553 #define WM9081_DRC_MAXGAIN_MASK 0x0003
0554 #define WM9081_DRC_MAXGAIN_SHIFT 0
0555 #define WM9081_DRC_MAXGAIN_WIDTH 2
0556
0557
0558
0559
0560 #define WM9081_DRC_HI_COMP_MASK 0x0038
0561 #define WM9081_DRC_HI_COMP_SHIFT 3
0562 #define WM9081_DRC_HI_COMP_WIDTH 3
0563 #define WM9081_DRC_LO_COMP_MASK 0x0007
0564 #define WM9081_DRC_LO_COMP_SHIFT 0
0565 #define WM9081_DRC_LO_COMP_WIDTH 3
0566
0567
0568
0569
0570 #define WM9081_DRC_KNEE_IP_MASK 0x07E0
0571 #define WM9081_DRC_KNEE_IP_SHIFT 5
0572 #define WM9081_DRC_KNEE_IP_WIDTH 6
0573 #define WM9081_DRC_KNEE_OP_MASK 0x001F
0574 #define WM9081_DRC_KNEE_OP_SHIFT 0
0575 #define WM9081_DRC_KNEE_OP_WIDTH 5
0576
0577
0578
0579
0580 #define WM9081_WSEQ_ENA 0x8000
0581 #define WM9081_WSEQ_ENA_MASK 0x8000
0582 #define WM9081_WSEQ_ENA_SHIFT 15
0583 #define WM9081_WSEQ_ENA_WIDTH 1
0584 #define WM9081_WSEQ_ABORT 0x0200
0585 #define WM9081_WSEQ_ABORT_MASK 0x0200
0586 #define WM9081_WSEQ_ABORT_SHIFT 9
0587 #define WM9081_WSEQ_ABORT_WIDTH 1
0588 #define WM9081_WSEQ_START 0x0100
0589 #define WM9081_WSEQ_START_MASK 0x0100
0590 #define WM9081_WSEQ_START_SHIFT 8
0591 #define WM9081_WSEQ_START_WIDTH 1
0592 #define WM9081_WSEQ_START_INDEX_MASK 0x007F
0593 #define WM9081_WSEQ_START_INDEX_SHIFT 0
0594 #define WM9081_WSEQ_START_INDEX_WIDTH 7
0595
0596
0597
0598
0599 #define WM9081_WSEQ_CURRENT_INDEX_MASK 0x07F0
0600 #define WM9081_WSEQ_CURRENT_INDEX_SHIFT 4
0601 #define WM9081_WSEQ_CURRENT_INDEX_WIDTH 7
0602 #define WM9081_WSEQ_BUSY 0x0001
0603 #define WM9081_WSEQ_BUSY_MASK 0x0001
0604 #define WM9081_WSEQ_BUSY_SHIFT 0
0605 #define WM9081_WSEQ_BUSY_WIDTH 1
0606
0607
0608
0609
0610 #define WM9081_SPI_CFG 0x0020
0611 #define WM9081_SPI_CFG_MASK 0x0020
0612 #define WM9081_SPI_CFG_SHIFT 5
0613 #define WM9081_SPI_CFG_WIDTH 1
0614 #define WM9081_SPI_4WIRE 0x0010
0615 #define WM9081_SPI_4WIRE_MASK 0x0010
0616 #define WM9081_SPI_4WIRE_SHIFT 4
0617 #define WM9081_SPI_4WIRE_WIDTH 1
0618 #define WM9081_ARA_ENA 0x0008
0619 #define WM9081_ARA_ENA_MASK 0x0008
0620 #define WM9081_ARA_ENA_SHIFT 3
0621 #define WM9081_ARA_ENA_WIDTH 1
0622 #define WM9081_AUTO_INC 0x0002
0623 #define WM9081_AUTO_INC_MASK 0x0002
0624 #define WM9081_AUTO_INC_SHIFT 1
0625 #define WM9081_AUTO_INC_WIDTH 1
0626
0627
0628
0629
0630 #define WM9081_EQ_B1_GAIN_MASK 0xF800
0631 #define WM9081_EQ_B1_GAIN_SHIFT 11
0632 #define WM9081_EQ_B1_GAIN_WIDTH 5
0633 #define WM9081_EQ_B2_GAIN_MASK 0x07C0
0634 #define WM9081_EQ_B2_GAIN_SHIFT 6
0635 #define WM9081_EQ_B2_GAIN_WIDTH 5
0636 #define WM9081_EQ_B4_GAIN_MASK 0x003E
0637 #define WM9081_EQ_B4_GAIN_SHIFT 1
0638 #define WM9081_EQ_B4_GAIN_WIDTH 5
0639 #define WM9081_EQ_ENA 0x0001
0640 #define WM9081_EQ_ENA_MASK 0x0001
0641 #define WM9081_EQ_ENA_SHIFT 0
0642 #define WM9081_EQ_ENA_WIDTH 1
0643
0644
0645
0646
0647 #define WM9081_EQ_B3_GAIN_MASK 0xF800
0648 #define WM9081_EQ_B3_GAIN_SHIFT 11
0649 #define WM9081_EQ_B3_GAIN_WIDTH 5
0650 #define WM9081_EQ_B5_GAIN_MASK 0x07C0
0651 #define WM9081_EQ_B5_GAIN_SHIFT 6
0652 #define WM9081_EQ_B5_GAIN_WIDTH 5
0653
0654
0655
0656
0657 #define WM9081_EQ_B1_A_MASK 0xFFFF
0658 #define WM9081_EQ_B1_A_SHIFT 0
0659 #define WM9081_EQ_B1_A_WIDTH 16
0660
0661
0662
0663
0664 #define WM9081_EQ_B1_B_MASK 0xFFFF
0665 #define WM9081_EQ_B1_B_SHIFT 0
0666 #define WM9081_EQ_B1_B_WIDTH 16
0667
0668
0669
0670
0671 #define WM9081_EQ_B1_PG_MASK 0xFFFF
0672 #define WM9081_EQ_B1_PG_SHIFT 0
0673 #define WM9081_EQ_B1_PG_WIDTH 16
0674
0675
0676
0677
0678 #define WM9081_EQ_B2_A_MASK 0xFFFF
0679 #define WM9081_EQ_B2_A_SHIFT 0
0680 #define WM9081_EQ_B2_A_WIDTH 16
0681
0682
0683
0684
0685 #define WM9081_EQ_B2_B_MASK 0xFFFF
0686 #define WM9081_EQ_B2_B_SHIFT 0
0687 #define WM9081_EQ_B2_B_WIDTH 16
0688
0689
0690
0691
0692 #define WM9081_EQ_B2_C_MASK 0xFFFF
0693 #define WM9081_EQ_B2_C_SHIFT 0
0694 #define WM9081_EQ_B2_C_WIDTH 16
0695
0696
0697
0698
0699 #define WM9081_EQ_B2_PG_MASK 0xFFFF
0700 #define WM9081_EQ_B2_PG_SHIFT 0
0701 #define WM9081_EQ_B2_PG_WIDTH 16
0702
0703
0704
0705
0706 #define WM9081_EQ_B4_A_MASK 0xFFFF
0707 #define WM9081_EQ_B4_A_SHIFT 0
0708 #define WM9081_EQ_B4_A_WIDTH 16
0709
0710
0711
0712
0713 #define WM9081_EQ_B4_B_MASK 0xFFFF
0714 #define WM9081_EQ_B4_B_SHIFT 0
0715 #define WM9081_EQ_B4_B_WIDTH 16
0716
0717
0718
0719
0720 #define WM9081_EQ_B4_C_MASK 0xFFFF
0721 #define WM9081_EQ_B4_C_SHIFT 0
0722 #define WM9081_EQ_B4_C_WIDTH 16
0723
0724
0725
0726
0727 #define WM9081_EQ_B4_PG_MASK 0xFFFF
0728 #define WM9081_EQ_B4_PG_SHIFT 0
0729 #define WM9081_EQ_B4_PG_WIDTH 16
0730
0731
0732
0733
0734 #define WM9081_EQ_B3_A_MASK 0xFFFF
0735 #define WM9081_EQ_B3_A_SHIFT 0
0736 #define WM9081_EQ_B3_A_WIDTH 16
0737
0738
0739
0740
0741 #define WM9081_EQ_B3_B_MASK 0xFFFF
0742 #define WM9081_EQ_B3_B_SHIFT 0
0743 #define WM9081_EQ_B3_B_WIDTH 16
0744
0745
0746
0747
0748 #define WM9081_EQ_B3_C_MASK 0xFFFF
0749 #define WM9081_EQ_B3_C_SHIFT 0
0750 #define WM9081_EQ_B3_C_WIDTH 16
0751
0752
0753
0754
0755 #define WM9081_EQ_B3_PG_MASK 0xFFFF
0756 #define WM9081_EQ_B3_PG_SHIFT 0
0757 #define WM9081_EQ_B3_PG_WIDTH 16
0758
0759
0760
0761
0762 #define WM9081_EQ_B5_A_MASK 0xFFFF
0763 #define WM9081_EQ_B5_A_SHIFT 0
0764 #define WM9081_EQ_B5_A_WIDTH 16
0765
0766
0767
0768
0769 #define WM9081_EQ_B5_B_MASK 0xFFFF
0770 #define WM9081_EQ_B5_B_SHIFT 0
0771 #define WM9081_EQ_B5_B_WIDTH 16
0772
0773
0774
0775
0776 #define WM9081_EQ_B5_PG_MASK 0xFFFF
0777 #define WM9081_EQ_B5_PG_SHIFT 0
0778 #define WM9081_EQ_B5_PG_WIDTH 16
0779
0780
0781 #endif