~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/rt5665.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/codecs/rt5665.h (Version linux-6.12-rc7) and /sound/soc/codecs/rt5665.h (Version linux-4.14.336)


  1 /* SPDX-License-Identifier: GPL-2.0-only */    << 
  2 /*                                                  1 /*
  3  * rt5665.h  --  RT5665/RT5658 ALSA SoC audio       2  * rt5665.h  --  RT5665/RT5658 ALSA SoC audio driver
  4  *                                                  3  *
  5  * Copyright 2016 Realtek Microelectronics          4  * Copyright 2016 Realtek Microelectronics
  6  * Author: Bard Liao <bardliao@realtek.com>         5  * Author: Bard Liao <bardliao@realtek.com>
                                                   >>   6  *
                                                   >>   7  * This program is free software; you can redistribute it and/or modify
                                                   >>   8  * it under the terms of the GNU General Public License version 2 as
                                                   >>   9  * published by the Free Software Foundation.
  7  */                                                10  */
  8                                                    11 
  9 #ifndef __RT5665_H__                               12 #ifndef __RT5665_H__
 10 #define __RT5665_H__                               13 #define __RT5665_H__
 11                                                    14 
 12 #include <sound/rt5665.h>                          15 #include <sound/rt5665.h>
 13                                                    16 
 14 #define DEVICE_ID 0x6451                           17 #define DEVICE_ID 0x6451
 15                                                    18 
 16 /* Info */                                         19 /* Info */
 17 #define RT5665_RESET                               20 #define RT5665_RESET                            0x0000
 18 #define RT5665_VENDOR_ID                           21 #define RT5665_VENDOR_ID                        0x00fd
 19 #define RT5665_VENDOR_ID_1                         22 #define RT5665_VENDOR_ID_1                      0x00fe
 20 #define RT5665_DEVICE_ID                           23 #define RT5665_DEVICE_ID                        0x00ff
 21 /*  I/O - Output */                                24 /*  I/O - Output */
 22 #define RT5665_LOUT                                25 #define RT5665_LOUT                             0x0001
 23 #define RT5665_HP_CTRL_1                           26 #define RT5665_HP_CTRL_1                        0x0002
 24 #define RT5665_HP_CTRL_2                           27 #define RT5665_HP_CTRL_2                        0x0003
 25 #define RT5665_MONO_OUT                            28 #define RT5665_MONO_OUT                         0x0004
 26 #define RT5665_HPL_GAIN                            29 #define RT5665_HPL_GAIN                         0x0005
 27 #define RT5665_HPR_GAIN                            30 #define RT5665_HPR_GAIN                         0x0006
 28 #define RT5665_MONO_GAIN                           31 #define RT5665_MONO_GAIN                        0x0007
 29                                                    32 
 30 /* I/O - Input */                                  33 /* I/O - Input */
 31 #define RT5665_CAL_BST_CTRL                        34 #define RT5665_CAL_BST_CTRL                     0x000a
 32 #define RT5665_CBJ_BST_CTRL                        35 #define RT5665_CBJ_BST_CTRL                     0x000b
 33 #define RT5665_IN1_IN2                             36 #define RT5665_IN1_IN2                          0x000c
 34 #define RT5665_IN3_IN4                             37 #define RT5665_IN3_IN4                          0x000d
 35 #define RT5665_INL1_INR1_VOL                       38 #define RT5665_INL1_INR1_VOL                    0x000f
 36 /* I/O - Speaker */                                39 /* I/O - Speaker */
 37 #define RT5665_EJD_CTRL_1                          40 #define RT5665_EJD_CTRL_1                       0x0010
 38 #define RT5665_EJD_CTRL_2                          41 #define RT5665_EJD_CTRL_2                       0x0011
 39 #define RT5665_EJD_CTRL_3                          42 #define RT5665_EJD_CTRL_3                       0x0012
 40 #define RT5665_EJD_CTRL_4                          43 #define RT5665_EJD_CTRL_4                       0x0013
 41 #define RT5665_EJD_CTRL_5                          44 #define RT5665_EJD_CTRL_5                       0x0014
 42 #define RT5665_EJD_CTRL_6                          45 #define RT5665_EJD_CTRL_6                       0x0015
 43 #define RT5665_EJD_CTRL_7                          46 #define RT5665_EJD_CTRL_7                       0x0016
 44 /* I/O - ADC/DAC/DMIC */                           47 /* I/O - ADC/DAC/DMIC */
 45 #define RT5665_DAC2_CTRL                           48 #define RT5665_DAC2_CTRL                        0x0017
 46 #define RT5665_DAC2_DIG_VOL                        49 #define RT5665_DAC2_DIG_VOL                     0x0018
 47 #define RT5665_DAC1_DIG_VOL                        50 #define RT5665_DAC1_DIG_VOL                     0x0019
 48 #define RT5665_DAC3_DIG_VOL                        51 #define RT5665_DAC3_DIG_VOL                     0x001a
 49 #define RT5665_DAC3_CTRL                           52 #define RT5665_DAC3_CTRL                        0x001b
 50 #define RT5665_STO1_ADC_DIG_VOL                    53 #define RT5665_STO1_ADC_DIG_VOL                 0x001c
 51 #define RT5665_MONO_ADC_DIG_VOL                    54 #define RT5665_MONO_ADC_DIG_VOL                 0x001d
 52 #define RT5665_STO2_ADC_DIG_VOL                    55 #define RT5665_STO2_ADC_DIG_VOL                 0x001e
 53 #define RT5665_STO1_ADC_BOOST                      56 #define RT5665_STO1_ADC_BOOST                   0x001f
 54 #define RT5665_MONO_ADC_BOOST                      57 #define RT5665_MONO_ADC_BOOST                   0x0020
 55 #define RT5665_STO2_ADC_BOOST                      58 #define RT5665_STO2_ADC_BOOST                   0x0021
 56 #define RT5665_HP_IMP_GAIN_1                       59 #define RT5665_HP_IMP_GAIN_1                    0x0022
 57 #define RT5665_HP_IMP_GAIN_2                       60 #define RT5665_HP_IMP_GAIN_2                    0x0023
 58 /* Mixer - D-D */                                  61 /* Mixer - D-D */
 59 #define RT5665_STO1_ADC_MIXER                      62 #define RT5665_STO1_ADC_MIXER                   0x0026
 60 #define RT5665_MONO_ADC_MIXER                      63 #define RT5665_MONO_ADC_MIXER                   0x0027
 61 #define RT5665_STO2_ADC_MIXER                      64 #define RT5665_STO2_ADC_MIXER                   0x0028
 62 #define RT5665_AD_DA_MIXER                         65 #define RT5665_AD_DA_MIXER                      0x0029
 63 #define RT5665_STO1_DAC_MIXER                      66 #define RT5665_STO1_DAC_MIXER                   0x002a
 64 #define RT5665_MONO_DAC_MIXER                      67 #define RT5665_MONO_DAC_MIXER                   0x002b
 65 #define RT5665_STO2_DAC_MIXER                      68 #define RT5665_STO2_DAC_MIXER                   0x002c
 66 #define RT5665_A_DAC1_MUX                          69 #define RT5665_A_DAC1_MUX                       0x002d
 67 #define RT5665_A_DAC2_MUX                          70 #define RT5665_A_DAC2_MUX                       0x002e
 68 #define RT5665_DIG_INF2_DATA                       71 #define RT5665_DIG_INF2_DATA                    0x002f
 69 #define RT5665_DIG_INF3_DATA                       72 #define RT5665_DIG_INF3_DATA                    0x0030
 70 /* Mixer - PDM */                                  73 /* Mixer - PDM */
 71 #define RT5665_PDM_OUT_CTRL                        74 #define RT5665_PDM_OUT_CTRL                     0x0031
 72 #define RT5665_PDM_DATA_CTRL_1                     75 #define RT5665_PDM_DATA_CTRL_1                  0x0032
 73 #define RT5665_PDM_DATA_CTRL_2                     76 #define RT5665_PDM_DATA_CTRL_2                  0x0033
 74 #define RT5665_PDM_DATA_CTRL_3                     77 #define RT5665_PDM_DATA_CTRL_3                  0x0034
 75 #define RT5665_PDM_DATA_CTRL_4                     78 #define RT5665_PDM_DATA_CTRL_4                  0x0035
 76 /* Mixer - ADC */                                  79 /* Mixer - ADC */
 77 #define RT5665_REC1_GAIN                           80 #define RT5665_REC1_GAIN                        0x003a
 78 #define RT5665_REC1_L1_MIXER                       81 #define RT5665_REC1_L1_MIXER                    0x003b
 79 #define RT5665_REC1_L2_MIXER                       82 #define RT5665_REC1_L2_MIXER                    0x003c
 80 #define RT5665_REC1_R1_MIXER                       83 #define RT5665_REC1_R1_MIXER                    0x003d
 81 #define RT5665_REC1_R2_MIXER                       84 #define RT5665_REC1_R2_MIXER                    0x003e
 82 #define RT5665_REC2_GAIN                           85 #define RT5665_REC2_GAIN                        0x003f
 83 #define RT5665_REC2_L1_MIXER                       86 #define RT5665_REC2_L1_MIXER                    0x0040
 84 #define RT5665_REC2_L2_MIXER                       87 #define RT5665_REC2_L2_MIXER                    0x0041
 85 #define RT5665_REC2_R1_MIXER                       88 #define RT5665_REC2_R1_MIXER                    0x0042
 86 #define RT5665_REC2_R2_MIXER                       89 #define RT5665_REC2_R2_MIXER                    0x0043
 87 #define RT5665_CAL_REC                             90 #define RT5665_CAL_REC                          0x0044
 88 /* Mixer - DAC */                                  91 /* Mixer - DAC */
 89 #define RT5665_ALC_BACK_GAIN                       92 #define RT5665_ALC_BACK_GAIN                    0x0049
 90 #define RT5665_MONOMIX_GAIN                        93 #define RT5665_MONOMIX_GAIN                     0x004a
 91 #define RT5665_MONOMIX_IN_GAIN                     94 #define RT5665_MONOMIX_IN_GAIN                  0x004b
 92 #define RT5665_OUT_L_GAIN                          95 #define RT5665_OUT_L_GAIN                       0x004d
 93 #define RT5665_OUT_L_MIXER                         96 #define RT5665_OUT_L_MIXER                      0x004e
 94 #define RT5665_OUT_R_GAIN                          97 #define RT5665_OUT_R_GAIN                       0x004f
 95 #define RT5665_OUT_R_MIXER                         98 #define RT5665_OUT_R_MIXER                      0x0050
 96 #define RT5665_LOUT_MIXER                          99 #define RT5665_LOUT_MIXER                       0x0052
 97 /* Power */                                       100 /* Power */
 98 #define RT5665_PWR_DIG_1                          101 #define RT5665_PWR_DIG_1                        0x0061
 99 #define RT5665_PWR_DIG_2                          102 #define RT5665_PWR_DIG_2                        0x0062
