rt5663.h 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122
  1. /*
  2. * rt5663.h -- RT5663 ALSA SoC audio driver
  3. *
  4. * Copyright 2016 Realtek Microelectronics
  5. * Author: Jack Yu <jack.yu@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.
  10. */
  11. #ifndef __RT5663_H__
  12. #define __RT5663_H__
  13. /* Info */
  14. #define RT5663_RESET 0x0000
  15. #define RT5663_VENDOR_ID 0x00fd
  16. #define RT5663_VENDOR_ID_1 0x00fe
  17. #define RT5663_VENDOR_ID_2 0x00ff
  18. #define RT5668_LOUT_CTRL 0x0001
  19. #define RT5668_HP_AMP_2 0x0003
  20. #define RT5668_MONO_OUT 0x0004
  21. #define RT5668_MONO_GAIN 0x0007
  22. #define RT5668_AEC_BST 0x000b
  23. #define RT5668_IN1_IN2 0x000c
  24. #define RT5668_IN3_IN4 0x000d
  25. #define RT5668_INL1_INR1 0x000f
  26. #define RT5668_CBJ_TYPE_2 0x0011
  27. #define RT5668_CBJ_TYPE_3 0x0012
  28. #define RT5668_CBJ_TYPE_4 0x0013
  29. #define RT5668_CBJ_TYPE_5 0x0014
  30. #define RT5668_CBJ_TYPE_8 0x0017
  31. /* I/O - ADC/DAC/DMIC */
  32. #define RT5668_DAC3_DIG_VOL 0x001a
  33. #define RT5668_DAC3_CTRL 0x001b
  34. #define RT5668_MONO_ADC_DIG_VOL 0x001d
  35. #define RT5668_STO2_ADC_DIG_VOL 0x001e
  36. #define RT5668_MONO_ADC_BST_GAIN 0x0020
  37. #define RT5668_STO2_ADC_BST_GAIN 0x0021
  38. #define RT5668_SIDETONE_CTRL 0x0024
  39. /* Mixer - D-D */
  40. #define RT5668_MONO1_ADC_MIXER 0x0027
  41. #define RT5668_STO2_ADC_MIXER 0x0028
  42. #define RT5668_MONO_DAC_MIXER 0x002b
  43. #define RT5668_DAC2_SRC_CTRL 0x002e
  44. #define RT5668_IF_3_4_DATA_CTL 0x002f
  45. #define RT5668_IF_5_DATA_CTL 0x0030
  46. #define RT5668_PDM_OUT_CTL 0x0031
  47. #define RT5668_PDM_I2C_DATA_CTL1 0x0032
  48. #define RT5668_PDM_I2C_DATA_CTL2 0x0033
  49. #define RT5668_PDM_I2C_DATA_CTL3 0x0034
  50. #define RT5668_PDM_I2C_DATA_CTL4 0x0035
  51. /*Mixer - Analog*/
  52. #define RT5668_RECMIX1_NEW 0x003a
  53. #define RT5668_RECMIX1L_0 0x003b
  54. #define RT5668_RECMIX1L 0x003c
  55. #define RT5668_RECMIX1R_0 0x003d
  56. #define RT5668_RECMIX1R 0x003e
  57. #define RT5668_RECMIX2_NEW 0x003f
  58. #define RT5668_RECMIX2_L_2 0x0041
  59. #define RT5668_RECMIX2_R 0x0042
  60. #define RT5668_RECMIX2_R_2 0x0043
  61. #define RT5668_CALIB_REC_LR 0x0044
  62. #define RT5668_ALC_BK_GAIN 0x0049
  63. #define RT5668_MONOMIX_GAIN 0x004a
  64. #define RT5668_MONOMIX_IN_GAIN 0x004b
  65. #define RT5668_OUT_MIXL_GAIN 0x004d
  66. #define RT5668_OUT_LMIX_IN_GAIN 0x004e
  67. #define RT5668_OUT_RMIX_IN_GAIN 0x004f
  68. #define RT5668_OUT_RMIX_IN_GAIN1 0x0050
  69. #define RT5668_LOUT_MIXER_CTRL 0x0052
  70. /* Power */
  71. #define RT5668_PWR_VOL 0x0067
  72. #define RT5668_ADCDAC_RST 0x006d
  73. /* Format - ADC/DAC */
  74. #define RT5668_I2S34_SDP 0x0071
  75. #define RT5668_I2S5_SDP 0x0072
  76. /* Format - TDM Control */
  77. #define RT5668_TDM_5 0x007c
  78. #define RT5668_TDM_6 0x007d
  79. #define RT5668_TDM_7 0x007e
  80. #define RT5668_TDM_8 0x007f
  81. /* Function - Analog */
  82. #define RT5668_ASRC_3 0x0085
  83. #define RT5668_ASRC_6 0x0088
  84. #define RT5668_ASRC_7 0x0089
  85. #define RT5668_PLL_TRK_13 0x0099
  86. #define RT5668_I2S_M_CLK_CTL 0x00a0
  87. #define RT5668_FDIV_I2S34_M_CLK 0x00a1
  88. #define RT5668_FDIV_I2S34_M_CLK2 0x00a2
  89. #define RT5668_FDIV_I2S5_M_CLK 0x00a3
  90. #define RT5668_FDIV_I2S5_M_CLK2 0x00a4
  91. /* Function - Digital */
  92. #define RT5668_IRQ_4 0x00b9
  93. #define RT5668_GPIO_3 0x00c2
  94. #define RT5668_GPIO_4 0x00c3
  95. #define RT5668_GPIO_STA 0x00c4
  96. #define RT5668_HP_AMP_DET1 0x00d0
  97. #define RT5668_HP_AMP_DET2 0x00d1
  98. #define RT5668_HP_AMP_DET3 0x00d2
  99. #define RT5668_MID_BD_HP_AMP 0x00d3
  100. #define RT5668_LOW_BD_HP_AMP 0x00d4
  101. #define RT5668_SOF_VOL_ZC2 0x00da
  102. #define RT5668_ADC_STO2_ADJ1 0x00ee
  103. #define RT5668_ADC_STO2_ADJ2 0x00ef
  104. /* General Control */
  105. #define RT5668_A_JD_CTRL 0x00f0
  106. #define RT5668_JD1_TRES_CTRL 0x00f1
  107. #define RT5668_JD2_TRES_CTRL 0x00f2
  108. #define RT5668_JD_CTRL2 0x00f7
  109. #define RT5668_DUM_REG_2 0x00fb
  110. #define RT5668_DUM_REG_3 0x00fc
  111. #define RT5668_DACADC_DIG_VOL2 0x0101
  112. #define RT5668_DIG_IN_PIN2 0x0133
  113. #define RT5668_PAD_DRV_CTL1 0x0136
  114. #define RT5668_SOF_RAM_DEPOP 0x0138
  115. #define RT5668_VOL_TEST 0x013f
  116. #define RT5668_TEST_MODE_3 0x0147
  117. #define RT5668_TEST_MODE_4 0x0148
  118. #define RT5668_MONO_DYNA_1 0x0170
  119. #define RT5668_MONO_DYNA_2 0x0171
  120. #define RT5668_MONO_DYNA_3 0x0172
  121. #define RT5668_MONO_DYNA_4 0x0173
  122. #define RT5668_MONO_DYNA_5 0x0174
  123. #define RT5668_MONO_DYNA_6 0x0175
  124. #define RT5668_STO1_SIL_DET 0x0190
  125. #define RT5668_MONOL_SIL_DET 0x0191
  126. #define RT5668_MONOR_SIL_DET 0x0192
  127. #define RT5668_STO2_DAC_SIL 0x0193
  128. #define RT5668_PWR_SAV_CTL1 0x0194
  129. #define RT5668_PWR_SAV_CTL2 0x0195
  130. #define RT5668_PWR_SAV_CTL3 0x0196
  131. #define RT5668_PWR_SAV_CTL4 0x0197
  132. #define RT5668_PWR_SAV_CTL5 0x0198
  133. #define RT5668_PWR_SAV_CTL6 0x0199
  134. #define RT5668_MONO_AMP_CAL1 0x01a0
  135. #define RT5668_MONO_AMP_CAL2 0x01a1
  136. #define RT5668_MONO_AMP_CAL3 0x01a2
  137. #define RT5668_MONO_AMP_CAL4 0x01a3
  138. #define RT5668_MONO_AMP_CAL5 0x01a4
  139. #define RT5668_MONO_AMP_CAL6 0x01a5
  140. #define RT5668_MONO_AMP_CAL7 0x01a6
  141. #define RT5668_MONO_AMP_CAL_ST1 0x01a7
  142. #define RT5668_MONO_AMP_CAL_ST2 0x01a8
  143. #define RT5668_MONO_AMP_CAL_ST3 0x01a9
  144. #define RT5668_MONO_AMP_CAL_ST4 0x01aa
  145. #define RT5668_MONO_AMP_CAL_ST5 0x01ab
  146. #define RT5668_HP_IMP_SEN_13 0x01b9
  147. #define RT5668_HP_IMP_SEN_14 0x01ba
  148. #define RT5668_HP_IMP_SEN_6 0x01bb
  149. #define RT5668_HP_IMP_SEN_7 0x01bc
  150. #define RT5668_HP_IMP_SEN_8 0x01bd
  151. #define RT5668_HP_IMP_SEN_9 0x01be
  152. #define RT5668_HP_IMP_SEN_10 0x01bf
  153. #define RT5668_HP_LOGIC_3 0x01dc
  154. #define RT5668_HP_CALIB_ST10 0x01f3
  155. #define RT5668_HP_CALIB_ST11 0x01f4
  156. #define RT5668_PRO_REG_TBL_4 0x0203
  157. #define RT5668_PRO_REG_TBL_5 0x0204
  158. #define RT5668_PRO_REG_TBL_6 0x0205
  159. #define RT5668_PRO_REG_TBL_7 0x0206
  160. #define RT5668_PRO_REG_TBL_8 0x0207
  161. #define RT5668_PRO_REG_TBL_9 0x0208
  162. #define RT5668_SAR_ADC_INL_1 0x0210
  163. #define RT5668_SAR_ADC_INL_2 0x0211
  164. #define RT5668_SAR_ADC_INL_3 0x0212
  165. #define RT5668_SAR_ADC_INL_4 0x0213
  166. #define RT5668_SAR_ADC_INL_5 0x0214
  167. #define RT5668_SAR_ADC_INL_6 0x0215
  168. #define RT5668_SAR_ADC_INL_7 0x0216
  169. #define RT5668_SAR_ADC_INL_8 0x0217
  170. #define RT5668_SAR_ADC_INL_9 0x0218
  171. #define RT5668_SAR_ADC_INL_10 0x0219
  172. #define RT5668_SAR_ADC_INL_11 0x021a
  173. #define RT5668_SAR_ADC_INL_12 0x021b
  174. #define RT5668_DRC_CTRL_1 0x02ff
  175. #define RT5668_DRC1_CTRL_2 0x0301
  176. #define RT5668_DRC1_CTRL_3 0x0302
  177. #define RT5668_DRC1_CTRL_4 0x0303
  178. #define RT5668_DRC1_CTRL_5 0x0304
  179. #define RT5668_DRC1_CTRL_6 0x0305
  180. #define RT5668_DRC1_HD_CTRL_1 0x0306
  181. #define RT5668_DRC1_HD_CTRL_2 0x0307
  182. #define RT5668_DRC1_PRI_REG_1 0x0310
  183. #define RT5668_DRC1_PRI_REG_2 0x0311
  184. #define RT5668_DRC1_PRI_REG_3 0x0312
  185. #define RT5668_DRC1_PRI_REG_4 0x0313
  186. #define RT5668_DRC1_PRI_REG_5 0x0314
  187. #define RT5668_DRC1_PRI_REG_6 0x0315
  188. #define RT5668_DRC1_PRI_REG_7 0x0316
  189. #define RT5668_DRC1_PRI_REG_8 0x0317
  190. #define RT5668_ALC_PGA_CTL_1 0x0330
  191. #define RT5668_ALC_PGA_CTL_2 0x0331
  192. #define RT5668_ALC_PGA_CTL_3 0x0332
  193. #define RT5668_ALC_PGA_CTL_4 0x0333
  194. #define RT5668_ALC_PGA_CTL_5 0x0334
  195. #define RT5668_ALC_PGA_CTL_6 0x0335
  196. #define RT5668_ALC_PGA_CTL_7 0x0336
  197. #define RT5668_ALC_PGA_CTL_8 0x0337
  198. #define RT5668_ALC_PGA_REG_1 0x0338
  199. #define RT5668_ALC_PGA_REG_2 0x0339
  200. #define RT5668_ALC_PGA_REG_3 0x033a
  201. #define RT5668_ADC_EQ_RECOV_1 0x03c0
  202. #define RT5668_ADC_EQ_RECOV_2 0x03c1
  203. #define RT5668_ADC_EQ_RECOV_3 0x03c2
  204. #define RT5668_ADC_EQ_RECOV_4 0x03c3
  205. #define RT5668_ADC_EQ_RECOV_5 0x03c4
  206. #define RT5668_ADC_EQ_RECOV_6 0x03c5
  207. #define RT5668_ADC_EQ_RECOV_7 0x03c6
  208. #define RT5668_ADC_EQ_RECOV_8 0x03c7
  209. #define RT5668_ADC_EQ_RECOV_9 0x03c8
  210. #define RT5668_ADC_EQ_RECOV_10 0x03c9
  211. #define RT5668_ADC_EQ_RECOV_11 0x03ca
  212. #define RT5668_ADC_EQ_RECOV_12 0x03cb
  213. #define RT5668_ADC_EQ_RECOV_13 0x03cc
  214. #define RT5668_VID_HIDDEN 0x03fe
  215. #define RT5668_VID_CUSTOMER 0x03ff
  216. #define RT5668_SCAN_MODE 0x07f0
  217. #define RT5668_I2C_BYPA 0x07fa
  218. /* Headphone Amp Control 2 (0x0003) */
  219. #define RT5668_EN_DAC_HPO_MASK (0x1 << 14)
  220. #define RT5668_EN_DAC_HPO_SHIFT 14
  221. #define RT5668_EN_DAC_HPO_DIS (0x0 << 14)
  222. #define RT5668_EN_DAC_HPO_EN (0x1 << 14)
  223. /*Headphone Amp L/R Analog Gain and Digital NG2 Gain Control (0x0005 0x0006)*/
  224. #define RT5668_GAIN_HP (0x1f << 8)
  225. #define RT5668_GAIN_HP_SHIFT 8
  226. /* AEC BST Control (0x000b) */
  227. #define RT5668_GAIN_CBJ_MASK (0xf << 8)
  228. #define RT5668_GAIN_CBJ_SHIFT 8
  229. /* IN1 Control / MIC GND REF (0x000c) */
  230. #define RT5668_IN1_DF_MASK (0x1 << 15)
  231. #define RT5668_IN1_DF_SHIFT 15
  232. /* Combo Jack and Type Detection Control 1 (0x0010) */
  233. #define RT5668_CBJ_DET_MASK (0x1 << 15)
  234. #define RT5668_CBJ_DET_SHIFT 15
  235. #define RT5668_CBJ_DET_DIS (0x0 << 15)
  236. #define RT5668_CBJ_DET_EN (0x1 << 15)
  237. #define RT5668_DET_TYPE_MASK (0x1 << 12)
  238. #define RT5668_DET_TYPE_SHIFT 12
  239. #define RT5668_DET_TYPE_WLCSP (0x0 << 12)
  240. #define RT5668_DET_TYPE_QFN (0x1 << 12)
  241. #define RT5668_VREF_BIAS_MASK (0x1 << 6)
  242. #define RT5668_VREF_BIAS_SHIFT 6
  243. #define RT5668_VREF_BIAS_FSM (0x0 << 6)
  244. #define RT5668_VREF_BIAS_REG (0x1 << 6)
  245. /* REC Left Mixer Control 2 (0x003c) */
  246. #define RT5668_RECMIX1L_BST1_CBJ (0x1 << 7)
  247. #define RT5668_RECMIX1L_BST1_CBJ_SHIFT 7
  248. #define RT5668_RECMIX1L_BST2 (0x1 << 4)
  249. #define RT5668_RECMIX1L_BST2_SHIFT 4
  250. /* REC Right Mixer Control 2 (0x003e) */
  251. #define RT5668_RECMIX1R_BST2 (0x1 << 4)
  252. #define RT5668_RECMIX1R_BST2_SHIFT 4
  253. /* DAC1 Digital Volume (0x0019) */
  254. #define RT5668_DAC_L1_VOL_MASK (0xff << 8)
  255. #define RT5668_DAC_L1_VOL_SHIFT 8
  256. #define RT5668_DAC_R1_VOL_MASK (0xff)
  257. #define RT5668_DAC_R1_VOL_SHIFT 0
  258. /* ADC Digital Volume Control (0x001c) */
  259. #define RT5668_ADC_L_MUTE_MASK (0x1 << 15)
  260. #define RT5668_ADC_L_MUTE_SHIFT 15
  261. #define RT5668_ADC_L_VOL_MASK (0x7f << 8)
  262. #define RT5668_ADC_L_VOL_SHIFT 8
  263. #define RT5668_ADC_R_MUTE_MASK (0x1 << 7)
  264. #define RT5668_ADC_R_MUTE_SHIFT 7
  265. #define RT5668_ADC_R_VOL_MASK (0x7f)
  266. #define RT5668_ADC_R_VOL_SHIFT 0
  267. /* Stereo ADC Mixer Control (0x0026) */
  268. #define RT5668_M_STO1_ADC_L1 (0x1 << 15)
  269. #define RT5668_M_STO1_ADC_L1_SHIFT 15
  270. #define RT5668_M_STO1_ADC_L2 (0x1 << 14)
  271. #define RT5668_M_STO1_ADC_L2_SHIFT 14
  272. #define RT5668_STO1_ADC_L1_SRC (0x1 << 13)
  273. #define RT5668_STO1_ADC_L1_SRC_SHIFT 13
  274. #define RT5668_STO1_ADC_L2_SRC (0x1 << 12)
  275. #define RT5668_STO1_ADC_L2_SRC_SHIFT 12
  276. #define RT5668_STO1_ADC_L_SRC (0x3 << 10)
  277. #define RT5668_STO1_ADC_L_SRC_SHIFT 10
  278. #define RT5668_M_STO1_ADC_R1 (0x1 << 7)
  279. #define RT5668_M_STO1_ADC_R1_SHIFT 7
  280. #define RT5668_M_STO1_ADC_R2 (0x1 << 6)
  281. #define RT5668_M_STO1_ADC_R2_SHIFT 6
  282. #define RT5668_STO1_ADC_R1_SRC (0x1 << 5)
  283. #define RT5668_STO1_ADC_R1_SRC_SHIFT 5
  284. #define RT5668_STO1_ADC_R2_SRC (0x1 << 4)
  285. #define RT5668_STO1_ADC_R2_SRC_SHIFT 4
  286. #define RT5668_STO1_ADC_R_SRC (0x3 << 2)
  287. #define RT5668_STO1_ADC_R_SRC_SHIFT 2
  288. /* ADC Mixer to DAC Mixer Control (0x0029) */
  289. #define RT5668_M_ADCMIX_L (0x1 << 15)
  290. #define RT5668_M_ADCMIX_L_SHIFT 15
  291. #define RT5668_M_DAC1_L (0x1 << 14)
  292. #define RT5668_M_DAC1_L_SHIFT 14
  293. #define RT5668_M_ADCMIX_R (0x1 << 7)
  294. #define RT5668_M_ADCMIX_R_SHIFT 7
  295. #define RT5668_M_DAC1_R (0x1 << 6)
  296. #define RT5668_M_DAC1_R_SHIFT 6
  297. /* Stereo DAC Mixer Control (0x002a) */
  298. #define RT5668_M_DAC_L1_STO_L (0x1 << 15)
  299. #define RT5668_M_DAC_L1_STO_L_SHIFT 15
  300. #define RT5668_M_DAC_R1_STO_L (0x1 << 13)
  301. #define RT5668_M_DAC_R1_STO_L_SHIFT 13
  302. #define RT5668_M_DAC_L1_STO_R (0x1 << 7)
  303. #define RT5668_M_DAC_L1_STO_R_SHIFT 7
  304. #define RT5668_M_DAC_R1_STO_R (0x1 << 5)
  305. #define RT5668_M_DAC_R1_STO_R_SHIFT 5
  306. /* Power Management for Digital 1 (0x0061) */
  307. #define RT5668_PWR_I2S1 (0x1 << 15)
  308. #define RT5668_PWR_I2S1_SHIFT 15
  309. #define RT5668_PWR_DAC_L1 (0x1 << 11)
  310. #define RT5668_PWR_DAC_L1_SHIFT 11
  311. #define RT5668_PWR_DAC_R1 (0x1 << 10)
  312. #define RT5668_PWR_DAC_R1_SHIFT 10
  313. #define RT5668_PWR_LDO_DACREF_MASK (0x1 << 8)
  314. #define RT5668_PWR_LDO_DACREF_SHIFT 8
  315. #define RT5668_PWR_LDO_DACREF_ON (0x1 << 8)
  316. #define RT5668_PWR_LDO_DACREF_DOWN (0x0 << 8)
  317. #define RT5668_PWR_LDO_SHIFT 8
  318. #define RT5668_PWR_ADC_L1 (0x1 << 4)
  319. #define RT5668_PWR_ADC_L1_SHIFT 4
  320. #define RT5668_PWR_ADC_R1 (0x1 << 3)
  321. #define RT5668_PWR_ADC_R1_SHIFT 3
  322. /* Power Management for Digital 2 (0x0062) */
  323. #define RT5668_PWR_ADC_S1F (0x1 << 15)
  324. #define RT5668_PWR_ADC_S1F_SHIFT 15
  325. #define RT5668_PWR_DAC_S1F (0x1 << 10)
  326. #define RT5668_PWR_DAC_S1F_SHIFT 10
  327. /* Power Management for Analog 1 (0x0063) */
  328. #define RT5668_PWR_VREF1 (0x1 << 15)
  329. #define RT5668_PWR_VREF1_MASK (0x1 << 15)
  330. #define RT5668_PWR_VREF1_SHIFT 15
  331. #define RT5668_PWR_FV1 (0x1 << 14)
  332. #define RT5668_PWR_FV1_MASK (0x1 << 14)
  333. #define RT5668_PWR_FV1_SHIFT 14
  334. #define RT5668_PWR_VREF2 (0x1 << 13)
  335. #define RT5668_PWR_VREF2_MASK (0x1 << 13)
  336. #define RT5668_PWR_VREF2_SHIFT 13
  337. #define RT5668_PWR_FV2 (0x1 << 12)
  338. #define RT5668_PWR_FV2_MASK (0x1 << 12)
  339. #define RT5668_PWR_FV2_SHIFT 12
  340. #define RT5668_PWR_MB (0x1 << 9)
  341. #define RT5668_PWR_MB_MASK (0x1 << 9)
  342. #define RT5668_PWR_MB_SHIFT 9
  343. #define RT5668_AMP_HP_MASK (0x3 << 2)
  344. #define RT5668_AMP_HP_SHIFT 2
  345. #define RT5668_AMP_HP_1X (0x0 << 2)
  346. #define RT5668_AMP_HP_3X (0x1 << 2)
  347. #define RT5668_AMP_HP_5X (0x3 << 2)
  348. #define RT5668_LDO1_DVO_MASK (0x3)
  349. #define RT5668_LDO1_DVO_SHIFT 0
  350. #define RT5668_LDO1_DVO_0_9V (0x0)
  351. #define RT5668_LDO1_DVO_1_0V (0x1)
  352. #define RT5668_LDO1_DVO_1_2V (0x2)
  353. #define RT5668_LDO1_DVO_1_4V (0x3)
  354. /* Power Management for Analog 2 (0x0064) */
  355. #define RT5668_PWR_BST1 (0x1 << 15)
  356. #define RT5668_PWR_BST1_MASK (0x1 << 15)
  357. #define RT5668_PWR_BST1_SHIFT 15
  358. #define RT5668_PWR_BST1_OFF (0x0 << 15)
  359. #define RT5668_PWR_BST1_ON (0x1 << 15)
  360. #define RT5668_PWR_BST2 (0x1 << 14)
  361. #define RT5668_PWR_BST2_MASK (0x1 << 14)
  362. #define RT5668_PWR_BST2_SHIFT 14
  363. #define RT5668_PWR_MB1 (0x1 << 11)
  364. #define RT5668_PWR_MB1_SHIFT 11
  365. #define RT5668_PWR_MB2 (0x1 << 10)
  366. #define RT5668_PWR_MB2_SHIFT 10
  367. #define RT5668_PWR_BST2_OP (0x1 << 6)
  368. #define RT5668_PWR_BST2_OP_MASK (0x1 << 6)
  369. #define RT5668_PWR_BST2_OP_SHIFT 6
  370. #define RT5668_PWR_JD1 (0x1 << 3)
  371. #define RT5668_PWR_JD1_MASK (0x1 << 3)
  372. #define RT5668_PWR_JD1_SHIFT 3
  373. #define RT5668_PWR_JD2 (0x1 << 2)
  374. #define RT5668_PWR_JD2_MASK (0x1 << 2)
  375. #define RT5668_PWR_JD2_SHIFT 2
  376. #define RT5668_PWR_RECMIX1 (0x1 << 1)
  377. #define RT5668_PWR_RECMIX1_SHIFT 1
  378. #define RT5668_PWR_RECMIX2 (0x1)
  379. #define RT5668_PWR_RECMIX2_SHIFT 0
  380. /* Power Management for Analog 3 (0x0065) */
  381. #define RT5668_PWR_CBJ_MASK (0x1 << 9)
  382. #define RT5668_PWR_CBJ_SHIFT 9
  383. #define RT5668_PWR_CBJ_OFF (0x0 << 9)
  384. #define RT5668_PWR_CBJ_ON (0x1 << 9)
  385. #define RT5668_PWR_PLL (0x1 << 6)
  386. #define RT5668_PWR_PLL_SHIFT 6
  387. #define RT5668_PWR_LDO2 (0x1 << 2)
  388. #define RT5668_PWR_LDO2_SHIFT 2
  389. /* Power Management for Volume (0x0067) */
  390. #define RT5668_PWR_MIC_DET (0x1 << 5)
  391. #define RT5668_PWR_MIC_DET_SHIFT 5
  392. /* MCLK and System Clock Detection Control (0x006b) */
  393. #define RT5668_EN_ANA_CLK_DET_MASK (0x1 << 15)
  394. #define RT5668_EN_ANA_CLK_DET_SHIFT 15
  395. #define RT5668_EN_ANA_CLK_DET_DIS (0x0 << 15)
  396. #define RT5668_EN_ANA_CLK_DET_AUTO (0x1 << 15)
  397. #define RT5668_PWR_CLK_DET_MASK (0x1)
  398. #define RT5668_PWR_CLK_DET_SHIFT 0
  399. #define RT5668_PWR_CLK_DET_DIS (0x0)
  400. #define RT5668_PWR_CLK_DET_EN (0x1)
  401. /* I2S1 Audio Serial Data Port Control (0x0070) */
  402. #define RT5668_I2S_MS_MASK (0x1 << 15)
  403. #define RT5668_I2S_MS_SHIFT 15
  404. #define RT5668_I2S_MS_M (0x0 << 15)
  405. #define RT5668_I2S_MS_S (0x1 << 15)
  406. #define RT5668_I2S_BP_MASK (0x1 << 8)
  407. #define RT5668_I2S_BP_SHIFT 8
  408. #define RT5668_I2S_BP_NOR (0x0 << 8)
  409. #define RT5668_I2S_BP_INV (0x1 << 8)
  410. #define RT5668_I2S_DL_MASK (0x3 << 4)
  411. #define RT5668_I2S_DL_SHIFT 4
  412. #define RT5668_I2S_DL_16 (0x0 << 4)
  413. #define RT5668_I2S_DL_20 (0x1 << 4)
  414. #define RT5668_I2S_DL_24 (0x2 << 4)
  415. #define RT5668_I2S_DL_8 (0x3 << 4)
  416. #define RT5668_I2S_DF_MASK (0x7)
  417. #define RT5668_I2S_DF_SHIFT 0
  418. #define RT5668_I2S_DF_I2S (0x0)
  419. #define RT5668_I2S_DF_LEFT (0x1)
  420. #define RT5668_I2S_DF_PCM_A (0x2)
  421. #define RT5668_I2S_DF_PCM_B (0x3)
  422. #define RT5668_I2S_DF_PCM_A_N (0x6)
  423. #define RT5668_I2S_DF_PCM_B_N (0x7)
  424. /* ADC/DAC Clock Control 1 (0x0073) */
  425. #define RT5668_I2S_PD1_MASK (0x7 << 12)
  426. #define RT5668_I2S_PD1_SHIFT 12
  427. #define RT5668_M_I2S_DIV_MASK (0x7 << 8)
  428. #define RT5668_M_I2S_DIV_SHIFT 8
  429. #define RT5668_CLK_SRC_MASK (0x3 << 4)
  430. #define RT5668_CLK_SRC_MCLK (0x0 << 4)
  431. #define RT5668_CLK_SRC_PLL_OUT (0x1 << 4)
  432. #define RT5668_CLK_SRC_DIV (0x2 << 4)
  433. #define RT5668_CLK_SRC_RC (0x3 << 4)
  434. #define RT5668_DAC_OSR_MASK (0x3 << 2)
  435. #define RT5668_DAC_OSR_SHIFT 2
  436. #define RT5668_DAC_OSR_128 (0x0 << 2)
  437. #define RT5668_DAC_OSR_64 (0x1 << 2)
  438. #define RT5668_DAC_OSR_32 (0x2 << 2)
  439. #define RT5668_ADC_OSR_MASK (0x3)
  440. #define RT5668_ADC_OSR_SHIFT 0
  441. #define RT5668_ADC_OSR_128 (0x0)
  442. #define RT5668_ADC_OSR_64 (0x1)
  443. #define RT5668_ADC_OSR_32 (0x2)
  444. /* TDM1 control 1 (0x0078) */
  445. #define RT5668_TDM_MODE_MASK (0x1 << 15)
  446. #define RT5668_TDM_MODE_SHIFT 15
  447. #define RT5668_TDM_MODE_I2S (0x0 << 15)
  448. #define RT5668_TDM_MODE_TDM (0x1 << 15)
  449. #define RT5668_TDM_IN_CH_MASK (0x3 << 10)
  450. #define RT5668_TDM_IN_CH_SHIFT 10
  451. #define RT5668_TDM_IN_CH_2 (0x0 << 10)
  452. #define RT5668_TDM_IN_CH_4 (0x1 << 10)
  453. #define RT5668_TDM_IN_CH_6 (0x2 << 10)
  454. #define RT5668_TDM_IN_CH_8 (0x3 << 10)
  455. #define RT5668_TDM_OUT_CH_MASK (0x3 << 8)
  456. #define RT5668_TDM_OUT_CH_SHIFT 8
  457. #define RT5668_TDM_OUT_CH_2 (0x0 << 8)
  458. #define RT5668_TDM_OUT_CH_4 (0x1 << 8)
  459. #define RT5668_TDM_OUT_CH_6 (0x2 << 8)
  460. #define RT5668_TDM_OUT_CH_8 (0x3 << 8)
  461. #define RT5668_TDM_IN_LEN_MASK (0x3 << 6)
  462. #define RT5668_TDM_IN_LEN_SHIFT 6
  463. #define RT5668_TDM_IN_LEN_16 (0x0 << 6)
  464. #define RT5668_TDM_IN_LEN_20 (0x1 << 6)
  465. #define RT5668_TDM_IN_LEN_24 (0x2 << 6)
  466. #define RT5668_TDM_IN_LEN_32 (0x3 << 6)
  467. #define RT5668_TDM_OUT_LEN_MASK (0x3 << 4)
  468. #define RT5668_TDM_OUT_LEN_SHIFT 4
  469. #define RT5668_TDM_OUT_LEN_16 (0x0 << 4)
  470. #define RT5668_TDM_OUT_LEN_20 (0x1 << 4)
  471. #define RT5668_TDM_OUT_LEN_24 (0x2 << 4)
  472. #define RT5668_TDM_OUT_LEN_32 (0x3 << 4)
  473. /* Global Clock Control (0x0080) */
  474. #define RT5668_SCLK_SRC_MASK (0x3 << 14)
  475. #define RT5668_SCLK_SRC_SHIFT 14
  476. #define RT5668_SCLK_SRC_MCLK (0x0 << 14)
  477. #define RT5668_SCLK_SRC_PLL1 (0x1 << 14)
  478. #define RT5668_SCLK_SRC_RCCLK (0x2 << 14)
  479. #define RT5668_PLL1_SRC_MASK (0x7 << 8)
  480. #define RT5668_PLL1_SRC_SHIFT 8
  481. #define RT5668_PLL1_SRC_MCLK (0x0 << 8)
  482. #define RT5668_PLL1_SRC_BCLK1 (0x1 << 8)
  483. #define RT5668_PLL1_PD_MASK (0x1 << 4)
  484. #define RT5668_PLL1_PD_SHIFT 4
  485. #define RT5668_PLL_INP_MAX 40000000
  486. #define RT5668_PLL_INP_MIN 256000
  487. /* PLL M/N/K Code Control 1 (0x0081) */
  488. #define RT5668_PLL_N_MAX 0x001ff
  489. #define RT5668_PLL_N_MASK (RT5668_PLL_N_MAX << 7)
  490. #define RT5668_PLL_N_SHIFT 7
  491. #define RT5668_PLL_K_MAX 0x001f
  492. #define RT5668_PLL_K_MASK (RT5668_PLL_K_MAX)
  493. #define RT5668_PLL_K_SHIFT 0
  494. /* PLL M/N/K Code Control 2 (0x0082) */
  495. #define RT5668_PLL_M_MAX 0x00f
  496. #define RT5668_PLL_M_MASK (RT5668_PLL_M_MAX << 12)
  497. #define RT5668_PLL_M_SHIFT 12
  498. #define RT5668_PLL_M_BP (0x1 << 11)
  499. #define RT5668_PLL_M_BP_SHIFT 11
  500. /* PLL tracking mode 1 (0x0083) */
  501. #define RT5668_I2S1_ASRC_MASK (0x1 << 13)
  502. #define RT5668_I2S1_ASRC_SHIFT 13
  503. #define RT5668_DAC_STO1_ASRC_MASK (0x1 << 12)
  504. #define RT5668_DAC_STO1_ASRC_SHIFT 12
  505. #define RT5668_ADC_STO1_ASRC_MASK (0x1 << 4)
  506. #define RT5668_ADC_STO1_ASRC_SHIFT 4
  507. /* PLL tracking mode 2 (0x0084)*/
  508. #define RT5668_DA_STO1_TRACK_MASK (0x7 << 12)
  509. #define RT5668_DA_STO1_TRACK_SHIFT 12
  510. #define RT5668_DA_STO1_TRACK_SYSCLK (0x0 << 12)
  511. #define RT5668_DA_STO1_TRACK_I2S1 (0x1 << 12)
  512. /* PLL tracking mode 3 (0x0085)*/
  513. #define RT5668_AD_STO1_TRACK_MASK (0x7 << 12)
  514. #define RT5668_AD_STO1_TRACK_SHIFT 12
  515. #define RT5668_AD_STO1_TRACK_SYSCLK (0x0 << 12)
  516. #define RT5668_AD_STO1_TRACK_I2S1 (0x1 << 12)
  517. /* HPOUT Charge pump control 1 (0x0091) */
  518. #define RT5668_OSW_HP_L_MASK (0x1 << 11)
  519. #define RT5668_OSW_HP_L_SHIFT 11
  520. #define RT5668_OSW_HP_L_EN (0x1 << 11)
  521. #define RT5668_OSW_HP_L_DIS (0x0 << 11)
  522. #define RT5668_OSW_HP_R_MASK (0x1 << 10)
  523. #define RT5668_OSW_HP_R_SHIFT 10
  524. #define RT5668_OSW_HP_R_EN (0x1 << 10)
  525. #define RT5668_OSW_HP_R_DIS (0x0 << 10)
  526. #define RT5668_SEL_PM_HP_MASK (0x3 << 8)
  527. #define RT5668_SEL_PM_HP_SHIFT 8
  528. #define RT5668_SEL_PM_HP_0_6 (0x0 << 8)
  529. #define RT5668_SEL_PM_HP_0_9 (0x1 << 8)
  530. #define RT5668_SEL_PM_HP_1_8 (0x2 << 8)
  531. #define RT5668_SEL_PM_HP_HIGH (0x3 << 8)
  532. #define RT5668_OVCD_HP_MASK (0x1 << 2)
  533. #define RT5668_OVCD_HP_SHIFT 2
  534. #define RT5668_OVCD_HP_EN (0x1 << 2)
  535. #define RT5668_OVCD_HP_DIS (0x0 << 2)
  536. /* RC Clock Control (0x0094) */
  537. #define RT5668_DIG_25M_CLK_MASK (0x1 << 9)
  538. #define RT5668_DIG_25M_CLK_SHIFT 9
  539. #define RT5668_DIG_25M_CLK_DIS (0x0 << 9)
  540. #define RT5668_DIG_25M_CLK_EN (0x1 << 9)
  541. #define RT5668_DIG_1M_CLK_MASK (0x1 << 8)
  542. #define RT5668_DIG_1M_CLK_SHIFT 8
  543. #define RT5668_DIG_1M_CLK_DIS (0x0 << 8)
  544. #define RT5668_DIG_1M_CLK_EN (0x1 << 8)
  545. /* Auto Turn On 1M RC CLK (0x009f) */
  546. #define RT5668_IRQ_POW_SAV_MASK (0x1 << 15)
  547. #define RT5668_IRQ_POW_SAV_SHIFT 15
  548. #define RT5668_IRQ_POW_SAV_DIS (0x0 << 15)
  549. #define RT5668_IRQ_POW_SAV_EN (0x1 << 15)
  550. #define RT5668_IRQ_POW_SAV_JD1_MASK (0x1 << 14)
  551. #define RT5668_IRQ_POW_SAV_JD1_SHIFT 14
  552. #define RT5668_IRQ_POW_SAV_JD1_DIS (0x0 << 14)
  553. #define RT5668_IRQ_POW_SAV_JD1_EN (0x1 << 14)
  554. /* IRQ Control 1 (0x00b6) */
  555. #define RT5668_EN_CB_JD_MASK (0x1 << 3)
  556. #define RT5668_EN_CB_JD_SHIFT 3
  557. #define RT5668_EN_CB_JD_EN (0x1 << 3)
  558. #define RT5668_EN_CB_JD_DIS (0x0 << 3)
  559. /* IRQ Control 3 (0x00b8) */
  560. #define RT5668_EN_IRQ_INLINE_MASK (0x1 << 6)
  561. #define RT5668_EN_IRQ_INLINE_SHIFT 6
  562. #define RT5668_EN_IRQ_INLINE_BYP (0x0 << 6)
  563. #define RT5668_EN_IRQ_INLINE_NOR (0x1 << 6)
  564. /* GPIO Control 1 (0x00c0) */
  565. #define RT5668_GP1_PIN_MASK (0x1 << 15)
  566. #define RT5668_GP1_PIN_SHIFT 15
  567. #define RT5668_GP1_PIN_GPIO1 (0x0 << 15)
  568. #define RT5668_GP1_PIN_IRQ (0x1 << 15)
  569. /* GPIO Control 2 (0x00c1) */
  570. #define RT5668_GP4_PIN_CONF_MASK (0x1 << 5)
  571. #define RT5668_GP4_PIN_CONF_SHIFT 5
  572. #define RT5668_GP4_PIN_CONF_INPUT (0x0 << 5)
  573. #define RT5668_GP4_PIN_CONF_OUTPUT (0x1 << 5)
  574. /* GPIO Control 2 (0x00c2) */
  575. #define RT5668_GP8_PIN_CONF_MASK (0x1 << 13)
  576. #define RT5668_GP8_PIN_CONF_SHIFT 13
  577. #define RT5668_GP8_PIN_CONF_INPUT (0x0 << 13)
  578. #define RT5668_GP8_PIN_CONF_OUTPUT (0x1 << 13)
  579. /* 4 Buttons Inline Command Function 1 (0x00df) */
  580. #define RT5668_4BTN_CLK_DEB_MASK (0x3 << 2)
  581. #define RT5668_4BTN_CLK_DEB_SHIFT 2
  582. #define RT5668_4BTN_CLK_DEB_8MS (0x0 << 2)
  583. #define RT5668_4BTN_CLK_DEB_16MS (0x1 << 2)
  584. #define RT5668_4BTN_CLK_DEB_32MS (0x2 << 2)
  585. #define RT5668_4BTN_CLK_DEB_65MS (0x3 << 2)
  586. /* Inline Command Function 6 (0x00e0) */
  587. #define RT5668_EN_4BTN_INL_MASK (0x1 << 15)
  588. #define RT5668_EN_4BTN_INL_SHIFT 15
  589. #define RT5668_EN_4BTN_INL_DIS (0x0 << 15)
  590. #define RT5668_EN_4BTN_INL_EN (0x1 << 15)
  591. #define RT5668_RESET_4BTN_INL_MASK (0x1 << 14)
  592. #define RT5668_RESET_4BTN_INL_SHIFT 14
  593. #define RT5668_RESET_4BTN_INL_RESET (0x0 << 14)
  594. #define RT5668_RESET_4BTN_INL_NOR (0x1 << 14)
  595. /* Digital Misc Control (0x00fa) */
  596. #define RT5668_DIG_GATE_CTRL_MASK 0x1
  597. #define RT5668_DIG_GATE_CTRL_SHIFT (0)
  598. #define RT5668_DIG_GATE_CTRL_DIS 0x0
  599. #define RT5668_DIG_GATE_CTRL_EN 0x1
  600. /* Chopper and Clock control for DAC L (0x013a)*/
  601. #define RT5668_CKXEN_DAC1_MASK (0x1 << 13)
  602. #define RT5668_CKXEN_DAC1_SHIFT 13
  603. #define RT5668_CKGEN_DAC1_MASK (0x1 << 12)
  604. #define RT5668_CKGEN_DAC1_SHIFT 12
  605. /* Chopper and Clock control for ADC (0x013b)*/
  606. #define RT5668_CKXEN_ADCC_MASK (0x1 << 13)
  607. #define RT5668_CKXEN_ADCC_SHIFT 13
  608. #define RT5668_CKGEN_ADCC_MASK (0x1 << 12)
  609. #define RT5668_CKGEN_ADCC_SHIFT 12
  610. /* HP Behavior Logic Control 2 (0x01db) */
  611. #define RT5668_HP_SIG_SRC1_MASK (0x3)
  612. #define RT5668_HP_SIG_SRC1_SHIFT 0
  613. #define RT5668_HP_SIG_SRC1_HP_DC (0x0)
  614. #define RT5668_HP_SIG_SRC1_HP_CALIB (0x1)
  615. #define RT5668_HP_SIG_SRC1_REG (0x2)
  616. #define RT5668_HP_SIG_SRC1_SILENCE (0x3)
  617. /* RT5663 specific register */
  618. #define RT5663_HP_OUT_EN 0x0002
  619. #define RT5663_HP_LCH_DRE 0x0005
  620. #define RT5663_HP_RCH_DRE 0x0006
  621. #define RT5663_CALIB_BST 0x000a
  622. #define RT5663_RECMIX 0x0010
  623. #define RT5663_SIL_DET_CTL 0x0015
  624. #define RT5663_PWR_SAV_SILDET 0x0016
  625. #define RT5663_SIDETONE_CTL 0x0018
  626. #define RT5663_STO1_DAC_DIG_VOL 0x0019
  627. #define RT5663_STO1_ADC_DIG_VOL 0x001c
  628. #define RT5663_STO1_BOOST 0x001f
  629. #define RT5663_HP_IMP_GAIN_1 0x0022
  630. #define RT5663_HP_IMP_GAIN_2 0x0023
  631. #define RT5663_STO1_ADC_MIXER 0x0026
  632. #define RT5663_AD_DA_MIXER 0x0029
  633. #define RT5663_STO_DAC_MIXER 0x002a
  634. #define RT5663_DIG_SIDE_MIXER 0x002c
  635. #define RT5663_BYPASS_STO_DAC 0x002d
  636. #define RT5663_CALIB_REC_MIX 0x0040
  637. #define RT5663_PWR_DIG_1 0x0061
  638. #define RT5663_PWR_DIG_2 0x0062
  639. #define RT5663_PWR_ANLG_1 0x0063
  640. #define RT5663_PWR_ANLG_2 0x0064
  641. #define RT5663_PWR_ANLG_3 0x0065
  642. #define RT5663_PWR_MIXER 0x0066
  643. #define RT5663_SIG_CLK_DET 0x006b
  644. #define RT5663_PRE_DIV_GATING_1 0x006e
  645. #define RT5663_PRE_DIV_GATING_2 0x006f
  646. #define RT5663_I2S1_SDP 0x0070
  647. #define RT5663_ADDA_CLK_1 0x0073
  648. #define RT5663_ADDA_RST 0x0074
  649. #define RT5663_FRAC_DIV_1 0x0075
  650. #define RT5663_FRAC_DIV_2 0x0076
  651. #define RT5663_TDM_1 0x0077
  652. #define RT5663_TDM_2 0x0078
  653. #define RT5663_TDM_3 0x0079
  654. #define RT5663_TDM_4 0x007a
  655. #define RT5663_TDM_5 0x007b
  656. #define RT5663_GLB_CLK 0x0080
  657. #define RT5663_PLL_1 0x0081
  658. #define RT5663_PLL_2 0x0082
  659. #define RT5663_ASRC_1 0x0083
  660. #define RT5663_ASRC_2 0x0084
  661. #define RT5663_ASRC_4 0x0086
  662. #define RT5663_DUMMY_REG 0x0087
  663. #define RT5663_ASRC_8 0x008a
  664. #define RT5663_ASRC_9 0x008b
  665. #define RT5663_ASRC_11 0x008c
  666. #define RT5663_DEPOP_1 0x008e
  667. #define RT5663_DEPOP_2 0x008f
  668. #define RT5663_DEPOP_3 0x0090
  669. #define RT5663_HP_CHARGE_PUMP_1 0x0091
  670. #define RT5663_HP_CHARGE_PUMP_2 0x0092
  671. #define RT5663_MICBIAS_1 0x0093
  672. #define RT5663_RC_CLK 0x0094
  673. #define RT5663_ASRC_11_2 0x0097
  674. #define RT5663_DUMMY_REG_2 0x0098
  675. #define RT5663_REC_PATH_GAIN 0x009a
  676. #define RT5663_AUTO_1MRC_CLK 0x009f
  677. #define RT5663_ADC_EQ_1 0x00ae
  678. #define RT5663_ADC_EQ_2 0x00af
  679. #define RT5663_IRQ_1 0x00b6
  680. #define RT5663_IRQ_2 0x00b7
  681. #define RT5663_IRQ_3 0x00b8
  682. #define RT5663_IRQ_4 0x00ba
  683. #define RT5663_IRQ_5 0x00bb
  684. #define RT5663_INT_ST_1 0x00be
  685. #define RT5663_INT_ST_2 0x00bf
  686. #define RT5663_GPIO_1 0x00c0
  687. #define RT5663_GPIO_2 0x00c1
  688. #define RT5663_GPIO_STA 0x00c5
  689. #define RT5663_SIN_GEN_1 0x00cb
  690. #define RT5663_SIN_GEN_2 0x00cc
  691. #define RT5663_SIN_GEN_3 0x00cd
  692. #define RT5663_SOF_VOL_ZC1 0x00d9
  693. #define RT5663_IL_CMD_1 0x00db
  694. #define RT5663_IL_CMD_2 0x00dc
  695. #define RT5663_IL_CMD_3 0x00dd
  696. #define RT5663_IL_CMD_4 0x00de
  697. #define RT5663_IL_CMD_5 0x00df
  698. #define RT5663_IL_CMD_6 0x00e0
  699. #define RT5663_IL_CMD_7 0x00e1
  700. #define RT5663_IL_CMD_8 0x00e2
  701. #define RT5663_IL_CMD_PWRSAV1 0x00e4
  702. #define RT5663_IL_CMD_PWRSAV2 0x00e5
  703. #define RT5663_EM_JACK_TYPE_1 0x00e6
  704. #define RT5663_EM_JACK_TYPE_2 0x00e7
  705. #define RT5663_EM_JACK_TYPE_3 0x00e8
  706. #define RT5663_EM_JACK_TYPE_4 0x00e9
  707. #define RT5663_EM_JACK_TYPE_5 0x00ea
  708. #define RT5663_EM_JACK_TYPE_6 0x00eb
  709. #define RT5663_STO1_HPF_ADJ1 0x00ec
  710. #define RT5663_STO1_HPF_ADJ2 0x00ed
  711. #define RT5663_FAST_OFF_MICBIAS 0x00f4
  712. #define RT5663_JD_CTRL1 0x00f6
  713. #define RT5663_JD_CTRL2 0x00f8
  714. #define RT5663_DIG_MISC 0x00fa
  715. #define RT5663_DIG_VOL_ZCD 0x0100
  716. #define RT5663_ANA_BIAS_CUR_1 0x0108
  717. #define RT5663_ANA_BIAS_CUR_2 0x0109
  718. #define RT5663_ANA_BIAS_CUR_3 0x010a
  719. #define RT5663_ANA_BIAS_CUR_4 0x010b
  720. #define RT5663_ANA_BIAS_CUR_5 0x010c
  721. #define RT5663_ANA_BIAS_CUR_6 0x010d
  722. #define RT5663_BIAS_CUR_5 0x010e
  723. #define RT5663_BIAS_CUR_6 0x010f
  724. #define RT5663_BIAS_CUR_7 0x0110
  725. #define RT5663_BIAS_CUR_8 0x0111
  726. #define RT5663_DACREF_LDO 0x0112
  727. #define RT5663_DUMMY_REG_3 0x0113
  728. #define RT5663_BIAS_CUR_9 0x0114
  729. #define RT5663_DUMMY_REG_4 0x0116
  730. #define RT5663_VREFADJ_OP 0x0117
  731. #define RT5663_VREF_RECMIX 0x0118
  732. #define RT5663_CHARGE_PUMP_1 0x0125
  733. #define RT5663_CHARGE_PUMP_1_2 0x0126
  734. #define RT5663_CHARGE_PUMP_1_3 0x0127
  735. #define RT5663_CHARGE_PUMP_2 0x0128
  736. #define RT5663_DIG_IN_PIN1 0x0132
  737. #define RT5663_PAD_DRV_CTL 0x0137
  738. #define RT5663_PLL_INT_REG 0x0139
  739. #define RT5663_CHOP_DAC_L 0x013a
  740. #define RT5663_CHOP_ADC 0x013b
  741. #define RT5663_CALIB_ADC 0x013c
  742. #define RT5663_CHOP_DAC_R 0x013d
  743. #define RT5663_DUMMY_CTL_DACLR 0x013e
  744. #define RT5663_DUMMY_REG_5 0x0140
  745. #define RT5663_SOFT_RAMP 0x0141
  746. #define RT5663_TEST_MODE_1 0x0144
  747. #define RT5663_TEST_MODE_2 0x0145
  748. #define RT5663_TEST_MODE_3 0x0146
  749. #define RT5663_STO_DRE_1 0x0160
  750. #define RT5663_STO_DRE_2 0x0161
  751. #define RT5663_STO_DRE_3 0x0162
  752. #define RT5663_STO_DRE_4 0x0163
  753. #define RT5663_STO_DRE_5 0x0164
  754. #define RT5663_STO_DRE_6 0x0165
  755. #define RT5663_STO_DRE_7 0x0166
  756. #define RT5663_STO_DRE_8 0x0167
  757. #define RT5663_STO_DRE_9 0x0168
  758. #define RT5663_STO_DRE_10 0x0169
  759. #define RT5663_MIC_DECRO_1 0x0180
  760. #define RT5663_MIC_DECRO_2 0x0181
  761. #define RT5663_MIC_DECRO_3 0x0182
  762. #define RT5663_MIC_DECRO_4 0x0183
  763. #define RT5663_MIC_DECRO_5 0x0184
  764. #define RT5663_MIC_DECRO_6 0x0185
  765. #define RT5663_HP_DECRO_1 0x01b0
  766. #define RT5663_HP_DECRO_2 0x01b1
  767. #define RT5663_HP_DECRO_3 0x01b2
  768. #define RT5663_HP_DECRO_4 0x01b3
  769. #define RT5663_HP_DECOUP 0x01b4
  770. #define RT5663_HP_IMP_SEN_MAP8 0x01b5
  771. #define RT5663_HP_IMP_SEN_MAP9 0x01b6
  772. #define RT5663_HP_IMP_SEN_MAP10 0x01b7
  773. #define RT5663_HP_IMP_SEN_MAP11 0x01b8
  774. #define RT5663_HP_IMP_SEN_1 0x01c0
  775. #define RT5663_HP_IMP_SEN_2 0x01c1
  776. #define RT5663_HP_IMP_SEN_3 0x01c2
  777. #define RT5663_HP_IMP_SEN_4 0x01c3
  778. #define RT5663_HP_IMP_SEN_5 0x01c4
  779. #define RT5663_HP_IMP_SEN_6 0x01c5
  780. #define RT5663_HP_IMP_SEN_7 0x01c6
  781. #define RT5663_HP_IMP_SEN_8 0x01c7
  782. #define RT5663_HP_IMP_SEN_9 0x01c8
  783. #define RT5663_HP_IMP_SEN_10 0x01c9
  784. #define RT5663_HP_IMP_SEN_11 0x01ca
  785. #define RT5663_HP_IMP_SEN_12 0x01cb
  786. #define RT5663_HP_IMP_SEN_13 0x01cc
  787. #define RT5663_HP_IMP_SEN_14 0x01cd
  788. #define RT5663_HP_IMP_SEN_15 0x01ce
  789. #define RT5663_HP_IMP_SEN_16 0x01cf
  790. #define RT5663_HP_IMP_SEN_17 0x01d0
  791. #define RT5663_HP_IMP_SEN_18 0x01d1
  792. #define RT5663_HP_IMP_SEN_19 0x01d2
  793. #define RT5663_HP_IMPSEN_DIG5 0x01d3
  794. #define RT5663_HP_IMPSEN_MAP1 0x01d4
  795. #define RT5663_HP_IMPSEN_MAP2 0x01d5
  796. #define RT5663_HP_IMPSEN_MAP3 0x01d6
  797. #define RT5663_HP_IMPSEN_MAP4 0x01d7
  798. #define RT5663_HP_IMPSEN_MAP5 0x01d8
  799. #define RT5663_HP_IMPSEN_MAP7 0x01d9
  800. #define RT5663_HP_LOGIC_1 0x01da
  801. #define RT5663_HP_LOGIC_2 0x01db
  802. #define RT5663_HP_CALIB_1 0x01dd
  803. #define RT5663_HP_CALIB_1_1 0x01de
  804. #define RT5663_HP_CALIB_2 0x01df
  805. #define RT5663_HP_CALIB_3 0x01e0
  806. #define RT5663_HP_CALIB_4 0x01e1
  807. #define RT5663_HP_CALIB_5 0x01e2
  808. #define RT5663_HP_CALIB_5_1 0x01e3
  809. #define RT5663_HP_CALIB_6 0x01e4
  810. #define RT5663_HP_CALIB_7 0x01e5
  811. #define RT5663_HP_CALIB_9 0x01e6
  812. #define RT5663_HP_CALIB_10 0x01e7
  813. #define RT5663_HP_CALIB_11 0x01e8
  814. #define RT5663_HP_CALIB_ST1 0x01ea
  815. #define RT5663_HP_CALIB_ST2 0x01eb
  816. #define RT5663_HP_CALIB_ST3 0x01ec
  817. #define RT5663_HP_CALIB_ST4 0x01ed
  818. #define RT5663_HP_CALIB_ST5 0x01ee
  819. #define RT5663_HP_CALIB_ST6 0x01ef
  820. #define RT5663_HP_CALIB_ST7 0x01f0
  821. #define RT5663_HP_CALIB_ST8 0x01f1
  822. #define RT5663_HP_CALIB_ST9 0x01f2
  823. #define RT5663_HP_AMP_DET 0x0200
  824. #define RT5663_DUMMY_REG_6 0x0201
  825. #define RT5663_HP_BIAS 0x0202
  826. #define RT5663_CBJ_1 0x0250
  827. #define RT5663_CBJ_2 0x0251
  828. #define RT5663_CBJ_3 0x0252
  829. #define RT5663_DUMMY_1 0x02fa
  830. #define RT5663_DUMMY_2 0x02fb
  831. #define RT5663_DUMMY_3 0x02fc
  832. #define RT5663_ANA_JD 0x0300
  833. #define RT5663_ADC_LCH_LPF1_A1 0x03d0
  834. #define RT5663_ADC_RCH_LPF1_A1 0x03d1
  835. #define RT5663_ADC_LCH_LPF1_H0 0x03d2
  836. #define RT5663_ADC_RCH_LPF1_H0 0x03d3
  837. #define RT5663_ADC_LCH_BPF1_A1 0x03d4
  838. #define RT5663_ADC_RCH_BPF1_A1 0x03d5
  839. #define RT5663_ADC_LCH_BPF1_A2 0x03d6
  840. #define RT5663_ADC_RCH_BPF1_A2 0x03d7
  841. #define RT5663_ADC_LCH_BPF1_H0 0x03d8
  842. #define RT5663_ADC_RCH_BPF1_H0 0x03d9
  843. #define RT5663_ADC_LCH_BPF2_A1 0x03da
  844. #define RT5663_ADC_RCH_BPF2_A1 0x03db
  845. #define RT5663_ADC_LCH_BPF2_A2 0x03dc
  846. #define RT5663_ADC_RCH_BPF2_A2 0x03dd
  847. #define RT5663_ADC_LCH_BPF2_H0 0x03de
  848. #define RT5663_ADC_RCH_BPF2_H0 0x03df
  849. #define RT5663_ADC_LCH_BPF3_A1 0x03e0
  850. #define RT5663_ADC_RCH_BPF3_A1 0x03e1
  851. #define RT5663_ADC_LCH_BPF3_A2 0x03e2
  852. #define RT5663_ADC_RCH_BPF3_A2 0x03e3
  853. #define RT5663_ADC_LCH_BPF3_H0 0x03e4
  854. #define RT5663_ADC_RCH_BPF3_H0 0x03e5
  855. #define RT5663_ADC_LCH_BPF4_A1 0x03e6
  856. #define RT5663_ADC_RCH_BPF4_A1 0x03e7
  857. #define RT5663_ADC_LCH_BPF4_A2 0x03e8
  858. #define RT5663_ADC_RCH_BPF4_A2 0x03e9
  859. #define RT5663_ADC_LCH_BPF4_H0 0x03ea
  860. #define RT5663_ADC_RCH_BPF4_H0 0x03eb
  861. #define RT5663_ADC_LCH_HPF1_A1 0x03ec
  862. #define RT5663_ADC_RCH_HPF1_A1 0x03ed
  863. #define RT5663_ADC_LCH_HPF1_H0 0x03ee
  864. #define RT5663_ADC_RCH_HPF1_H0 0x03ef
  865. #define RT5663_ADC_EQ_PRE_VOL_L 0x03f0
  866. #define RT5663_ADC_EQ_PRE_VOL_R 0x03f1
  867. #define RT5663_ADC_EQ_POST_VOL_L 0x03f2
  868. #define RT5663_ADC_EQ_POST_VOL_R 0x03f3
  869. /* RT5663: RECMIX Control (0x0010) */
  870. #define RT5663_RECMIX1_BST1_MASK (0x1)
  871. #define RT5663_RECMIX1_BST1_SHIFT 0
  872. #define RT5663_RECMIX1_BST1_ON (0x0)
  873. #define RT5663_RECMIX1_BST1_OFF (0x1)
  874. /* RT5663: Bypass Stereo1 DAC Mixer Control (0x002d) */
  875. #define RT5663_DACL1_SRC_MASK (0x1 << 3)
  876. #define RT5663_DACL1_SRC_SHIFT 3
  877. #define RT5663_DACR1_SRC_MASK (0x1 << 2)
  878. #define RT5663_DACR1_SRC_SHIFT 2
  879. /* RT5663: TDM control 2 (0x0078) */
  880. #define RT5663_DATA_SWAP_ADCDAT1_MASK (0x3 << 14)
  881. #define RT5663_DATA_SWAP_ADCDAT1_SHIFT 14
  882. #define RT5663_DATA_SWAP_ADCDAT1_LR (0x0 << 14)
  883. #define RT5663_DATA_SWAP_ADCDAT1_RL (0x1 << 14)
  884. #define RT5663_DATA_SWAP_ADCDAT1_LL (0x2 << 14)
  885. #define RT5663_DATA_SWAP_ADCDAT1_RR (0x3 << 14)
  886. /* RT5663: TDM control 5 (0x007b) */
  887. #define RT5663_TDM_LENGTN_MASK (0x3)
  888. #define RT5663_TDM_LENGTN_SHIFT 0
  889. #define RT5663_TDM_LENGTN_16 (0x0)
  890. #define RT5663_TDM_LENGTN_20 (0x1)
  891. #define RT5663_TDM_LENGTN_24 (0x2)
  892. #define RT5663_TDM_LENGTN_32 (0x3)
  893. /* RT5663: Global Clock Control (0x0080) */
  894. #define RT5663_SCLK_SRC_MASK (0x3 << 14)
  895. #define RT5663_SCLK_SRC_SHIFT 14
  896. #define RT5663_SCLK_SRC_MCLK (0x0 << 14)
  897. #define RT5663_SCLK_SRC_PLL1 (0x1 << 14)
  898. #define RT5663_SCLK_SRC_RCCLK (0x2 << 14)
  899. #define RT5663_PLL1_SRC_MASK (0x7 << 11)
  900. #define RT5663_PLL1_SRC_SHIFT 11
  901. #define RT5663_PLL1_SRC_MCLK (0x0 << 11)
  902. #define RT5663_PLL1_SRC_BCLK1 (0x1 << 11)
  903. /* PLL tracking mode 1 (0x0083) */
  904. #define RT5663_I2S1_ASRC_MASK (0x1 << 11)
  905. #define RT5663_I2S1_ASRC_SHIFT 11
  906. #define RT5663_DAC_STO1_ASRC_MASK (0x1 << 10)
  907. #define RT5663_DAC_STO1_ASRC_SHIFT 10
  908. #define RT5663_ADC_STO1_ASRC_MASK (0x1 << 3)
  909. #define RT5663_ADC_STO1_ASRC_SHIFT 3
  910. /* PLL tracking mode 2 (0x0084)*/
  911. #define RT5663_DA_STO1_TRACK_MASK (0x7 << 12)
  912. #define RT5663_DA_STO1_TRACK_SHIFT 12
  913. #define RT5663_DA_STO1_TRACK_SYSCLK (0x0 << 12)
  914. #define RT5663_DA_STO1_TRACK_I2S1 (0x1 << 12)
  915. #define RT5663_AD_STO1_TRACK_MASK (0x7)
  916. #define RT5663_AD_STO1_TRACK_SHIFT 0
  917. #define RT5663_AD_STO1_TRACK_SYSCLK (0x0)
  918. #define RT5663_AD_STO1_TRACK_I2S1 (0x1)
  919. /* RT5663: HPOUT Charge pump control 1 (0x0091) */
  920. #define RT5663_SI_HP_MASK (0x1 << 12)
  921. #define RT5663_SI_HP_SHIFT 12
  922. #define RT5663_SI_HP_EN (0x1 << 12)
  923. #define RT5663_SI_HP_DIS (0x0 << 12)
  924. /* RT5663: GPIO Control 2 (0x00b6) */
  925. #define RT5663_GP1_PIN_CONF_MASK (0x1 << 2)
  926. #define RT5663_GP1_PIN_CONF_SHIFT 2
  927. #define RT5663_GP1_PIN_CONF_OUTPUT (0x1 << 2)
  928. #define RT5663_GP1_PIN_CONF_INPUT (0x0 << 2)
  929. /* RT5663: GPIO Control 2 (0x00b7) */
  930. #define RT5663_EN_IRQ_INLINE_MASK (0x1 << 3)
  931. #define RT5663_EN_IRQ_INLINE_SHIFT 3
  932. #define RT5663_EN_IRQ_INLINE_NOR (0x1 << 3)
  933. #define RT5663_EN_IRQ_INLINE_BYP (0x0 << 3)
  934. /* RT5663: IRQ Control 1 (0x00c1) */
  935. #define RT5663_EN_IRQ_JD1_MASK (0x1 << 6)
  936. #define RT5663_EN_IRQ_JD1_SHIFT 6
  937. #define RT5663_EN_IRQ_JD1_EN (0x1 << 6)
  938. #define RT5663_EN_IRQ_JD1_DIS (0x0 << 6)
  939. /* RT5663: Inline Command Function 2 (0x00dc) */
  940. #define RT5663_PWR_MIC_DET_MASK (0x1)
  941. #define RT5663_PWR_MIC_DET_SHIFT 0
  942. #define RT5663_PWR_MIC_DET_ON (0x1)
  943. #define RT5663_PWR_MIC_DET_OFF (0x0)
  944. /* RT5663: Embeeded Jack and Type Detection Control 1 (0x00e6)*/
  945. #define RT5663_CBJ_DET_MASK (0x1 << 15)
  946. #define RT5663_CBJ_DET_SHIFT 15
  947. #define RT5663_CBJ_DET_DIS (0x0 << 15)
  948. #define RT5663_CBJ_DET_EN (0x1 << 15)
  949. #define RT5663_EXT_JD_MASK (0x1 << 11)
  950. #define RT5663_EXT_JD_SHIFT 11
  951. #define RT5663_EXT_JD_EN (0x1 << 11)
  952. #define RT5663_EXT_JD_DIS (0x0 << 11)
  953. #define RT5663_POL_EXT_JD_MASK (0x1 << 10)
  954. #define RT5663_POL_EXT_JD_SHIFT 10
  955. #define RT5663_POL_EXT_JD_EN (0x1 << 10)
  956. #define RT5663_POL_EXT_JD_DIS (0x0 << 10)
  957. /* RT5663: DACREF LDO Control (0x0112)*/
  958. #define RT5663_PWR_LDO_DACREFL_MASK (0x1 << 9)
  959. #define RT5663_PWR_LDO_DACREFL_SHIFT 9
  960. #define RT5663_PWR_LDO_DACREFR_MASK (0x1 << 1)
  961. #define RT5663_PWR_LDO_DACREFR_SHIFT 1
  962. /* RT5663: Stereo Dynamic Range Enhancement Control 9 (0x0168, 0x0169)*/
  963. #define RT5663_DRE_GAIN_HP_MASK (0x1f)
  964. #define RT5663_DRE_GAIN_HP_SHIFT 0
  965. /* RT5663: Combo Jack Control (0x0250) */
  966. #define RT5663_INBUF_CBJ_BST1_MASK (0x1 << 11)
  967. #define RT5663_INBUF_CBJ_BST1_SHIFT 11
  968. #define RT5663_INBUF_CBJ_BST1_ON (0x1 << 11)
  969. #define RT5663_INBUF_CBJ_BST1_OFF (0x0 << 11)
  970. #define RT5663_CBJ_SENSE_BST1_MASK (0x1 << 10)
  971. #define RT5663_CBJ_SENSE_BST1_SHIFT 10
  972. #define RT5663_CBJ_SENSE_BST1_L (0x1 << 10)
  973. #define RT5663_CBJ_SENSE_BST1_R (0x0 << 10)
  974. /* RT5663: Combo Jack Control (0x0251) */
  975. #define RT5663_GAIN_BST1_MASK (0xf)
  976. #define RT5663_GAIN_BST1_SHIFT 0
  977. /* RT5663: Dummy register 1 (0x02fa) */
  978. #define RT5663_EMB_CLK_MASK (0x1 << 9)
  979. #define RT5663_EMB_CLK_SHIFT 9
  980. #define RT5663_EMB_CLK_EN (0x1 << 9)
  981. #define RT5663_EMB_CLK_DIS (0x0 << 9)
  982. #define RT5663_HPA_CPL_BIAS_MASK (0x7 << 6)
  983. #define RT5663_HPA_CPL_BIAS_SHIFT 6
  984. #define RT5663_HPA_CPL_BIAS_0_5 (0x0 << 6)
  985. #define RT5663_HPA_CPL_BIAS_1 (0x1 << 6)
  986. #define RT5663_HPA_CPL_BIAS_2 (0x2 << 6)
  987. #define RT5663_HPA_CPL_BIAS_3 (0x3 << 6)
  988. #define RT5663_HPA_CPL_BIAS_4_1 (0x4 << 6)
  989. #define RT5663_HPA_CPL_BIAS_4_2 (0x5 << 6)
  990. #define RT5663_HPA_CPL_BIAS_6 (0x6 << 6)
  991. #define RT5663_HPA_CPL_BIAS_8 (0x7 << 6)
  992. #define RT5663_HPA_CPR_BIAS_MASK (0x7 << 3)
  993. #define RT5663_HPA_CPR_BIAS_SHIFT 3
  994. #define RT5663_HPA_CPR_BIAS_0_5 (0x0 << 3)
  995. #define RT5663_HPA_CPR_BIAS_1 (0x1 << 3)
  996. #define RT5663_HPA_CPR_BIAS_2 (0x2 << 3)
  997. #define RT5663_HPA_CPR_BIAS_3 (0x3 << 3)
  998. #define RT5663_HPA_CPR_BIAS_4_1 (0x4 << 3)
  999. #define RT5663_HPA_CPR_BIAS_4_2 (0x5 << 3)
  1000. #define RT5663_HPA_CPR_BIAS_6 (0x6 << 3)
  1001. #define RT5663_HPA_CPR_BIAS_8 (0x7 << 3)
  1002. #define RT5663_DUMMY_BIAS_MASK (0x7)
  1003. #define RT5663_DUMMY_BIAS_SHIFT 0
  1004. #define RT5663_DUMMY_BIAS_0_5 (0x0)
  1005. #define RT5663_DUMMY_BIAS_1 (0x1)
  1006. #define RT5663_DUMMY_BIAS_2 (0x2)
  1007. #define RT5663_DUMMY_BIAS_3 (0x3)
  1008. #define RT5663_DUMMY_BIAS_4_1 (0x4)
  1009. #define RT5663_DUMMY_BIAS_4_2 (0x5)
  1010. #define RT5663_DUMMY_BIAS_6 (0x6)
  1011. #define RT5663_DUMMY_BIAS_8 (0x7)
  1012. /* System Clock Source */
  1013. enum {
  1014. RT5663_SCLK_S_MCLK,
  1015. RT5663_SCLK_S_PLL1,
  1016. RT5663_SCLK_S_RCCLK,
  1017. };
  1018. /* PLL1 Source */
  1019. enum {
  1020. RT5663_PLL1_S_MCLK,
  1021. RT5663_PLL1_S_BCLK1,
  1022. };
  1023. enum {
  1024. RT5663_AIF,
  1025. RT5663_AIFS,
  1026. };
  1027. /* asrc clock source */
  1028. enum {
  1029. RT5663_CLK_SEL_SYS = 0x0,
  1030. RT5663_CLK_SEL_I2S1_ASRC = 0x1,
  1031. };
  1032. /* filter mask */
  1033. enum {
  1034. RT5663_DA_STEREO_FILTER = 0x1,
  1035. RT5663_AD_STEREO_FILTER = 0x2,
  1036. };
  1037. int rt5663_set_jack_detect(struct snd_soc_codec *codec,
  1038. struct snd_soc_jack *hs_jack);
  1039. int rt5663_sel_asrc_clk_src(struct snd_soc_codec *codec,
  1040. unsigned int filter_mask, unsigned int clk_src);
  1041. #endif /* __RT5663_H__ */