0001
0002 #ifndef _WM8737_H
0003 #define _WM8737_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #define WM8737_LEFT_PGA_VOLUME 0x00
0017 #define WM8737_RIGHT_PGA_VOLUME 0x01
0018 #define WM8737_AUDIO_PATH_L 0x02
0019 #define WM8737_AUDIO_PATH_R 0x03
0020 #define WM8737_3D_ENHANCE 0x04
0021 #define WM8737_ADC_CONTROL 0x05
0022 #define WM8737_POWER_MANAGEMENT 0x06
0023 #define WM8737_AUDIO_FORMAT 0x07
0024 #define WM8737_CLOCKING 0x08
0025 #define WM8737_MIC_PREAMP_CONTROL 0x09
0026 #define WM8737_MISC_BIAS_CONTROL 0x0A
0027 #define WM8737_NOISE_GATE 0x0B
0028 #define WM8737_ALC1 0x0C
0029 #define WM8737_ALC2 0x0D
0030 #define WM8737_ALC3 0x0E
0031 #define WM8737_RESET 0x0F
0032
0033 #define WM8737_REGISTER_COUNT 16
0034 #define WM8737_MAX_REGISTER 0x0F
0035
0036
0037
0038
0039
0040
0041
0042
0043 #define WM8737_LVU 0x0100
0044 #define WM8737_LVU_MASK 0x0100
0045 #define WM8737_LVU_SHIFT 8
0046 #define WM8737_LVU_WIDTH 1
0047 #define WM8737_LINVOL_MASK 0x00FF
0048 #define WM8737_LINVOL_SHIFT 0
0049 #define WM8737_LINVOL_WIDTH 8
0050
0051
0052
0053
0054 #define WM8737_RVU 0x0100
0055 #define WM8737_RVU_MASK 0x0100
0056 #define WM8737_RVU_SHIFT 8
0057 #define WM8737_RVU_WIDTH 1
0058 #define WM8737_RINVOL_MASK 0x00FF
0059 #define WM8737_RINVOL_SHIFT 0
0060 #define WM8737_RINVOL_WIDTH 8
0061
0062
0063
0064
0065 #define WM8737_LINSEL_MASK 0x0180
0066 #define WM8737_LINSEL_SHIFT 7
0067 #define WM8737_LINSEL_WIDTH 2
0068 #define WM8737_LMICBOOST_MASK 0x0060
0069 #define WM8737_LMICBOOST_SHIFT 5
0070 #define WM8737_LMICBOOST_WIDTH 2
0071 #define WM8737_LMBE 0x0010
0072 #define WM8737_LMBE_MASK 0x0010
0073 #define WM8737_LMBE_SHIFT 4
0074 #define WM8737_LMBE_WIDTH 1
0075 #define WM8737_LMZC 0x0008
0076 #define WM8737_LMZC_MASK 0x0008
0077 #define WM8737_LMZC_SHIFT 3
0078 #define WM8737_LMZC_WIDTH 1
0079 #define WM8737_LPZC 0x0004
0080 #define WM8737_LPZC_MASK 0x0004
0081 #define WM8737_LPZC_SHIFT 2
0082 #define WM8737_LPZC_WIDTH 1
0083 #define WM8737_LZCTO_MASK 0x0003
0084 #define WM8737_LZCTO_SHIFT 0
0085 #define WM8737_LZCTO_WIDTH 2
0086
0087
0088
0089
0090 #define WM8737_RINSEL_MASK 0x0180
0091 #define WM8737_RINSEL_SHIFT 7
0092 #define WM8737_RINSEL_WIDTH 2
0093 #define WM8737_RMICBOOST_MASK 0x0060
0094 #define WM8737_RMICBOOST_SHIFT 5
0095 #define WM8737_RMICBOOST_WIDTH 2
0096 #define WM8737_RMBE 0x0010
0097 #define WM8737_RMBE_MASK 0x0010
0098 #define WM8737_RMBE_SHIFT 4
0099 #define WM8737_RMBE_WIDTH 1
0100 #define WM8737_RMZC 0x0008
0101 #define WM8737_RMZC_MASK 0x0008
0102 #define WM8737_RMZC_SHIFT 3
0103 #define WM8737_RMZC_WIDTH 1
0104 #define WM8737_RPZC 0x0004
0105 #define WM8737_RPZC_MASK 0x0004
0106 #define WM8737_RPZC_SHIFT 2
0107 #define WM8737_RPZC_WIDTH 1
0108 #define WM8737_RZCTO_MASK 0x0003
0109 #define WM8737_RZCTO_SHIFT 0
0110 #define WM8737_RZCTO_WIDTH 2
0111
0112
0113
0114
0115 #define WM8737_DIV2 0x0080
0116 #define WM8737_DIV2_MASK 0x0080
0117 #define WM8737_DIV2_SHIFT 7
0118 #define WM8737_DIV2_WIDTH 1
0119 #define WM8737_3DLC 0x0040
0120 #define WM8737_3DLC_MASK 0x0040
0121 #define WM8737_3DLC_SHIFT 6
0122 #define WM8737_3DLC_WIDTH 1
0123 #define WM8737_3DUC 0x0020
0124 #define WM8737_3DUC_MASK 0x0020
0125 #define WM8737_3DUC_SHIFT 5
0126 #define WM8737_3DUC_WIDTH 1
0127 #define WM8737_3DDEPTH_MASK 0x001E
0128 #define WM8737_3DDEPTH_SHIFT 1
0129 #define WM8737_3DDEPTH_WIDTH 4
0130 #define WM8737_3DE 0x0001
0131 #define WM8737_3DE_MASK 0x0001
0132 #define WM8737_3DE_SHIFT 0
0133 #define WM8737_3DE_WIDTH 1
0134
0135
0136
0137
0138 #define WM8737_MONOMIX_MASK 0x0180
0139 #define WM8737_MONOMIX_SHIFT 7
0140 #define WM8737_MONOMIX_WIDTH 2
0141 #define WM8737_POLARITY_MASK 0x0060
0142 #define WM8737_POLARITY_SHIFT 5
0143 #define WM8737_POLARITY_WIDTH 2
0144 #define WM8737_HPOR 0x0010
0145 #define WM8737_HPOR_MASK 0x0010
0146 #define WM8737_HPOR_SHIFT 4
0147 #define WM8737_HPOR_WIDTH 1
0148 #define WM8737_LP 0x0004
0149 #define WM8737_LP_MASK 0x0004
0150 #define WM8737_LP_SHIFT 2
0151 #define WM8737_LP_WIDTH 1
0152 #define WM8737_MONOUT 0x0002
0153 #define WM8737_MONOUT_MASK 0x0002
0154 #define WM8737_MONOUT_SHIFT 1
0155 #define WM8737_MONOUT_WIDTH 1
0156 #define WM8737_ADCHPD 0x0001
0157 #define WM8737_ADCHPD_MASK 0x0001
0158 #define WM8737_ADCHPD_SHIFT 0
0159 #define WM8737_ADCHPD_WIDTH 1
0160
0161
0162
0163
0164 #define WM8737_VMID 0x0100
0165 #define WM8737_VMID_MASK 0x0100
0166 #define WM8737_VMID_SHIFT 8
0167 #define WM8737_VMID_WIDTH 1
0168 #define WM8737_VREF 0x0080
0169 #define WM8737_VREF_MASK 0x0080
0170 #define WM8737_VREF_SHIFT 7
0171 #define WM8737_VREF_WIDTH 1
0172 #define WM8737_AI 0x0040
0173 #define WM8737_AI_MASK 0x0040
0174 #define WM8737_AI_SHIFT 6
0175 #define WM8737_AI_WIDTH 1
0176 #define WM8737_PGL 0x0020
0177 #define WM8737_PGL_MASK 0x0020
0178 #define WM8737_PGL_SHIFT 5
0179 #define WM8737_PGL_WIDTH 1
0180 #define WM8737_PGR 0x0010
0181 #define WM8737_PGR_MASK 0x0010
0182 #define WM8737_PGR_SHIFT 4
0183 #define WM8737_PGR_WIDTH 1
0184 #define WM8737_ADL 0x0008
0185 #define WM8737_ADL_MASK 0x0008
0186 #define WM8737_ADL_SHIFT 3
0187 #define WM8737_ADL_WIDTH 1
0188 #define WM8737_ADR 0x0004
0189 #define WM8737_ADR_MASK 0x0004
0190 #define WM8737_ADR_SHIFT 2
0191 #define WM8737_ADR_WIDTH 1
0192 #define WM8737_MICBIAS_MASK 0x0003
0193 #define WM8737_MICBIAS_SHIFT 0
0194 #define WM8737_MICBIAS_WIDTH 2
0195
0196
0197
0198
0199 #define WM8737_SDODIS 0x0080
0200 #define WM8737_SDODIS_MASK 0x0080
0201 #define WM8737_SDODIS_SHIFT 7
0202 #define WM8737_SDODIS_WIDTH 1
0203 #define WM8737_MS 0x0040
0204 #define WM8737_MS_MASK 0x0040
0205 #define WM8737_MS_SHIFT 6
0206 #define WM8737_MS_WIDTH 1
0207 #define WM8737_LRP 0x0010
0208 #define WM8737_LRP_MASK 0x0010
0209 #define WM8737_LRP_SHIFT 4
0210 #define WM8737_LRP_WIDTH 1
0211 #define WM8737_WL_MASK 0x000C
0212 #define WM8737_WL_SHIFT 2
0213 #define WM8737_WL_WIDTH 2
0214 #define WM8737_FORMAT_MASK 0x0003
0215 #define WM8737_FORMAT_SHIFT 0
0216 #define WM8737_FORMAT_WIDTH 2
0217
0218
0219
0220
0221 #define WM8737_AUTODETECT 0x0080
0222 #define WM8737_AUTODETECT_MASK 0x0080
0223 #define WM8737_AUTODETECT_SHIFT 7
0224 #define WM8737_AUTODETECT_WIDTH 1
0225 #define WM8737_CLKDIV2 0x0040
0226 #define WM8737_CLKDIV2_MASK 0x0040
0227 #define WM8737_CLKDIV2_SHIFT 6
0228 #define WM8737_CLKDIV2_WIDTH 1
0229 #define WM8737_SR_MASK 0x003E
0230 #define WM8737_SR_SHIFT 1
0231 #define WM8737_SR_WIDTH 5
0232 #define WM8737_USB_MODE 0x0001
0233 #define WM8737_USB_MODE_MASK 0x0001
0234 #define WM8737_USB_MODE_SHIFT 0
0235 #define WM8737_USB_MODE_WIDTH 1
0236
0237
0238
0239
0240 #define WM8737_RBYPEN 0x0008
0241 #define WM8737_RBYPEN_MASK 0x0008
0242 #define WM8737_RBYPEN_SHIFT 3
0243 #define WM8737_RBYPEN_WIDTH 1
0244 #define WM8737_LBYPEN 0x0004
0245 #define WM8737_LBYPEN_MASK 0x0004
0246 #define WM8737_LBYPEN_SHIFT 2
0247 #define WM8737_LBYPEN_WIDTH 1
0248 #define WM8737_MBCTRL_MASK 0x0003
0249 #define WM8737_MBCTRL_SHIFT 0
0250 #define WM8737_MBCTRL_WIDTH 2
0251
0252
0253
0254
0255 #define WM8737_VMIDSEL_MASK 0x000C
0256 #define WM8737_VMIDSEL_SHIFT 2
0257 #define WM8737_VMIDSEL_WIDTH 2
0258 #define WM8737_LINPUT1_DC_BIAS_ENABLE 0x0002
0259 #define WM8737_LINPUT1_DC_BIAS_ENABLE_MASK 0x0002
0260 #define WM8737_LINPUT1_DC_BIAS_ENABLE_SHIFT 1
0261 #define WM8737_LINPUT1_DC_BIAS_ENABLE_WIDTH 1
0262 #define WM8737_RINPUT1_DC_BIAS_ENABLE 0x0001
0263 #define WM8737_RINPUT1_DC_BIAS_ENABLE_MASK 0x0001
0264 #define WM8737_RINPUT1_DC_BIAS_ENABLE_SHIFT 0
0265 #define WM8737_RINPUT1_DC_BIAS_ENABLE_WIDTH 1
0266
0267
0268
0269
0270 #define WM8737_NGTH_MASK 0x001C
0271 #define WM8737_NGTH_SHIFT 2
0272 #define WM8737_NGTH_WIDTH 3
0273 #define WM8737_NGAT 0x0001
0274 #define WM8737_NGAT_MASK 0x0001
0275 #define WM8737_NGAT_SHIFT 0
0276 #define WM8737_NGAT_WIDTH 1
0277
0278
0279
0280
0281 #define WM8737_ALCSEL_MASK 0x0180
0282 #define WM8737_ALCSEL_SHIFT 7
0283 #define WM8737_ALCSEL_WIDTH 2
0284 #define WM8737_MAX_GAIN_MASK 0x0070
0285 #define WM8737_MAX_GAIN_SHIFT 4
0286 #define WM8737_MAX_GAIN_WIDTH 3
0287 #define WM8737_ALCL_MASK 0x000F
0288 #define WM8737_ALCL_SHIFT 0
0289 #define WM8737_ALCL_WIDTH 4
0290
0291
0292
0293
0294 #define WM8737_ALCZCE 0x0010
0295 #define WM8737_ALCZCE_MASK 0x0010
0296 #define WM8737_ALCZCE_SHIFT 4
0297 #define WM8737_ALCZCE_WIDTH 1
0298 #define WM8737_HLD_MASK 0x000F
0299 #define WM8737_HLD_SHIFT 0
0300 #define WM8737_HLD_WIDTH 4
0301
0302
0303
0304
0305 #define WM8737_DCY_MASK 0x00F0
0306 #define WM8737_DCY_SHIFT 4
0307 #define WM8737_DCY_WIDTH 4
0308 #define WM8737_ATK_MASK 0x000F
0309 #define WM8737_ATK_SHIFT 0
0310 #define WM8737_ATK_WIDTH 4
0311
0312
0313
0314
0315 #define WM8737_RESET_MASK 0x01FF
0316 #define WM8737_RESET_SHIFT 0
0317 #define WM8737_RESET_WIDTH 9
0318
0319 #endif