100 #define RT5665_PWR_ANLG_1                         103 #define RT5665_PWR_ANLG_1                       0x0063
101 #define RT5665_PWR_ANLG_2                         104 #define RT5665_PWR_ANLG_2                       0x0064
102 #define RT5665_PWR_ANLG_3                         105 #define RT5665_PWR_ANLG_3                       0x0065
103 #define RT5665_PWR_MIXER                          106 #define RT5665_PWR_MIXER                        0x0066
104 #define RT5665_PWR_VOL                            107 #define RT5665_PWR_VOL                          0x0067
105 /* Clock Detect */                                108 /* Clock Detect */
106 #define RT5665_CLK_DET                            109 #define RT5665_CLK_DET                          0x006b
107 /* Filter */                                      110 /* Filter */
108 #define RT5665_HPF_CTRL1                          111 #define RT5665_HPF_CTRL1                        0x006d
109 /* DMIC */                                        112 /* DMIC */
110 #define RT5665_DMIC_CTRL_1                        113 #define RT5665_DMIC_CTRL_1                      0x006e
111 #define RT5665_DMIC_CTRL_2                        114 #define RT5665_DMIC_CTRL_2                      0x006f
112 /* Format - ADC/DAC */                            115 /* Format - ADC/DAC */
113 #define RT5665_I2S1_SDP                           116 #define RT5665_I2S1_SDP                         0x0070
114 #define RT5665_I2S2_SDP                           117 #define RT5665_I2S2_SDP                         0x0071
115 #define RT5665_I2S3_SDP                           118 #define RT5665_I2S3_SDP                         0x0072
116 #define RT5665_ADDA_CLK_1                         119 #define RT5665_ADDA_CLK_1                       0x0073
117 #define RT5665_ADDA_CLK_2                         120 #define RT5665_ADDA_CLK_2                       0x0074
118 #define RT5665_I2S1_F_DIV_CTRL_1                  121 #define RT5665_I2S1_F_DIV_CTRL_1                0x0075
119 #define RT5665_I2S1_F_DIV_CTRL_2                  122 #define RT5665_I2S1_F_DIV_CTRL_2                0x0076
120 /* Format - TDM Control */                        123 /* Format - TDM Control */
121 #define RT5665_TDM_CTRL_1                         124 #define RT5665_TDM_CTRL_1                       0x0078
122 #define RT5665_TDM_CTRL_2                         125 #define RT5665_TDM_CTRL_2                       0x0079
123 #define RT5665_TDM_CTRL_3                         126 #define RT5665_TDM_CTRL_3                       0x007a
124 #define RT5665_TDM_CTRL_4                         127 #define RT5665_TDM_CTRL_4                       0x007b
125 #define RT5665_TDM_CTRL_5                         128 #define RT5665_TDM_CTRL_5                       0x007c
126 #define RT5665_TDM_CTRL_6                         129 #define RT5665_TDM_CTRL_6                       0x007d
127 #define RT5665_TDM_CTRL_7                         130 #define RT5665_TDM_CTRL_7                       0x007e
128 #define RT5665_TDM_CTRL_8                         131 #define RT5665_TDM_CTRL_8                       0x007f
129 /* Function - Analog */                           132 /* Function - Analog */
130 #define RT5665_GLB_CLK                            133 #define RT5665_GLB_CLK                          0x0080
131 #define RT5665_PLL_CTRL_1                         134 #define RT5665_PLL_CTRL_1                       0x0081
132 #define RT5665_PLL_CTRL_2                         135 #define RT5665_PLL_CTRL_2                       0x0082
133 #define RT5665_ASRC_1                             136 #define RT5665_ASRC_1                           0x0083
134 #define RT5665_ASRC_2                             137 #define RT5665_ASRC_2                           0x0084
135 #define RT5665_ASRC_3                             138 #define RT5665_ASRC_3                           0x0085
136 #define RT5665_ASRC_4                             139 #define RT5665_ASRC_4                           0x0086
137 #define RT5665_ASRC_5                             140 #define RT5665_ASRC_5                           0x0087
138 #define RT5665_ASRC_6                             141 #define RT5665_ASRC_6                           0x0088
139 #define RT5665_ASRC_7                             142 #define RT5665_ASRC_7                           0x0089
140 #define RT5665_ASRC_8                             143 #define RT5665_ASRC_8                           0x008a
141 #define RT5665_ASRC_9                             144 #define RT5665_ASRC_9                           0x008b
142 #define RT5665_ASRC_10                            145 #define RT5665_ASRC_10                          0x008c
143 #define RT5665_DEPOP_1                            146 #define RT5665_DEPOP_1                          0x008e
144 #define RT5665_DEPOP_2                            147 #define RT5665_DEPOP_2                          0x008f
145 #define RT5665_HP_CHARGE_PUMP_1                   148 #define RT5665_HP_CHARGE_PUMP_1                 0x0091
146 #define RT5665_HP_CHARGE_PUMP_2                   149 #define RT5665_HP_CHARGE_PUMP_2                 0x0092
147 #define RT5665_MICBIAS_1                          150 #define RT5665_MICBIAS_1                        0x0093
148 #define RT5665_MICBIAS_2                          151 #define RT5665_MICBIAS_2                        0x0094
149 #define RT5665_ASRC_12                            152 #define RT5665_ASRC_12                          0x0098
150 #define RT5665_ASRC_13                            153 #define RT5665_ASRC_13                          0x0099
151 #define RT5665_ASRC_14                            154 #define RT5665_ASRC_14                          0x009a
152 #define RT5665_RC_CLK_CTRL                        155 #define RT5665_RC_CLK_CTRL                      0x009f
153 #define RT5665_I2S_M_CLK_CTRL_1                   156 #define RT5665_I2S_M_CLK_CTRL_1                 0x00a0
154 #define RT5665_I2S2_F_DIV_CTRL_1                  157 #define RT5665_I2S2_F_DIV_CTRL_1                0x00a1
155 #define RT5665_I2S2_F_DIV_CTRL_2                  158 #define RT5665_I2S2_F_DIV_CTRL_2                0x00a2
156 #define RT5665_I2S3_F_DIV_CTRL_1                  159 #define RT5665_I2S3_F_DIV_CTRL_1                0x00a3
157 #define RT5665_I2S3_F_DIV_CTRL_2                  160 #define RT5665_I2S3_F_DIV_CTRL_2                0x00a4
158 /* Function - Digital */                          161 /* Function - Digital */
159 #define RT5665_EQ_CTRL_1                          162 #define RT5665_EQ_CTRL_1                        0x00ae
160 #define RT5665_EQ_CTRL_2                          163 #define RT5665_EQ_CTRL_2                        0x00af
161 #define RT5665_IRQ_CTRL_1                         164 #define RT5665_IRQ_CTRL_1                       0x00b6
162 #define RT5665_IRQ_CTRL_2                         165 #define RT5665_IRQ_CTRL_2                       0x00b7
163 #define RT5665_IRQ_CTRL_3                         166 #define RT5665_IRQ_CTRL_3                       0x00b8
164 #define RT5665_IRQ_CTRL_4                         167 #define RT5665_IRQ_CTRL_4                       0x00b9
165 #define RT5665_IRQ_CTRL_5                         168 #define RT5665_IRQ_CTRL_5                       0x00ba
166 #define RT5665_IRQ_CTRL_6                         169 #define RT5665_IRQ_CTRL_6                       0x00bb
167 #define RT5665_INT_ST_1                           170 #define RT5665_INT_ST_1                         0x00be
168 #define RT5665_GPIO_CTRL_1                        171 #define RT5665_GPIO_CTRL_1                      0x00c0
169 #define RT5665_GPIO_CTRL_2                        172 #define RT5665_GPIO_CTRL_2                      0x00c1
170 #define RT5665_GPIO_CTRL_3                        173 #define RT5665_GPIO_CTRL_3                      0x00c2
171 #define RT5665_GPIO_CTRL_4                        174 #define RT5665_GPIO_CTRL_4                      0x00c3
172 #define RT5665_GPIO_STA                           175 #define RT5665_GPIO_STA                         0x00c4
173 #define RT5665_HP_AMP_DET_CTRL_1                  176 #define RT5665_HP_AMP_DET_CTRL_1                0x00d0
174 #define RT5665_HP_AMP_DET_CTRL_2                  177 #define RT5665_HP_AMP_DET_CTRL_2                0x00d1
175 #define RT5665_MID_HP_AMP_DET                     178 #define RT5665_MID_HP_AMP_DET                   0x00d3
176 #define RT5665_LOW_HP_AMP_DET                     179 #define RT5665_LOW_HP_AMP_DET                   0x00d4
177 #define RT5665_SV_ZCD_1                           180 #define RT5665_SV_ZCD_1                         0x00d9
178 #define RT5665_SV_ZCD_2                           181 #define RT5665_SV_ZCD_2                         0x00da
179 #define RT5665_IL_CMD_1                           182 #define RT5665_IL_CMD_1                         0x00db
180 #define RT5665_IL_CMD_2                           183 #define RT5665_IL_CMD_2                         0x00dc
181 #define RT5665_IL_CMD_3                           184 #define RT5665_IL_CMD_3                         0x00dd
182 #define RT5665_IL_CMD_4                           185 #define RT5665_IL_CMD_4                         0x00de
183 #define RT5665_4BTN_IL_CMD_1                      186 #define RT5665_4BTN_IL_CMD_1                    0x00df
184 #define RT5665_4BTN_IL_CMD_2                      187 #define RT5665_4BTN_IL_CMD_2                    0x00e0
185 #define RT5665_4BTN_IL_CMD_3                      188 #define RT5665_4BTN_IL_CMD_3                    0x00e1
186 #define RT5665_PSV_IL_CMD_1                       189 #define RT5665_PSV_IL_CMD_1                     0x00e2
187                                                   190 
188 #define RT5665_ADC_STO1_HP_CTRL_1                 191 #define RT5665_ADC_STO1_HP_CTRL_1               0x00ea
189 #define RT5665_ADC_STO1_HP_CTRL_2                 192 #define RT5665_ADC_STO1_HP_CTRL_2               0x00eb
190 #define RT5665_ADC_MONO_HP_CTRL_1                 193 #define RT5665_ADC_MONO_HP_CTRL_1               0x00ec
191 #define RT5665_ADC_MONO_HP_CTRL_2                 194 #define RT5665_ADC_MONO_HP_CTRL_2               0x00ed
192 #define RT5665_ADC_STO2_HP_CTRL_1                 195 #define RT5665_ADC_STO2_HP_CTRL_1               0x00ee
193 #define RT5665_ADC_STO2_HP_CTRL_2                 196 #define RT5665_ADC_STO2_HP_CTRL_2               0x00ef
194 #define RT5665_AJD1_CTRL                          197 #define RT5665_AJD1_CTRL                        0x00f0
195 #define RT5665_JD1_THD                            198 #define RT5665_JD1_THD                          0x00f1
196 #define RT5665_JD2_THD                            199 #define RT5665_JD2_THD                          0x00f2
197 #define RT5665_JD_CTRL_1                          200 #define RT5665_JD_CTRL_1                        0x00f6
198 #define RT5665_JD_CTRL_2                          201 #define RT5665_JD_CTRL_2                        0x00f7
199 #define RT5665_JD_CTRL_3                          202 #define RT5665_JD_CTRL_3                        0x00f8
200 /* General Control */                             203 /* General Control */
201 #define RT5665_DIG_MISC                           204 #define RT5665_DIG_MISC                         0x00fa
202 #define RT5665_DUMMY_2                            205 #define RT5665_DUMMY_2                          0x00fb
203 #define RT5665_DUMMY_3                            206 #define RT5665_DUMMY_3                          0x00fc
204                                                   207 
205 #define RT5665_DAC_ADC_DIG_VOL1                   208 #define RT5665_DAC_ADC_DIG_VOL1                 0x0100
206 #define RT5665_DAC_ADC_DIG_VOL2                   209 #define RT5665_DAC_ADC_DIG_VOL2                 0x0101
207 #define RT5665_BIAS_CUR_CTRL_1                    210 #define RT5665_BIAS_CUR_CTRL_1                  0x010a
208 #define RT5665_BIAS_CUR_CTRL_2                    211 #define RT5665_BIAS_CUR_CTRL_2                  0x010b
209 #define RT5665_BIAS_CUR_CTRL_3                    212 #define RT5665_BIAS_CUR_CTRL_3                  0x010c
210 #define RT5665_BIAS_CUR_CTRL_4                    213 #define RT5665_BIAS_CUR_CTRL_4                  0x010d
211 #define RT5665_BIAS_CUR_CTRL_5                    214 #define RT5665_BIAS_CUR_CTRL_5                  0x010e
212 #define RT5665_BIAS_CUR_CTRL_6                    215 #define RT5665_BIAS_CUR_CTRL_6                  0x010f
213 #define RT5665_BIAS_CUR_CTRL_7                    216 #define RT5665_BIAS_CUR_CTRL_7                  0x0110
214 #define RT5665_BIAS_CUR_CTRL_8                    217 #define RT5665_BIAS_CUR_CTRL_8                  0x0111
215 #define RT5665_BIAS_CUR_CTRL_9                    218 #define RT5665_BIAS_CUR_CTRL_9                  0x0112
216 #define RT5665_BIAS_CUR_CTRL_10                   219 #define RT5665_BIAS_CUR_CTRL_10                 0x0113
217 #define RT5665_VREF_REC_OP_FB_CAP_CTRL            220 #define RT5665_VREF_REC_OP_FB_CAP_CTRL          0x0117
218 #define RT5665_CHARGE_PUMP_1                      221 #define RT5665_CHARGE_PUMP_1                    0x0125
219 #define RT5665_DIG_IN_CTRL_1                      222 #define RT5665_DIG_IN_CTRL_1                    0x0132
220 #define RT5665_DIG_IN_CTRL_2                      223 #define RT5665_DIG_IN_CTRL_2                    0x0133
221 #define RT5665_PAD_DRIVING_CTRL                   224 #define RT5665_PAD_DRIVING_CTRL                 0x0137
222 #define RT5665_SOFT_RAMP_DEPOP                    225 #define RT5665_SOFT_RAMP_DEPOP                  0x0138
223 #define RT5665_PLL                                226 #define RT5665_PLL                              0x0139
224 #define RT5665_CHOP_DAC                           227 #define RT5665_CHOP_DAC                         0x013a
225 #define RT5665_CHOP_ADC                           228 #define RT5665_CHOP_ADC                         0x013b
226 #define RT5665_CALIB_ADC_CTRL                     229 #define RT5665_CALIB_ADC_CTRL                   0x013c
227 #define RT5665_VOL_TEST                           230 #define RT5665_VOL_TEST                         0x013f
228 #define RT5665_TEST_MODE_CTRL_1                   231 #define RT5665_TEST_MODE_CTRL_1                 0x0145
229 #define RT5665_TEST_MODE_CTRL_2                   232 #define RT5665_TEST_MODE_CTRL_2                 0x0146
230 #define RT5665_TEST_MODE_CTRL_3                   233 #define RT5665_TEST_MODE_CTRL_3                 0x0147
231 #define RT5665_TEST_MODE_CTRL_4                   234 #define RT5665_TEST_MODE_CTRL_4                 0x0148
232 #define RT5665_BASSBACK_CTRL                      235 #define RT5665_BASSBACK_CTRL                    0x0150
233 #define RT5665_STO_NG2_CTRL_1                     236 #define RT5665_STO_NG2_CTRL_1                   0x0160
234 #define RT5665_STO_NG2_CTRL_2                     237 #define RT5665_STO_NG2_CTRL_2                   0x0161
235 #define RT5665_STO_NG2_CTRL_3                     238 #define RT5665_STO_NG2_CTRL_3                   0x0162
236 #define RT5665_STO_NG2_CTRL_4                     239 #define RT5665_STO_NG2_CTRL_4                   0x0163
237 #define RT5665_STO_NG2_CTRL_5                     240 #define RT5665_STO_NG2_CTRL_5                   0x0164
238 #define RT5665_STO_NG2_CTRL_6                     241 #define RT5665_STO_NG2_CTRL_6                   0x0165
239 #define RT5665_STO_NG2_CTRL_7                     242 #define RT5665_STO_NG2_CTRL_7                   0x0166
240 #define RT5665_STO_NG2_CTRL_8                     243 #define RT5665_STO_NG2_CTRL_8                   0x0167
241 #define RT5665_MONO_NG2_CTRL_1                    244 #define RT5665_MONO_NG2_CTRL_1                  0x0170
242 #define RT5665_MONO_NG2_CTRL_2                    245 #define RT5665_MONO_NG2_CTRL_2                  0x0171
243 #define RT5665_MONO_NG2_CTRL_3                    246 #define RT5665_MONO_NG2_CTRL_3                  0x0172
244 #define RT5665_MONO_NG2_CTRL_4                    247 #define RT5665_MONO_NG2_CTRL_4                  0x0173
245 #define RT5665_MONO_NG2_CTRL_5                    248 #define RT5665_MONO_NG2_CTRL_5                  0x0174
246 #define RT5665_MONO_NG2_CTRL_6                    249 #define RT5665_MONO_NG2_CTRL_6                  0x0175
247 #define RT5665_STO1_DAC_SIL_DET                   250 #define RT5665_STO1_DAC_SIL_DET                 0x0190
248 #define RT5665_MONOL_DAC_SIL_DET                  251 #define RT5665_MONOL_DAC_SIL_DET                0x0191
249 #define RT5665_MONOR_DAC_SIL_DET                  252 #define RT5665_MONOR_DAC_SIL_DET                0x0192
250 #define RT5665_STO2_DAC_SIL_DET                   253 #define RT5665_STO2_DAC_SIL_DET                 0x0193
251 #define RT5665_SIL_PSV_CTRL1                      254 #define RT5665_SIL_PSV_CTRL1                    0x0194
252 #define RT5665_SIL_PSV_CTRL2                      255 #define RT5665_SIL_PSV_CTRL2                    0x0195
253 #define RT5665_SIL_PSV_CTRL3                      256 #define RT5665_SIL_PSV_CTRL3                    0x0196
254 #define RT5665_SIL_PSV_CTRL4                      257 #define RT5665_SIL_PSV_CTRL4                    0x0197
255 #define RT5665_SIL_PSV_CTRL5                      258 #define RT5665_SIL_PSV_CTRL5                    0x0198
256 #define RT5665_SIL_PSV_CTRL6                      259 #define RT5665_SIL_PSV_CTRL6                    0x0199
257 #define RT5665_MONO_AMP_CALIB_CTRL_1              260 #define RT5665_MONO_AMP_CALIB_CTRL_1            0x01a0
258 #define RT5665_MONO_AMP_CALIB_CTRL_2              261 #define RT5665_MONO_AMP_CALIB_CTRL_2            0x01a1
259 #define RT5665_MONO_AMP_CALIB_CTRL_3              262 #define RT5665_MONO_AMP_CALIB_CTRL_3            0x01a2
260 #define RT5665_MONO_AMP_CALIB_CTRL_4              263 #define RT5665_MONO_AMP_CALIB_CTRL_4            0x01a3
261 #define RT5665_MONO_AMP_CALIB_CTRL_5              264 #define RT5665_MONO_AMP_CALIB_CTRL_5            0x01a4
262 #define RT5665_MONO_AMP_CALIB_CTRL_6              265 #define RT5665_MONO_AMP_CALIB_CTRL_6            0x01a5
263 #define RT5665_MONO_AMP_CALIB_CTRL_7              266 #define RT5665_MONO_AMP_CALIB_CTRL_7            0x01a6
264 #define RT5665_MONO_AMP_CALIB_STA1                267 #define RT5665_MONO_AMP_CALIB_STA1              0x01a7
265 #define RT5665_MONO_AMP_CALIB_STA2                268 #define RT5665_MONO_AMP_CALIB_STA2              0x01a8
266 #define RT5665_MONO_AMP_CALIB_STA3                269 #define RT5665_MONO_AMP_CALIB_STA3              0x01a9
267 #define RT5665_MONO_AMP_CALIB_STA4                270 #define RT5665_MONO_AMP_CALIB_STA4              0x01aa
268 #define RT5665_MONO_AMP_CALIB_STA6                271 #define RT5665_MONO_AMP_CALIB_STA6              0x01ab
269 #define RT5665_HP_IMP_SENS_CTRL_01                272 #define RT5665_HP_IMP_SENS_CTRL_01              0x01b5
270 #define RT5665_HP_IMP_SENS_CTRL_02                273 #define RT5665_HP_IMP_SENS_CTRL_02              0x01b6
271 #define RT5665_HP_IMP_SENS_CTRL_03                274 #define RT5665_HP_IMP_SENS_CTRL_03              0x01b7
272 #define RT5665_HP_IMP_SENS_CTRL_04                275 #define RT5665_HP_IMP_SENS_CTRL_04              0x01b8
273 #define RT5665_HP_IMP_SENS_CTRL_05                276 #define RT5665_HP_IMP_SENS_CTRL_05              0x01b9
274 #define RT5665_HP_IMP_SENS_CTRL_06                277 #define RT5665_HP_IMP_SENS_CTRL_06              0x01ba
275 #define RT5665_HP_IMP_SENS_CTRL_07                278 #define RT5665_HP_IMP_SENS_CTRL_07              0x01bb
276 #define RT5665_HP_IMP_SENS_CTRL_08                279 #define RT5665_HP_IMP_SENS_CTRL_08              0x01bc
277 #define RT5665_HP_IMP_SENS_CTRL_09                280 #define RT5665_HP_IMP_SENS_CTRL_09              0x01bd
278 #define RT5665_HP_IMP_SENS_CTRL_10                281 #define RT5665_HP_IMP_SENS_CTRL_10              0x01be
279 #define RT5665_HP_IMP_SENS_CTRL_11                282 #define RT5665_HP_IMP_SENS_CTRL_11              0x01bf
280 #define RT5665_HP_IMP_SENS_CTRL_12                283 #define RT5665_HP_IMP_SENS_CTRL_12              0x01c0
281 #define RT5665_HP_IMP_SENS_CTRL_13                284 #define RT5665_HP_IMP_SENS_CTRL_13              0x01c1
282 #define RT5665_HP_IMP_SENS_CTRL_14                285 #define RT5665_HP_IMP_SENS_CTRL_14              0x01c2
283 #define RT5665_HP_IMP_SENS_CTRL_15                286 #define RT5665_HP_IMP_SENS_CTRL_15              0x01c3
284 #define RT5665_HP_IMP_SENS_CTRL_16                287 #define RT5665_HP_IMP_SENS_CTRL_16              0x01c4
285 #define RT5665_HP_IMP_SENS_CTRL_17                288 #define RT5665_HP_IMP_SENS_CTRL_17              0x01c5
286 #define RT5665_HP_IMP_SENS_CTRL_18                289 #define RT5665_HP_IMP_SENS_CTRL_18              0x01c6
287 #define RT5665_HP_IMP_SENS_CTRL_19                290 #define RT5665_HP_IMP_SENS_CTRL_19              0x01c7
288 #define RT5665_HP_IMP_SENS_CTRL_20                291 #define RT5665_HP_IMP_SENS_CTRL_20              0x01c8
289 #define RT5665_HP_IMP_SENS_CTRL_21                292 #define RT5665_HP_IMP_SENS_CTRL_21              0x01c9
290 #define RT5665_HP_IMP_SENS_CTRL_22                293 #define RT5665_HP_IMP_SENS_CTRL_22              0x01ca
291 #define RT5665_HP_IMP_SENS_CTRL_23                294 #define RT5665_HP_IMP_SENS_CTRL_23              0x01cb
292 #define RT5665_HP_IMP_SENS_CTRL_24                295 #define RT5665_HP_IMP_SENS_CTRL_24              0x01cc
293 #define RT5665_HP_IMP_SENS_CTRL_25                296 #define RT5665_HP_IMP_SENS_CTRL_25              0x01cd
294 #define RT5665_HP_IMP_SENS_CTRL_26                297 #define RT5665_HP_IMP_SENS_CTRL_26              0x01ce
295 #define RT5665_HP_IMP_SENS_CTRL_27                298 #define RT5665_HP_IMP_SENS_CTRL_27              0x01cf
296 #define RT5665_HP_IMP_SENS_CTRL_28                299 #define RT5665_HP_IMP_SENS_CTRL_28              0x01d0
297 #define RT5665_HP_IMP_SENS_CTRL_29                300 #define RT5665_HP_IMP_SENS_CTRL_29              0x01d1
298 #define RT5665_HP_IMP_SENS_CTRL_30                301 #define RT5665_HP_IMP_SENS_CTRL_30              0x01d2
299 #define RT5665_HP_IMP_SENS_CTRL_31                302 #define RT5665_HP_IMP_SENS_CTRL_31              0x01d3
300 #define RT5665_HP_IMP_SENS_CTRL_32                303 #define RT5665_HP_IMP_SENS_CTRL_32              0x01d4
301 #define RT5665_HP_IMP_SENS_CTRL_33                304 #define RT5665_HP_IMP_SENS_CTRL_33              0x01d5
302 #define RT5665_HP_IMP_SENS_CTRL_34                305 #define RT5665_HP_IMP_SENS_CTRL_34              0x01d6
303 #define RT5665_HP_LOGIC_CTRL_1                    306 #define RT5665_HP_LOGIC_CTRL_1                  0x01da
304 #define RT5665_HP_LOGIC_CTRL_2                    307 #define RT5665_HP_LOGIC_CTRL_2                  0x01db
305 #define RT5665_HP_LOGIC_CTRL_3                    308 #define RT5665_HP_LOGIC_CTRL_3                  0x01dc
306 #define RT5665_HP_CALIB_CTRL_1                    309 #define RT5665_HP_CALIB_CTRL_1                  0x01de
307 #define RT5665_HP_CALIB_CTRL_2                    310 #define RT5665_HP_CALIB_CTRL_2                  0x01df
308 #define RT5665_HP_CALIB_CTRL_3                    311 #define RT5665_HP_CALIB_CTRL_3                  0x01e0
309 #define RT5665_HP_CALIB_CTRL_4                    312 #define RT5665_HP_CALIB_CTRL_4                  0x01e1
310 #define RT5665_HP_CALIB_CTRL_5                    313 #define RT5665_HP_CALIB_CTRL_5                  0x01e2
311 #define RT5665_HP_CALIB_CTRL_6                    314 #define RT5665_HP_CALIB_CTRL_6                  0x01e3
312 #define RT5665_HP_CALIB_CTRL_7                    315 #define RT5665_HP_CALIB_CTRL_7                  0x01e4
313 #define RT5665_HP_CALIB_CTRL_9                    316 #define RT5665_HP_CALIB_CTRL_9                  0x01e6
314 #define RT5665_HP_CALIB_CTRL_10                   317 #define RT5665_HP_CALIB_CTRL_10                 0x01e7
315 #define RT5665_HP_CALIB_CTRL_11                   318 #define RT5665_HP_CALIB_CTRL_11                 0x01e8
316 #define RT5665_HP_CALIB_STA_1                     319 #define RT5665_HP_CALIB_STA_1                   0x01ea
317 #define RT5665_HP_CALIB_STA_2                     320 #define RT5665_HP_CALIB_STA_2                   0x01eb
318 #define RT5665_HP_CALIB_STA_3                     321 #define RT5665_HP_CALIB_STA_3                   0x01ec
319 #define RT5665_HP_CALIB_STA_4                     322 #define RT5665_HP_CALIB_STA_4                   0x01ed
320 #define RT5665_HP_CALIB_STA_5                     323 #define RT5665_HP_CALIB_STA_5                   0x01ee
321 #define RT5665_HP_CALIB_STA_6                     324 #define RT5665_HP_CALIB_STA_6                   0x01ef
322 #define RT5665_HP_CALIB_STA_7                     325 #define RT5665_HP_CALIB_STA_7                   0x01f0
323 #define RT5665_HP_CALIB_STA_8                     326 #define RT5665_HP_CALIB_STA_8                   0x01f1
324 #define RT5665_HP_CALIB_STA_9                     327 #define RT5665_HP_CALIB_STA_9                   0x01f2
325 #define RT5665_HP_CALIB_STA_10                    328 #define RT5665_HP_CALIB_STA_10                  0x01f3
326 #define RT5665_HP_CALIB_STA_11                    329 #define RT5665_HP_CALIB_STA_11                  0x01f4
327 #define RT5665_PGM_TAB_CTRL1                      330 #define RT5665_PGM_TAB_CTRL1                    0x0200
328 #define RT5665_PGM_TAB_CTRL2                      331 #define RT5665_PGM_TAB_CTRL2                    0x0201
329 #define RT5665_PGM_TAB_CTRL3                      332 #define RT5665_PGM_TAB_CTRL3                    0x0202
330 #define RT5665_PGM_TAB_CTRL4                      333 #define RT5665_PGM_TAB_CTRL4                    0x0203
331 #define RT5665_PGM_TAB_CTRL5                      334 #define RT5665_PGM_TAB_CTRL5                    0x0204
332 #define RT5665_PGM_TAB_CTRL6                      335 #define RT5665_PGM_TAB_CTRL6                    0x0205
333 #define RT5665_PGM_TAB_CTRL7                      336 #define RT5665_PGM_TAB_CTRL7                    0x0206
334 #define RT5665_PGM_TAB_CTRL8                      337 #define RT5665_PGM_TAB_CTRL8                    0x0207
335 #define RT5665_PGM_TAB_CTRL9                      338 #define RT5665_PGM_TAB_CTRL9                    0x0208
336 #define RT5665_SAR_IL_CMD_1                       339 #define RT5665_SAR_IL_CMD_1                     0x0210
337 #define RT5665_SAR_IL_CMD_2                       340 #define RT5665_SAR_IL_CMD_2                     0x0211
338 #define RT5665_SAR_IL_CMD_3                       341 #define RT5665_SAR_IL_CMD_3                     0x0212
339 #define RT5665_SAR_IL_CMD_4                       342 #define RT5665_SAR_IL_CMD_4                     0x0213
340 #define RT5665_SAR_IL_CMD_5                       343 #define RT5665_SAR_IL_CMD_5                     0x0214
341 #define RT5665_SAR_IL_CMD_6                       344 #define RT5665_SAR_IL_CMD_6                     0x0215
342 #define RT5665_SAR_IL_CMD_7                       345 #define RT5665_SAR_IL_CMD_7                     0x0216
343 #define RT5665_SAR_IL_CMD_8                       346 #define RT5665_SAR_IL_CMD_8                     0x0217
344 #define RT5665_SAR_IL_CMD_9                       347 #define RT5665_SAR_IL_CMD_9                     0x0218
345 #define RT5665_SAR_IL_CMD_10                      348 #define RT5665_SAR_IL_CMD_10                    0x0219
346 #define RT5665_SAR_IL_CMD_11                      349 #define RT5665_SAR_IL_CMD_11                    0x021a
347 #define RT5665_SAR_IL_CMD_12                      350 #define RT5665_SAR_IL_CMD_12                    0x021b
348 #define RT5665_DRC1_CTRL_0                        351 #define RT5665_DRC1_CTRL_0                      0x02ff
349 #define RT5665_DRC1_CTRL_1                        352 #define RT5665_DRC1_CTRL_1                      0x0300
350 #define RT5665_DRC1_CTRL_2                        353 #define RT5665_DRC1_CTRL_2                      0x0301
351 #define RT5665_DRC1_CTRL_3                        354 #define RT5665_DRC1_CTRL_3                      0x0302
352 #define RT5665_DRC1_CTRL_4                        355 #define RT5665_DRC1_CTRL_4                      0x0303
353 #define RT5665_DRC1_CTRL_5                        356 #define RT5665_DRC1_CTRL_5                      0x0304
354 #define RT5665_DRC1_CTRL_6                        357 #define RT5665_DRC1_CTRL_6                      0x0305
355 #define RT5665_DRC1_HARD_LMT_CTRL_1               358 #define RT5665_DRC1_HARD_LMT_CTRL_1             0x0306
356 #define RT5665_DRC1_HARD_LMT_CTRL_2               359 #define RT5665_DRC1_HARD_LMT_CTRL_2             0x0307
357 #define RT5665_DRC1_PRIV_1                        360 #define RT5665_DRC1_PRIV_1                      0x0310
358 #define RT5665_DRC1_PRIV_2                        361 #define RT5665_DRC1_PRIV_2                      0x0311
359 #define RT5665_DRC1_PRIV_3                        362 #define RT5665_DRC1_PRIV_3                      0x0312
360 #define RT5665_DRC1_PRIV_4                        363 #define RT5665_DRC1_PRIV_4                      0x0313
361 #define RT5665_DRC1_PRIV_5                        364 #define RT5665_DRC1_PRIV_5                      0x0314
362 #define RT5665_DRC1_PRIV_6                        365 #define RT5665_DRC1_PRIV_6                      0x0315
363 #define RT5665_DRC1_PRIV_7                        366 #define RT5665_DRC1_PRIV_7                      0x0316
364 #define RT5665_DRC1_PRIV_8                        367 #define RT5665_DRC1_PRIV_8                      0x0317
365 #define RT5665_ALC_PGA_CTRL_1                     368 #define RT5665_ALC_PGA_CTRL_1                   0x0330
366 #define RT5665_ALC_PGA_CTRL_2                     369 #define RT5665_ALC_PGA_CTRL_2                   0x0331
367 #define RT5665_ALC_PGA_CTRL_3                     370 #define RT5665_ALC_PGA_CTRL_3                   0x0332
368 #define RT5665_ALC_PGA_CTRL_4                     371 #define RT5665_ALC_PGA_CTRL_4                   0x0333
369 #define RT5665_ALC_PGA_CTRL_5                     372 #define RT5665_ALC_PGA_CTRL_5                   0x0334
370 #define RT5665_ALC_PGA_CTRL_6                     373 #define RT5665_ALC_PGA_CTRL_6                   0x0335
371 #define RT5665_ALC_PGA_CTRL_7                     374 #define RT5665_ALC_PGA_CTRL_7                   0x0336
372 #define RT5665_ALC_PGA_CTRL_8                     375 #define RT5665_ALC_PGA_CTRL_8                   0x0337
373 #define RT5665_ALC_PGA_STA_1                      376 #define RT5665_ALC_PGA_STA_1                    0x0338
374 #define RT5665_ALC_PGA_STA_2                      377 #define RT5665_ALC_PGA_STA_2                    0x0339
375 #define RT5665_ALC_PGA_STA_3                      378 #define RT5665_ALC_PGA_STA_3                    0x033a
376 #define RT5665_EQ_AUTO_RCV_CTRL1                  379 #define RT5665_EQ_AUTO_RCV_CTRL1                0x03c0
377 #define RT5665_EQ_AUTO_RCV_CTRL2                  380 #define RT5665_EQ_AUTO_RCV_CTRL2                0x03c1
378 #define RT5665_EQ_AUTO_RCV_CTRL3                  381 #define RT5665_EQ_AUTO_RCV_CTRL3                0x03c2
379 #define RT5665_EQ_AUTO_RCV_CTRL4                  382 #define RT5665_EQ_AUTO_RCV_CTRL4                0x03c3
380 #define RT5665_EQ_AUTO_RCV_CTRL5                  383 #define RT5665_EQ_AUTO_RCV_CTRL5                0x03c4
381 #define RT5665_EQ_AUTO_RCV_CTRL6                  384 #define RT5665_EQ_AUTO_RCV_CTRL6                0x03c5
382 #define RT5665_EQ_AUTO_RCV_CTRL7                  385 #define RT5665_EQ_AUTO_RCV_CTRL7                0x03c6
383 #define RT5665_EQ_AUTO_RCV_CTRL8                  386 #define RT5665_EQ_AUTO_RCV_CTRL8                0x03c7
384 #define RT5665_EQ_AUTO_RCV_CTRL9                  387 #define RT5665_EQ_AUTO_RCV_CTRL9                0x03c8
385 #define RT5665_EQ_AUTO_RCV_CTRL10                 388 #define RT5665_EQ_AUTO_RCV_CTRL10               0x03c9
386 #define RT5665_EQ_AUTO_RCV_CTRL11                 389 #define RT5665_EQ_AUTO_RCV_CTRL11               0x03ca
387 #define RT5665_EQ_AUTO_RCV_CTRL12                 390 #define RT5665_EQ_AUTO_RCV_CTRL12               0x03cb
388 #define RT5665_EQ_AUTO_RCV_CTRL13                 391 #define RT5665_EQ_AUTO_RCV_CTRL13               0x03cc
389 #define RT5665_ADC_L_EQ_LPF1_A1                   392 #define RT5665_ADC_L_EQ_LPF1_A1                 0x03d0
390 #define RT5665_R_EQ_LPF1_A1                       393 #define RT5665_R_EQ_LPF1_A1                     0x03d1
391 #define RT5665_L_EQ_LPF1_H0                       394 #define RT5665_L_EQ_LPF1_H0                     0x03d2
392 #define RT5665_R_EQ_LPF1_H0                       395 #define RT5665_R_EQ_LPF1_H0                     0x03d3
393 #define RT5665_L_EQ_BPF1_A1                       396 #define RT5665_L_EQ_BPF1_A1                     0x03d4
394 #define RT5665_R_EQ_BPF1_A1                       397 #define RT5665_R_EQ_BPF1_A1                     0x03d5
395 #define RT5665_L_EQ_BPF1_A2                       398 #define RT5665_L_EQ_BPF1_A2                     0x03d6
396 #define RT5665_R_EQ_BPF1_A2                       399 #define RT5665_R_EQ_BPF1_A2                     0x03d7
397 #define RT5665_L_EQ_BPF1_H0                       400 #define RT5665_L_EQ_BPF1_H0                     0x03d8
398 #define RT5665_R_EQ_BPF1_H0                       401 #define RT5665_R_EQ_BPF1_H0                     0x03d9
399 #define RT5665_L_EQ_BPF2_A1                       402 #define RT5665_L_EQ_BPF2_A1                     0x03da
400 #define RT5665_R_EQ_BPF2_A1                       403 #define RT5665_R_EQ_BPF2_A1                     0x03db
401 #define RT5665_L_EQ_BPF2_A2                       404 #define RT5665_L_EQ_BPF2_A2                     0x03dc
402 #define RT5665_R_EQ_BPF2_A2                       405 #define RT5665_R_EQ_BPF2_A2                     0x03dd
403 #define RT5665_L_EQ_BPF2_H0                       406 #define RT5665_L_EQ_BPF2_H0                     0x03de
404 #define RT5665_R_EQ_BPF2_H0                       407 #define RT5665_R_EQ_BPF2_H0                     0x03df
405 #define RT5665_L_EQ_BPF3_A1                       408 #define RT5665_L_EQ_BPF3_A1                     0x03e0
406 #define RT5665_R_EQ_BPF3_A1                       409 #define RT5665_R_EQ_BPF3_A1                     0x03e1
407 #define RT5665_L_EQ_BPF3_A2                       410 #define RT5665_L_EQ_BPF3_A2                     0x03e2
408 #define RT5665_R_EQ_BPF3_A2                       411 #define RT5665_R_EQ_BPF3_A2                     0x03e3
409 #define RT5665_L_EQ_BPF3_H0                       412 #define RT5665_L_EQ_BPF3_H0                     0x03e4
410 #define RT5665_R_EQ_BPF3_H0                       413 #define RT5665_R_EQ_BPF3_H0                     0x03e5
411 #define RT5665_L_EQ_BPF4_A1                       414 #define RT5665_L_EQ_BPF4_A1                     0x03e6
412 #define RT5665_R_EQ_BPF4_A1                       415 #define RT5665_R_EQ_BPF4_A1                     0x03e7
413 #define RT5665_L_EQ_BPF4_A2                       416 #define RT5665_L_EQ_BPF4_A2                     0x03e8
414 #define RT5665_R_EQ_BPF4_A2                       417 #define RT5665_R_EQ_BPF4_A2                     0x03e9
415 #define RT5665_L_EQ_BPF4_H0                       418 #define RT5665_L_EQ_BPF4_H0                     0x03ea
416 #define RT5665_R_EQ_BPF4_H0                       419 #define RT5665_R_EQ_BPF4_H0                     0x03eb
417 #define RT5665_L_EQ_HPF1_A1                       420 #define RT5665_L_EQ_HPF1_A1                     0x03ec
418 #define RT5665_R_EQ_HPF1_A1                       421 #define RT5665_R_EQ_HPF1_A1                     0x03ed
419 #define RT5665_L_EQ_HPF1_H0                       422 #define RT5665_L_EQ_HPF1_H0                     0x03ee
420 #define RT5665_R_EQ_HPF1_H0                       423 #define RT5665_R_EQ_HPF1_H0                     0x03ef
421 #define RT5665_L_EQ_PRE_VOL                       424 #define RT5665_L_EQ_PRE_VOL                     0x03f0
422 #define RT5665_R_EQ_PRE_VOL                       425 #define RT5665_R_EQ_PRE_VOL                     0x03f1
423 #define RT5665_L_EQ_POST_VOL                      426 #define RT5665_L_EQ_POST_VOL                    0x03f2
424 #define RT5665_R_EQ_POST_VOL                      427 #define RT5665_R_EQ_POST_VOL                    0x03f3
425 #define RT5665_SCAN_MODE_CTRL                     428 #define RT5665_SCAN_MODE_CTRL                   0x07f0
426 #define RT5665_I2C_MODE                           429 #define RT5665_I2C_MODE                         0x07fa
427                                                   430 
428                                                   431 
429                                                   432 
430 /* global definition */                           433 /* global definition */
431 #define RT5665_L_MUTE                             434 #define RT5665_L_MUTE                           (0x1 << 15)
432 #define RT5665_L_MUTE_SFT                         435 #define RT5665_L_MUTE_SFT                       15
433 #define RT5665_VOL_L_MUTE                         436 #define RT5665_VOL_L_MUTE                       (0x1 << 14)
434 #define RT5665_VOL_L_SFT                          437 #define RT5665_VOL_L_SFT                        14
435 #define RT5665_R_MUTE                             438 #define RT5665_R_MUTE                           (0x1 << 7)
436 #define RT5665_R_MUTE_SFT                         439 #define RT5665_R_MUTE_SFT                       7
437 #define RT5665_VOL_R_MUTE                         440 #define RT5665_VOL_R_MUTE                       (0x1 << 6)
438 #define RT5665_VOL_R_SFT                          441 #define RT5665_VOL_R_SFT                        6
439 #define RT5665_L_VOL_MASK                         442 #define RT5665_L_VOL_MASK                       (0x3f << 8)
440 #define RT5665_L_VOL_SFT                          443 #define RT5665_L_VOL_SFT                        8
441 #define RT5665_R_VOL_MASK                         444 #define RT5665_R_VOL_MASK                       (0x3f)
442 #define RT5665_R_VOL_SFT                          445 #define RT5665_R_VOL_SFT                        0
443                                                   446 
444 /*Headphone Amp L/R Analog Gain and Digital NG    447 /*Headphone Amp L/R Analog Gain and Digital NG2 Gain Control (0x0005 0x0006)*/
445 #define RT5665_G_HP                               448 #define RT5665_G_HP                             (0xf << 8)
446 #define RT5665_G_HP_SFT                           449 #define RT5665_G_HP_SFT                         8
447 #define RT5665_G_STO_DA_DMIX                      450 #define RT5665_G_STO_DA_DMIX                    (0xf)
448 #define RT5665_G_STO_DA_SFT                       451 #define RT5665_G_STO_DA_SFT                     0
449                                                   452 
450 /* CBJ Control (0x000b) */                        453 /* CBJ Control (0x000b) */
451 #define RT5665_BST_CBJ_MASK                       454 #define RT5665_BST_CBJ_MASK                     (0xf << 8)
452 #define RT5665_BST_CBJ_SFT                        455 #define RT5665_BST_CBJ_SFT                      8
453                                                   456 
454 /* IN1/IN2 Control (0x000c) */                    457 /* IN1/IN2 Control (0x000c) */
455 #define RT5665_IN1_DF_MASK                        458 #define RT5665_IN1_DF_MASK                      (0x1 << 15)
456 #define RT5665_IN1_DF                             459 #define RT5665_IN1_DF                           15
457 #define RT5665_BST1_MASK                          460 #define RT5665_BST1_MASK                        (0x7f << 8)
458 #define RT5665_BST1_SFT                           461 #define RT5665_BST1_SFT                         8
459 #define RT5665_IN2_DF_MASK                        462 #define RT5665_IN2_DF_MASK                      (0x1 << 7)
460 #define RT5665_IN2_DF                             463 #define RT5665_IN2_DF                           7
461 #define RT5665_BST2_MASK                          464 #define RT5665_BST2_MASK                        (0x7f)
462 #define RT5665_BST2_SFT                           465 #define RT5665_BST2_SFT                         0
463                                                   466 
464 /* IN3/IN4 Control (0x000d) */                    467 /* IN3/IN4 Control (0x000d) */
465 #define RT5665_IN3_DF_MASK                        468 #define RT5665_IN3_DF_MASK                      (0x1 << 15)
466 #define RT5665_IN3_DF                             469 #define RT5665_IN3_DF                           15
467 #define RT5665_BST3_MASK                          470 #define RT5665_BST3_MASK                        (0x7f << 8)
468 #define RT5665_BST3_SFT                           471 #define RT5665_BST3_SFT                         8
469 #define RT5665_IN4_DF_MASK                        472 #define RT5665_IN4_DF_MASK                      (0x1 << 7)
470 #define RT5665_IN4_DF                             473 #define RT5665_IN4_DF                           7
471 #define RT5665_BST4_MASK                          474 #define RT5665_BST4_MASK                        (0x7f)
472 #define RT5665_BST4_SFT                           475 #define RT5665_BST4_SFT                         0
473                                                   476 
474 /* INL and INR Volume Control (0x000f) */         477 /* INL and INR Volume Control (0x000f) */
475 #define RT5665_INL_VOL_MASK                       478 #define RT5665_INL_VOL_MASK                     (0x1f << 8)
476 #define RT5665_INL_VOL_SFT                        479 #define RT5665_INL_VOL_SFT                      8
477 #define RT5665_INR_VOL_MASK                       480 #define RT5665_INR_VOL_MASK                     (0x1f)
478 #define RT5665_INR_VOL_SFT                        481 #define RT5665_INR_VOL_SFT                      0
479                                                   482 
480 /* Embeeded Jack and Type Detection Control 1     483 /* Embeeded Jack and Type Detection Control 1 (0x0010) */
481 #define RT5665_EMB_JD_EN                          484 #define RT5665_EMB_JD_EN                        (0x1 << 15)
482 #define RT5665_EMB_JD_EN_SFT                      485 #define RT5665_EMB_JD_EN_SFT                    15
483 #define RT5665_JD_MODE                            486 #define RT5665_JD_MODE                          (0x1 << 13)
484 #define RT5665_JD_MODE_SFT                        487 #define RT5665_JD_MODE_SFT                      13
485 #define RT5665_POLA_EXT_JD_MASK                   488 #define RT5665_POLA_EXT_JD_MASK                 (0x1 << 11)
486 #define RT5665_POLA_EXT_JD_LOW                    489 #define RT5665_POLA_EXT_JD_LOW                  (0x1 << 11)
487 #define RT5665_POLA_EXT_JD_HIGH                   490 #define RT5665_POLA_EXT_JD_HIGH                 (0x0 << 11)
488 #define RT5665_EXT_JD_DIG                         491 #define RT5665_EXT_JD_DIG                       (0x1 << 9)
489 #define RT5665_POL_FAST_OFF_MASK                  492 #define RT5665_POL_FAST_OFF_MASK                (0x1 << 8)
490 #define RT5665_POL_FAST_OFF_HIGH                  493 #define RT5665_POL_FAST_OFF_HIGH                (0x1 << 8)
491 #define RT5665_POL_FAST_OFF_LOW                   494 #define RT5665_POL_FAST_OFF_LOW                 (0x0 << 8)
492 #define RT5665_VREF_POW_MASK                      495 #define RT5665_VREF_POW_MASK                    (0x1 << 6)
493 #define RT5665_VREF_POW_FSM                       496 #define RT5665_VREF_POW_FSM                     (0x0 << 6)
494 #define RT5665_VREF_POW_REG                       497 #define RT5665_VREF_POW_REG                     (0x1 << 6)
495 #define RT5665_MB1_PATH_MASK                      498 #define RT5665_MB1_PATH_MASK                    (0x1 << 5)
496 #define RT5665_CTRL_MB1_REG                       499 #define RT5665_CTRL_MB1_REG                     (0x1 << 5)
497 #define RT5665_CTRL_MB1_FSM                       500 #define RT5665_CTRL_MB1_FSM                     (0x0 << 5)
498 #define RT5665_MB2_PATH_MASK                      501 #define RT5665_MB2_PATH_MASK                    (0x1 << 4)
499 #define RT5665_CTRL_MB2_REG                       502 #define RT5665_CTRL_MB2_REG                     (0x1 << 4)
500 #define RT5665_CTRL_MB2_FSM                       503 #define RT5665_CTRL_MB2_FSM                     (0x0 << 4)
501 #define RT5665_TRIG_JD_MASK                       504 #define RT5665_TRIG_JD_MASK                     (0x1 << 3)
502 #define RT5665_TRIG_JD_HIGH                       505 #define RT5665_TRIG_JD_HIGH                     (0x1 << 3)
503 #define RT5665_TRIG_JD_LOW                        506 #define RT5665_TRIG_JD_LOW                      (0x0 << 3)
504                                                   507 
505 /* Embeeded Jack and Type Detection Control 2     508 /* Embeeded Jack and Type Detection Control 2 (0x0011) */
506 #define RT5665_EXT_JD_SRC                         509 #define RT5665_EXT_JD_SRC                       (0x7 << 4)
507 #define RT5665_EXT_JD_SRC_SFT                     510 #define RT5665_EXT_JD_SRC_SFT                   4
508 #define RT5665_EXT_JD_SRC_GPIO_JD1                511 #define RT5665_EXT_JD_SRC_GPIO_JD1              (0x0 << 4)
509 #define RT5665_EXT_JD_SRC_GPIO_JD2                512 #define RT5665_EXT_JD_SRC_GPIO_JD2              (0x1 << 4)
510 #define RT5665_EXT_JD_SRC_JD1_1                   513 #define RT5665_EXT_JD_SRC_JD1_1                 (0x2 << 4)
511 #define RT5665_EXT_JD_SRC_JD1_2                   514 #define RT5665_EXT_JD_SRC_JD1_2                 (0x3 << 4)
512 #define RT5665_EXT_JD_SRC_JD2                     515 #define RT5665_EXT_JD_SRC_JD2                   (0x4 << 4)
513 #define RT5665_EXT_JD_SRC_JD3                     516 #define RT5665_EXT_JD_SRC_JD3                   (0x5 << 4)
514 #define RT5665_EXT_JD_SRC_MANUAL                  517 #define RT5665_EXT_JD_SRC_MANUAL                (0x6 << 4)
515                                                   518 
516 /* Combo Jack and Type Detection Control 4 (0x    519 /* Combo Jack and Type Detection Control 4 (0x0013) */
517 #define RT5665_SEL_SHT_MID_TON_MASK               520 #define RT5665_SEL_SHT_MID_TON_MASK             (0x3 << 12)
518 #define RT5665_SEL_SHT_MID_TON_2                  521 #define RT5665_SEL_SHT_MID_TON_2                (0x0 << 12)
519 #define RT5665_SEL_SHT_MID_TON_3                  522 #define RT5665_SEL_SHT_MID_TON_3                (0x1 << 12)
520 #define RT5665_CBJ_JD_TEST_MASK                   523 #define RT5665_CBJ_JD_TEST_MASK                 (0x1 << 6)
521 #define RT5665_CBJ_JD_TEST_NORM                   524 #define RT5665_CBJ_JD_TEST_NORM                 (0x0 << 6)
522 #define RT5665_CBJ_JD_TEST_MODE                   525 #define RT5665_CBJ_JD_TEST_MODE                 (0x1 << 6)
523                                                   526 
524 /* Slience Detection Control (0x0015) */          527 /* Slience Detection Control (0x0015) */
525 #define RT5665_SIL_DET_MASK                       528 #define RT5665_SIL_DET_MASK                     (0x1 << 15)
526 #define RT5665_SIL_DET_DIS                        529 #define RT5665_SIL_DET_DIS                      (0x0 << 15)
527 #define RT5665_SIL_DET_EN                         530 #define RT5665_SIL_DET_EN                       (0x1 << 15)
528                                                   531 
529 /* DAC2 Control (0x0017) */                       532 /* DAC2 Control (0x0017) */
530 #define RT5665_M_DAC2_L_VOL                       533 #define RT5665_M_DAC2_L_VOL                     (0x1 << 13)
531 #define RT5665_M_DAC2_L_VOL_SFT                   534 #define RT5665_M_DAC2_L_VOL_SFT                 13
532 #define RT5665_M_DAC2_R_VOL                       535 #define RT5665_M_DAC2_R_VOL                     (0x1 << 12)
533 #define RT5665_M_DAC2_R_VOL_SFT                   536 #define RT5665_M_DAC2_R_VOL_SFT                 12
534 #define RT5665_DAC_L2_SEL_MASK                    537 #define RT5665_DAC_L2_SEL_MASK                  (0x7 << 4)
535 #define RT5665_DAC_L2_SEL_SFT                     538 #define RT5665_DAC_L2_SEL_SFT                   4
536 #define RT5665_DAC_R2_SEL_MASK                    539 #define RT5665_DAC_R2_SEL_MASK                  (0x7 << 0)
537 #define RT5665_DAC_R2_SEL_SFT                     540 #define RT5665_DAC_R2_SEL_SFT                   0
538                                                   541 
539 /* Sidetone Control (0x0018) */                   542 /* Sidetone Control (0x0018) */
540 #define RT5665_ST_SEL_MASK                        543 #define RT5665_ST_SEL_MASK                      (0x7 << 9)
541 #define RT5665_ST_SEL_SFT                         544 #define RT5665_ST_SEL_SFT                       9
542 #define RT5665_ST_EN                              545 #define RT5665_ST_EN                            (0x1 << 6)
543 #define RT5665_ST_EN_SFT                          546 #define RT5665_ST_EN_SFT                        6
544                                                   547 
545 /* DAC1 Digital Volume (0x0019) */                548 /* DAC1 Digital Volume (0x0019) */
546 #define RT5665_DAC_L1_VOL_MASK                    549 #define RT5665_DAC_L1_VOL_MASK                  (0xff << 8)
547 #define RT5665_DAC_L1_VOL_SFT                     550 #define RT5665_DAC_L1_VOL_SFT                   8
548 #define RT5665_DAC_R1_VOL_MASK                    551 #define RT5665_DAC_R1_VOL_MASK                  (0xff)
549 #define RT5665_DAC_R1_VOL_SFT                     552 #define RT5665_DAC_R1_VOL_SFT                   0
550                                                   553 
551 /* DAC2 Digital Volume (0x001a) */                554 /* DAC2 Digital Volume (0x001a) */
552 #define RT5665_DAC_L2_VOL_MASK                    555 #define RT5665_DAC_L2_VOL_MASK                  (0xff << 8)
553 #define RT5665_DAC_L2_VOL_SFT                     556 #define RT5665_DAC_L2_VOL_SFT                   8
554 #define RT5665_DAC_R2_VOL_MASK                    557 #define RT5665_DAC_R2_VOL_MASK                  (0xff)
555 #define RT5665_DAC_R2_VOL_SFT                     558 #define RT5665_DAC_R2_VOL_SFT                   0
556                                                   559 
557 /* DAC3 Control (0x001b) */                       560 /* DAC3 Control (0x001b) */
558 #define RT5665_M_DAC3_L_VOL                       561 #define RT5665_M_DAC3_L_VOL                     (0x1 << 13)
559 #define RT5665_M_DAC3_L_VOL_SFT                   562 #define RT5665_M_DAC3_L_VOL_SFT                 13
560 #define RT5665_M_DAC3_R_VOL                       563 #define RT5665_M_DAC3_R_VOL                     (0x1 << 12)
561 #define RT5665_M_DAC3_R_VOL_SFT                   564 #define RT5665_M_DAC3_R_VOL_SFT                 12
562 #define RT5665_DAC_L3_SEL_MASK                    565 #define RT5665_DAC_L3_SEL_MASK                  (0x7 << 4)
563 #define RT5665_DAC_L3_SEL_SFT                     566 #define RT5665_DAC_L3_SEL_SFT                   4
564 #define RT5665_DAC_R3_SEL_MASK                    567 #define RT5665_DAC_R3_SEL_MASK                  (0x7 << 0)
565 #define RT5665_DAC_R3_SEL_SFT                     568 #define RT5665_DAC_R3_SEL_SFT                   0
566                                                   569 
567 /* ADC Digital Volume Control (0x001c) */         570 /* ADC Digital Volume Control (0x001c) */
568 #define RT5665_ADC_L_VOL_MASK                     571 #define RT5665_ADC_L_VOL_MASK                   (0x7f << 8)
569 #define RT5665_ADC_L_VOL_SFT                      572 #define RT5665_ADC_L_VOL_SFT                    8
570 #define RT5665_ADC_R_VOL_MASK                     573 #define RT5665_ADC_R_VOL_MASK                   (0x7f)
571 #define RT5665_ADC_R_VOL_SFT                      574 #define RT5665_ADC_R_VOL_SFT                    0
572                                                   575 
573 /* Mono ADC Digital Volume Control (0x001d) */    576 /* Mono ADC Digital Volume Control (0x001d) */
574 #define RT5665_MONO_ADC_L_VOL_MASK                577 #define RT5665_MONO_ADC_L_VOL_MASK              (0x7f << 8)
575 #define RT5665_MONO_ADC_L_VOL_SFT                 578 #define RT5665_MONO_ADC_L_VOL_SFT               8
576 #define RT5665_MONO_ADC_R_VOL_MASK                579 #define RT5665_MONO_ADC_R_VOL_MASK              (0x7f)
577 #define RT5665_MONO_ADC_R_VOL_SFT                 580 #define RT5665_MONO_ADC_R_VOL_SFT               0
578                                                   581 
579 /* Stereo1 ADC Boost Gain Control (0x001f) */     582 /* Stereo1 ADC Boost Gain Control (0x001f) */
580 #define RT5665_STO1_ADC_L_BST_MASK                583 #define RT5665_STO1_ADC_L_BST_MASK              (0x3 << 14)
581 #define RT5665_STO1_ADC_L_BST_SFT                 584 #define RT5665_STO1_ADC_L_BST_SFT               14
582 #define RT5665_STO1_ADC_R_BST_MASK                585 #define RT5665_STO1_ADC_R_BST_MASK              (0x3 << 12)
583 #define RT5665_STO1_ADC_R_BST_SFT                 586 #define RT5665_STO1_ADC_R_BST_SFT               12
584                                                   587 
585 /* Mono ADC Boost Gain Control (0x0020) */        588 /* Mono ADC Boost Gain Control (0x0020) */
586 #define RT5665_MONO_ADC_L_BST_MASK                589 #define RT5665_MONO_ADC_L_BST_MASK              (0x3 << 14)
587 #define RT5665_MONO_ADC_L_BST_SFT                 590 #define RT5665_MONO_ADC_L_BST_SFT               14
588 #define RT5665_MONO_ADC_R_BST_MASK                591 #define RT5665_MONO_ADC_R_BST_MASK              (0x3 << 12)
589 #define RT5665_MONO_ADC_R_BST_SFT                 592 #define RT5665_MONO_ADC_R_BST_SFT               12
590                                                   593 
591 /* Stereo1 ADC Boost Gain Control (0x001f) */     594 /* Stereo1 ADC Boost Gain Control (0x001f) */
592 #define RT5665_STO2_ADC_L_BST_MASK                595 #define RT5665_STO2_ADC_L_BST_MASK              (0x3 << 14)
593 #define RT5665_STO2_ADC_L_BST_SFT                 596 #define RT5665_STO2_ADC_L_BST_SFT               14
594 #define RT5665_STO2_ADC_R_BST_MASK                597 #define RT5665_STO2_ADC_R_BST_MASK              (0x3 << 12)
595 #define RT5665_STO2_ADC_R_BST_SFT                 598 #define RT5665_STO2_ADC_R_BST_SFT               12
596                                                   599 
597 /* Stereo1 ADC Mixer Control (0x0026) */          600 /* Stereo1 ADC Mixer Control (0x0026) */
598 #define RT5665_M_STO1_ADC_L1                      601 #define RT5665_M_STO1_ADC_L1                    (0x1 << 15)
599 #define RT5665_M_STO1_ADC_L1_SFT                  602 #define RT5665_M_STO1_ADC_L1_SFT                15
600 #define RT5665_M_STO1_ADC_L2                      603 #define RT5665_M_STO1_ADC_L2                    (0x1 << 14)
601 #define RT5665_M_STO1_ADC_L2_SFT                  604 #define RT5665_M_STO1_ADC_L2_SFT                14
602 #define RT5665_STO1_ADC1L_SRC_MASK                605 #define RT5665_STO1_ADC1L_SRC_MASK              (0x1 << 13)
603 #define RT5665_STO1_ADC1L_SRC_SFT                 606 #define RT5665_STO1_ADC1L_SRC_SFT               13
604 #define RT5665_STO1_ADC1_SRC_ADC                  607 #define RT5665_STO1_ADC1_SRC_ADC                (0x1 << 13)
605 #define RT5665_STO1_ADC1_SRC_DACMIX               608 #define RT5665_STO1_ADC1_SRC_DACMIX             (0x0 << 13)
606 #define RT5665_STO1_ADC2L_SRC_MASK                609 #define RT5665_STO1_ADC2L_SRC_MASK              (0x1 << 12)
607 #define RT5665_STO1_ADC2L_SRC_SFT                 610 #define RT5665_STO1_ADC2L_SRC_SFT               12
608 #define RT5665_STO1_ADCL_SRC_MASK                 611 #define RT5665_STO1_ADCL_SRC_MASK               (0x3 << 10)
609 #define RT5665_STO1_ADCL_SRC_SFT                  612 #define RT5665_STO1_ADCL_SRC_SFT                10
610 #define RT5665_STO1_DD_L_SRC_MASK                 613 #define RT5665_STO1_DD_L_SRC_MASK               (0x1 << 9)
611 #define RT5665_STO1_DD_L_SRC_SFT                  614 #define RT5665_STO1_DD_L_SRC_SFT                9
612 #define RT5665_STO1_DMIC_SRC_MASK                 615 #define RT5665_STO1_DMIC_SRC_MASK               (0x1 << 8)
613 #define RT5665_STO1_DMIC_SRC_SFT                  616 #define RT5665_STO1_DMIC_SRC_SFT                8
614 #define RT5665_STO1_DMIC_SRC_DMIC2                617 #define RT5665_STO1_DMIC_SRC_DMIC2              (0x1 << 8)
615 #define RT5665_STO1_DMIC_SRC_DMIC1                618 #define RT5665_STO1_DMIC_SRC_DMIC1              (0x0 << 8)
616 #define RT5665_M_STO1_ADC_R1                      619 #define RT5665_M_STO1_ADC_R1                    (0x1 << 7)
617 #define RT5665_M_STO1_ADC_R1_SFT                  620 #define RT5665_M_STO1_ADC_R1_SFT                7
618 #define RT5665_M_STO1_ADC_R2                      621 #define RT5665_M_STO1_ADC_R2                    (0x1 << 6)
619 #define RT5665_M_STO1_ADC_R2_SFT                  622 #define RT5665_M_STO1_ADC_R2_SFT                6
620 #define RT5665_STO1_ADC1R_SRC_MASK                623 #define RT5665_STO1_ADC1R_SRC_MASK              (0x1 << 5)
621 #define RT5665_STO1_ADC1R_SRC_SFT                 624 #define RT5665_STO1_ADC1R_SRC_SFT               5
622 #define RT5665_STO1_ADC2R_SRC_MASK                625 #define RT5665_STO1_ADC2R_SRC_MASK              (0x1 << 4)
623 #define RT5665_STO1_ADC2R_SRC_SFT                 626 #define RT5665_STO1_ADC2R_SRC_SFT               4
624 #define RT5665_STO1_ADCR_SRC_MASK                 627 #define RT5665_STO1_ADCR_SRC_MASK               (0x3 << 2)
625 #define RT5665_STO1_ADCR_SRC_SFT                  628 #define RT5665_STO1_ADCR_SRC_SFT                2
626 #define RT5665_STO1_DD_R_SRC_MASK                 629 #define RT5665_STO1_DD_R_SRC_MASK               (0x3)
627 #define RT5665_STO1_DD_R_SRC_SFT                  630 #define RT5665_STO1_DD_R_SRC_SFT                0
628                                                   631 
629                                                   632 
630 /* Mono1 ADC Mixer control (0x0027) */            633 /* Mono1 ADC Mixer control (0x0027) */
631 #define RT5665_M_MONO_ADC_L1                      634 #define RT5665_M_MONO_ADC_L1                    (0x1 << 15)
632 #define RT5665_M_MONO_ADC_L1_SFT                  635 #define RT5665_M_MONO_ADC_L1_SFT                15
633 #define RT5665_M_MONO_ADC_L2                      636 #define RT5665_M_MONO_ADC_L2                    (0x1 << 14)
634 #define RT5665_M_MONO_ADC_L2_SFT                  637 #define RT5665_M_MONO_ADC_L2_SFT                14
635 #define RT5665_MONO_ADC_L1_SRC_MASK               638 #define RT5665_MONO_ADC_L1_SRC_MASK             (0x1 << 13)
636 #define RT5665_MONO_ADC_L1_SRC_SFT                639 #define RT5665_MONO_ADC_L1_SRC_SFT              13
637 #define RT5665_MONO_ADC_L2_SRC_MASK               640 #define RT5665_MONO_ADC_L2_SRC_MASK             (0x1 << 12)
638 #define RT5665_MONO_ADC_L2_SRC_SFT                641 #define RT5665_MONO_ADC_L2_SRC_SFT              12
639 #define RT5665_MONO_ADC_L_SRC_MASK                642 #define RT5665_MONO_ADC_L_SRC_MASK              (0x3 << 10)
640 #define RT5665_MONO_ADC_L_SRC_SFT                 643 #define RT5665_MONO_ADC_L_SRC_SFT               10
641 #define RT5665_MONO_DD_L_SRC_MASK                 644 #define RT5665_MONO_DD_L_SRC_MASK               (0x1 << 9)
642 #define RT5665_MONO_DD_L_SRC_SFT                  645 #define RT5665_MONO_DD_L_SRC_SFT                9
643 #define RT5665_MONO_DMIC_L_SRC_MASK               646 #define RT5665_MONO_DMIC_L_SRC_MASK             (0x1 << 8)
644 #define RT5665_MONO_DMIC_L_SRC_SFT                647 #define RT5665_MONO_DMIC_L_SRC_SFT              8
645 #define RT5665_M_MONO_ADC_R1                      648 #define RT5665_M_MONO_ADC_R1                    (0x1 << 7)
646 #define RT5665_M_MONO_ADC_R1_SFT                  649 #define RT5665_M_MONO_ADC_R1_SFT                7
647 #define RT5665_M_MONO_ADC_R2                      650 #define RT5665_M_MONO_ADC_R2                    (0x1 << 6)
648 #define RT5665_M_MONO_ADC_R2_SFT                  651 #define RT5665_M_MONO_ADC_R2_SFT                6
649 #define RT5665_MONO_ADC_R1_SRC_MASK               652 #define RT5665_MONO_ADC_R1_SRC_MASK             (0x1 << 5)
650 #define RT5665_MONO_ADC_R1_SRC_SFT                653 #define RT5665_MONO_ADC_R1_SRC_SFT              5
651 #define RT5665_MONO_ADC_R2_SRC_MASK               654 #define RT5665_MONO_ADC_R2_SRC_MASK             (0x1 << 4)
652 #define RT5665_MONO_ADC_R2_SRC_SFT                655 #define RT5665_MONO_ADC_R2_SRC_SFT              4
653 #define RT5665_MONO_ADC_R_SRC_MASK                656 #define RT5665_MONO_ADC_R_SRC_MASK              (0x3 << 2)
654 #define RT5665_MONO_ADC_R_SRC_SFT                 657 #define RT5665_MONO_ADC_R_SRC_SFT               2
655 #define RT5665_MONO_DD_R_SRC_MASK                 658 #define RT5665_MONO_DD_R_SRC_MASK               (0x1 << 1)
656 #define RT5665_MONO_DD_R_SRC_SFT                  659 #define RT5665_MONO_DD_R_SRC_SFT                1
657 #define RT5665_MONO_DMIC_R_SRC_MASK               660 #define RT5665_MONO_DMIC_R_SRC_MASK             0x1
658 #define RT5665_MONO_DMIC_R_SRC_SFT                661 #define RT5665_MONO_DMIC_R_SRC_SFT              0
659                                                   662 
660 /* Stereo2 ADC Mixer Control (0x0028) */          663 /* Stereo2 ADC Mixer Control (0x0028) */
661 #define RT5665_M_STO2_ADC_L1                      664 #define RT5665_M_STO2_ADC_L1                    (0x1 << 15)
662 #define RT5665_M_STO2_ADC_L1_UN                   665 #define RT5665_M_STO2_ADC_L1_UN                 (0x0 << 15)
663 #define RT5665_M_STO2_ADC_L1_SFT                  666 #define RT5665_M_STO2_ADC_L1_SFT                15
664 #define RT5665_M_STO2_ADC_L2                      667 #define RT5665_M_STO2_ADC_L2                    (0x1 << 14)
665 #define RT5665_M_STO2_ADC_L2_SFT                  668 #define RT5665_M_STO2_ADC_L2_SFT                14
666 #define RT5665_STO2_ADC1L_SRC_MASK                669 #define RT5665_STO2_ADC1L_SRC_MASK              (0x1 << 13)
667 #define RT5665_STO2_ADC1L_SRC_SFT                 670 #define RT5665_STO2_ADC1L_SRC_SFT               13
668 #define RT5665_STO2_ADC1_SRC_ADC                  671 #define RT5665_STO2_ADC1_SRC_ADC                (0x1 << 13)
669 #define RT5665_STO2_ADC1_SRC_DACMIX               672 #define RT5665_STO2_ADC1_SRC_DACMIX             (0x0 << 13)
670 #define RT5665_STO2_ADC2L_SRC_MASK                673 #define RT5665_STO2_ADC2L_SRC_MASK              (0x1 << 12)
671 #define RT5665_STO2_ADC2L_SRC_SFT                 674 #define RT5665_STO2_ADC2L_SRC_SFT               12
672 #define RT5665_STO2_ADCL_SRC_MASK                 675 #define RT5665_STO2_ADCL_SRC_MASK               (0x3 << 10)
673 #define RT5665_STO2_ADCL_SRC_SFT                  676 #define RT5665_STO2_ADCL_SRC_SFT                10
674 #define RT5665_STO2_DD_L_SRC_MASK                 677 #define RT5665_STO2_DD_L_SRC_MASK               (0x1 << 9)
675 #define RT5665_STO2_DD_L_SRC_SFT                  678 #define RT5665_STO2_DD_L_SRC_SFT                9
676 #define RT5665_STO2_DMIC_SRC_MASK                 679 #define RT5665_STO2_DMIC_SRC_MASK               (0x1 << 8)
677 #define RT5665_STO2_DMIC_SRC_SFT                  680 #define RT5665_STO2_DMIC_SRC_SFT                8
678 #define RT5665_STO2_DMIC_SRC_DMIC2                681 #define RT5665_STO2_DMIC_SRC_DMIC2              (0x1 << 8)
679 #define RT5665_STO2_DMIC_SRC_DMIC1                682 #define RT5665_STO2_DMIC_SRC_DMIC1              (0x0 << 8)
680 #define RT5665_M_STO2_ADC_R1                      683 #define RT5665_M_STO2_ADC_R1                    (0x1 << 7)
681 #define RT5665_M_STO2_ADC_R1_UN                   684 #define RT5665_M_STO2_ADC_R1_UN                 (0x0 << 7)
682 #define RT5665_M_STO2_ADC_R1_SFT                  685 #define RT5665_M_STO2_ADC_R1_SFT                7
683 #define RT5665_M_STO2_ADC_R2                      686 #define RT5665_M_STO2_ADC_R2                    (0x1 << 6)
684 #define RT5665_M_STO2_ADC_R2_SFT                  687 #define RT5665_M_STO2_ADC_R2_SFT                6
685 #define RT5665_STO2_ADC1R_SRC_MASK                688 #define RT5665_STO2_ADC1R_SRC_MASK              (0x1 << 5)
686 #define RT5665_STO2_ADC1R_SRC_SFT                 689 #define RT5665_STO2_ADC1R_SRC_SFT               5
687 #define RT5665_STO2_ADC2R_SRC_MASK                690 #define RT5665_STO2_ADC2R_SRC_MASK              (0x1 << 4)
688 #define RT5665_STO2_ADC2R_SRC_SFT                 691 #define RT5665_STO2_ADC2R_SRC_SFT               4
689 #define RT5665_STO2_ADCR_SRC_MASK                 692 #define RT5665_STO2_ADCR_SRC_MASK               (0x3 << 2)
690 #define RT5665_STO2_ADCR_SRC_SFT                  693 #define RT5665_STO2_ADCR_SRC_SFT                2
691 #define RT5665_STO2_DD_R_SRC_MASK                 694 #define RT5665_STO2_DD_R_SRC_MASK               (0x1 << 1)
692 #define RT5665_STO2_DD_R_SRC_SFT                  695 #define RT5665_STO2_DD_R_SRC_SFT                1
693                                                   696 
694 /* ADC Mixer to DAC Mixer Control (0x0029) */     697 /* ADC Mixer to DAC Mixer Control (0x0029) */
695 #define RT5665_M_ADCMIX_L                         698 #define RT5665_M_ADCMIX_L                       (0x1 << 15)
696 #define RT5665_M_ADCMIX_L_SFT                     699 #define RT5665_M_ADCMIX_L_SFT                   15
697 #define RT5665_M_DAC1_L                           700 #define RT5665_M_DAC1_L                         (0x1 << 14)
698 #define RT5665_M_DAC1_L_SFT                       701 #define RT5665_M_DAC1_L_SFT                     14
699 #define RT5665_DAC1_R_SEL_MASK                    702 #define RT5665_DAC1_R_SEL_MASK                  (0x3 << 10)
700 #define RT5665_DAC1_R_SEL_SFT                     703 #define RT5665_DAC1_R_SEL_SFT                   10
701 #define RT5665_DAC1_L_SEL_MASK                    704 #define RT5665_DAC1_L_SEL_MASK                  (0x3 << 8)
702 #define RT5665_DAC1_L_SEL_SFT                     705 #define RT5665_DAC1_L_SEL_SFT                   8
703 #define RT5665_M_ADCMIX_R                         706 #define RT5665_M_ADCMIX_R                       (0x1 << 7)
704 #define RT5665_M_ADCMIX_R_SFT                     707 #define RT5665_M_ADCMIX_R_SFT                   7
705 #define RT5665_M_DAC1_R                           708 #define RT5665_M_DAC1_R                         (0x1 << 6)
706 #define RT5665_M_DAC1_R_SFT                       709 #define RT5665_M_DAC1_R_SFT                     6
707                                                   710 
708 /* Stereo1 DAC Mixer Control (0x002a) */          711 /* Stereo1 DAC Mixer Control (0x002a) */
709 #define RT5665_M_DAC_L1_STO_L                     712 #define RT5665_M_DAC_L1_STO_L                   (0x1 << 15)
710 #define RT5665_M_DAC_L1_STO_L_SFT                 713 #define RT5665_M_DAC_L1_STO_L_SFT               15
711 #define RT5665_G_DAC_L1_STO_L_MASK                714 #define RT5665_G_DAC_L1_STO_L_MASK              (0x1 << 14)
712 #define RT5665_G_DAC_L1_STO_L_SFT                 715 #define RT5665_G_DAC_L1_STO_L_SFT               14
713 #define RT5665_M_DAC_R1_STO_L                     716 #define RT5665_M_DAC_R1_STO_L                   (0x1 << 13)
714 #define RT5665_M_DAC_R1_STO_L_SFT                 717 #define RT5665_M_DAC_R1_STO_L_SFT               13
715 #define RT5665_G_DAC_R1_STO_L_MASK                718 #define RT5665_G_DAC_R1_STO_L_MASK              (0x1 << 12)
716 #define RT5665_G_DAC_R1_STO_L_SFT                 719 #define RT5665_G_DAC_R1_STO_L_SFT               12
717 #define RT5665_M_DAC_L2_STO_L                     720 #define RT5665_M_DAC_L2_STO_L                   (0x1 << 11)
718 #define RT5665_M_DAC_L2_STO_L_SFT                 721 #define RT5665_M_DAC_L2_STO_L_SFT               11
719 #define RT5665_G_DAC_L2_STO_L_MASK                722 #define RT5665_G_DAC_L2_STO_L_MASK              (0x1 << 10)
720 #define RT5665_G_DAC_L2_STO_L_SFT                 723 #define RT5665_G_DAC_L2_STO_L_SFT               10
721 #define RT5665_M_DAC_R2_STO_L                     724 #define RT5665_M_DAC_R2_STO_L                   (0x1 << 9)
722 #define RT5665_M_DAC_R2_STO_L_SFT                 725 #define RT5665_M_DAC_R2_STO_L_SFT               9
723 #define RT5665_G_DAC_R2_STO_L_MASK                726 #define RT5665_G_DAC_R2_STO_L_MASK              (0x1 << 8)
724 #define RT5665_G_DAC_R2_STO_L_SFT                 727 #define RT5665_G_DAC_R2_STO_L_SFT               8
725 #define RT5665_M_DAC_L1_STO_R                     728 #define RT5665_M_DAC_L1_STO_R                   (0x1 << 7)
726 #define RT5665_M_DAC_L1_STO_R_SFT                 729 #define RT5665_M_DAC_L1_STO_R_SFT               7
727 #define RT5665_G_DAC_L1_STO_R_MASK                730 #define RT5665_G_DAC_L1_STO_R_MASK              (0x1 << 6)
728 #define RT5665_G_DAC_L1_STO_R_SFT                 731 #define RT5665_G_DAC_L1_STO_R_SFT               6
729 #define RT5665_M_DAC_R1_STO_R                     732 #define RT5665_M_DAC_R1_STO_R                   (0x1 << 5)
730 #define RT5665_M_DAC_R1_STO_R_SFT                 733 #define RT5665_M_DAC_R1_STO_R_SFT               5
731 #define RT5665_G_DAC_R1_STO_R_MASK                734 #define RT5665_G_DAC_R1_STO_R_MASK              (0x1 << 4)
732 #define RT5665_G_DAC_R1_STO_R_SFT                 735 #define RT5665_G_DAC_R1_STO_R_SFT               4
733 #define RT5665_M_DAC_L2_STO_R                     736 #define RT5665_M_DAC_L2_STO_R                   (0x1 << 3)
734 #define RT5665_M_DAC_L2_STO_R_SFT                 737 #define RT5665_M_DAC_L2_STO_R_SFT               3
735 #define RT5665_G_DAC_L2_STO_R_MASK                738 #define RT5665_G_DAC_L2_STO_R_MASK              (0x1 << 2)
736 #define RT5665_G_DAC_L2_STO_R_SFT                 739 #define RT5665_G_DAC_L2_STO_R_SFT               2
737 #define RT5665_M_DAC_R2_STO_R                     740 #define RT5665_M_DAC_R2_STO_R                   (0x1 << 1)
738 #define RT5665_M_DAC_R2_STO_R_SFT                 741 #define RT5665_M_DAC_R2_STO_R_SFT               1
739 #define RT5665_G_DAC_R2_STO_R_MASK                742 #define RT5665_G_DAC_R2_STO_R_MASK              (0x1)
740 #define RT5665_G_DAC_R2_STO_R_SFT                 743 #define RT5665_G_DAC_R2_STO_R_SFT               0
741                                                   744 
742 /* Mono DAC Mixer Control (0x002b) */             745 /* Mono DAC Mixer Control (0x002b) */
743 #define RT5665_M_DAC_L1_MONO_L                    746 #define RT5665_M_DAC_L1_MONO_L                  (0x1 << 15)
744 #define RT5665_M_DAC_L1_MONO_L_SFT                747 #define RT5665_M_DAC_L1_MONO_L_SFT              15
745 #define RT5665_G_DAC_L1_MONO_L_MASK               748 #define RT5665_G_DAC_L1_MONO_L_MASK             (0x1 << 14)
746 #define RT5665_G_DAC_L1_MONO_L_SFT                749 #define RT5665_G_DAC_L1_MONO_L_SFT              14
747 #define RT5665_M_DAC_R1_MONO_L                    750 #define RT5665_M_DAC_R1_MONO_L                  (0x1 << 13)
748 #define RT5665_M_DAC_R1_MONO_L_SFT                751 #define RT5665_M_DAC_R1_MONO_L_SFT              13
749 #define RT5665_G_DAC_R1_MONO_L_MASK               752 #define RT5665_G_DAC_R1_MONO_L_MASK             (0x1 << 12)
750 #define RT5665_G_DAC_R1_MONO_L_SFT                753 #define RT5665_G_DAC_R1_MONO_L_SFT              12
751 #define RT5665_M_DAC_L2_MONO_L                    754 #define RT5665_M_DAC_L2_MONO_L                  (0x1 << 11)
752 #define RT5665_M_DAC_L2_MONO_L_SFT                755 #define RT5665_M_DAC_L2_MONO_L_SFT              11
753 #define RT5665_G_DAC_L2_MONO_L_MASK               756 #define RT5665_G_DAC_L2_MONO_L_MASK             (0x1 << 10)
754 #define RT5665_G_DAC_L2_MONO_L_SFT                757 #define RT5665_G_DAC_L2_MONO_L_SFT              10
755 #define RT5665_M_DAC_R2_MONO_L                    758 #define RT5665_M_DAC_R2_MONO_L                  (0x1 << 9)
756 #define RT5665_M_DAC_R2_MONO_L_SFT                759 #define RT5665_M_DAC_R2_MONO_L_SFT              9
757 #define RT5665_G_DAC_R2_MONO_L_MASK               760 #define RT5665_G_DAC_R2_MONO_L_MASK             (0x1 << 8)
758 #define RT5665_G_DAC_R2_MONO_L_SFT                761 #define RT5665_G_DAC_R2_MONO_L_SFT              8
759 #define RT5665_M_DAC_L1_MONO_R                    762 #define RT5665_M_DAC_L1_MONO_R                  (0x1 << 7)
760 #define RT5665_M_DAC_L1_MONO_R_SFT                763 #define RT5665_M_DAC_L1_MONO_R_SFT              7
761 #define RT5665_G_DAC_L1_MONO_R_MASK               764 #define RT5665_G_DAC_L1_MONO_R_MASK             (0x1 << 6)
762 #define RT5665_G_DAC_L1_MONO_R_SFT                765 #define RT5665_G_DAC_L1_MONO_R_SFT              6
763 #define RT5665_M_DAC_R1_MONO_R                    766 #define RT5665_M_DAC_R1_MONO_R                  (0x1 << 5)
764 #define RT5665_M_DAC_R1_MONO_R_SFT                767 #define RT5665_M_DAC_R1_MONO_R_SFT              5
765 #define RT5665_G_DAC_R1_MONO_R_MASK               768 #define RT5665_G_DAC_R1_MONO_R_MASK             (0x1 << 4)
766 #define RT5665_G_DAC_R1_MONO_R_SFT                769 #define RT5665_G_DAC_R1_MONO_R_SFT              4
767 #define RT5665_M_DAC_L2_MONO_R                    770 #define RT5665_M_DAC_L2_MONO_R                  (0x1 << 3)
768 #define RT5665_M_DAC_L2_MONO_R_SFT                771 #define RT5665_M_DAC_L2_MONO_R_SFT              3
769 #define RT5665_G_DAC_L2_MONO_R_MASK               772 #define RT5665_G_DAC_L2_MONO_R_MASK             (0x1 << 2)
770 #define RT5665_G_DAC_L2_MONO_R_SFT                773 #define RT5665_G_DAC_L2_MONO_R_SFT              2
771 #define RT5665_M_DAC_R2_MONO_R                    774 #define RT5665_M_DAC_R2_MONO_R                  (0x1 << 1)
772 #define RT5665_M_DAC_R2_MONO_R_SFT                775 #define RT5665_M_DAC_R2_MONO_R_SFT              1
773 #define RT5665_G_DAC_R2_MONO_R_MASK               776 #define RT5665_G_DAC_R2_MONO_R_MASK             (0x1)
774 #define RT5665_G_DAC_R2_MONO_R_SFT                777 #define RT5665_G_DAC_R2_MONO_R_SFT              0
775                                                   778 
776 /* Stereo2 DAC Mixer Control (0x002c) */          779 /* Stereo2 DAC Mixer Control (0x002c) */
777 #define RT5665_M_DAC_L1_STO2_L                    780 #define RT5665_M_DAC_L1_STO2_L                  (0x1 << 15)
778 #define RT5665_M_DAC_L1_STO2_L_SFT                781 #define RT5665_M_DAC_L1_STO2_L_SFT              15
779 #define RT5665_G_DAC_L1_STO2_L_MASK               782 #define RT5665_G_DAC_L1_STO2_L_MASK             (0x1 << 14)
780 #define RT5665_G_DAC_L1_STO2_L_SFT                783 #define RT5665_G_DAC_L1_STO2_L_SFT              14
781 #define RT5665_M_DAC_L2_STO2_L                    784 #define RT5665_M_DAC_L2_STO2_L                  (0x1 << 13)
782 #define RT5665_M_DAC_L2_STO2_L_SFT                785 #define RT5665_M_DAC_L2_STO2_L_SFT              13
783 #define RT5665_G_DAC_L2_STO2_L_MASK               786 #define RT5665_G_DAC_L2_STO2_L_MASK             (0x1 << 12)
784 #define RT5665_G_DAC_L2_STO2_L_SFT                787 #define RT5665_G_DAC_L2_STO2_L_SFT              12
785 #define RT5665_M_DAC_L3_STO2_L                    788 #define RT5665_M_DAC_L3_STO2_L                  (0x1 << 11)
786 #define RT5665_M_DAC_L3_STO2_L_SFT                789 #define RT5665_M_DAC_L3_STO2_L_SFT              11
787 #define RT5665_G_DAC_L3_STO2_L_MASK               790 #define RT5665_G_DAC_L3_STO2_L_MASK             (0x1 << 10)
788 #define RT5665_G_DAC_L3_STO2_L_SFT                791 #define RT5665_G_DAC_L3_STO2_L_SFT              10
789 #define RT5665_M_ST_DAC_L1                        792 #define RT5665_M_ST_DAC_L1                      (0x1 << 9)
790 #define RT5665_M_ST_DAC_L1_SFT                    793 #define RT5665_M_ST_DAC_L1_SFT                  9
791 #define RT5665_M_ST_DAC_R1                        794 #define RT5665_M_ST_DAC_R1                      (0x1 << 8)
792 #define RT5665_M_ST_DAC_R1_SFT                    795 #define RT5665_M_ST_DAC_R1_SFT                  8
793 #define RT5665_M_DAC_R1_STO2_R                    796 #define RT5665_M_DAC_R1_STO2_R                  (0x1 << 7)
794 #define RT5665_M_DAC_R1_STO2_R_SFT                797 #define RT5665_M_DAC_R1_STO2_R_SFT              7
795 #define RT5665_G_DAC_R1_STO2_R_MASK               798 #define RT5665_G_DAC_R1_STO2_R_MASK             (0x1 << 6)
796 #define RT5665_G_DAC_R1_STO2_R_SFT                799 #define RT5665_G_DAC_R1_STO2_R_SFT              6
797 #define RT5665_M_DAC_R2_STO2_R                    800 #define RT5665_M_DAC_R2_STO2_R                  (0x1 << 5)
798 #define RT5665_M_DAC_R2_STO2_R_SFT                801 #define RT5665_M_DAC_R2_STO2_R_SFT              5
799 #define RT5665_G_DAC_R2_STO2_R_MASK               802 #define RT5665_G_DAC_R2_STO2_R_MASK             (0x1 << 4)
800 #define RT5665_G_DAC_R2_STO2_R_SFT                803 #define RT5665_G_DAC_R2_STO2_R_SFT              4
801 #define RT5665_M_DAC_R3_STO2_R                    804 #define RT5665_M_DAC_R3_STO2_R                  (0x1 << 3)
802 #define RT5665_M_DAC_R3_STO2_R_SFT                805 #define RT5665_M_DAC_R3_STO2_R_SFT              3
803 #define RT5665_G_DAC_R3_STO2_R_MASK               806 #define RT5665_G_DAC_R3_STO2_R_MASK             (0x1 << 2)
804 #define RT5665_G_DAC_R3_STO2_R_SFT                807 #define RT5665_G_DAC_R3_STO2_R_SFT              2
805                                                   808 
806 /* Analog DAC1 Input Source Control (0x002d) *    809 /* Analog DAC1 Input Source Control (0x002d) */
807 #define RT5665_DAC_MIX_L_MASK                     810 #define RT5665_DAC_MIX_L_MASK                   (0x3 << 12)
808 #define RT5665_DAC_MIX_L_SFT                      811 #define RT5665_DAC_MIX_L_SFT                    12
809 #define RT5665_DAC_MIX_R_MASK                     812 #define RT5665_DAC_MIX_R_MASK                   (0x3 << 8)
810 #define RT5665_DAC_MIX_R_SFT                      813 #define RT5665_DAC_MIX_R_SFT                    8
811 #define RT5665_DAC_L1_SRC_MASK                    814 #define RT5665_DAC_L1_SRC_MASK                  (0x3 << 4)
812 #define RT5665_A_DACL1_SFT                        815 #define RT5665_A_DACL1_SFT                      4
813 #define RT5665_DAC_R1_SRC_MASK                    816 #define RT5665_DAC_R1_SRC_MASK                  (0x3)
814 #define RT5665_A_DACR1_SFT                        817 #define RT5665_A_DACR1_SFT                      0
815                                                   818 
816 /* Analog DAC Input Source Control (0x002e) */    819 /* Analog DAC Input Source Control (0x002e) */
817 #define RT5665_A_DACL2_SEL                        820 #define RT5665_A_DACL2_SEL                      (0x1 << 4)
818 #define RT5665_A_DACL2_SFT                        821 #define RT5665_A_DACL2_SFT                      4
819 #define RT5665_A_DACR2_SEL                        822 #define RT5665_A_DACR2_SEL                      (0x1 << 0)
820 #define RT5665_A_DACR2_SFT                        823 #define RT5665_A_DACR2_SFT                      0
821                                                   824 
822 /* Digital Interface Data Control (0x002f) */     825 /* Digital Interface Data Control (0x002f) */
823 #define RT5665_IF2_1_ADC_IN_MASK                  826 #define RT5665_IF2_1_ADC_IN_MASK                (0x7 << 12)
824 #define RT5665_IF2_1_ADC_IN_SFT                   827 #define RT5665_IF2_1_ADC_IN_SFT                 12
825 #define RT5665_IF2_1_DAC_SEL_MASK                 828 #define RT5665_IF2_1_DAC_SEL_MASK               (0x3 << 10)
826 #define RT5665_IF2_1_DAC_SEL_SFT                  829 #define RT5665_IF2_1_DAC_SEL_SFT                10
827 #define RT5665_IF2_1_ADC_SEL_MASK                 830 #define RT5665_IF2_1_ADC_SEL_MASK               (0x3 << 8)
828 #define RT5665_IF2_1_ADC_SEL_SFT                  831 #define RT5665_IF2_1_ADC_SEL_SFT                8
829 #define RT5665_IF2_2_ADC_IN_MASK                  832 #define RT5665_IF2_2_ADC_IN_MASK                (0x7 << 4)
830 #define RT5665_IF2_2_ADC_IN_SFT                   833 #define RT5665_IF2_2_ADC_IN_SFT                 4
831 #define RT5665_IF2_2_DAC_SEL_MASK                 834 #define RT5665_IF2_2_DAC_SEL_MASK               (0x3 << 2)
832 #define RT5665_IF2_2_DAC_SEL_SFT                  835 #define RT5665_IF2_2_DAC_SEL_SFT                2
833 #define RT5665_IF2_2_ADC_SEL_MASK                 836 #define RT5665_IF2_2_ADC_SEL_MASK               (0x3 << 0)
834 #define RT5665_IF2_2_ADC_SEL_SFT                  837 #define RT5665_IF2_2_ADC_SEL_SFT                0
835                                                   838 
836 /* Digital Interface Data Control (0x0030) */     839 /* Digital Interface Data Control (0x0030) */
837 #define RT5665_IF3_ADC_IN_MASK                    840 #define RT5665_IF3_ADC_IN_MASK                  (0x7 << 4)
838 #define RT5665_IF3_ADC_IN_SFT                     841 #define RT5665_IF3_ADC_IN_SFT                   4
839 #define RT5665_IF3_DAC_SEL_MASK                   842 #define RT5665_IF3_DAC_SEL_MASK                 (0x3 << 2)
840 #define RT5665_IF3_DAC_SEL_SFT                    843 #define RT5665_IF3_DAC_SEL_SFT                  2
841 #define RT5665_IF3_ADC_SEL_MASK                   844 #define RT5665_IF3_ADC_SEL_MASK                 (0x3 << 0)
842 #define RT5665_IF3_ADC_SEL_SFT                    845 #define RT5665_IF3_ADC_SEL_SFT                  0
843                                                   846 
844 /* PDM Output Control (0x0031) */                 847 /* PDM Output Control (0x0031) */
845 #define RT5665_M_PDM1_L                           848 #define RT5665_M_PDM1_L                         (0x1 << 14)
846 #define RT5665_M_PDM1_L_SFT                       849 #define RT5665_M_PDM1_L_SFT                     14
847 #define RT5665_M_PDM1_R                           850 #define RT5665_M_PDM1_R                         (0x1 << 12)
848 #define RT5665_M_PDM1_R_SFT                       851 #define RT5665_M_PDM1_R_SFT                     12
849 #define RT5665_PDM1_L_MASK                        852 #define RT5665_PDM1_L_MASK                      (0x3 << 10)
850 #define RT5665_PDM1_L_SFT                         853 #define RT5665_PDM1_L_SFT                       10
851 #define RT5665_PDM1_R_MASK                        854 #define RT5665_PDM1_R_MASK                      (0x3 << 8)
852 #define RT5665_PDM1_R_SFT                         855 #define RT5665_PDM1_R_SFT                       8
853 #define RT5665_PDM1_BUSY                          856 #define RT5665_PDM1_BUSY                        (0x1 << 6)
854 #define RT5665_PDM_PATTERN                        857 #define RT5665_PDM_PATTERN                      (0x1 << 5)
855 #define RT5665_PDM_GAIN                           858 #define RT5665_PDM_GAIN                         (0x1 << 4)
856 #define RT5665_LRCK_PDM_PI2C                      859 #define RT5665_LRCK_PDM_PI2C                    (0x1 << 3)
857 #define RT5665_PDM_DIV_MASK                       860 #define RT5665_PDM_DIV_MASK                     (0x3)
858                                                   861 
859 /*S/PDIF Output Control (0x0036) */               862 /*S/PDIF Output Control (0x0036) */
860 #define RT5665_SPDIF_SEL_MASK                     863 #define RT5665_SPDIF_SEL_MASK                   (0x3 << 0)
861 #define RT5665_SPDIF_SEL_SFT                      864 #define RT5665_SPDIF_SEL_SFT                    0
862                                                   865 
863 /* REC Left Mixer Control 2 (0x003c) */           866 /* REC Left Mixer Control 2 (0x003c) */
864 #define RT5665_M_CBJ_RM1_L                        867 #define RT5665_M_CBJ_RM1_L                      (0x1 << 7)
865 #define RT5665_M_CBJ_RM1_L_SFT                    868 #define RT5665_M_CBJ_RM1_L_SFT                  7
866 #define RT5665_M_BST1_RM1_L                       869 #define RT5665_M_BST1_RM1_L                     (0x1 << 5)
867 #define RT5665_M_BST1_RM1_L_SFT                   870 #define RT5665_M_BST1_RM1_L_SFT                 5
868 #define RT5665_M_BST2_RM1_L                       871 #define RT5665_M_BST2_RM1_L                     (0x1 << 4)
869 #define RT5665_M_BST2_RM1_L_SFT                   872 #define RT5665_M_BST2_RM1_L_SFT                 4
870 #define RT5665_M_BST3_RM1_L                       873 #define RT5665_M_BST3_RM1_L                     (0x1 << 3)
871 #define RT5665_M_BST3_RM1_L_SFT                   874 #define RT5665_M_BST3_RM1_L_SFT                 3
872 #define RT5665_M_BST4_RM1_L                       875 #define RT5665_M_BST4_RM1_L                     (0x1 << 2)
873 #define RT5665_M_BST4_RM1_L_SFT                   876 #define RT5665_M_BST4_RM1_L_SFT                 2
874 #define RT5665_M_INL_RM1_L                        877 #define RT5665_M_INL_RM1_L                      (0x1 << 1)
875 #define RT5665_M_INL_RM1_L_SFT                    878 #define RT5665_M_INL_RM1_L_SFT                  1
876 #define RT5665_M_INR_RM1_L                        879 #define RT5665_M_INR_RM1_L                      (0x1)
877 #define RT5665_M_INR_RM1_L_SFT                    880 #define RT5665_M_INR_RM1_L_SFT                  0
878                                                   881 
879 /* REC Right Mixer Control 2 (0x003e) */          882 /* REC Right Mixer Control 2 (0x003e) */
880 #define RT5665_M_AEC_REF_RM1_R                    883 #define RT5665_M_AEC_REF_RM1_R                  (0x1 << 7)
881 #define RT5665_M_AEC_REF_RM1_R_SFT                884 #define RT5665_M_AEC_REF_RM1_R_SFT              7
882 #define RT5665_M_BST1_RM1_R                       885 #define RT5665_M_BST1_RM1_R                     (0x1 << 5)
883 #define RT5665_M_BST1_RM1_R_SFT                   886 #define RT5665_M_BST1_RM1_R_SFT                 5
884 #define RT5665_M_BST2_RM1_R                       887 #define RT5665_M_BST2_RM1_R                     (0x1 << 4)
885 #define RT5665_M_BST2_RM1_R_SFT                   888 #define RT5665_M_BST2_RM1_R_SFT                 4
886 #define RT5665_M_BST3_RM1_R                       889 #define RT5665_M_BST3_RM1_R                     (0x1 << 3)
887 #define RT5665_M_BST3_RM1_R_SFT                   890 #define RT5665_M_BST3_RM1_R_SFT                 3
888 #define RT5665_M_BST4_RM1_R                       891 #define RT5665_M_BST4_RM1_R                     (0x1 << 2)
889 #define RT5665_M_BST4_RM1_R_SFT                   892 #define RT5665_M_BST4_RM1_R_SFT                 2
890 #define RT5665_M_INR_RM1_R                        893 #define RT5665_M_INR_RM1_R                      (0x1 << 1)
891 #define RT5665_M_INR_RM1_R_SFT                    894 #define RT5665_M_INR_RM1_R_SFT                  1
892 #define RT5665_M_MONOVOL_RM1_R                    895 #define RT5665_M_MONOVOL_RM1_R                  (0x1)
893 #define RT5665_M_MONOVOL_RM1_R_SFT                896 #define RT5665_M_MONOVOL_RM1_R_SFT              0
894                                                   897 
895 /* REC Mixer 2 Left Control 2 (0x0041) */         898 /* REC Mixer 2 Left Control 2 (0x0041) */
896 #define RT5665_M_CBJ_RM2_L                        899 #define RT5665_M_CBJ_RM2_L                      (0x1 << 7)
897 #define RT5665_M_CBJ_RM2_L_SFT                    900 #define RT5665_M_CBJ_RM2_L_SFT                  7
898 #define RT5665_M_BST1_RM2_L                       901 #define RT5665_M_BST1_RM2_L                     (0x1 << 5)
899 #define RT5665_M_BST1_RM2_L_SFT                   902 #define RT5665_M_BST1_RM2_L_SFT                 5
900 #define RT5665_M_BST2_RM2_L                       903 #define RT5665_M_BST2_RM2_L                     (0x1 << 4)
901 #define RT5665_M_BST2_RM2_L_SFT                   904 #define RT5665_M_BST2_RM2_L_SFT                 4
902 #define RT5665_M_BST3_RM2_L                       905 #define RT5665_M_BST3_RM2_L                     (0x1 << 3)
903 #define RT5665_M_BST3_RM2_L_SFT                   906 #define RT5665_M_BST3_RM2_L_SFT                 3
904 #define RT5665_M_BST4_RM2_L                       907 #define RT5665_M_BST4_RM2_L                     (0x1 << 2)
905 #define RT5665_M_BST4_RM2_L_SFT                   908 #define RT5665_M_BST4_RM2_L_SFT                 2
906 #define RT5665_M_INL_RM2_L                        909 #define RT5665_M_INL_RM2_L                      (0x1 << 1)
907 #define RT5665_M_INL_RM2_L_SFT                    910 #define RT5665_M_INL_RM2_L_SFT                  1
908 #define RT5665_M_INR_RM2_L                        911 #define RT5665_M_INR_RM2_L                      (0x1)
909 #define RT5665_M_INR_RM2_L_SFT                    912 #define RT5665_M_INR_RM2_L_SFT                  0
910                                                   913 
911 /* REC Mixer 2 Right Control 2 (0x0043) */        914 /* REC Mixer 2 Right Control 2 (0x0043) */
912 #define RT5665_M_MONOVOL_RM2_R                    915 #define RT5665_M_MONOVOL_RM2_R                  (0x1 << 7)
913 #define RT5665_M_MONOVOL_RM2_R_SFT                916 #define RT5665_M_MONOVOL_RM2_R_SFT              7
914 #define RT5665_M_BST1_RM2_R                       917 #define RT5665_M_BST1_RM2_R                     (0x1 << 5)
915 #define RT5665_M_BST1_RM2_R_SFT                   918 #define RT5665_M_BST1_RM2_R_SFT                 5
916 #define RT5665_M_BST2_RM2_R                       919 #define RT5665_M_BST2_RM2_R                     (0x1 << 4)
917 #define RT5665_M_BST2_RM2_R_SFT                   920 #define RT5665_M_BST2_RM2_R_SFT                 4
918 #define RT5665_M_BST3_RM2_R                       921 #define RT5665_M_BST3_RM2_R                     (0x1 << 3)
919 #define RT5665_M_BST3_RM2_R_SFT                   922 #define RT5665_M_BST3_RM2_R_SFT                 3
920 #define RT5665_M_BST4_RM2_R                       923 #define RT5665_M_BST4_RM2_R                     (0x1 << 2)
921 #define RT5665_M_BST4_RM2_R_SFT                   924 #define RT5665_M_BST4_RM2_R_SFT                 2
922 #define RT5665_M_INL_RM2_R                        925 #define RT5665_M_INL_RM2_R                      (0x1 << 1)
923 #define RT5665_M_INL_RM2_R_SFT                    926 #define RT5665_M_INL_RM2_R_SFT                  1
924 #define RT5665_M_INR_RM2_R                        927 #define RT5665_M_INR_RM2_R                      (0x1)
925 #define RT5665_M_INR_RM2_R_SFT                    928 #define RT5665_M_INR_RM2_R_SFT                  0
926                                                   929 
927 /* SPK Left Mixer Control (0x0046) */             930 /* SPK Left Mixer Control (0x0046) */
928 #define RT5665_M_BST3_SM_L                        931 #define RT5665_M_BST3_SM_L                      (0x1 << 4)
929 #define RT5665_M_BST3_SM_L_SFT                    932 #define RT5665_M_BST3_SM_L_SFT                  4
930 #define RT5665_M_IN_R_SM_L                        933 #define RT5665_M_IN_R_SM_L                      (0x1 << 3)
931 #define RT5665_M_IN_R_SM_L_SFT                    934 #define RT5665_M_IN_R_SM_L_SFT                  3
932 #define RT5665_M_IN_L_SM_L                        935 #define RT5665_M_IN_L_SM_L                      (0x1 << 2)
933 #define RT5665_M_IN_L_SM_L_SFT                    936 #define RT5665_M_IN_L_SM_L_SFT                  2
934 #define RT5665_M_BST1_SM_L                        937 #define RT5665_M_BST1_SM_L                      (0x1 << 1)
935 #define RT5665_M_BST1_SM_L_SFT                    938 #define RT5665_M_BST1_SM_L_SFT                  1
936 #define RT5665_M_DAC_L2_SM_L                      939 #define RT5665_M_DAC_L2_SM_L                    (0x1)
937 #define RT5665_M_DAC_L2_SM_L_SFT                  940 #define RT5665_M_DAC_L2_SM_L_SFT                0
938                                                   941 
939 /* SPK Right Mixer Control (0x0047) */            942 /* SPK Right Mixer Control (0x0047) */
940 #define RT5665_M_BST3_SM_R                        943 #define RT5665_M_BST3_SM_R                      (0x1 << 4)
941 #define RT5665_M_BST3_SM_R_SFT                    944 #define RT5665_M_BST3_SM_R_SFT                  4
942 #define RT5665_M_IN_R_SM_R                        945 #define RT5665_M_IN_R_SM_R                      (0x1 << 3)
943 #define RT5665_M_IN_R_SM_R_SFT                    946 #define RT5665_M_IN_R_SM_R_SFT                  3
944 #define RT5665_M_IN_L_SM_R                        947 #define RT5665_M_IN_L_SM_R                      (0x1 << 2)
945 #define RT5665_M_IN_L_SM_R_SFT                    948 #define RT5665_M_IN_L_SM_R_SFT                  2
946 #define RT5665_M_BST4_SM_R                        949 #define RT5665_M_BST4_SM_R                      (0x1 << 1)
947 #define RT5665_M_BST4_SM_R_SFT                    950 #define RT5665_M_BST4_SM_R_SFT                  1
948 #define RT5665_M_DAC_R2_SM_R                      951 #define RT5665_M_DAC_R2_SM_R                    (0x1)
949 #define RT5665_M_DAC_R2_SM_R_SFT                  952 #define RT5665_M_DAC_R2_SM_R_SFT                0
950                                                   953 
951 /* SPO Amp Input and Gain Control (0x0048) */     954 /* SPO Amp Input and Gain Control (0x0048) */
952 #define RT5665_M_DAC_L2_SPKOMIX                   955 #define RT5665_M_DAC_L2_SPKOMIX                 (0x1 << 13)
953 #define RT5665_M_DAC_L2_SPKOMIX_SFT               956 #define RT5665_M_DAC_L2_SPKOMIX_SFT             13
954 #define RT5665_M_SPKVOLL_SPKOMIX                  957 #define RT5665_M_SPKVOLL_SPKOMIX                (0x1 << 12)
955 #define RT5665_M_SPKVOLL_SPKOMIX_SFT              958 #define RT5665_M_SPKVOLL_SPKOMIX_SFT            12
956 #define RT5665_M_DAC_R2_SPKOMIX                   959 #define RT5665_M_DAC_R2_SPKOMIX                 (0x1 << 9)
957 #define RT5665_M_DAC_R2_SPKOMIX_SFT               960 #define RT5665_M_DAC_R2_SPKOMIX_SFT             9
958 #define RT5665_M_SPKVOLR_SPKOMIX                  961 #define RT5665_M_SPKVOLR_SPKOMIX                (0x1 << 8)
959 #define RT5665_M_SPKVOLR_SPKOMIX_SFT              962 #define RT5665_M_SPKVOLR_SPKOMIX_SFT            8
960                                                   963 
961 /* MONOMIX Input and Gain Control (0x004b) */     964 /* MONOMIX Input and Gain Control (0x004b) */
962 #define RT5665_G_MONOVOL_MA                       965 #define RT5665_G_MONOVOL_MA                     (0x1 << 10)
963 #define RT5665_G_MONOVOL_MA_SFT                   966 #define RT5665_G_MONOVOL_MA_SFT                 10
964 #define RT5665_M_MONOVOL_MA                       967 #define RT5665_M_MONOVOL_MA                     (0x1 << 9)
965 #define RT5665_M_MONOVOL_MA_SFT                   968 #define RT5665_M_MONOVOL_MA_SFT                 9
966 #define RT5665_M_DAC_L2_MA                        969 #define RT5665_M_DAC_L2_MA                      (0x1 << 8)
967 #define RT5665_M_DAC_L2_MA_SFT                    970 #define RT5665_M_DAC_L2_MA_SFT                  8
968 #define RT5665_M_BST3_MM                          971 #define RT5665_M_BST3_MM                        (0x1 << 4)
969 #define RT5665_M_BST3_MM_SFT                      972 #define RT5665_M_BST3_MM_SFT                    4
970 #define RT5665_M_BST2_MM                          973 #define RT5665_M_BST2_MM                        (0x1 << 3)
971 #define RT5665_M_BST2_MM_SFT                      974 #define RT5665_M_BST2_MM_SFT                    3
972 #define RT5665_M_BST1_MM                          975 #define RT5665_M_BST1_MM                        (0x1 << 2)
973 #define RT5665_M_BST1_MM_SFT                      976 #define RT5665_M_BST1_MM_SFT                    2
974 #define RT5665_M_RECMIC2L_MM                      977 #define RT5665_M_RECMIC2L_MM                    (0x1 << 1)
975 #define RT5665_M_RECMIC2L_MM_SFT                  978 #define RT5665_M_RECMIC2L_MM_SFT                1
976 #define RT5665_M_DAC_L2_MM                        979 #define RT5665_M_DAC_L2_MM                      (0x1)
977 #define RT5665_M_DAC_L2_MM_SFT                    980 #define RT5665_M_DAC_L2_MM_SFT                  0
978                                                   981 
979 /* Output Left Mixer Control 1 (0x004d) */        982 /* Output Left Mixer Control 1 (0x004d) */
980 #define RT5665_G_BST3_OM_L_MASK                   983 #define RT5665_G_BST3_OM_L_MASK                 (0x7 << 12)
981 #define RT5665_G_BST3_OM_L_SFT                    984 #define RT5665_G_BST3_OM_L_SFT                  12
982 #define RT5665_G_BST2_OM_L_MASK                   985 #define RT5665_G_BST2_OM_L_MASK                 (0x7 << 9)
983 #define RT5665_G_BST2_OM_L_SFT                    986 #define RT5665_G_BST2_OM_L_SFT                  9
984 #define RT5665_G_BST1_OM_L_MASK                   987 #define RT5665_G_BST1_OM_L_MASK                 (0x7 << 6)
985 #define RT5665_G_BST1_OM_L_SFT                    988 #define RT5665_G_BST1_OM_L_SFT                  6
986 #define RT5665_G_IN_L_OM_L_MASK                   989 #define RT5665_G_IN_L_OM_L_MASK                 (0x7 << 3)
987 #define RT5665_G_IN_L_OM_L_SFT                    990 #define RT5665_G_IN_L_OM_L_SFT                  3
988 #define RT5665_G_DAC_L2_OM_L_MASK                 991 #define RT5665_G_DAC_L2_OM_L_MASK               (0x7 << 0)
989 #define RT5665_G_DAC_L2_OM_L_SFT                  992 #define RT5665_G_DAC_L2_OM_L_SFT                0
990                                                   993 
991 /* Output Left Mixer Input Control (0x004e) */    994 /* Output Left Mixer Input Control (0x004e) */
992 #define RT5665_M_BST3_OM_L                        995 #define RT5665_M_BST3_OM_L                      (0x1 << 4)
993 #define RT5665_M_BST3_OM_L_SFT                    996 #define RT5665_M_BST3_OM_L_SFT                  4
994 #define RT5665_M_BST2_OM_L                        997 #define RT5665_M_BST2_OM_L                      (0x1 << 3)
995 #define RT5665_M_BST2_OM_L_SFT                    998 #define RT5665_M_BST2_OM_L_SFT                  3
996 #define RT5665_M_BST1_OM_L                        999 #define RT5665_M_BST1_OM_L                      (0x1 << 2)
997 #define RT5665_M_BST1_OM_L_SFT                    1000 #define RT5665_M_BST1_OM_L_SFT                  2
998 #define RT5665_M_IN_L_OM_L                        1001 #define RT5665_M_IN_L_OM_L                      (0x1 << 1)
999 #define RT5665_M_IN_L_OM_L_SFT                    1002 #define RT5665_M_IN_L_OM_L_SFT                  1
1000 #define RT5665_M_DAC_L2_OM_L                     1003 #define RT5665_M_DAC_L2_OM_L                    (0x1)
1001 #define RT5665_M_DAC_L2_OM_L_SFT                 1004 #define RT5665_M_DAC_L2_OM_L_SFT                0
1002                                                  1005 
1003 /* Output Right Mixer Input Control (0x0050)     1006 /* Output Right Mixer Input Control (0x0050) */
1004 #define RT5665_M_BST4_OM_R                       1007 #define RT5665_M_BST4_OM_R                      (0x1 << 4)
1005 #define RT5665_M_BST4_OM_R_SFT                   1008 #define RT5665_M_BST4_OM_R_SFT                  4
1006 #define RT5665_M_BST3_OM_R                       1009 #define RT5665_M_BST3_OM_R                      (0x1 << 3)
1007 #define RT5665_M_BST3_OM_R_SFT                   1010 #define RT5665_M_BST3_OM_R_SFT                  3
1008 #define RT5665_M_BST2_OM_R                       1011 #define RT5665_M_BST2_OM_R                      (0x1 << 2)
1009 #define RT5665_M_BST2_OM_R_SFT                   1012 #define RT5665_M_BST2_OM_R_SFT                  2
1010 #define RT5665_M_IN_R_OM_R                       1013 #define RT5665_M_IN_R_OM_R                      (0x1 << 1)
1011 #define RT5665_M_IN_R_OM_R_SFT                   1014 #define RT5665_M_IN_R_OM_R_SFT                  1
1012 #define RT5665_M_DAC_R2_OM_R                     1015 #define RT5665_M_DAC_R2_OM_R                    (0x1)
1013 #define RT5665_M_DAC_R2_OM_R_SFT                 1016 #define RT5665_M_DAC_R2_OM_R_SFT                0
1014                                                  1017 
1015 /* LOUT Mixer Control (0x0052) */                1018 /* LOUT Mixer Control (0x0052) */
1016 #define RT5665_M_DAC_L2_LM                       1019 #define RT5665_M_DAC_L2_LM                      (0x1 << 15)
1017 #define RT5665_M_DAC_L2_LM_SFT                   1020 #define RT5665_M_DAC_L2_LM_SFT                  15
1018 #define RT5665_M_DAC_R2_LM                       1021 #define RT5665_M_DAC_R2_LM                      (0x1 << 14)
1019 #define RT5665_M_DAC_R2_LM_SFT                   1022 #define RT5665_M_DAC_R2_LM_SFT                  14
1020 #define RT5665_M_OV_L_LM                         1023 #define RT5665_M_OV_L_LM                        (0x1 << 13)
1021 #define RT5665_M_OV_L_LM_SFT                     1024 #define RT5665_M_OV_L_LM_SFT                    13
1022 #define RT5665_M_OV_R_LM                         1025 #define RT5665_M_OV_R_LM                        (0x1 << 12)
1023 #define RT5665_M_OV_R_LM_SFT                     1026 #define RT5665_M_OV_R_LM_SFT                    12
1024 #define RT5665_LOUT_BST_SFT                      1027 #define RT5665_LOUT_BST_SFT                     11
1025 #define RT5665_LOUT_DF                           1028 #define RT5665_LOUT_DF                          (0x1 << 11)
1026 #define RT5665_LOUT_DF_SFT                       1029 #define RT5665_LOUT_DF_SFT                      11
1027                                                  1030 
1028 /* Power Management for Digital 1 (0x0061) */    1031 /* Power Management for Digital 1 (0x0061) */
1029 #define RT5665_PWR_I2S1_1                        1032 #define RT5665_PWR_I2S1_1                       (0x1 << 15)
1030 #define RT5665_PWR_I2S1_1_BIT                    1033 #define RT5665_PWR_I2S1_1_BIT                   15
1031 #define RT5665_PWR_I2S1_2                        1034 #define RT5665_PWR_I2S1_2                       (0x1 << 14)
1032 #define RT5665_PWR_I2S1_2_BIT                    1035 #define RT5665_PWR_I2S1_2_BIT                   14
1033 #define RT5665_PWR_I2S2_1                        1036 #define RT5665_PWR_I2S2_1                       (0x1 << 13)
1034 #define RT5665_PWR_I2S2_1_BIT                    1037 #define RT5665_PWR_I2S2_1_BIT                   13
1035 #define RT5665_PWR_I2S2_2                        1038 #define RT5665_PWR_I2S2_2                       (0x1 << 12)
1036 #define RT5665_PWR_I2S2_2_BIT                    1039 #define RT5665_PWR_I2S2_2_BIT                   12
1037 #define RT5665_PWR_DAC_L1                        1040 #define RT5665_PWR_DAC_L1                       (0x1 << 11)
1038 #define RT5665_PWR_DAC_L1_BIT                    1041 #define RT5665_PWR_DAC_L1_BIT                   11
1039 #define RT5665_PWR_DAC_R1                        1042 #define RT5665_PWR_DAC_R1                       (0x1 << 10)
1040 #define RT5665_PWR_DAC_R1_BIT                    1043 #define RT5665_PWR_DAC_R1_BIT                   10
1041 #define RT5665_PWR_I2S3                          1044 #define RT5665_PWR_I2S3                         (0x1 << 9)
1042 #define RT5665_PWR_I2S3_BIT                      1045 #define RT5665_PWR_I2S3_BIT                     9
1043 #define RT5665_PWR_LDO                           1046 #define RT5665_PWR_LDO                          (0x1 << 8)
1044 #define RT5665_PWR_LDO_BIT                       1047 #define RT5665_PWR_LDO_BIT                      8
1045 #define RT5665_PWR_DAC_L2                        1048 #define RT5665_PWR_DAC_L2                       (0x1 << 7)
1046 #define RT5665_PWR_DAC_L2_BIT                    1049 #define RT5665_PWR_DAC_L2_BIT                   7
1047 #define RT5665_PWR_DAC_R2                        1050 #define RT5665_PWR_DAC_R2                       (0x1 << 6)
1048 #define RT5665_PWR_DAC_R2_BIT                    1051 #define RT5665_PWR_DAC_R2_BIT                   6
1049 #define RT5665_PWR_ADC_L1                        1052 #define RT5665_PWR_ADC_L1                       (0x1 << 4)
1050 #define RT5665_PWR_ADC_L1_BIT                    1053 #define RT5665_PWR_ADC_L1_BIT                   4
1051 #define RT5665_PWR_ADC_R1                        1054 #define RT5665_PWR_ADC_R1                       (0x1 << 3)
1052 #define RT5665_PWR_ADC_R1_BIT                    1055 #define RT5665_PWR_ADC_R1_BIT                   3
1053 #define RT5665_PWR_ADC_L2                        1056 #define RT5665_PWR_ADC_L2                       (0x1 << 2)
1054 #define RT5665_PWR_ADC_L2_BIT                    1057 #define RT5665_PWR_ADC_L2_BIT                   2
1055 #define RT5665_PWR_ADC_R2                        1058 #define RT5665_PWR_ADC_R2                       (0x1 << 1)
1056 #define RT5665_PWR_ADC_R2_BIT                    1059 #define RT5665_PWR_ADC_R2_BIT                   1
1057                                                  1060 
1058 /* Power Management for Digital 2 (0x0062) */    1061 /* Power Management for Digital 2 (0x0062) */
1059 #define RT5665_PWR_ADC_S1F                       1062 #define RT5665_PWR_ADC_S1F                      (0x1 << 15)
1060 #define RT5665_PWR_ADC_S1F_BIT                   1063 #define RT5665_PWR_ADC_S1F_BIT                  15
1061 #define RT5665_PWR_ADC_S2F                       1064 #define RT5665_PWR_ADC_S2F                      (0x1 << 14)
1062 #define RT5665_PWR_ADC_S2F_BIT                   1065 #define RT5665_PWR_ADC_S2F_BIT                  14
1063 #define RT5665_PWR_ADC_MF_L                      1066 #define RT5665_PWR_ADC_MF_L                     (0x1 << 13)
1064 #define RT5665_PWR_ADC_MF_L_BIT                  1067 #define RT5665_PWR_ADC_MF_L_BIT                 13
1065 #define RT5665_PWR_ADC_MF_R                      1068 #define RT5665_PWR_ADC_MF_R                     (0x1 << 12)
1066 #define RT5665_PWR_ADC_MF_R_BIT                  1069 #define RT5665_PWR_ADC_MF_R_BIT                 12
1067 #define RT5665_PWR_DAC_S2F                       1070 #define RT5665_PWR_DAC_S2F                      (0x1 << 11)
1068 #define RT5665_PWR_DAC_S2F_BIT                   1071 #define RT5665_PWR_DAC_S2F_BIT                  11
1069 #define RT5665_PWR_DAC_S1F                       1072 #define RT5665_PWR_DAC_S1F                      (0x1 << 10)
1070 #define RT5665_PWR_DAC_S1F_BIT                   1073 #define RT5665_PWR_DAC_S1F_BIT                  10
1071 #define RT5665_PWR_DAC_MF_L                      1074 #define RT5665_PWR_DAC_MF_L                     (0x1 << 9)
1072 #define RT5665_PWR_DAC_MF_L_BIT                  1075 #define RT5665_PWR_DAC_MF_L_BIT                 9
1073 #define RT5665_PWR_DAC_MF_R                      1076 #define RT5665_PWR_DAC_MF_R                     (0x1 << 8)
1074 #define RT5665_PWR_DAC_MF_R_BIT                  1077 #define RT5665_PWR_DAC_MF_R_BIT                 8
1075 #define RT5665_PWR_PDM1                          1078 #define RT5665_PWR_PDM1                         (0x1 << 7)
1076 #define RT5665_PWR_PDM1_BIT                      1079 #define RT5665_PWR_PDM1_BIT                     7
1077                                                  1080 
1078 /* Power Management for Analog 1 (0x0063) */     1081 /* Power Management for Analog 1 (0x0063) */
1079 #define RT5665_PWR_VREF1                         1082 #define RT5665_PWR_VREF1                        (0x1 << 15)
1080 #define RT5665_PWR_VREF1_BIT                     1083 #define RT5665_PWR_VREF1_BIT                    15
1081 #define RT5665_PWR_FV1                           1084 #define RT5665_PWR_FV1                          (0x1 << 14)
1082 #define RT5665_PWR_FV1_BIT                       1085 #define RT5665_PWR_FV1_BIT                      14
1083 #define RT5665_PWR_VREF2                         1086 #define RT5665_PWR_VREF2                        (0x1 << 13)
1084 #define RT5665_PWR_VREF2_BIT                     1087 #define RT5665_PWR_VREF2_BIT                    13
1085 #define RT5665_PWR_FV2                           1088 #define RT5665_PWR_FV2                          (0x1 << 12)
1086 #define RT5665_PWR_FV2_BIT                       1089 #define RT5665_PWR_FV2_BIT                      12
1087 #define RT5665_PWR_VREF3                         1090 #define RT5665_PWR_VREF3                        (0x1 << 11)
1088 #define RT5665_PWR_VREF3_BIT                     1091 #define RT5665_PWR_VREF3_BIT                    11
1089 #define RT5665_PWR_FV3                           1092 #define RT5665_PWR_FV3                          (0x1 << 10)
1090 #define RT5665_PWR_FV3_BIT                       1093 #define RT5665_PWR_FV3_BIT                      10
1091 #define RT5665_PWR_MB                            1094 #define RT5665_PWR_MB                           (0x1 << 9)
1092 #define RT5665_PWR_MB_BIT                        1095 #define RT5665_PWR_MB_BIT                       9
1093 #define RT5665_PWR_LM                            1096 #define RT5665_PWR_LM                           (0x1 << 8)
1094 #define RT5665_PWR_LM_BIT                        1097 #define RT5665_PWR_LM_BIT                       8
1095 #define RT5665_PWR_BG                            1098 #define RT5665_PWR_BG                           (0x1 << 7)
1096 #define RT5665_PWR_BG_BIT                        1099 #define RT5665_PWR_BG_BIT                       7
1097 #define RT5665_PWR_MA                            1100 #define RT5665_PWR_MA                           (0x1 << 6)
1098 #define RT5665_PWR_MA_BIT                        1101 #define RT5665_PWR_MA_BIT                       6
1099 #define RT5665_PWR_HA_L                          1102 #define RT5665_PWR_HA_L                         (0x1 << 5)
1100 #define RT5665_PWR_HA_L_BIT                      1103 #define RT5665_PWR_HA_L_BIT                     5
1101 #define RT5665_PWR_HA_R                          1104 #define RT5665_PWR_HA_R                         (0x1 << 4)
1102 #define RT5665_PWR_HA_R_BIT                      1105 #define RT5665_PWR_HA_R_BIT                     4
1103 #define RT5665_HP_DRIVER_MASK                    1106 #define RT5665_HP_DRIVER_MASK                   (0x3 << 2)
1104 #define RT5665_HP_DRIVER_1X                      1107 #define RT5665_HP_DRIVER_1X                     (0x0 << 2)
1105 #define RT5665_HP_DRIVER_3X                      1108 #define RT5665_HP_DRIVER_3X                     (0x1 << 2)
1106 #define RT5665_HP_DRIVER_5X                      1109 #define RT5665_HP_DRIVER_5X                     (0x3 << 2)
1107 #define RT5665_LDO1_DVO_MASK                     1110 #define RT5665_LDO1_DVO_MASK                    (0x3)
1108 #define RT5665_LDO1_DVO_09                       1111 #define RT5665_LDO1_DVO_09                      (0x0)
1109 #define RT5665_LDO1_DVO_10                       1112 #define RT5665_LDO1_DVO_10                      (0x1)
1110 #define RT5665_LDO1_DVO_12                       1113 #define RT5665_LDO1_DVO_12                      (0x2)
1111 #define RT5665_LDO1_DVO_14                       1114 #define RT5665_LDO1_DVO_14                      (0x3)
1112                                                  1115 
1113 /* Power Management for Analog 2 (0x0064) */     1116 /* Power Management for Analog 2 (0x0064) */
1114 #define RT5665_PWR_BST1                          1117 #define RT5665_PWR_BST1                         (0x1 << 15)
1115 #define RT5665_PWR_BST1_BIT                      1118 #define RT5665_PWR_BST1_BIT                     15
1116 #define RT5665_PWR_BST2                          1119 #define RT5665_PWR_BST2                         (0x1 << 14)
1117 #define RT5665_PWR_BST2_BIT                      1120 #define RT5665_PWR_BST2_BIT                     14
1118 #define RT5665_PWR_BST3                          1121 #define RT5665_PWR_BST3                         (0x1 << 13)
1119 #define RT5665_PWR_BST3_BIT                      1122 #define RT5665_PWR_BST3_BIT                     13
1120 #define RT5665_PWR_BST4                          1123 #define RT5665_PWR_BST4                         (0x1 << 12)
1121 #define RT5665_PWR_BST4_BIT                      1124 #define RT5665_PWR_BST4_BIT                     12
1122 #define RT5665_PWR_MB1                           1125 #define RT5665_PWR_MB1                          (0x1 << 11)
1123 #define RT5665_PWR_MB1_PWR_DOWN                  1126 #define RT5665_PWR_MB1_PWR_DOWN                 (0x0 << 11)
1124 #define RT5665_PWR_MB1_BIT                       1127 #define RT5665_PWR_MB1_BIT                      11
1125 #define RT5665_PWR_MB2                           1128 #define RT5665_PWR_MB2                          (0x1 << 10)
1126 #define RT5665_PWR_MB2_PWR_DOWN                  1129 #define RT5665_PWR_MB2_PWR_DOWN                 (0x0 << 10)
1127 #define RT5665_PWR_MB2_BIT                       1130 #define RT5665_PWR_MB2_BIT                      10
1128 #define RT5665_PWR_MB3                           1131 #define RT5665_PWR_MB3                          (0x1 << 9)
1129 #define RT5665_PWR_MB3_BIT                       1132 #define RT5665_PWR_MB3_BIT                      9
1130 #define RT5665_PWR_BST1_P                        1133 #define RT5665_PWR_BST1_P                       (0x1 << 7)
1131 #define RT5665_PWR_BST1_P_BIT                    1134 #define RT5665_PWR_BST1_P_BIT                   7
1132 #define RT5665_PWR_BST2_P                        1135 #define RT5665_PWR_BST2_P                       (0x1 << 6)
1133 #define RT5665_PWR_BST2_P_BIT                    1136 #define RT5665_PWR_BST2_P_BIT                   6
1134 #define RT5665_PWR_BST3_P                        1137 #define RT5665_PWR_BST3_P                       (0x1 << 5)
1135 #define RT5665_PWR_BST3_P_BIT                    1138 #define RT5665_PWR_BST3_P_BIT                   5
1136 #define RT5665_PWR_BST4_P                        1139 #define RT5665_PWR_BST4_P                       (0x1 << 4)
1137 #define RT5665_PWR_BST4_P_BIT                    1140 #define RT5665_PWR_BST4_P_BIT                   4
1138 #define RT5665_PWR_JD1                           1141 #define RT5665_PWR_JD1                          (0x1 << 3)
1139 #define RT5665_PWR_JD1_BIT                       1142 #define RT5665_PWR_JD1_BIT                      3
1140 #define RT5665_PWR_JD2                           1143 #define RT5665_PWR_JD2                          (0x1 << 2)
1141 #define RT5665_PWR_JD2_BIT                       1144 #define RT5665_PWR_JD2_BIT                      2
1142 #define RT5665_PWR_RM1_L                         1145 #define RT5665_PWR_RM1_L                        (0x1 << 1)
1143 #define RT5665_PWR_RM1_L_BIT                     1146 #define RT5665_PWR_RM1_L_BIT                    1
1144 #define RT5665_PWR_RM1_R                         1147 #define RT5665_PWR_RM1_R                        (0x1)
1145 #define RT5665_PWR_RM1_R_BIT                     1148 #define RT5665_PWR_RM1_R_BIT                    0
1146                                                  1149 
1147 /* Power Management for Analog 3 (0x0065) */     1150 /* Power Management for Analog 3 (0x0065) */
1148 #define RT5665_PWR_CBJ                           1151 #define RT5665_PWR_CBJ                          (0x1 << 9)
1149 #define RT5665_PWR_CBJ_BIT                       1152 #define RT5665_PWR_CBJ_BIT                      9
1150 #define RT5665_PWR_BST_L                         1153 #define RT5665_PWR_BST_L                        (0x1 << 8)
1151 #define RT5665_PWR_BST_L_BIT                     1154 #define RT5665_PWR_BST_L_BIT                    8
1152 #define RT5665_PWR_BST_R                         1155 #define RT5665_PWR_BST_R                        (0x1 << 7)
1153 #define RT5665_PWR_BST_R_BIT                     1156 #define RT5665_PWR_BST_R_BIT                    7
1154 #define RT5665_PWR_PLL                           1157 #define RT5665_PWR_PLL                          (0x1 << 6)
1155 #define RT5665_PWR_PLL_BIT                       1158 #define RT5665_PWR_PLL_BIT                      6
1156 #define RT5665_PWR_LDO2                          1159 #define RT5665_PWR_LDO2                         (0x1 << 2)
1157 #define RT5665_PWR_LDO2_BIT                      1160 #define RT5665_PWR_LDO2_BIT                     2
1158 #define RT5665_PWR_SVD                           1161 #define RT5665_PWR_SVD                          (0x1 << 1)
1159 #define RT5665_PWR_SVD_BIT                       1162 #define RT5665_PWR_SVD_BIT                      1
1160                                                  1163 
1161 /* Power Management for Mixer (0x0066) */        1164 /* Power Management for Mixer (0x0066) */
1162 #define RT5665_PWR_RM2_L                         1165 #define RT5665_PWR_RM2_L                        (0x1 << 15)
1163 #define RT5665_PWR_RM2_L_BIT                     1166 #define RT5665_PWR_RM2_L_BIT                    15
1164 #define RT5665_PWR_RM2_R                         1167 #define RT5665_PWR_RM2_R                        (0x1 << 14)
1165 #define RT5665_PWR_RM2_R_BIT                     1168 #define RT5665_PWR_RM2_R_BIT                    14
1166 #define RT5665_PWR_OM_L                          1169 #define RT5665_PWR_OM_L                         (0x1 << 13)
1167 #define RT5665_PWR_OM_L_BIT                      1170 #define RT5665_PWR_OM_L_BIT                     13
1168 #define RT5665_PWR_OM_R                          1171 #define RT5665_PWR_OM_R                         (0x1 << 12)
1169 #define RT5665_PWR_OM_R_BIT                      1172 #define RT5665_PWR_OM_R_BIT                     12
1170 #define RT5665_PWR_MM                            1173 #define RT5665_PWR_MM                           (0x1 << 11)
1171 #define RT5665_PWR_MM_BIT                        1174 #define RT5665_PWR_MM_BIT                       11
1172 #define RT5665_PWR_AEC_REF                       1175 #define RT5665_PWR_AEC_REF                      (0x1 << 6)
1173 #define RT5665_PWR_AEC_REF_BIT                   1176 #define RT5665_PWR_AEC_REF_BIT                  6
1174 #define RT5665_PWR_STO1_DAC_L                    1177 #define RT5665_PWR_STO1_DAC_L                   (0x1 << 5)
1175 #define RT5665_PWR_STO1_DAC_L_BIT                1178 #define RT5665_PWR_STO1_DAC_L_BIT               5
1176 #define RT5665_PWR_STO1_DAC_R                    1179 #define RT5665_PWR_STO1_DAC_R                   (0x1 << 4)
1177 #define RT5665_PWR_STO1_DAC_R_BIT                1180 #define RT5665_PWR_STO1_DAC_R_BIT               4
1178 #define RT5665_PWR_MONO_DAC_L                    1181 #define RT5665_PWR_MONO_DAC_L                   (0x1 << 3)
1179 #define RT5665_PWR_MONO_DAC_L_BIT                1182 #define RT5665_PWR_MONO_DAC_L_BIT               3
1180 #define RT5665_PWR_MONO_DAC_R                    1183 #define RT5665_PWR_MONO_DAC_R                   (0x1 << 2)
1181 #define RT5665_PWR_MONO_DAC_R_BIT                1184 #define RT5665_PWR_MONO_DAC_R_BIT               2
1182 #define RT5665_PWR_STO2_DAC_L                    1185 #define RT5665_PWR_STO2_DAC_L                   (0x1 << 1)
1183 #define RT5665_PWR_STO2_DAC_L_BIT                1186 #define RT5665_PWR_STO2_DAC_L_BIT               1
1184 #define RT5665_PWR_STO2_DAC_R                    1187 #define RT5665_PWR_STO2_DAC_R                   (0x1)
1185 #define RT5665_PWR_STO2_DAC_R_BIT                1188 #define RT5665_PWR_STO2_DAC_R_BIT               0
1186                                                  1189 
1187 /* Power Management for Volume (0x0067) */       1190 /* Power Management for Volume (0x0067) */
1188 #define RT5665_PWR_OV_L                          1191 #define RT5665_PWR_OV_L                         (0x1 << 13)
1189 #define RT5665_PWR_OV_L_BIT                      1192 #define RT5665_PWR_OV_L_BIT                     13
1190 #define RT5665_PWR_OV_R                          1193 #define RT5665_PWR_OV_R                         (0x1 << 12)
1191 #define RT5665_PWR_OV_R_BIT                      1194 #define RT5665_PWR_OV_R_BIT                     12
1192 #define RT5665_PWR_IN_L                          1195 #define RT5665_PWR_IN_L                         (0x1 << 9)
1193 #define RT5665_PWR_IN_L_BIT                      1196 #define RT5665_PWR_IN_L_BIT                     9
1194 #define RT5665_PWR_IN_R                          1197 #define RT5665_PWR_IN_R                         (0x1 << 8)
1195 #define RT5665_PWR_IN_R_BIT                      1198 #define RT5665_PWR_IN_R_BIT                     8
1196 #define RT5665_PWR_MV                            1199 #define RT5665_PWR_MV                           (0x1 << 7)
1197 #define RT5665_PWR_MV_BIT                        1200 #define RT5665_PWR_MV_BIT                       7
1198 #define RT5665_PWR_MIC_DET                       1201 #define RT5665_PWR_MIC_DET                      (0x1 << 5)
1199 #define RT5665_PWR_MIC_DET_BIT                   1202 #define RT5665_PWR_MIC_DET_BIT                  5
1200                                                  1203 
1201 /* (0x006b) */                                   1204 /* (0x006b) */
1202 #define RT5665_SYS_CLK_DET                       1205 #define RT5665_SYS_CLK_DET                      15
1203 #define RT5665_HP_CLK_DET                        1206 #define RT5665_HP_CLK_DET                       14
1204 #define RT5665_MONO_CLK_DET                      1207 #define RT5665_MONO_CLK_DET                     13
1205 #define RT5665_LOUT_CLK_DET                      1208 #define RT5665_LOUT_CLK_DET                     12
1206 #define RT5665_POW_CLK_DET                       1209 #define RT5665_POW_CLK_DET                      0
1207                                                  1210 
1208 /* Digital Microphone Control 1 (0x006e) */      1211 /* Digital Microphone Control 1 (0x006e) */
1209 #define RT5665_DMIC_1_EN_MASK                    1212 #define RT5665_DMIC_1_EN_MASK                   (0x1 << 15)
1210 #define RT5665_DMIC_1_EN_SFT                     1213 #define RT5665_DMIC_1_EN_SFT                    15
1211 #define RT5665_DMIC_1_DIS                        1214 #define RT5665_DMIC_1_DIS                       (0x0 << 15)
1212 #define RT5665_DMIC_1_EN                         1215 #define RT5665_DMIC_1_EN                        (0x1 << 15)
1213 #define RT5665_DMIC_2_EN_MASK                    1216 #define RT5665_DMIC_2_EN_MASK                   (0x1 << 14)
1214 #define RT5665_DMIC_2_EN_SFT                     1217 #define RT5665_DMIC_2_EN_SFT                    14
1215 #define RT5665_DMIC_2_DIS                        1218 #define RT5665_DMIC_2_DIS                       (0x0 << 14)
1216 #define RT5665_DMIC_2_EN                         1219 #define RT5665_DMIC_2_EN                        (0x1 << 14)
1217 #define RT5665_DMIC_2_DP_MASK                    1220 #define RT5665_DMIC_2_DP_MASK                   (0x1 << 9)
1218 #define RT5665_DMIC_2_DP_SFT                     1221 #define RT5665_DMIC_2_DP_SFT                    9
1219 #define RT5665_DMIC_2_DP_GPIO5                   1222 #define RT5665_DMIC_2_DP_GPIO5                  (0x0 << 9)
1220 #define RT5665_DMIC_2_DP_IN2P                    1223 #define RT5665_DMIC_2_DP_IN2P                   (0x1 << 9)
1221 #define RT5665_DMIC_CLK_MASK                     1224 #define RT5665_DMIC_CLK_MASK                    (0x7 << 5)
1222 #define RT5665_DMIC_CLK_SFT                      1225 #define RT5665_DMIC_CLK_SFT                     5
1223 #define RT5665_DMIC_1_DP_MASK                    1226 #define RT5665_DMIC_1_DP_MASK                   (0x1 << 1)
1224 #define RT5665_DMIC_1_DP_SFT                     1227 #define RT5665_DMIC_1_DP_SFT                    1
1225 #define RT5665_DMIC_1_DP_GPIO4                   1228 #define RT5665_DMIC_1_DP_GPIO4                  (0x0 << 1)
1226 #define RT5665_DMIC_1_DP_IN2N                    1229 #define RT5665_DMIC_1_DP_IN2N                   (0x1 << 1)
1227                                                  1230 
1228                                                  1231 
1229 /* Digital Microphone Control 1 (0x006f) */      1232 /* Digital Microphone Control 1 (0x006f) */
1230 #define RT5665_DMIC_2L_LH_MASK                   1233 #define RT5665_DMIC_2L_LH_MASK                  (0x1 << 3)
1231 #define RT5665_DMIC_2L_LH_SFT                    1234 #define RT5665_DMIC_2L_LH_SFT                   3
1232 #define RT5665_DMIC_2L_LH_RISING                 1235 #define RT5665_DMIC_2L_LH_RISING                (0x0 << 3)
1233 #define RT5665_DMIC_2L_LH_FALLING                1236 #define RT5665_DMIC_2L_LH_FALLING               (0x1 << 3)
1234 #define RT5665_DMIC_2R_LH_MASK                   1237 #define RT5665_DMIC_2R_LH_MASK                  (0x1 << 2)
1235 #define RT5665_DMIC_2R_LH_SFT                    1238 #define RT5665_DMIC_2R_LH_SFT                   2
1236 #define RT5665_DMIC_2R_LH_RISING                 1239 #define RT5665_DMIC_2R_LH_RISING                (0x0 << 2)
1237 #define RT5665_DMIC_2R_LH_FALLING                1240 #define RT5665_DMIC_2R_LH_FALLING               (0x1 << 2)
1238 #define RT5665_DMIC_1L_LH_MASK                   1241 #define RT5665_DMIC_1L_LH_MASK                  (0x1 << 1)
1239 #define RT5665_DMIC_1L_LH_SFT                    1242 #define RT5665_DMIC_1L_LH_SFT                   1
1240 #define RT5665_DMIC_1L_LH_RISING                 1243 #define RT5665_DMIC_1L_LH_RISING                (0x0 << 1)
1241 #define RT5665_DMIC_1L_LH_FALLING                1244 #define RT5665_DMIC_1L_LH_FALLING               (0x1 << 1)
1242 #define RT5665_DMIC_1R_LH_MASK                   1245 #define RT5665_DMIC_1R_LH_MASK                  (0x1 << 0)
1243 #define RT5665_DMIC_1R_LH_SFT                    1246 #define RT5665_DMIC_1R_LH_SFT                   0
1244 #define RT5665_DMIC_1R_LH_RISING                 1247 #define RT5665_DMIC_1R_LH_RISING                (0x0)
1245 #define RT5665_DMIC_1R_LH_FALLING                1248 #define RT5665_DMIC_1R_LH_FALLING               (0x1)
1246                                                  1249 
1247 /* I2S1/2/3 Audio Serial Data Port Control (0    1250 /* I2S1/2/3 Audio Serial Data Port Control (0x0070 0x0071 0x0072) */
1248 #define RT5665_I2S_MS_MASK                       1251 #define RT5665_I2S_MS_MASK                      (0x1 << 15)
1249 #define RT5665_I2S_MS_SFT                        1252 #define RT5665_I2S_MS_SFT                       15
1250 #define RT5665_I2S_MS_M                          1253 #define RT5665_I2S_MS_M                         (0x0 << 15)
1251 #define RT5665_I2S_MS_S                          1254 #define RT5665_I2S_MS_S                         (0x1 << 15)
1252 #define RT5665_I2S_PIN_CFG_MASK                  1255 #define RT5665_I2S_PIN_CFG_MASK                 (0x1 << 14)
1253 #define RT5665_I2S_PIN_CFG_SFT                   1256 #define RT5665_I2S_PIN_CFG_SFT                  14
1254 #define RT5665_I2S_CLK_SEL_MASK                  1257 #define RT5665_I2S_CLK_SEL_MASK                 (0x1 << 11)
1255 #define RT5665_I2S_CLK_SEL_SFT                   1258 #define RT5665_I2S_CLK_SEL_SFT                  11
1256 #define RT5665_I2S_BP_MASK                       1259 #define RT5665_I2S_BP_MASK                      (0x1 << 8)
1257 #define RT5665_I2S_BP_SFT                        1260 #define RT5665_I2S_BP_SFT                       8
1258 #define RT5665_I2S_BP_NOR                        1261 #define RT5665_I2S_BP_NOR                       (0x0 << 8)
1259 #define RT5665_I2S_BP_INV                        1262 #define RT5665_I2S_BP_INV                       (0x1 << 8)
1260 #define RT5665_I2S_DL_MASK                       1263 #define RT5665_I2S_DL_MASK                      (0x3 << 4)
1261 #define RT5665_I2S_DL_SFT                        1264 #define RT5665_I2S_DL_SFT                       4
1262 #define RT5665_I2S_DL_16                         1265 #define RT5665_I2S_DL_16                        (0x0 << 4)
1263 #define RT5665_I2S_DL_20                         1266 #define RT5665_I2S_DL_20                        (0x1 << 4)
1264 #define RT5665_I2S_DL_24                         1267 #define RT5665_I2S_DL_24                        (0x2 << 4)
1265 #define RT5665_I2S_DL_8                          1268 #define RT5665_I2S_DL_8                         (0x3 << 4)
1266 #define RT5665_I2S_DF_MASK                       1269 #define RT5665_I2S_DF_MASK                      (0x7)
1267 #define RT5665_I2S_DF_SFT                        1270 #define RT5665_I2S_DF_SFT                       0
1268 #define RT5665_I2S_DF_I2S                        1271 #define RT5665_I2S_DF_I2S                       (0x0)
1269 #define RT5665_I2S_DF_LEFT                       1272 #define RT5665_I2S_DF_LEFT                      (0x1)
1270 #define RT5665_I2S_DF_PCM_A                      1273 #define RT5665_I2S_DF_PCM_A                     (0x2)
1271 #define RT5665_I2S_DF_PCM_B                      1274 #define RT5665_I2S_DF_PCM_B                     (0x3)
1272 #define RT5665_I2S_DF_PCM_A_N                    1275 #define RT5665_I2S_DF_PCM_A_N                   (0x6)
1273 #define RT5665_I2S_DF_PCM_B_N                    1276 #define RT5665_I2S_DF_PCM_B_N                   (0x7)
1274                                                  1277 
1275 /* ADC/DAC Clock Control 1 (0x0073) */           1278 /* ADC/DAC Clock Control 1 (0x0073) */
1276 #define RT5665_I2S_PD1_MASK                      1279 #define RT5665_I2S_PD1_MASK                     (0x7 << 12)
1277 #define RT5665_I2S_PD1_SFT                       1280 #define RT5665_I2S_PD1_SFT                      12
1278 #define RT5665_I2S_PD1_1                         1281 #define RT5665_I2S_PD1_1                        (0x0 << 12)
1279 #define RT5665_I2S_PD1_2                         1282 #define RT5665_I2S_PD1_2                        (0x1 << 12)
1280 #define RT5665_I2S_PD1_3                         1283 #define RT5665_I2S_PD1_3                        (0x2 << 12)
1281 #define RT5665_I2S_PD1_4                         1284 #define RT5665_I2S_PD1_4                        (0x3 << 12)
1282 #define RT5665_I2S_PD1_6                         1285 #define RT5665_I2S_PD1_6                        (0x4 << 12)
1283 #define RT5665_I2S_PD1_8                         1286 #define RT5665_I2S_PD1_8                        (0x5 << 12)
1284 #define RT5665_I2S_PD1_12                        1287 #define RT5665_I2S_PD1_12                       (0x6 << 12)
1285 #define RT5665_I2S_PD1_16                        1288 #define RT5665_I2S_PD1_16                       (0x7 << 12)
1286 #define RT5665_I2S_M_PD2_MASK                    1289 #define RT5665_I2S_M_PD2_MASK                   (0x7 << 8)
1287 #define RT5665_I2S_M_PD2_SFT                     1290 #define RT5665_I2S_M_PD2_SFT                    8
1288 #define RT5665_I2S_M_PD2_1                       1291 #define RT5665_I2S_M_PD2_1                      (0x0 << 8)
1289 #define RT5665_I2S_M_PD2_2                       1292 #define RT5665_I2S_M_PD2_2                      (0x1 << 8)
1290 #define RT5665_I2S_M_PD2_3                       1293 #define RT5665_I2S_M_PD2_3                      (0x2 << 8)
1291 #define RT5665_I2S_M_PD2_4                       1294 #define RT5665_I2S_M_PD2_4                      (0x3 << 8)
1292 #define RT5665_I2S_M_PD2_6                       1295 #define RT5665_I2S_M_PD2_6                      (0x4 << 8)
1293 #define RT5665_I2S_M_PD2_8                       1296 #define RT5665_I2S_M_PD2_8                      (0x5 << 8)
1294 #define RT5665_I2S_M_PD2_12                      1297 #define RT5665_I2S_M_PD2_12                     (0x6 << 8)
1295 #define RT5665_I2S_M_PD2_16                      1298 #define RT5665_I2S_M_PD2_16                     (0x7 << 8)
1296 #define RT5665_I2S_CLK_SRC_MASK                  1299 #define RT5665_I2S_CLK_SRC_MASK                 (0x3 << 4)
1297 #define RT5665_I2S_CLK_SRC_SFT                   1300 #define RT5665_I2S_CLK_SRC_SFT                  4
1298 #define RT5665_I2S_CLK_SRC_MCLK                  1301 #define RT5665_I2S_CLK_SRC_MCLK                 (0x0 << 4)
1299 #define RT5665_I2S_CLK_SRC_PLL1                  1302 #define RT5665_I2S_CLK_SRC_PLL1                 (0x1 << 4)
1300 #define RT5665_I2S_CLK_SRC_RCCLK                 1303 #define RT5665_I2S_CLK_SRC_RCCLK                (0x2 << 4)
1301 #define RT5665_DAC_OSR_MASK                      1304 #define RT5665_DAC_OSR_MASK                     (0x3 << 2)
1302 #define RT5665_DAC_OSR_SFT                       1305 #define RT5665_DAC_OSR_SFT                      2
1303 #define RT5665_DAC_OSR_128                       1306 #define RT5665_DAC_OSR_128                      (0x0 << 2)
1304 #define RT5665_DAC_OSR_64                        1307 #define RT5665_DAC_OSR_64                       (0x1 << 2)
1305 #define RT5665_DAC_OSR_32                        1308 #define RT5665_DAC_OSR_32                       (0x2 << 2)
1306 #define RT5665_ADC_OSR_MASK                      1309 #define RT5665_ADC_OSR_MASK                     (0x3)
1307 #define RT5665_ADC_OSR_SFT                       1310 #define RT5665_ADC_OSR_SFT                      0
1308 #define RT5665_ADC_OSR_128                       1311 #define RT5665_ADC_OSR_128                      (0x0)
1309 #define RT5665_ADC_OSR_64                        1312 #define RT5665_ADC_OSR_64                       (0x1)
1310 #define RT5665_ADC_OSR_32                        1313 #define RT5665_ADC_OSR_32                       (0x2)
1311                                                  1314 
1312 /* ADC/DAC Clock Control 2 (0x0074) */           1315 /* ADC/DAC Clock Control 2 (0x0074) */
1313 #define RT5665_I2S_BCLK_MS2_MASK                 1316 #define RT5665_I2S_BCLK_MS2_MASK                (0x1 << 15)
1314 #define RT5665_I2S_BCLK_MS2_SFT                  1317 #define RT5665_I2S_BCLK_MS2_SFT                 15
1315 #define RT5665_I2S_BCLK_MS2_32                   1318 #define RT5665_I2S_BCLK_MS2_32                  (0x0 << 15)
1316 #define RT5665_I2S_BCLK_MS2_64                   1319 #define RT5665_I2S_BCLK_MS2_64                  (0x1 << 15)
1317 #define RT5665_I2S_PD2_MASK                      1320 #define RT5665_I2S_PD2_MASK                     (0x7 << 12)
1318 #define RT5665_I2S_PD2_SFT                       1321 #define RT5665_I2S_PD2_SFT                      12
1319 #define RT5665_I2S_PD2_1                         1322 #define RT5665_I2S_PD2_1                        (0x0 << 12)
1320 #define RT5665_I2S_PD2_2                         1323 #define RT5665_I2S_PD2_2                        (0x1 << 12)
1321 #define RT5665_I2S_PD2_3                         1324 #define RT5665_I2S_PD2_3                        (0x2 << 12)
1322 #define RT5665_I2S_PD2_4                         1325 #define RT5665_I2S_PD2_4                        (0x3 << 12)
1323 #define RT5665_I2S_PD2_6                         1326 #define RT5665_I2S_PD2_6                        (0x4 << 12)
1324 #define RT5665_I2S_PD2_8                         1327 #define RT5665_I2S_PD2_8                        (0x5 << 12)
1325 #define RT5665_I2S_PD2_12                        1328 #define RT5665_I2S_PD2_12                       (0x6 << 12)
1326 #define RT5665_I2S_PD2_16                        1329 #define RT5665_I2S_PD2_16                       (0x7 << 12)
1327 #define RT5665_I2S_BCLK_MS3_MASK                 1330 #define RT5665_I2S_BCLK_MS3_MASK                (0x1 << 11)
1328 #define RT5665_I2S_BCLK_MS3_SFT                  1331 #define RT5665_I2S_BCLK_MS3_SFT                 11
1329 #define RT5665_I2S_BCLK_MS3_32                   1332 #define RT5665_I2S_BCLK_MS3_32                  (0x0 << 11)
1330 #define RT5665_I2S_BCLK_MS3_64                   1333 #define RT5665_I2S_BCLK_MS3_64                  (0x1 << 11)
1331 #define RT5665_I2S_PD3_MASK                      1334 #define RT5665_I2S_PD3_MASK                     (0x7 << 8)
1332 #define RT5665_I2S_PD3_SFT                       1335 #define RT5665_I2S_PD3_SFT                      8
1333 #define RT5665_I2S_PD3_1                         1336 #define RT5665_I2S_PD3_1                        (0x0 << 8)
1334 #define RT5665_I2S_PD3_2                         1337 #define RT5665_I2S_PD3_2                        (0x1 << 8)
1335 #define RT5665_I2S_PD3_3                         1338 #define RT5665_I2S_PD3_3                        (0x2 << 8)
1336 #define RT5665_I2S_PD3_4                         1339 #define RT5665_I2S_PD3_4                        (0x3 << 8)
1337 #define RT5665_I2S_PD3_6                         1340 #define RT5665_I2S_PD3_6                        (0x4 << 8)
1338 #define RT5665_I2S_PD3_8                         1341 #define RT5665_I2S_PD3_8                        (0x5 << 8)
1339 #define RT5665_I2S_PD3_12                        1342 #define RT5665_I2S_PD3_12                       (0x6 << 8)
1340 #define RT5665_I2S_PD3_16                        1343 #define RT5665_I2S_PD3_16                       (0x7 << 8)
1341 #define RT5665_I2S_PD4_MASK                      1344 #define RT5665_I2S_PD4_MASK                     (0x7 << 4)
1342 #define RT5665_I2S_PD4_SFT                       1345 #define RT5665_I2S_PD4_SFT                      4
1343 #define RT5665_I2S_PD4_1                         1346 #define RT5665_I2S_PD4_1                        (0x0 << 4)
1344 #define RT5665_I2S_PD4_2                         1347 #define RT5665_I2S_PD4_2                        (0x1 << 4)
1345 #define RT5665_I2S_PD4_3                         1348 #define RT5665_I2S_PD4_3                        (0x2 << 4)
1346 #define RT5665_I2S_PD4_4                         1349 #define RT5665_I2S_PD4_4                        (0x3 << 4)
1347 #define RT5665_I2S_PD4_6                         1350 #define RT5665_I2S_PD4_6                        (0x4 << 4)
1348 #define RT5665_I2S_PD4_8                         1351 #define RT5665_I2S_PD4_8                        (0x5 << 4)
1349 #define RT5665_I2S_PD4_12                        1352 #define RT5665_I2S_PD4_12                       (0x6 << 4)
1350 #define RT5665_I2S_PD4_16                        1353 #define RT5665_I2S_PD4_16                       (0x7 << 4)
1351                                                  1354 
1352 /* TDM control 1 (0x0078) */                     1355 /* TDM control 1 (0x0078) */
1353 #define RT5665_I2S1_MODE_MASK                    1356 #define RT5665_I2S1_MODE_MASK                   (0x1 << 15)
1354 #define RT5665_I2S1_MODE_I2S                     1357 #define RT5665_I2S1_MODE_I2S                    (0x0 << 15)
1355 #define RT5665_I2S1_MODE_TDM                     1358 #define RT5665_I2S1_MODE_TDM                    (0x1 << 15)
1356 #define RT5665_TDM_IN_CH_MASK                    1359 #define RT5665_TDM_IN_CH_MASK                   (0x3 << 10)
1357 #define RT5665_TDM_IN_CH_2                       1360 #define RT5665_TDM_IN_CH_2                      (0x0 << 10)
1358 #define RT5665_TDM_IN_CH_4                       1361 #define RT5665_TDM_IN_CH_4                      (0x1 << 10)
1359 #define RT5665_TDM_IN_CH_6                       1362 #define RT5665_TDM_IN_CH_6                      (0x2 << 10)
1360 #define RT5665_TDM_IN_CH_8                       1363 #define RT5665_TDM_IN_CH_8                      (0x3 << 10)
1361 #define RT5665_TDM_OUT_CH_MASK                   1364 #define RT5665_TDM_OUT_CH_MASK                  (0x3 << 8)
1362 #define RT5665_TDM_OUT_CH_2                      1365 #define RT5665_TDM_OUT_CH_2                     (0x0 << 8)
1363 #define RT5665_TDM_OUT_CH_4                      1366 #define RT5665_TDM_OUT_CH_4                     (0x1 << 8)
1364 #define RT5665_TDM_OUT_CH_6                      1367 #define RT5665_TDM_OUT_CH_6                     (0x2 << 8)
1365 #define RT5665_TDM_OUT_CH_8                      1368 #define RT5665_TDM_OUT_CH_8                     (0x3 << 8)
1366 #define RT5665_TDM_IN_LEN_MASK                   1369 #define RT5665_TDM_IN_LEN_MASK                  (0x3 << 6)
1367 #define RT5665_TDM_IN_LEN_16                     1370 #define RT5665_TDM_IN_LEN_16                    (0x0 << 6)
1368 #define RT5665_TDM_IN_LEN_20                     1371 #define RT5665_TDM_IN_LEN_20                    (0x1 << 6)
1369 #define RT5665_TDM_IN_LEN_24                     1372 #define RT5665_TDM_IN_LEN_24                    (0x2 << 6)
1370 #define RT5665_TDM_IN_LEN_32                     1373 #define RT5665_TDM_IN_LEN_32                    (0x3 << 6)
1371 #define RT5665_TDM_OUT_LEN_MASK                  1374 #define RT5665_TDM_OUT_LEN_MASK                 (0x3 << 4)
1372 #define RT5665_TDM_OUT_LEN_16                    1375 #define RT5665_TDM_OUT_LEN_16                   (0x0 << 4)
1373 #define RT5665_TDM_OUT_LEN_20                    1376 #define RT5665_TDM_OUT_LEN_20                   (0x1 << 4)
1374 #define RT5665_TDM_OUT_LEN_24                    1377 #define RT5665_TDM_OUT_LEN_24                   (0x2 << 4)
1375 #define RT5665_TDM_OUT_LEN_32                    1378 #define RT5665_TDM_OUT_LEN_32                   (0x3 << 4)
1376                                                  1379 
1377                                                  1380 
1378 /* TDM control 2 (0x0079) */                     1381 /* TDM control 2 (0x0079) */
1379 #define RT5665_I2S1_1_DS_ADC_SLOT01_SFT          1382 #define RT5665_I2S1_1_DS_ADC_SLOT01_SFT         14
1380 #define RT5665_I2S1_1_DS_ADC_SLOT23_SFT          1383 #define RT5665_I2S1_1_DS_ADC_SLOT23_SFT         12
1381 #define RT5665_I2S1_1_DS_ADC_SLOT45_SFT          1384 #define RT5665_I2S1_1_DS_ADC_SLOT45_SFT         10
1382 #define RT5665_I2S1_1_DS_ADC_SLOT67_SFT          1385 #define RT5665_I2S1_1_DS_ADC_SLOT67_SFT         8
1383 #define RT5665_I2S1_2_DS_ADC_SLOT01_SFT          1386 #define RT5665_I2S1_2_DS_ADC_SLOT01_SFT         6
1384 #define RT5665_I2S1_2_DS_ADC_SLOT23_SFT          1387 #define RT5665_I2S1_2_DS_ADC_SLOT23_SFT         4
1385 #define RT5665_I2S1_2_DS_ADC_SLOT45_SFT          1388 #define RT5665_I2S1_2_DS_ADC_SLOT45_SFT         2
1386 #define RT5665_I2S1_2_DS_ADC_SLOT67_SFT          1389 #define RT5665_I2S1_2_DS_ADC_SLOT67_SFT         0
1387                                                  1390 
1388 /* TDM control 3/4 (0x007a) (0x007b) */          1391 /* TDM control 3/4 (0x007a) (0x007b) */
1389 #define RT5665_IF1_ADC1_SEL_SFT                  1392 #define RT5665_IF1_ADC1_SEL_SFT                 10
1390 #define RT5665_IF1_ADC2_SEL_SFT                  1393 #define RT5665_IF1_ADC2_SEL_SFT                 9
1391 #define RT5665_IF1_ADC3_SEL_SFT                  1394 #define RT5665_IF1_ADC3_SEL_SFT                 8
1392 #define RT5665_IF1_ADC4_SEL_SFT                  1395 #define RT5665_IF1_ADC4_SEL_SFT                 7
1393 #define RT5665_TDM_ADC_SEL_SFT                   1396 #define RT5665_TDM_ADC_SEL_SFT                  0
1394 #define RT5665_TDM_ADC_CTRL_MASK                 1397 #define RT5665_TDM_ADC_CTRL_MASK                (0x1f << 0)
1395 #define RT5665_TDM_ADC_DATA_06                   1398 #define RT5665_TDM_ADC_DATA_06                  (0x6 << 0)
1396                                                  1399 
1397 /* Global Clock Control (0x0080) */              1400 /* Global Clock Control (0x0080) */
1398 #define RT5665_SCLK_SRC_MASK                     1401 #define RT5665_SCLK_SRC_MASK                    (0x3 << 14)
1399 #define RT5665_SCLK_SRC_SFT                      1402 #define RT5665_SCLK_SRC_SFT                     14
1400 #define RT5665_SCLK_SRC_MCLK                     1403 #define RT5665_SCLK_SRC_MCLK                    (0x0 << 14)
1401 #define RT5665_SCLK_SRC_PLL1                     1404 #define RT5665_SCLK_SRC_PLL1                    (0x1 << 14)
1402 #define RT5665_SCLK_SRC_RCCLK                    1405 #define RT5665_SCLK_SRC_RCCLK                   (0x2 << 14)
1403 #define RT5665_PLL1_SRC_MASK                     1406 #define RT5665_PLL1_SRC_MASK                    (0x7 << 8)
1404 #define RT5665_PLL1_SRC_SFT                      1407 #define RT5665_PLL1_SRC_SFT                     8
1405 #define RT5665_PLL1_SRC_MCLK                     1408 #define RT5665_PLL1_SRC_MCLK                    (0x0 << 8)
1406 #define RT5665_PLL1_SRC_BCLK1                    1409 #define RT5665_PLL1_SRC_BCLK1                   (0x1 << 8)
1407 #define RT5665_PLL1_SRC_BCLK2                    1410 #define RT5665_PLL1_SRC_BCLK2                   (0x2 << 8)
1408 #define RT5665_PLL1_SRC_BCLK3                    1411 #define RT5665_PLL1_SRC_BCLK3                   (0x3 << 8)
1409 #define RT5665_PLL1_PD_MASK                      1412 #define RT5665_PLL1_PD_MASK                     (0x7 << 4)
1410 #define RT5665_PLL1_PD_SFT                       1413 #define RT5665_PLL1_PD_SFT                      4
1411                                                  1414 
1412                                                  1415 
1413 #define RT5665_PLL_INP_MAX                       1416 #define RT5665_PLL_INP_MAX                      40000000
1414 #define RT5665_PLL_INP_MIN                       1417 #define RT5665_PLL_INP_MIN                      256000
1415 /* PLL M/N/K Code Control 1 (0x0081) */          1418 /* PLL M/N/K Code Control 1 (0x0081) */
1416 #define RT5665_PLL_N_MAX                         1419 #define RT5665_PLL_N_MAX                        0x001ff
1417 #define RT5665_PLL_N_MASK                        1420 #define RT5665_PLL_N_MASK                       (RT5665_PLL_N_MAX << 7)
1418 #define RT5665_PLL_N_SFT                         1421 #define RT5665_PLL_N_SFT                        7
1419 #define RT5665_PLL_K_MAX                         1422 #define RT5665_PLL_K_MAX                        0x001f
1420 #define RT5665_PLL_K_MASK                        1423 #define RT5665_PLL_K_MASK                       (RT5665_PLL_K_MAX)
1421 #define RT5665_PLL_K_SFT                         1424 #define RT5665_PLL_K_SFT                        0
1422                                                  1425 
1423 /* PLL M/N/K Code Control 2 (0x0082) */          1426 /* PLL M/N/K Code Control 2 (0x0082) */
1424 #define RT5665_PLL_M_MAX                         1427 #define RT5665_PLL_M_MAX                        0x00f
1425 #define RT5665_PLL_M_MASK                        1428 #define RT5665_PLL_M_MASK                       (RT5665_PLL_M_MAX << 12)
1426 #define RT5665_PLL_M_SFT                         1429 #define RT5665_PLL_M_SFT                        12
1427 #define RT5665_PLL_M_BP                          1430 #define RT5665_PLL_M_BP                         (0x1 << 11)
1428 #define RT5665_PLL_M_BP_SFT                      1431 #define RT5665_PLL_M_BP_SFT                     11
1429 #define RT5665_PLL_K_BP                          1432 #define RT5665_PLL_K_BP                         (0x1 << 10)
1430 #define RT5665_PLL_K_BP_SFT                      1433 #define RT5665_PLL_K_BP_SFT                     10
1431                                                  1434 
1432 /* PLL tracking mode 1 (0x0083) */               1435 /* PLL tracking mode 1 (0x0083) */
1433 #define RT5665_I2S3_ASRC_MASK                    1436 #define RT5665_I2S3_ASRC_MASK                   (0x1 << 15)
1434 #define RT5665_I2S3_ASRC_SFT                     1437 #define RT5665_I2S3_ASRC_SFT                    15
1435 #define RT5665_I2S2_ASRC_MASK                    1438 #define RT5665_I2S2_ASRC_MASK                   (0x1 << 14)
1436 #define RT5665_I2S2_ASRC_SFT                     1439 #define RT5665_I2S2_ASRC_SFT                    14
1437 #define RT5665_I2S1_ASRC_MASK                    1440 #define RT5665_I2S1_ASRC_MASK                   (0x1 << 13)
1438 #define RT5665_I2S1_ASRC_SFT                     1441 #define RT5665_I2S1_ASRC_SFT                    13
1439 #define RT5665_DAC_STO1_ASRC_MASK                1442 #define RT5665_DAC_STO1_ASRC_MASK               (0x1 << 12)
1440 #define RT5665_DAC_STO1_ASRC_SFT                 1443 #define RT5665_DAC_STO1_ASRC_SFT                12
1441 #define RT5665_DAC_STO2_ASRC_MASK                1444 #define RT5665_DAC_STO2_ASRC_MASK               (0x1 << 11)
1442 #define RT5665_DAC_STO2_ASRC_SFT                 1445 #define RT5665_DAC_STO2_ASRC_SFT                11
1443 #define RT5665_DAC_MONO_L_ASRC_MASK              1446 #define RT5665_DAC_MONO_L_ASRC_MASK             (0x1 << 10)
1444 #define RT5665_DAC_MONO_L_ASRC_SFT               1447 #define RT5665_DAC_MONO_L_ASRC_SFT              10
1445 #define RT5665_DAC_MONO_R_ASRC_MASK              1448 #define RT5665_DAC_MONO_R_ASRC_MASK             (0x1 << 9)
1446 #define RT5665_DAC_MONO_R_ASRC_SFT               1449 #define RT5665_DAC_MONO_R_ASRC_SFT              9
1447 #define RT5665_DMIC_STO1_ASRC_MASK               1450 #define RT5665_DMIC_STO1_ASRC_MASK              (0x1 << 8)
1448 #define RT5665_DMIC_STO1_ASRC_SFT                1451 #define RT5665_DMIC_STO1_ASRC_SFT               8
1449 #define RT5665_DMIC_STO2_ASRC_MASK               1452 #define RT5665_DMIC_STO2_ASRC_MASK              (0x1 << 7)
1450 #define RT5665_DMIC_STO2_ASRC_SFT                1453 #define RT5665_DMIC_STO2_ASRC_SFT               7
1451 #define RT5665_DMIC_MONO_L_ASRC_MASK             1454 #define RT5665_DMIC_MONO_L_ASRC_MASK            (0x1 << 6)
1452 #define RT5665_DMIC_MONO_L_ASRC_SFT              1455 #define RT5665_DMIC_MONO_L_ASRC_SFT             6
1453 #define RT5665_DMIC_MONO_R_ASRC_MASK             1456 #define RT5665_DMIC_MONO_R_ASRC_MASK            (0x1 << 5)
1454 #define RT5665_DMIC_MONO_R_ASRC_SFT              1457 #define RT5665_DMIC_MONO_R_ASRC_SFT             5
1455 #define RT5665_ADC_STO1_ASRC_MASK                1458 #define RT5665_ADC_STO1_ASRC_MASK               (0x1 << 4)
1456 #define RT5665_ADC_STO1_ASRC_SFT                 1459 #define RT5665_ADC_STO1_ASRC_SFT                4
1457 #define RT5665_ADC_STO2_ASRC_MASK                1460 #define RT5665_ADC_STO2_ASRC_MASK               (0x1 << 3)
1458 #define RT5665_ADC_STO2_ASRC_SFT                 1461 #define RT5665_ADC_STO2_ASRC_SFT                3
1459 #define RT5665_ADC_MONO_L_ASRC_MASK              1462 #define RT5665_ADC_MONO_L_ASRC_MASK             (0x1 << 2)
1460 #define RT5665_ADC_MONO_L_ASRC_SFT               1463 #define RT5665_ADC_MONO_L_ASRC_SFT              2
1461 #define RT5665_ADC_MONO_R_ASRC_MASK              1464 #define RT5665_ADC_MONO_R_ASRC_MASK             (0x1 << 1)
1462 #define RT5665_ADC_MONO_R_ASRC_SFT               1465 #define RT5665_ADC_MONO_R_ASRC_SFT              1
1463                                                  1466 
1464 /* PLL tracking mode 2 (0x0084)*/                1467 /* PLL tracking mode 2 (0x0084)*/
1465 #define RT5665_DA_STO1_CLK_SEL_MASK              1468 #define RT5665_DA_STO1_CLK_SEL_MASK             (0x7 << 12)
1466 #define RT5665_DA_STO1_CLK_SEL_SFT               1469 #define RT5665_DA_STO1_CLK_SEL_SFT              12
1467 #define RT5665_DA_STO2_CLK_SEL_MASK              1470 #define RT5665_DA_STO2_CLK_SEL_MASK             (0x7 << 8)
1468 #define RT5665_DA_STO2_CLK_SEL_SFT               1471 #define RT5665_DA_STO2_CLK_SEL_SFT              8
1469 #define RT5665_DA_MONOL_CLK_SEL_MASK             1472 #define RT5665_DA_MONOL_CLK_SEL_MASK            (0x7 << 4)
1470 #define RT5665_DA_MONOL_CLK_SEL_SFT              1473 #define RT5665_DA_MONOL_CLK_SEL_SFT             4
1471 #define RT5665_DA_MONOR_CLK_SEL_MASK             1474 #define RT5665_DA_MONOR_CLK_SEL_MASK            (0x7)
1472 #define RT5665_DA_MONOR_CLK_SEL_SFT              1475 #define RT5665_DA_MONOR_CLK_SEL_SFT             0
1473                                                  1476 
1474 /* PLL tracking mode 3 (0x0085)*/                1477 /* PLL tracking mode 3 (0x0085)*/
1475 #define RT5665_AD_STO1_CLK_SEL_MASK              1478 #define RT5665_AD_STO1_CLK_SEL_MASK             (0x7 << 12)
1476 #define RT5665_AD_STO1_CLK_SEL_SFT               1479 #define RT5665_AD_STO1_CLK_SEL_SFT              12
1477 #define RT5665_AD_STO2_CLK_SEL_MASK              1480 #define RT5665_AD_STO2_CLK_SEL_MASK             (0x7 << 8)
1478 #define RT5665_AD_STO2_CLK_SEL_SFT               1481 #define RT5665_AD_STO2_CLK_SEL_SFT              8
1479 #define RT5665_AD_MONOL_CLK_SEL_MASK             1482 #define RT5665_AD_MONOL_CLK_SEL_MASK            (0x7 << 4)
1480 #define RT5665_AD_MONOL_CLK_SEL_SFT              1483 #define RT5665_AD_MONOL_CLK_SEL_SFT             4
1481 #define RT5665_AD_MONOR_CLK_SEL_MASK             1484 #define RT5665_AD_MONOR_CLK_SEL_MASK            (0x7)
1482 #define RT5665_AD_MONOR_CLK_SEL_SFT              1485 #define RT5665_AD_MONOR_CLK_SEL_SFT             0
1483                                                  1486 
1484 /* ASRC Control 4 (0x0086) */                    1487 /* ASRC Control 4 (0x0086) */
1485 #define RT5665_I2S1_RATE_MASK                    1488 #define RT5665_I2S1_RATE_MASK                   (0xf << 12)
1486 #define RT5665_I2S1_RATE_SFT                     1489 #define RT5665_I2S1_RATE_SFT                    12
1487 #define RT5665_I2S2_RATE_MASK                    1490 #define RT5665_I2S2_RATE_MASK                   (0xf << 8)
1488 #define RT5665_I2S2_RATE_SFT                     1491 #define RT5665_I2S2_RATE_SFT                    8
1489 #define RT5665_I2S3_RATE_MASK                    1492 #define RT5665_I2S3_RATE_MASK                   (0xf << 4)
1490 #define RT5665_I2S3_RATE_SFT                     1493 #define RT5665_I2S3_RATE_SFT                    4
1491                                                  1494 
1492 /* Depop Mode Control 1 (0x008e) */              1495 /* Depop Mode Control 1 (0x008e) */
1493 #define RT5665_PUMP_EN                           1496 #define RT5665_PUMP_EN                          (0x1 << 3)
1494                                                  1497 
1495 /* Depop Mode Control 2 (0x8f) */                1498 /* Depop Mode Control 2 (0x8f) */
1496 #define RT5665_DEPOP_MASK                        1499 #define RT5665_DEPOP_MASK                       (0x1 << 13)
1497 #define RT5665_DEPOP_SFT                         1500 #define RT5665_DEPOP_SFT                        13
1498 #define RT5665_DEPOP_AUTO                        1501 #define RT5665_DEPOP_AUTO                       (0x0 << 13)
1499 #define RT5665_DEPOP_MAN                         1502 #define RT5665_DEPOP_MAN                        (0x1 << 13)
1500 #define RT5665_RAMP_MASK                         1503 #define RT5665_RAMP_MASK                        (0x1 << 12)
1501 #define RT5665_RAMP_SFT                          1504 #define RT5665_RAMP_SFT                         12
1502 #define RT5665_RAMP_DIS                          1505 #define RT5665_RAMP_DIS                         (0x0 << 12)
1503 #define RT5665_RAMP_EN                           1506 #define RT5665_RAMP_EN                          (0x1 << 12)
1504 #define RT5665_BPS_MASK                          1507 #define RT5665_BPS_MASK                         (0x1 << 11)
1505 #define RT5665_BPS_SFT                           1508 #define RT5665_BPS_SFT                          11
1506 #define RT5665_BPS_DIS                           1509 #define RT5665_BPS_DIS                          (0x0 << 11)
1507 #define RT5665_BPS_EN                            1510 #define RT5665_BPS_EN                           (0x1 << 11)
1508 #define RT5665_FAST_UPDN_MASK                    1511 #define RT5665_FAST_UPDN_MASK                   (0x1 << 10)
1509 #define RT5665_FAST_UPDN_SFT                     1512 #define RT5665_FAST_UPDN_SFT                    10
1510 #define RT5665_FAST_UPDN_DIS                     1513 #define RT5665_FAST_UPDN_DIS                    (0x0 << 10)
1511 #define RT5665_FAST_UPDN_EN                      1514 #define RT5665_FAST_UPDN_EN                     (0x1 << 10)
1512 #define RT5665_MRES_MASK                         1515 #define RT5665_MRES_MASK                        (0x3 << 8)
1513 #define RT5665_MRES_SFT                          1516 #define RT5665_MRES_SFT                         8
1514 #define RT5665_MRES_15MO                         1517 #define RT5665_MRES_15MO                        (0x0 << 8)
1515 #define RT5665_MRES_25MO                         1518 #define RT5665_MRES_25MO                        (0x1 << 8)
1516 #define RT5665_MRES_35MO                         1519 #define RT5665_MRES_35MO                        (0x2 << 8)
1517 #define RT5665_MRES_45MO                         1520 #define RT5665_MRES_45MO                        (0x3 << 8)
1518 #define RT5665_VLO_MASK                          1521 #define RT5665_VLO_MASK                         (0x1 << 7)
1519 #define RT5665_VLO_SFT                           1522 #define RT5665_VLO_SFT                          7
1520 #define RT5665_VLO_3V                            1523 #define RT5665_VLO_3V                           (0x0 << 7)
1521 #define RT5665_VLO_32V                           1524 #define RT5665_VLO_32V                          (0x1 << 7)
1522 #define RT5665_DIG_DP_MASK                       1525 #define RT5665_DIG_DP_MASK                      (0x1 << 6)
1523 #define RT5665_DIG_DP_SFT                        1526 #define RT5665_DIG_DP_SFT                       6
1524 #define RT5665_DIG_DP_DIS                        1527 #define RT5665_DIG_DP_DIS                       (0x0 << 6)
1525 #define RT5665_DIG_DP_EN                         1528 #define RT5665_DIG_DP_EN                        (0x1 << 6)
1526 #define RT5665_DP_TH_MASK                        1529 #define RT5665_DP_TH_MASK                       (0x3 << 4)
1527 #define RT5665_DP_TH_SFT                         1530 #define RT5665_DP_TH_SFT                        4
1528                                                  1531 
1529 /* Depop Mode Control 3 (0x90) */                1532 /* Depop Mode Control 3 (0x90) */
1530 #define RT5665_CP_SYS_MASK                       1533 #define RT5665_CP_SYS_MASK                      (0x7 << 12)
1531 #define RT5665_CP_SYS_SFT                        1534 #define RT5665_CP_SYS_SFT                       12
1532 #define RT5665_CP_FQ1_MASK                       1535 #define RT5665_CP_FQ1_MASK                      (0x7 << 8)
1533 #define RT5665_CP_FQ1_SFT                        1536 #define RT5665_CP_FQ1_SFT                       8
1534 #define RT5665_CP_FQ2_MASK                       1537 #define RT5665_CP_FQ2_MASK                      (0x7 << 4)
1535 #define RT5665_CP_FQ2_SFT                        1538 #define RT5665_CP_FQ2_SFT                       4
1536 #define RT5665_CP_FQ3_MASK                       1539 #define RT5665_CP_FQ3_MASK                      (0x7)
1537 #define RT5665_CP_FQ3_SFT                        1540 #define RT5665_CP_FQ3_SFT                       0
1538 #define RT5665_CP_FQ_1_5_KHZ                     1541 #define RT5665_CP_FQ_1_5_KHZ                    0
1539 #define RT5665_CP_FQ_3_KHZ                       1542 #define RT5665_CP_FQ_3_KHZ                      1
1540 #define RT5665_CP_FQ_6_KHZ                       1543 #define RT5665_CP_FQ_6_KHZ                      2
1541 #define RT5665_CP_FQ_12_KHZ                      1544 #define RT5665_CP_FQ_12_KHZ                     3
1542 #define RT5665_CP_FQ_24_KHZ                      1545 #define RT5665_CP_FQ_24_KHZ                     4
1543 #define RT5665_CP_FQ_48_KHZ                      1546 #define RT5665_CP_FQ_48_KHZ                     5
1544 #define RT5665_CP_FQ_96_KHZ                      1547 #define RT5665_CP_FQ_96_KHZ                     6
1545 #define RT5665_CP_FQ_192_KHZ                     1548 #define RT5665_CP_FQ_192_KHZ                    7
1546                                                  1549 
1547 /* HPOUT charge pump 1 (0x0091) */               1550 /* HPOUT charge pump 1 (0x0091) */
1548 #define RT5665_OSW_L_MASK                        1551 #define RT5665_OSW_L_MASK                       (0x1 << 11)
1549 #define RT5665_OSW_L_SFT                         1552 #define RT5665_OSW_L_SFT                        11
1550 #define RT5665_OSW_L_DIS                         1553 #define RT5665_OSW_L_DIS                        (0x0 << 11)
1551 #define RT5665_OSW_L_EN                          1554 #define RT5665_OSW_L_EN                         (0x1 << 11)
1552 #define RT5665_OSW_R_MASK                        1555 #define RT5665_OSW_R_MASK                       (0x1 << 10)
1553 #define RT5665_OSW_R_SFT                         1556 #define RT5665_OSW_R_SFT                        10
1554 #define RT5665_OSW_R_DIS                         1557 #define RT5665_OSW_R_DIS                        (0x0 << 10)
1555 #define RT5665_OSW_R_EN                          1558 #define RT5665_OSW_R_EN                         (0x1 << 10)
1556 #define RT5665_PM_HP_MASK                        1559 #define RT5665_PM_HP_MASK                       (0x3 << 8)
1557 #define RT5665_PM_HP_SFT                         1560 #define RT5665_PM_HP_SFT                        8
1558 #define RT5665_PM_HP_LV                          1561 #define RT5665_PM_HP_LV                         (0x0 << 8)
1559 #define RT5665_PM_HP_MV                          1562 #define RT5665_PM_HP_MV                         (0x1 << 8)
1560 #define RT5665_PM_HP_HV                          1563 #define RT5665_PM_HP_HV                         (0x2 << 8)
1561 #define RT5665_IB_HP_MASK                        1564 #define RT5665_IB_HP_MASK                       (0x3 << 6)
1562 #define RT5665_IB_HP_SFT                         1565 #define RT5665_IB_HP_SFT                        6
1563 #define RT5665_IB_HP_125IL                       1566 #define RT5665_IB_HP_125IL                      (0x0 << 6)
1564 #define RT5665_IB_HP_25IL                        1567 #define RT5665_IB_HP_25IL                       (0x1 << 6)
1565 #define RT5665_IB_HP_5IL                         1568 #define RT5665_IB_HP_5IL                        (0x2 << 6)
1566 #define RT5665_IB_HP_1IL                         1569 #define RT5665_IB_HP_1IL                        (0x3 << 6)
1567                                                  1570 
1568 /* PV detection and SPK gain control (0x92) *    1571 /* PV detection and SPK gain control (0x92) */
1569 #define RT5665_PVDD_DET_MASK                     1572 #define RT5665_PVDD_DET_MASK                    (0x1 << 15)
1570 #define RT5665_PVDD_DET_SFT                      1573 #define RT5665_PVDD_DET_SFT                     15
1571 #define RT5665_PVDD_DET_DIS                      1574 #define RT5665_PVDD_DET_DIS                     (0x0 << 15)
1572 #define RT5665_PVDD_DET_EN                       1575 #define RT5665_PVDD_DET_EN                      (0x1 << 15)
1573 #define RT5665_SPK_AG_MASK                       1576 #define RT5665_SPK_AG_MASK                      (0x1 << 14)
1574 #define RT5665_SPK_AG_SFT                        1577 #define RT5665_SPK_AG_SFT                       14
1575 #define RT5665_SPK_AG_DIS                        1578 #define RT5665_SPK_AG_DIS                       (0x0 << 14)
1576 #define RT5665_SPK_AG_EN                         1579 #define RT5665_SPK_AG_EN                        (0x1 << 14)
1577                                                  1580 
1578 /* Micbias Control1 (0x93) */                    1581 /* Micbias Control1 (0x93) */
1579 #define RT5665_MIC1_BS_MASK                      1582 #define RT5665_MIC1_BS_MASK                     (0x1 << 15)
1580 #define RT5665_MIC1_BS_SFT                       1583 #define RT5665_MIC1_BS_SFT                      15
1581 #define RT5665_MIC1_BS_9AV                       1584 #define RT5665_MIC1_BS_9AV                      (0x0 << 15)
1582 #define RT5665_MIC1_BS_75AV                      1585 #define RT5665_MIC1_BS_75AV                     (0x1 << 15)
1583 #define RT5665_MIC2_BS_MASK                      1586 #define RT5665_MIC2_BS_MASK                     (0x1 << 14)
1584 #define RT5665_MIC2_BS_SFT                       1587 #define RT5665_MIC2_BS_SFT                      14
1585 #define RT5665_MIC2_BS_9AV                       1588 #define RT5665_MIC2_BS_9AV                      (0x0 << 14)
1586 #define RT5665_MIC2_BS_75AV                      1589 #define RT5665_MIC2_BS_75AV                     (0x1 << 14)
1587 #define RT5665_MIC1_CLK_MASK                     1590 #define RT5665_MIC1_CLK_MASK                    (0x1 << 13)
1588 #define RT5665_MIC1_CLK_SFT                      1591 #define RT5665_MIC1_CLK_SFT                     13
1589 #define RT5665_MIC1_CLK_DIS                      1592 #define RT5665_MIC1_CLK_DIS                     (0x0 << 13)
1590 #define RT5665_MIC1_CLK_EN                       1593 #define RT5665_MIC1_CLK_EN                      (0x1 << 13)
1591 #define RT5665_MIC2_CLK_MASK                     1594 #define RT5665_MIC2_CLK_MASK                    (0x1 << 12)
1592 #define RT5665_MIC2_CLK_SFT                      1595 #define RT5665_MIC2_CLK_SFT                     12
1593 #define RT5665_MIC2_CLK_DIS                      1596 #define RT5665_MIC2_CLK_DIS                     (0x0 << 12)
1594 #define RT5665_MIC2_CLK_EN                       1597 #define RT5665_MIC2_CLK_EN                      (0x1 << 12)
1595 #define RT5665_MIC1_OVCD_MASK                    1598 #define RT5665_MIC1_OVCD_MASK                   (0x1 << 11)
1596 #define RT5665_MIC1_OVCD_SFT                     1599 #define RT5665_MIC1_OVCD_SFT                    11
1597 #define RT5665_MIC1_OVCD_DIS                     1600 #define RT5665_MIC1_OVCD_DIS                    (0x0 << 11)
1598 #define RT5665_MIC1_OVCD_EN                      1601 #define RT5665_MIC1_OVCD_EN                     (0x1 << 11)
1599 #define RT5665_MIC1_OVTH_MASK                    1602 #define RT5665_MIC1_OVTH_MASK                   (0x3 << 9)
1600 #define RT5665_MIC1_OVTH_SFT                     1603 #define RT5665_MIC1_OVTH_SFT                    9
1601 #define RT5665_MIC1_OVTH_600UA                   1604 #define RT5665_MIC1_OVTH_600UA                  (0x0 << 9)
1602 #define RT5665_MIC1_OVTH_1500UA                  1605 #define RT5665_MIC1_OVTH_1500UA                 (0x1 << 9)
1603 #define RT5665_MIC1_OVTH_2000UA                  1606 #define RT5665_MIC1_OVTH_2000UA                 (0x2 << 9)
1604 #define RT5665_MIC2_OVCD_MASK                    1607 #define RT5665_MIC2_OVCD_MASK                   (0x1 << 8)
1605 #define RT5665_MIC2_OVCD_SFT                     1608 #define RT5665_MIC2_OVCD_SFT                    8
1606 #define RT5665_MIC2_OVCD_DIS                     1609 #define RT5665_MIC2_OVCD_DIS                    (0x0 << 8)
1607 #define RT5665_MIC2_OVCD_EN                      1610 #define RT5665_MIC2_OVCD_EN                     (0x1 << 8)
1608 #define RT5665_MIC2_OVTH_MASK                    1611 #define RT5665_MIC2_OVTH_MASK                   (0x3 << 6)
1609 #define RT5665_MIC2_OVTH_SFT                     1612 #define RT5665_MIC2_OVTH_SFT                    6
1610 #define RT5665_MIC2_OVTH_600UA                   1613 #define RT5665_MIC2_OVTH_600UA                  (0x0 << 6)
1611 #define RT5665_MIC2_OVTH_1500UA                  1614 #define RT5665_MIC2_OVTH_1500UA                 (0x1 << 6)
1612 #define RT5665_MIC2_OVTH_2000UA                  1615 #define RT5665_MIC2_OVTH_2000UA                 (0x2 << 6)
1613 #define RT5665_PWR_MB_MASK                       1616 #define RT5665_PWR_MB_MASK                      (0x1 << 5)
1614 #define RT5665_PWR_MB_SFT                        1617 #define RT5665_PWR_MB_SFT                       5
1615 #define RT5665_PWR_MB_PD                         1618 #define RT5665_PWR_MB_PD                        (0x0 << 5)
1616 #define RT5665_PWR_MB_PU                         1619 #define RT5665_PWR_MB_PU                        (0x1 << 5)
1617                                                  1620 
1618 /* Micbias Control2 (0x94) */                    1621 /* Micbias Control2 (0x94) */
1619 #define RT5665_PWR_CLK25M_MASK                   1622 #define RT5665_PWR_CLK25M_MASK                  (0x1 << 9)
1620 #define RT5665_PWR_CLK25M_SFT                    1623 #define RT5665_PWR_CLK25M_SFT                   9
1621 #define RT5665_PWR_CLK25M_PD                     1624 #define RT5665_PWR_CLK25M_PD                    (0x0 << 9)
1622 #define RT5665_PWR_CLK25M_PU                     1625 #define RT5665_PWR_CLK25M_PU                    (0x1 << 9)
1623 #define RT5665_PWR_CLK1M_MASK                    1626 #define RT5665_PWR_CLK1M_MASK                   (0x1 << 8)
1624 #define RT5665_PWR_CLK1M_SFT                     1627 #define RT5665_PWR_CLK1M_SFT                    8
1625 #define RT5665_PWR_CLK1M_PD                      1628 #define RT5665_PWR_CLK1M_PD                     (0x0 << 8)
1626 #define RT5665_PWR_CLK1M_PU                      1629 #define RT5665_PWR_CLK1M_PU                     (0x1 << 8)
1627                                                  1630 
1628 /* I2S Master Mode Clock Control 1 (0x00a0) *    1631 /* I2S Master Mode Clock Control 1 (0x00a0) */
1629 #define RT5665_CLK_SRC_MCLK                      1632 #define RT5665_CLK_SRC_MCLK                     (0x0)
1630 #define RT5665_CLK_SRC_PLL1                      1633 #define RT5665_CLK_SRC_PLL1                     (0x1)
1631 #define RT5665_CLK_SRC_RCCLK                     1634 #define RT5665_CLK_SRC_RCCLK                    (0x2)
1632 #define RT5665_I2S_PD_1                          1635 #define RT5665_I2S_PD_1                         (0x0)
1633 #define RT5665_I2S_PD_2                          1636 #define RT5665_I2S_PD_2                         (0x1)
1634 #define RT5665_I2S_PD_3                          1637 #define RT5665_I2S_PD_3                         (0x2)
1635 #define RT5665_I2S_PD_4                          1638 #define RT5665_I2S_PD_4                         (0x3)
1636 #define RT5665_I2S_PD_6                          1639 #define RT5665_I2S_PD_6                         (0x4)
1637 #define RT5665_I2S_PD_8                          1640 #define RT5665_I2S_PD_8                         (0x5)
1638 #define RT5665_I2S_PD_12                         1641 #define RT5665_I2S_PD_12                        (0x6)
1639 #define RT5665_I2S_PD_16                         1642 #define RT5665_I2S_PD_16                        (0x7)
1640 #define RT5665_I2S2_SRC_MASK                     1643 #define RT5665_I2S2_SRC_MASK                    (0x3 << 12)
1641 #define RT5665_I2S2_SRC_SFT                      1644 #define RT5665_I2S2_SRC_SFT                     12
1642 #define RT5665_I2S2_M_PD_MASK                    1645 #define RT5665_I2S2_M_PD_MASK                   (0x7 << 8)
1643 #define RT5665_I2S2_M_PD_SFT                     1646 #define RT5665_I2S2_M_PD_SFT                    8
1644 #define RT5665_I2S3_SRC_MASK                     1647 #define RT5665_I2S3_SRC_MASK                    (0x3 << 4)
1645 #define RT5665_I2S3_SRC_SFT                      1648 #define RT5665_I2S3_SRC_SFT                     4
1646 #define RT5665_I2S3_M_PD_MASK                    1649 #define RT5665_I2S3_M_PD_MASK                   (0x7 << 0)
1647 #define RT5665_I2S3_M_PD_SFT                     1650 #define RT5665_I2S3_M_PD_SFT                    0
1648                                                  1651 
1649                                                  1652 
1650 /* EQ Control 1 (0x00b0) */                      1653 /* EQ Control 1 (0x00b0) */
1651 #define RT5665_EQ_SRC_DAC                        1654 #define RT5665_EQ_SRC_DAC                       (0x0 << 15)
1652 #define RT5665_EQ_SRC_ADC                        1655 #define RT5665_EQ_SRC_ADC                       (0x1 << 15)
1653 #define RT5665_EQ_UPD                            1656 #define RT5665_EQ_UPD                           (0x1 << 14)
1654 #define RT5665_EQ_UPD_BIT                        1657 #define RT5665_EQ_UPD_BIT                       14
1655 #define RT5665_EQ_CD_MASK                        1658 #define RT5665_EQ_CD_MASK                       (0x1 << 13)
1656 #define RT5665_EQ_CD_SFT                         1659 #define RT5665_EQ_CD_SFT                        13
1657 #define RT5665_EQ_CD_DIS                         1660 #define RT5665_EQ_CD_DIS                        (0x0 << 13)
1658 #define RT5665_EQ_CD_EN                          1661 #define RT5665_EQ_CD_EN                         (0x1 << 13)
1659 #define RT5665_EQ_DITH_MASK                      1662 #define RT5665_EQ_DITH_MASK                     (0x3 << 8)
1660 #define RT5665_EQ_DITH_SFT                       1663 #define RT5665_EQ_DITH_SFT                      8
1661 #define RT5665_EQ_DITH_NOR                       1664 #define RT5665_EQ_DITH_NOR                      (0x0 << 8)
1662 #define RT5665_EQ_DITH_LSB                       1665 #define RT5665_EQ_DITH_LSB                      (0x1 << 8)
1663 #define RT5665_EQ_DITH_LSB_1                     1666 #define RT5665_EQ_DITH_LSB_1                    (0x2 << 8)
1664 #define RT5665_EQ_DITH_LSB_2                     1667 #define RT5665_EQ_DITH_LSB_2                    (0x3 << 8)
1665                                                  1668 
1666 /* IRQ Control 1 (0x00b7) */                     1669 /* IRQ Control 1 (0x00b7) */
1667 #define RT5665_JD1_1_EN_MASK                     1670 #define RT5665_JD1_1_EN_MASK                    (0x1 << 15)
1668 #define RT5665_JD1_1_EN_SFT                      1671 #define RT5665_JD1_1_EN_SFT                     15
1669 #define RT5665_JD1_1_DIS                         1672 #define RT5665_JD1_1_DIS                        (0x0 << 15)
1670 #define RT5665_JD1_1_EN                          1673 #define RT5665_JD1_1_EN                         (0x1 << 15)
1671 #define RT5665_JD1_2_EN_MASK                     1674 #define RT5665_JD1_2_EN_MASK                    (0x1 << 12)
1672 #define RT5665_JD1_2_EN_SFT                      1675 #define RT5665_JD1_2_EN_SFT                     12
1673 #define RT5665_JD1_2_DIS                         1676 #define RT5665_JD1_2_DIS                        (0x0 << 12)
1674 #define RT5665_JD1_2_EN                          1677 #define RT5665_JD1_2_EN                         (0x1 << 12)
1675                                                  1678 
1676 /* IRQ Control 2 (0x00b8) */                     1679 /* IRQ Control 2 (0x00b8) */
1677 #define RT5665_IL_IRQ_MASK                       1680 #define RT5665_IL_IRQ_MASK                      (0x1 << 6)
1678 #define RT5665_IL_IRQ_DIS                        1681 #define RT5665_IL_IRQ_DIS                       (0x0 << 6)
1679 #define RT5665_IL_IRQ_EN                         1682 #define RT5665_IL_IRQ_EN                        (0x1 << 6)
1680                                                  1683 
1681 /* IRQ Control 5 (0x00ba) */                     1684 /* IRQ Control 5 (0x00ba) */
1682 #define RT5665_IRQ_JD_EN                         1685 #define RT5665_IRQ_JD_EN                        (0x1 << 3)
1683 #define RT5665_IRQ_JD_EN_SFT                     1686 #define RT5665_IRQ_JD_EN_SFT                    3
1684                                                  1687 
1685 /* GPIO Control 1 (0x00c0) */                    1688 /* GPIO Control 1 (0x00c0) */
1686 #define RT5665_GP1_PIN_MASK                      1689 #define RT5665_GP1_PIN_MASK                     (0x1 << 15)
1687 #define RT5665_GP1_PIN_SFT                       1690 #define RT5665_GP1_PIN_SFT                      15
1688 #define RT5665_GP1_PIN_GPIO1                     1691 #define RT5665_GP1_PIN_GPIO1                    (0x0 << 15)
1689 #define RT5665_GP1_PIN_IRQ                       1692 #define RT5665_GP1_PIN_IRQ                      (0x1 << 15)
1690 #define RT5665_GP2_PIN_MASK                      1693 #define RT5665_GP2_PIN_MASK                     (0x3 << 13)
1691 #define RT5665_GP2_PIN_SFT                       1694 #define RT5665_GP2_PIN_SFT                      13
1692 #define RT5665_GP2_PIN_GPIO2                     1695 #define RT5665_GP2_PIN_GPIO2                    (0x0 << 13)
1693 #define RT5665_GP2_PIN_BCLK2                     1696 #define RT5665_GP2_PIN_BCLK2                    (0x1 << 13)
1694 #define RT5665_GP2_PIN_PDM_SCL                   1697 #define RT5665_GP2_PIN_PDM_SCL                  (0x2 << 13)
1695 #define RT5665_GP3_PIN_MASK                      1698 #define RT5665_GP3_PIN_MASK                     (0x3 << 11)
1696 #define RT5665_GP3_PIN_SFT                       1699 #define RT5665_GP3_PIN_SFT                      11
1697 #define RT5665_GP3_PIN_GPIO3                     1700 #define RT5665_GP3_PIN_GPIO3                    (0x0 << 11)
1698 #define RT5665_GP3_PIN_LRCK2                     1701 #define RT5665_GP3_PIN_LRCK2                    (0x1 << 11)
1699 #define RT5665_GP3_PIN_PDM_SDA                   1702 #define RT5665_GP3_PIN_PDM_SDA                  (0x2 << 11)
1700 #define RT5665_GP4_PIN_MASK                      1703 #define RT5665_GP4_PIN_MASK                     (0x3 << 9)
1701 #define RT5665_GP4_PIN_SFT                       1704 #define RT5665_GP4_PIN_SFT                      9
1702 #define RT5665_GP4_PIN_GPIO4                     1705 #define RT5665_GP4_PIN_GPIO4                    (0x0 << 9)
1703 #define RT5665_GP4_PIN_DACDAT2_1                 1706 #define RT5665_GP4_PIN_DACDAT2_1                (0x1 << 9)
1704 #define RT5665_GP4_PIN_DMIC1_SDA                 1707 #define RT5665_GP4_PIN_DMIC1_SDA                (0x2 << 9)
1705 #define RT5665_GP5_PIN_MASK                      1708 #define RT5665_GP5_PIN_MASK                     (0x3 << 7)
1706 #define RT5665_GP5_PIN_SFT                       1709 #define RT5665_GP5_PIN_SFT                      7
1707 #define RT5665_GP5_PIN_GPIO5                     1710 #define RT5665_GP5_PIN_GPIO5                    (0x0 << 7)
1708 #define RT5665_GP5_PIN_ADCDAT2_1                 1711 #define RT5665_GP5_PIN_ADCDAT2_1                (0x1 << 7)
1709 #define RT5665_GP5_PIN_DMIC2_SDA                 1712 #define RT5665_GP5_PIN_DMIC2_SDA                (0x2 << 7)
1710 #define RT5665_GP6_PIN_MASK                      1713 #define RT5665_GP6_PIN_MASK                     (0x3 << 5)
1711 #define RT5665_GP6_PIN_SFT                       1714 #define RT5665_GP6_PIN_SFT                      5
1712 #define RT5665_GP6_PIN_GPIO6                     1715 #define RT5665_GP6_PIN_GPIO6                    (0x0 << 5)
1713 #define RT5665_GP6_PIN_BCLK3                     1716 #define RT5665_GP6_PIN_BCLK3                    (0x1 << 5)
1714 #define RT5665_GP6_PIN_PDM_SCL                   1717 #define RT5665_GP6_PIN_PDM_SCL                  (0x2 << 5)
1715 #define RT5665_GP7_PIN_MASK                      1718 #define RT5665_GP7_PIN_MASK                     (0x3 << 3)
1716 #define RT5665_GP7_PIN_SFT                       1719 #define RT5665_GP7_PIN_SFT                      3
1717 #define RT5665_GP7_PIN_GPIO7                     1720 #define RT5665_GP7_PIN_GPIO7                    (0x0 << 3)
1718 #define RT5665_GP7_PIN_LRCK3                     1721 #define RT5665_GP7_PIN_LRCK3                    (0x1 << 3)
1719 #define RT5665_GP7_PIN_PDM_SDA                   1722 #define RT5665_GP7_PIN_PDM_SDA                  (0x2 << 3)
1720 #define RT5665_GP8_PIN_MASK                      1723 #define RT5665_GP8_PIN_MASK                     (0x3 << 1)
1721 #define RT5665_GP8_PIN_SFT                       1724 #define RT5665_GP8_PIN_SFT                      1
1722 #define RT5665_GP8_PIN_GPIO8                     1725 #define RT5665_GP8_PIN_GPIO8                    (0x0 << 1)
1723 #define RT5665_GP8_PIN_DACDAT3                   1726 #define RT5665_GP8_PIN_DACDAT3                  (0x1 << 1)
1724 #define RT5665_GP8_PIN_DMIC2_SCL                 1727 #define RT5665_GP8_PIN_DMIC2_SCL                (0x2 << 1)
1725 #define RT5665_GP8_PIN_DACDAT2_2                 1728 #define RT5665_GP8_PIN_DACDAT2_2                (0x3 << 1)
1726                                                  1729 
1727                                                  1730 
1728 /* GPIO Control 2 (0x00c1)*/                     1731 /* GPIO Control 2 (0x00c1)*/
1729 #define RT5665_GP9_PIN_MASK                      1732 #define RT5665_GP9_PIN_MASK                     (0x3 << 14)
1730 #define RT5665_GP9_PIN_SFT                       1733 #define RT5665_GP9_PIN_SFT                      14
1731 #define RT5665_GP9_PIN_GPIO9                     1734 #define RT5665_GP9_PIN_GPIO9                    (0x0 << 14)
1732 #define RT5665_GP9_PIN_ADCDAT3                   1735 #define RT5665_GP9_PIN_ADCDAT3                  (0x1 << 14)
1733 #define RT5665_GP9_PIN_DMIC1_SCL                 1736 #define RT5665_GP9_PIN_DMIC1_SCL                (0x2 << 14)
1734 #define RT5665_GP9_PIN_ADCDAT2_2                 1737 #define RT5665_GP9_PIN_ADCDAT2_2                (0x3 << 14)
1735 #define RT5665_GP10_PIN_MASK                     1738 #define RT5665_GP10_PIN_MASK                    (0x3 << 12)
1736 #define RT5665_GP10_PIN_SFT                      1739 #define RT5665_GP10_PIN_SFT                     12
1737 #define RT5665_GP10_PIN_GPIO10                   1740 #define RT5665_GP10_PIN_GPIO10                  (0x0 << 12)
1738 #define RT5665_GP10_PIN_ADCDAT1_2                1741 #define RT5665_GP10_PIN_ADCDAT1_2               (0x1 << 12)
1739 #define RT5665_GP10_PIN_LPD                      1742 #define RT5665_GP10_PIN_LPD                     (0x2 << 12)
1740 #define RT5665_GP1_PF_MASK                       1743 #define RT5665_GP1_PF_MASK                      (0x1 << 11)
1741 #define RT5665_GP1_PF_IN                         1744 #define RT5665_GP1_PF_IN                        (0x0 << 11)
1742 #define RT5665_GP1_PF_OUT                        1745 #define RT5665_GP1_PF_OUT                       (0x1 << 11)
1743 #define RT5665_GP1_OUT_MASK                      1746 #define RT5665_GP1_OUT_MASK                     (0x1 << 10)
1744 #define RT5665_GP1_OUT_H                         1747 #define RT5665_GP1_OUT_H                        (0x0 << 10)
1745 #define RT5665_GP1_OUT_L                         1748 #define RT5665_GP1_OUT_L                        (0x1 << 10)
1746 #define RT5665_GP2_PF_MASK                       1749 #define RT5665_GP2_PF_MASK                      (0x1 << 9)
1747 #define RT5665_GP2_PF_IN                         1750 #define RT5665_GP2_PF_IN                        (0x0 << 9)
1748 #define RT5665_GP2_PF_OUT                        1751 #define RT5665_GP2_PF_OUT                       (0x1 << 9)
1749 #define RT5665_GP2_OUT_MASK                      1752 #define RT5665_GP2_OUT_MASK                     (0x1 << 8)
1750 #define RT5665_GP2_OUT_H                         1753 #define RT5665_GP2_OUT_H                        (0x0 << 8)
1751 #define RT5665_GP2_OUT_L                         1754 #define RT5665_GP2_OUT_L                        (0x1 << 8)
1752 #define RT5665_GP3_PF_MASK                       1755 #define RT5665_GP3_PF_MASK                      (0x1 << 7)
1753 #define RT5665_GP3_PF_IN                         1756 #define RT5665_GP3_PF_IN                        (0x0 << 7)
1754 #define RT5665_GP3_PF_OUT                        1757 #define RT5665_GP3_PF_OUT                       (0x1 << 7)
1755 #define RT5665_GP3_OUT_MASK                      1758 #define RT5665_GP3_OUT_MASK                     (0x1 << 6)
1756 #define RT5665_GP3_OUT_H                         1759 #define RT5665_GP3_OUT_H                        (0x0 << 6)
1757 #define RT5665_GP3_OUT_L                         1760 #define RT5665_GP3_OUT_L                        (0x1 << 6)
1758 #define RT5665_GP4_PF_MASK                       1761 #define RT5665_GP4_PF_MASK                      (0x1 << 5)
1759 #define RT5665_GP4_PF_IN                         1762 #define RT5665_GP4_PF_IN                        (0x0 << 5)
1760 #define RT5665_GP4_PF_OUT                        1763 #define RT5665_GP4_PF_OUT                       (0x1 << 5)
1761 #define RT5665_GP4_OUT_MASK                      1764 #define RT5665_GP4_OUT_MASK                     (0x1 << 4)
1762 #define RT5665_GP4_OUT_H                         1765 #define RT5665_GP4_OUT_H                        (0x0 << 4)
1763 #define RT5665_GP4_OUT_L                         1766 #define RT5665_GP4_OUT_L                        (0x1 << 4)
1764 #define RT5665_GP5_PF_MASK                       1767 #define RT5665_GP5_PF_MASK                      (0x1 << 3)
1765 #define RT5665_GP5_PF_IN                         1768 #define RT5665_GP5_PF_IN                        (0x0 << 3)
1766 #define RT5665_GP5_PF_OUT                        1769 #define RT5665_GP5_PF_OUT                       (0x1 << 3)
1767 #define RT5665_GP5_OUT_MASK                      1770 #define RT5665_GP5_OUT_MASK                     (0x1 << 2)
1768 #define RT5665_GP5_OUT_H                         1771 #define RT5665_GP5_OUT_H                        (0x0 << 2)
1769 #define RT5665_GP5_OUT_L                         1772 #define RT5665_GP5_OUT_L                        (0x1 << 2)
1770 #define RT5665_GP6_PF_MASK                       1773 #define RT5665_GP6_PF_MASK                      (0x1 << 1)
1771 #define RT5665_GP6_PF_IN                         1774 #define RT5665_GP6_PF_IN                        (0x0 << 1)
1772 #define RT5665_GP6_PF_OUT                        1775 #define RT5665_GP6_PF_OUT                       (0x1 << 1)
1773 #define RT5665_GP6_OUT_MASK                      1776 #define RT5665_GP6_OUT_MASK                     (0x1)
1774 #define RT5665_GP6_OUT_H                         1777 #define RT5665_GP6_OUT_H                        (0x0)
1775 #define RT5665_GP6_OUT_L                         1778 #define RT5665_GP6_OUT_L                        (0x1)
1776                                                  1779 
1777                                                  1780 
1778 /* GPIO Control 3 (0x00c2) */                    1781 /* GPIO Control 3 (0x00c2) */
1779 #define RT5665_GP7_PF_MASK                       1782 #define RT5665_GP7_PF_MASK                      (0x1 << 15)
1780 #define RT5665_GP7_PF_IN                         1783 #define RT5665_GP7_PF_IN                        (0x0 << 15)
1781 #define RT5665_GP7_PF_OUT                        1784 #define RT5665_GP7_PF_OUT                       (0x1 << 15)
1782 #define RT5665_GP7_OUT_MASK                      1785 #define RT5665_GP7_OUT_MASK                     (0x1 << 14)
1783 #define RT5665_GP7_OUT_H                         1786 #define RT5665_GP7_OUT_H                        (0x0 << 14)
1784 #define RT5665_GP7_OUT_L                         1787 #define RT5665_GP7_OUT_L                        (0x1 << 14)
1785 #define RT5665_GP8_PF_MASK                       1788 #define RT5665_GP8_PF_MASK                      (0x1 << 13)
1786 #define RT5665_GP8_PF_IN                         1789 #define RT5665_GP8_PF_IN                        (0x0 << 13)
1787 #define RT5665_GP8_PF_OUT                        1790 #define RT5665_GP8_PF_OUT                       (0x1 << 13)
1788 #define RT5665_GP8_OUT_MASK                      1791 #define RT5665_GP8_OUT_MASK                     (0x1 << 12)
1789 #define RT5665_GP8_OUT_H                         1792 #define RT5665_GP8_OUT_H                        (0x0 << 12)
1790 #define RT5665_GP8_OUT_L                         1793 #define RT5665_GP8_OUT_L                        (0x1 << 12)
1791 #define RT5665_GP9_PF_MASK                       1794 #define RT5665_GP9_PF_MASK                      (0x1 << 11)
1792 #define RT5665_GP9_PF_IN                         1795 #define RT5665_GP9_PF_IN                        (0x0 << 11)
1793 #define RT5665_GP9_PF_OUT                        1796 #define RT5665_GP9_PF_OUT                       (0x1 << 11)
1794 #define RT5665_GP9_OUT_MASK                      1797 #define RT5665_GP9_OUT_MASK                     (0x1 << 10)
1795 #define RT5665_GP9_OUT_H                         1798 #define RT5665_GP9_OUT_H                        (0x0 << 10)
1796 #define RT5665_GP9_OUT_L                         1799 #define RT5665_GP9_OUT_L                        (0x1 << 10)
1797 #define RT5665_GP10_PF_MASK                      1800 #define RT5665_GP10_PF_MASK                     (0x1 << 9)
1798 #define RT5665_GP10_PF_IN                        1801 #define RT5665_GP10_PF_IN                       (0x0 << 9)
1799 #define RT5665_GP10_PF_OUT                       1802 #define RT5665_GP10_PF_OUT                      (0x1 << 9)
1800 #define RT5665_GP10_OUT_MASK                     1803 #define RT5665_GP10_OUT_MASK                    (0x1 << 8)
1801 #define RT5665_GP10_OUT_H                        1804 #define RT5665_GP10_OUT_H                       (0x0 << 8)
1802 #define RT5665_GP10_OUT_L                        1805 #define RT5665_GP10_OUT_L                       (0x1 << 8)
1803 #define RT5665_GP11_PF_MASK                      1806 #define RT5665_GP11_PF_MASK                     (0x1 << 7)
1804 #define RT5665_GP11_PF_IN                        1807 #define RT5665_GP11_PF_IN                       (0x0 << 7)
1805 #define RT5665_GP11_PF_OUT                       1808 #define RT5665_GP11_PF_OUT                      (0x1 << 7)
1806 #define RT5665_GP11_OUT_MASK                     1809 #define RT5665_GP11_OUT_MASK                    (0x1 << 6)
1807 #define RT5665_GP11_OUT_H                        1810 #define RT5665_GP11_OUT_H                       (0x0 << 6)
1808 #define RT5665_GP11_OUT_L                        1811 #define RT5665_GP11_OUT_L                       (0x1 << 6)
1809                                                  1812 
1810 /* Soft volume and zero cross control 1 (0x00    1813 /* Soft volume and zero cross control 1 (0x00d9) */
1811 #define RT5665_SV_MASK                           1814 #define RT5665_SV_MASK                          (0x1 << 15)
1812 #define RT5665_SV_SFT                            1815 #define RT5665_SV_SFT                           15
1813 #define RT5665_SV_DIS                            1816 #define RT5665_SV_DIS                           (0x0 << 15)
1814 #define RT5665_SV_EN                             1817 #define RT5665_SV_EN                            (0x1 << 15)
1815 #define RT5665_OUT_SV_MASK                       1818 #define RT5665_OUT_SV_MASK                      (0x1 << 13)
1816 #define RT5665_OUT_SV_SFT                        1819 #define RT5665_OUT_SV_SFT                       13
1817 #define RT5665_OUT_SV_DIS                        1820 #define RT5665_OUT_SV_DIS                       (0x0 << 13)
1818 #define RT5665_OUT_SV_EN                         1821 #define RT5665_OUT_SV_EN                        (0x1 << 13)
1819 #define RT5665_HP_SV_MASK                        1822 #define RT5665_HP_SV_MASK                       (0x1 << 12)
1820 #define RT5665_HP_SV_SFT                         1823 #define RT5665_HP_SV_SFT                        12
1821 #define RT5665_HP_SV_DIS                         1824 #define RT5665_HP_SV_DIS                        (0x0 << 12)
1822 #define RT5665_HP_SV_EN                          1825 #define RT5665_HP_SV_EN                         (0x1 << 12)
1823 #define RT5665_ZCD_DIG_MASK                      1826 #define RT5665_ZCD_DIG_MASK                     (0x1 << 11)
1824 #define RT5665_ZCD_DIG_SFT                       1827 #define RT5665_ZCD_DIG_SFT                      11
1825 #define RT5665_ZCD_DIG_DIS                       1828 #define RT5665_ZCD_DIG_DIS                      (0x0 << 11)
1826 #define RT5665_ZCD_DIG_EN                        1829 #define RT5665_ZCD_DIG_EN                       (0x1 << 11)
1827 #define RT5665_ZCD_MASK                          1830 #define RT5665_ZCD_MASK                         (0x1 << 10)
1828 #define RT5665_ZCD_SFT                           1831 #define RT5665_ZCD_SFT                          10
1829 #define RT5665_ZCD_PD                            1832 #define RT5665_ZCD_PD                           (0x0 << 10)
1830 #define RT5665_ZCD_PU                            1833 #define RT5665_ZCD_PU                           (0x1 << 10)
1831 #define RT5665_SV_DLY_MASK                       1834 #define RT5665_SV_DLY_MASK                      (0xf)
1832 #define RT5665_SV_DLY_SFT                        1835 #define RT5665_SV_DLY_SFT                       0
1833                                                  1836 
1834 /* Soft volume and zero cross control 2 (0x00    1837 /* Soft volume and zero cross control 2 (0x00da) */
1835 #define RT5665_ZCD_HP_MASK                       1838 #define RT5665_ZCD_HP_MASK                      (0x1 << 15)
1836 #define RT5665_ZCD_HP_SFT                        1839 #define RT5665_ZCD_HP_SFT                       15
1837 #define RT5665_ZCD_HP_DIS                        1840 #define RT5665_ZCD_HP_DIS                       (0x0 << 15)
1838 #define RT5665_ZCD_HP_EN                         1841 #define RT5665_ZCD_HP_EN                        (0x1 << 15)
1839                                                  1842 
1840 /* 4 Button Inline Command Control 2 (0x00e0)    1843 /* 4 Button Inline Command Control 2 (0x00e0) */
1841 #define RT5665_4BTN_IL_MASK                      1844 #define RT5665_4BTN_IL_MASK                     (0x1 << 15)
1842 #define RT5665_4BTN_IL_EN                        1845 #define RT5665_4BTN_IL_EN                       (0x1 << 15)
1843 #define RT5665_4BTN_IL_DIS                       1846 #define RT5665_4BTN_IL_DIS                      (0x0 << 15)
1844 #define RT5665_4BTN_IL_RST_MASK                  1847 #define RT5665_4BTN_IL_RST_MASK                 (0x1 << 14)
1845 #define RT5665_4BTN_IL_NOR                       1848 #define RT5665_4BTN_IL_NOR                      (0x1 << 14)
1846 #define RT5665_4BTN_IL_RST                       1849 #define RT5665_4BTN_IL_RST                      (0x0 << 14)
1847                                                  1850 
1848 /* Analog JD Control 1 (0x00f0) */               1851 /* Analog JD Control 1 (0x00f0) */
1849 #define RT5665_JD1_MODE_MASK                     1852 #define RT5665_JD1_MODE_MASK                    (0x3 << 0)
1850 #define RT5665_JD1_MODE_0                        1853 #define RT5665_JD1_MODE_0                       (0x0 << 0)
1851 #define RT5665_JD1_MODE_1                        1854 #define RT5665_JD1_MODE_1                       (0x1 << 0)
1852 #define RT5665_JD1_MODE_2                        1855 #define RT5665_JD1_MODE_2                       (0x2 << 0)
1853                                                  1856 
1854 /* Jack Detect Control 3 (0x00f8) */             1857 /* Jack Detect Control 3 (0x00f8) */
1855 #define RT5665_JD_TRI_HPO_SEL_MASK               1858 #define RT5665_JD_TRI_HPO_SEL_MASK              (0x7)
1856 #define RT5665_JD_TRI_HPO_SEL_SFT                1859 #define RT5665_JD_TRI_HPO_SEL_SFT               (0)
1857 #define RT5665_JD_HPO_GPIO_JD1                   1860 #define RT5665_JD_HPO_GPIO_JD1                  (0x0)
1858 #define RT5665_JD_HPO_JD1_1                      1861 #define RT5665_JD_HPO_JD1_1                     (0x1)
1859 #define RT5665_JD_HPO_JD1_2                      1862 #define RT5665_JD_HPO_JD1_2                     (0x2)
1860 #define RT5665_JD_HPO_JD2                        1863 #define RT5665_JD_HPO_JD2                       (0x3)
1861 #define RT5665_JD_HPO_GPIO_JD2                   1864 #define RT5665_JD_HPO_GPIO_JD2                  (0x4)
1862 #define RT5665_JD_HPO_JD3                        1865 #define RT5665_JD_HPO_JD3                       (0x5)
1863 #define RT5665_JD_HPO_JD_D                       1866 #define RT5665_JD_HPO_JD_D                      (0x6)
1864                                                  1867 
1865 /* Digital Misc Control (0x00fa) */              1868 /* Digital Misc Control (0x00fa) */
1866 #define RT5665_AM_MASK                           1869 #define RT5665_AM_MASK                          (0x1 << 7)
1867 #define RT5665_AM_EN                             1870 #define RT5665_AM_EN                            (0x1 << 7)
1868 #define RT5665_AM_DIS                            1871 #define RT5665_AM_DIS                           (0x1 << 7)
1869 #define RT5665_DIG_GATE_CTRL                     1872 #define RT5665_DIG_GATE_CTRL                    0x1
1870 #define RT5665_DIG_GATE_CTRL_SFT                 1873 #define RT5665_DIG_GATE_CTRL_SFT                (0)
1871                                                  1874 
1872 /* Chopper and Clock control for ADC (0x011c)    1875 /* Chopper and Clock control for ADC (0x011c)*/
1873 #define RT5665_M_RF_DIG_MASK                     1876 #define RT5665_M_RF_DIG_MASK                    (0x1 << 12)
1874 #define RT5665_M_RF_DIG_SFT                      1877 #define RT5665_M_RF_DIG_SFT                     12
1875 #define RT5665_M_RI_DIG                          1878 #define RT5665_M_RI_DIG                         (0x1 << 11)
1876                                                  1879 
1877 /* Chopper and Clock control for DAC (0x013a)    1880 /* Chopper and Clock control for DAC (0x013a)*/
1878 #define RT5665_CKXEN_DAC1_MASK                   1881 #define RT5665_CKXEN_DAC1_MASK                  (0x1 << 13)
1879 #define RT5665_CKXEN_DAC1_SFT                    1882 #define RT5665_CKXEN_DAC1_SFT                   13
1880 #define RT5665_CKGEN_DAC1_MASK                   1883 #define RT5665_CKGEN_DAC1_MASK                  (0x1 << 12)
1881 #define RT5665_CKGEN_DAC1_SFT                    1884 #define RT5665_CKGEN_DAC1_SFT                   12
1882 #define RT5665_CKXEN_DAC2_MASK                   1885 #define RT5665_CKXEN_DAC2_MASK                  (0x1 << 5)
1883 #define RT5665_CKXEN_DAC2_SFT                    1886 #define RT5665_CKXEN_DAC2_SFT                   5
1884 #define RT5665_CKGEN_DAC2_MASK                   1887 #define RT5665_CKGEN_DAC2_MASK                  (0x1 << 4)
1885 #define RT5665_CKGEN_DAC2_SFT                    1888 #define RT5665_CKGEN_DAC2_SFT                   4
1886                                                  1889 
1887 /* Chopper and Clock control for ADC (0x013b)    1890 /* Chopper and Clock control for ADC (0x013b)*/
1888 #define RT5665_CKXEN_ADC1_MASK                   1891 #define RT5665_CKXEN_ADC1_MASK                  (0x1 << 13)
1889 #define RT5665_CKXEN_ADC1_SFT                    1892 #define RT5665_CKXEN_ADC1_SFT                   13
1890 #define RT5665_CKGEN_ADC1_MASK                   1893 #define RT5665_CKGEN_ADC1_MASK                  (0x1 << 12)
1891 #define RT5665_CKGEN_ADC1_SFT                    1894 #define RT5665_CKGEN_ADC1_SFT                   12
1892 #define RT5665_CKXEN_ADC2_MASK                   1895 #define RT5665_CKXEN_ADC2_MASK                  (0x1 << 5)
1893 #define RT5665_CKXEN_ADC2_SFT                    1896 #define RT5665_CKXEN_ADC2_SFT                   5
1894 #define RT5665_CKGEN_ADC2_MASK                   1897 #define RT5665_CKGEN_ADC2_MASK                  (0x1 << 4)
1895 #define RT5665_CKGEN_ADC2_SFT                    1898 #define RT5665_CKGEN_ADC2_SFT                   4
1896                                                  1899 
1897 /* Volume test (0x013f)*/                        1900 /* Volume test (0x013f)*/
1898 #define RT5665_SEL_CLK_VOL_MASK                  1901 #define RT5665_SEL_CLK_VOL_MASK                 (0x1 << 15)
1899 #define RT5665_SEL_CLK_VOL_EN                    1902 #define RT5665_SEL_CLK_VOL_EN                   (0x1 << 15)
1900 #define RT5665_SEL_CLK_VOL_DIS                   1903 #define RT5665_SEL_CLK_VOL_DIS                  (0x0 << 15)
1901                                                  1904 
1902 /* Test Mode Control 1 (0x0145) */               1905 /* Test Mode Control 1 (0x0145) */
1903 #define RT5665_AD2DA_LB_MASK                     1906 #define RT5665_AD2DA_LB_MASK                    (0x1 << 9)
1904 #define RT5665_AD2DA_LB_SFT                      1907 #define RT5665_AD2DA_LB_SFT                     9
1905                                                  1908 
1906 /* Stereo Noise Gate Control 1 (0x0160) */       1909 /* Stereo Noise Gate Control 1 (0x0160) */
1907 #define RT5665_NG2_EN_MASK                       1910 #define RT5665_NG2_EN_MASK                      (0x1 << 15)
1908 #define RT5665_NG2_EN                            1911 #define RT5665_NG2_EN                           (0x1 << 15)
1909 #define RT5665_NG2_DIS                           1912 #define RT5665_NG2_DIS                          (0x0 << 15)
1910                                                  1913 
1911 /* Stereo1 DAC Silence Detection Control (0x0    1914 /* Stereo1 DAC Silence Detection Control (0x0190) */
1912 #define RT5665_DEB_STO_DAC_MASK                  1915 #define RT5665_DEB_STO_DAC_MASK                 (0x7 << 4)
1913 #define RT5665_DEB_80_MS                         1916 #define RT5665_DEB_80_MS                        (0x0 << 4)
1914                                                  1917 
1915 /* SAR ADC Inline Command Control 1 (0x0210)     1918 /* SAR ADC Inline Command Control 1 (0x0210) */
1916 #define RT5665_SAR_BUTT_DET_MASK                 1919 #define RT5665_SAR_BUTT_DET_MASK                (0x1 << 15)
1917 #define RT5665_SAR_BUTT_DET_EN                   1920 #define RT5665_SAR_BUTT_DET_EN                  (0x1 << 15)
1918 #define RT5665_SAR_BUTT_DET_DIS                  1921 #define RT5665_SAR_BUTT_DET_DIS                 (0x0 << 15)
1919 #define RT5665_SAR_BUTDET_MODE_MASK              1922 #define RT5665_SAR_BUTDET_MODE_MASK             (0x1 << 14)
1920 #define RT5665_SAR_BUTDET_POW_SAV                1923 #define RT5665_SAR_BUTDET_POW_SAV               (0x1 << 14)
1921 #define RT5665_SAR_BUTDET_POW_NORM               1924 #define RT5665_SAR_BUTDET_POW_NORM              (0x0 << 14)
1922 #define RT5665_SAR_BUTDET_RST_MASK               1925 #define RT5665_SAR_BUTDET_RST_MASK              (0x1 << 13)
1923 #define RT5665_SAR_BUTDET_RST_NORMAL             1926 #define RT5665_SAR_BUTDET_RST_NORMAL            (0x1 << 13)
1924 #define RT5665_SAR_BUTDET_RST                    1927 #define RT5665_SAR_BUTDET_RST                   (0x0 << 13)
1925 #define RT5665_SAR_POW_MASK                      1928 #define RT5665_SAR_POW_MASK                     (0x1 << 12)
1926 #define RT5665_SAR_POW_EN                        1929 #define RT5665_SAR_POW_EN                       (0x1 << 12)
1927 #define RT5665_SAR_POW_DIS                       1930 #define RT5665_SAR_POW_DIS                      (0x0 << 12)
1928 #define RT5665_SAR_RST_MASK                      1931 #define RT5665_SAR_RST_MASK                     (0x1 << 11)
1929 #define RT5665_SAR_RST_NORMAL                    1932 #define RT5665_SAR_RST_NORMAL                   (0x1 << 11)
1930 #define RT5665_SAR_RST                           1933 #define RT5665_SAR_RST                          (0x0 << 11)
1931 #define RT5665_SAR_BYPASS_MASK                   1934 #define RT5665_SAR_BYPASS_MASK                  (0x1 << 10)
1932 #define RT5665_SAR_BYPASS_EN                     1935 #define RT5665_SAR_BYPASS_EN                    (0x1 << 10)
1933 #define RT5665_SAR_BYPASS_DIS                    1936 #define RT5665_SAR_BYPASS_DIS                   (0x0 << 10)
1934 #define RT5665_SAR_SEL_MB1_MASK                  1937 #define RT5665_SAR_SEL_MB1_MASK                 (0x1 << 9)
1935 #define RT5665_SAR_SEL_MB1_SEL                   1938 #define RT5665_SAR_SEL_MB1_SEL                  (0x1 << 9)
1936 #define RT5665_SAR_SEL_MB1_NOSEL                 1939 #define RT5665_SAR_SEL_MB1_NOSEL                (0x0 << 9)
1937 #define RT5665_SAR_SEL_MB2_MASK                  1940 #define RT5665_SAR_SEL_MB2_MASK                 (0x1 << 8)
1938 #define RT5665_SAR_SEL_MB2_SEL                   1941 #define RT5665_SAR_SEL_MB2_SEL                  (0x1 << 8)
1939 #define RT5665_SAR_SEL_MB2_NOSEL                 1942 #define RT5665_SAR_SEL_MB2_NOSEL                (0x0 << 8)
1940 #define RT5665_SAR_SEL_MODE_MASK                 1943 #define RT5665_SAR_SEL_MODE_MASK                (0x1 << 7)
1941 #define RT5665_SAR_SEL_MODE_CMP                  1944 #define RT5665_SAR_SEL_MODE_CMP                 (0x1 << 7)
1942 #define RT5665_SAR_SEL_MODE_ADC                  1945 #define RT5665_SAR_SEL_MODE_ADC                 (0x0 << 7)
1943 #define RT5665_SAR_SEL_MB1_MB2_MASK              1946 #define RT5665_SAR_SEL_MB1_MB2_MASK             (0x1 << 5)
1944 #define RT5665_SAR_SEL_MB1_MB2_AUTO              1947 #define RT5665_SAR_SEL_MB1_MB2_AUTO             (0x1 << 5)
1945 #define RT5665_SAR_SEL_MB1_MB2_MANU              1948 #define RT5665_SAR_SEL_MB1_MB2_MANU             (0x0 << 5)
1946 #define RT5665_SAR_SEL_SIGNAL_MASK               1949 #define RT5665_SAR_SEL_SIGNAL_MASK              (0x1 << 4)
1947 #define RT5665_SAR_SEL_SIGNAL_AUTO               1950 #define RT5665_SAR_SEL_SIGNAL_AUTO              (0x1 << 4)
1948 #define RT5665_SAR_SEL_SIGNAL_MANU               1951 #define RT5665_SAR_SEL_SIGNAL_MANU              (0x0 << 4)
1949                                                  1952 
1950 /* System Clock Source */                        1953 /* System Clock Source */
1951 enum {                                           1954 enum {
1952         RT5665_SCLK_S_MCLK,                      1955         RT5665_SCLK_S_MCLK,
1953         RT5665_SCLK_S_PLL1,                      1956         RT5665_SCLK_S_PLL1,
1954         RT5665_SCLK_S_RCCLK,                     1957         RT5665_SCLK_S_RCCLK,
1955 };                                               1958 };
1956                                                  1959 
1957 /* PLL1 Source */                                1960 /* PLL1 Source */
1958 enum {                                           1961 enum {
1959         RT5665_PLL1_S_MCLK,                      1962         RT5665_PLL1_S_MCLK,
1960         RT5665_PLL1_S_BCLK1,                     1963         RT5665_PLL1_S_BCLK1,
1961         RT5665_PLL1_S_BCLK2,                     1964         RT5665_PLL1_S_BCLK2,
1962         RT5665_PLL1_S_BCLK3,                     1965         RT5665_PLL1_S_BCLK3,
1963         RT5665_PLL1_S_BCLK4,                     1966         RT5665_PLL1_S_BCLK4,
1964 };                                               1967 };
1965                                                  1968 
1966 enum {                                           1969 enum {
1967         RT5665_AIF1_1,                           1970         RT5665_AIF1_1,
1968         RT5665_AIF1_2,                           1971         RT5665_AIF1_2,
1969         RT5665_AIF2_1,                           1972         RT5665_AIF2_1,
1970         RT5665_AIF2_2,                           1973         RT5665_AIF2_2,
1971         RT5665_AIF3,                             1974         RT5665_AIF3,
1972         RT5665_AIFS                              1975         RT5665_AIFS
1973 };                                               1976 };
1974                                                  1977 
1975 enum {                                           1978 enum {
1976         CODEC_5665,                              1979         CODEC_5665,
1977         CODEC_5666,                              1980         CODEC_5666,
                                                   >> 1981         CODEC_5668,
1978 };                                               1982 };
1979                                                  1983 
1980 /* filter mask */                                1984 /* filter mask */
1981 enum {                                           1985 enum {
1982         RT5665_DA_STEREO1_FILTER = 0x1,          1986         RT5665_DA_STEREO1_FILTER = 0x1,
1983         RT5665_DA_STEREO2_FILTER = (0x1 << 1)    1987         RT5665_DA_STEREO2_FILTER = (0x1 << 1),
1984         RT5665_DA_MONO_L_FILTER = (0x1 << 2),    1988         RT5665_DA_MONO_L_FILTER = (0x1 << 2),
1985         RT5665_DA_MONO_R_FILTER = (0x1 << 3),    1989         RT5665_DA_MONO_R_FILTER = (0x1 << 3),
1986         RT5665_AD_STEREO1_FILTER = (0x1 << 4)    1990         RT5665_AD_STEREO1_FILTER = (0x1 << 4),
1987         RT5665_AD_STEREO2_FILTER = (0x1 << 5)    1991         RT5665_AD_STEREO2_FILTER = (0x1 << 5),
1988         RT5665_AD_MONO_L_FILTER = (0x1 << 6),    1992         RT5665_AD_MONO_L_FILTER = (0x1 << 6),
1989         RT5665_AD_MONO_R_FILTER = (0x1 << 7),    1993         RT5665_AD_MONO_R_FILTER = (0x1 << 7),
1990 };                                               1994 };
1991                                                  1995 
1992 enum {                                           1996 enum {
1993         RT5665_CLK_SEL_SYS,                      1997         RT5665_CLK_SEL_SYS,
1994         RT5665_CLK_SEL_I2S1_ASRC,                1998         RT5665_CLK_SEL_I2S1_ASRC,
1995         RT5665_CLK_SEL_I2S2_ASRC,                1999         RT5665_CLK_SEL_I2S2_ASRC,
1996         RT5665_CLK_SEL_I2S3_ASRC,                2000         RT5665_CLK_SEL_I2S3_ASRC,
1997         RT5665_CLK_SEL_SYS2,                     2001         RT5665_CLK_SEL_SYS2,
1998         RT5665_CLK_SEL_SYS3,                     2002         RT5665_CLK_SEL_SYS3,
1999         RT5665_CLK_SEL_SYS4,                     2003         RT5665_CLK_SEL_SYS4,
2000 };                                               2004 };
2001                                                  2005 
2002 int rt5665_sel_asrc_clk_src(struct snd_soc_co !! 2006 int rt5665_sel_asrc_clk_src(struct snd_soc_codec *codec,
2003                 unsigned int filter_mask, uns    2007                 unsigned int filter_mask, unsigned int clk_src);
2004                                                  2008 
2005 #endif /* __RT5665_H__ */                        2009 #endif /* __RT5665_H__ */
2006                                                  2010 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php