wm8961.h 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. /*
  2. * wm8961.h -- WM8961 Soc Audio driver
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _WM8961_H
  9. #define _WM8961_H
  10. #include <sound/soc.h>
  11. #define WM8961_BCLK 1
  12. #define WM8961_LRCLK 2
  13. #define WM8961_BCLK_DIV_1 0
  14. #define WM8961_BCLK_DIV_1_5 1
  15. #define WM8961_BCLK_DIV_2 2
  16. #define WM8961_BCLK_DIV_3 3
  17. #define WM8961_BCLK_DIV_4 4
  18. #define WM8961_BCLK_DIV_5_5 5
  19. #define WM8961_BCLK_DIV_6 6
  20. #define WM8961_BCLK_DIV_8 7
  21. #define WM8961_BCLK_DIV_11 8
  22. #define WM8961_BCLK_DIV_12 9
  23. #define WM8961_BCLK_DIV_16 10
  24. #define WM8961_BCLK_DIV_24 11
  25. #define WM8961_BCLK_DIV_32 13
  26. /*
  27. * Register values.
  28. */
  29. #define WM8961_LEFT_INPUT_VOLUME 0x00
  30. #define WM8961_RIGHT_INPUT_VOLUME 0x01
  31. #define WM8961_LOUT1_VOLUME 0x02
  32. #define WM8961_ROUT1_VOLUME 0x03
  33. #define WM8961_CLOCKING1 0x04
  34. #define WM8961_ADC_DAC_CONTROL_1 0x05
  35. #define WM8961_ADC_DAC_CONTROL_2 0x06
  36. #define WM8961_AUDIO_INTERFACE_0 0x07
  37. #define WM8961_CLOCKING2 0x08
  38. #define WM8961_AUDIO_INTERFACE_1 0x09
  39. #define WM8961_LEFT_DAC_VOLUME 0x0A
  40. #define WM8961_RIGHT_DAC_VOLUME 0x0B
  41. #define WM8961_AUDIO_INTERFACE_2 0x0E
  42. #define WM8961_SOFTWARE_RESET 0x0F
  43. #define WM8961_ALC1 0x11
  44. #define WM8961_ALC2 0x12
  45. #define WM8961_ALC3 0x13
  46. #define WM8961_NOISE_GATE 0x14
  47. #define WM8961_LEFT_ADC_VOLUME 0x15
  48. #define WM8961_RIGHT_ADC_VOLUME 0x16
  49. #define WM8961_ADDITIONAL_CONTROL_1 0x17
  50. #define WM8961_ADDITIONAL_CONTROL_2 0x18
  51. #define WM8961_PWR_MGMT_1 0x19
  52. #define WM8961_PWR_MGMT_2 0x1A
  53. #define WM8961_ADDITIONAL_CONTROL_3 0x1B
  54. #define WM8961_ANTI_POP 0x1C
  55. #define WM8961_CLOCKING_3 0x1E
  56. #define WM8961_ADCL_SIGNAL_PATH 0x20
  57. #define WM8961_ADCR_SIGNAL_PATH 0x21
  58. #define WM8961_LOUT2_VOLUME 0x28
  59. #define WM8961_ROUT2_VOLUME 0x29
  60. #define WM8961_PWR_MGMT_3 0x2F
  61. #define WM8961_ADDITIONAL_CONTROL_4 0x30
  62. #define WM8961_CLASS_D_CONTROL_1 0x31
  63. #define WM8961_CLASS_D_CONTROL_2 0x33
  64. #define WM8961_CLOCKING_4 0x38
  65. #define WM8961_DSP_SIDETONE_0 0x39
  66. #define WM8961_DSP_SIDETONE_1 0x3A
  67. #define WM8961_DC_SERVO_0 0x3C
  68. #define WM8961_DC_SERVO_1 0x3D
  69. #define WM8961_DC_SERVO_3 0x3F
  70. #define WM8961_DC_SERVO_5 0x41
  71. #define WM8961_ANALOGUE_PGA_BIAS 0x44
  72. #define WM8961_ANALOGUE_HP_0 0x45
  73. #define WM8961_ANALOGUE_HP_2 0x47
  74. #define WM8961_CHARGE_PUMP_1 0x48
  75. #define WM8961_CHARGE_PUMP_B 0x52
  76. #define WM8961_WRITE_SEQUENCER_1 0x57
  77. #define WM8961_WRITE_SEQUENCER_2 0x58
  78. #define WM8961_WRITE_SEQUENCER_3 0x59
  79. #define WM8961_WRITE_SEQUENCER_4 0x5A
  80. #define WM8961_WRITE_SEQUENCER_5 0x5B
  81. #define WM8961_WRITE_SEQUENCER_6 0x5C
  82. #define WM8961_WRITE_SEQUENCER_7 0x5D
  83. #define WM8961_GENERAL_TEST_1 0xFC
  84. /*
  85. * Field Definitions.
  86. */
  87. /*
  88. * R0 (0x00) - Left Input volume
  89. */
  90. #define WM8961_IPVU 0x0100 /* IPVU */
  91. #define WM8961_IPVU_MASK 0x0100 /* IPVU */
  92. #define WM8961_IPVU_SHIFT 8 /* IPVU */
  93. #define WM8961_IPVU_WIDTH 1 /* IPVU */
  94. #define WM8961_LINMUTE 0x0080 /* LINMUTE */
  95. #define WM8961_LINMUTE_MASK 0x0080 /* LINMUTE */
  96. #define WM8961_LINMUTE_SHIFT 7 /* LINMUTE */
  97. #define WM8961_LINMUTE_WIDTH 1 /* LINMUTE */
  98. #define WM8961_LIZC 0x0040 /* LIZC */
  99. #define WM8961_LIZC_MASK 0x0040 /* LIZC */
  100. #define WM8961_LIZC_SHIFT 6 /* LIZC */
  101. #define WM8961_LIZC_WIDTH 1 /* LIZC */
  102. #define WM8961_LINVOL_MASK 0x003F /* LINVOL - [5:0] */
  103. #define WM8961_LINVOL_SHIFT 0 /* LINVOL - [5:0] */
  104. #define WM8961_LINVOL_WIDTH 6 /* LINVOL - [5:0] */
  105. /*
  106. * R1 (0x01) - Right Input volume
  107. */
  108. #define WM8961_DEVICE_ID_MASK 0xF000 /* DEVICE_ID - [15:12] */
  109. #define WM8961_DEVICE_ID_SHIFT 12 /* DEVICE_ID - [15:12] */
  110. #define WM8961_DEVICE_ID_WIDTH 4 /* DEVICE_ID - [15:12] */
  111. #define WM8961_CHIP_REV_MASK 0x0E00 /* CHIP_REV - [11:9] */
  112. #define WM8961_CHIP_REV_SHIFT 9 /* CHIP_REV - [11:9] */
  113. #define WM8961_CHIP_REV_WIDTH 3 /* CHIP_REV - [11:9] */
  114. #define WM8961_IPVU 0x0100 /* IPVU */
  115. #define WM8961_IPVU_MASK 0x0100 /* IPVU */
  116. #define WM8961_IPVU_SHIFT 8 /* IPVU */
  117. #define WM8961_IPVU_WIDTH 1 /* IPVU */
  118. #define WM8961_RINMUTE 0x0080 /* RINMUTE */
  119. #define WM8961_RINMUTE_MASK 0x0080 /* RINMUTE */
  120. #define WM8961_RINMUTE_SHIFT 7 /* RINMUTE */
  121. #define WM8961_RINMUTE_WIDTH 1 /* RINMUTE */
  122. #define WM8961_RIZC 0x0040 /* RIZC */
  123. #define WM8961_RIZC_MASK 0x0040 /* RIZC */
  124. #define WM8961_RIZC_SHIFT 6 /* RIZC */
  125. #define WM8961_RIZC_WIDTH 1 /* RIZC */
  126. #define WM8961_RINVOL_MASK 0x003F /* RINVOL - [5:0] */
  127. #define WM8961_RINVOL_SHIFT 0 /* RINVOL - [5:0] */
  128. #define WM8961_RINVOL_WIDTH 6 /* RINVOL - [5:0] */
  129. /*
  130. * R2 (0x02) - LOUT1 volume
  131. */
  132. #define WM8961_OUT1VU 0x0100 /* OUT1VU */
  133. #define WM8961_OUT1VU_MASK 0x0100 /* OUT1VU */
  134. #define WM8961_OUT1VU_SHIFT 8 /* OUT1VU */
  135. #define WM8961_OUT1VU_WIDTH 1 /* OUT1VU */
  136. #define WM8961_LO1ZC 0x0080 /* LO1ZC */
  137. #define WM8961_LO1ZC_MASK 0x0080 /* LO1ZC */
  138. #define WM8961_LO1ZC_SHIFT 7 /* LO1ZC */
  139. #define WM8961_LO1ZC_WIDTH 1 /* LO1ZC */
  140. #define WM8961_LOUT1VOL_MASK 0x007F /* LOUT1VOL - [6:0] */
  141. #define WM8961_LOUT1VOL_SHIFT 0 /* LOUT1VOL - [6:0] */
  142. #define WM8961_LOUT1VOL_WIDTH 7 /* LOUT1VOL - [6:0] */
  143. /*
  144. * R3 (0x03) - ROUT1 volume
  145. */
  146. #define WM8961_OUT1VU 0x0100 /* OUT1VU */
  147. #define WM8961_OUT1VU_MASK 0x0100 /* OUT1VU */
  148. #define WM8961_OUT1VU_SHIFT 8 /* OUT1VU */
  149. #define WM8961_OUT1VU_WIDTH 1 /* OUT1VU */
  150. #define WM8961_RO1ZC 0x0080 /* RO1ZC */
  151. #define WM8961_RO1ZC_MASK 0x0080 /* RO1ZC */
  152. #define WM8961_RO1ZC_SHIFT 7 /* RO1ZC */
  153. #define WM8961_RO1ZC_WIDTH 1 /* RO1ZC */
  154. #define WM8961_ROUT1VOL_MASK 0x007F /* ROUT1VOL - [6:0] */
  155. #define WM8961_ROUT1VOL_SHIFT 0 /* ROUT1VOL - [6:0] */
  156. #define WM8961_ROUT1VOL_WIDTH 7 /* ROUT1VOL - [6:0] */
  157. /*
  158. * R4 (0x04) - Clocking1
  159. */
  160. #define WM8961_ADCDIV_MASK 0x01C0 /* ADCDIV - [8:6] */
  161. #define WM8961_ADCDIV_SHIFT 6 /* ADCDIV - [8:6] */
  162. #define WM8961_ADCDIV_WIDTH 3 /* ADCDIV - [8:6] */
  163. #define WM8961_DACDIV_MASK 0x0038 /* DACDIV - [5:3] */
  164. #define WM8961_DACDIV_SHIFT 3 /* DACDIV - [5:3] */
  165. #define WM8961_DACDIV_WIDTH 3 /* DACDIV - [5:3] */
  166. #define WM8961_MCLKDIV 0x0004 /* MCLKDIV */
  167. #define WM8961_MCLKDIV_MASK 0x0004 /* MCLKDIV */
  168. #define WM8961_MCLKDIV_SHIFT 2 /* MCLKDIV */
  169. #define WM8961_MCLKDIV_WIDTH 1 /* MCLKDIV */
  170. /*
  171. * R5 (0x05) - ADC & DAC Control 1
  172. */
  173. #define WM8961_ADCPOL_MASK 0x0060 /* ADCPOL - [6:5] */
  174. #define WM8961_ADCPOL_SHIFT 5 /* ADCPOL - [6:5] */
  175. #define WM8961_ADCPOL_WIDTH 2 /* ADCPOL - [6:5] */
  176. #define WM8961_DACMU 0x0008 /* DACMU */
  177. #define WM8961_DACMU_MASK 0x0008 /* DACMU */
  178. #define WM8961_DACMU_SHIFT 3 /* DACMU */
  179. #define WM8961_DACMU_WIDTH 1 /* DACMU */
  180. #define WM8961_DEEMPH_MASK 0x0006 /* DEEMPH - [2:1] */
  181. #define WM8961_DEEMPH_SHIFT 1 /* DEEMPH - [2:1] */
  182. #define WM8961_DEEMPH_WIDTH 2 /* DEEMPH - [2:1] */
  183. #define WM8961_ADCHPD 0x0001 /* ADCHPD */
  184. #define WM8961_ADCHPD_MASK 0x0001 /* ADCHPD */
  185. #define WM8961_ADCHPD_SHIFT 0 /* ADCHPD */
  186. #define WM8961_ADCHPD_WIDTH 1 /* ADCHPD */
  187. /*
  188. * R6 (0x06) - ADC & DAC Control 2
  189. */
  190. #define WM8961_ADC_HPF_CUT_MASK 0x0180 /* ADC_HPF_CUT - [8:7] */
  191. #define WM8961_ADC_HPF_CUT_SHIFT 7 /* ADC_HPF_CUT - [8:7] */
  192. #define WM8961_ADC_HPF_CUT_WIDTH 2 /* ADC_HPF_CUT - [8:7] */
  193. #define WM8961_DACPOL_MASK 0x0060 /* DACPOL - [6:5] */
  194. #define WM8961_DACPOL_SHIFT 5 /* DACPOL - [6:5] */
  195. #define WM8961_DACPOL_WIDTH 2 /* DACPOL - [6:5] */
  196. #define WM8961_DACSMM 0x0008 /* DACSMM */
  197. #define WM8961_DACSMM_MASK 0x0008 /* DACSMM */
  198. #define WM8961_DACSMM_SHIFT 3 /* DACSMM */
  199. #define WM8961_DACSMM_WIDTH 1 /* DACSMM */
  200. #define WM8961_DACMR 0x0004 /* DACMR */
  201. #define WM8961_DACMR_MASK 0x0004 /* DACMR */
  202. #define WM8961_DACMR_SHIFT 2 /* DACMR */
  203. #define WM8961_DACMR_WIDTH 1 /* DACMR */
  204. #define WM8961_DACSLOPE 0x0002 /* DACSLOPE */
  205. #define WM8961_DACSLOPE_MASK 0x0002 /* DACSLOPE */
  206. #define WM8961_DACSLOPE_SHIFT 1 /* DACSLOPE */
  207. #define WM8961_DACSLOPE_WIDTH 1 /* DACSLOPE */
  208. #define WM8961_DAC_OSR128 0x0001 /* DAC_OSR128 */
  209. #define WM8961_DAC_OSR128_MASK 0x0001 /* DAC_OSR128 */
  210. #define WM8961_DAC_OSR128_SHIFT 0 /* DAC_OSR128 */
  211. #define WM8961_DAC_OSR128_WIDTH 1 /* DAC_OSR128 */
  212. /*
  213. * R7 (0x07) - Audio Interface 0
  214. */
  215. #define WM8961_ALRSWAP 0x0100 /* ALRSWAP */
  216. #define WM8961_ALRSWAP_MASK 0x0100 /* ALRSWAP */
  217. #define WM8961_ALRSWAP_SHIFT 8 /* ALRSWAP */
  218. #define WM8961_ALRSWAP_WIDTH 1 /* ALRSWAP */
  219. #define WM8961_BCLKINV 0x0080 /* BCLKINV */
  220. #define WM8961_BCLKINV_MASK 0x0080 /* BCLKINV */
  221. #define WM8961_BCLKINV_SHIFT 7 /* BCLKINV */
  222. #define WM8961_BCLKINV_WIDTH 1 /* BCLKINV */
  223. #define WM8961_MS 0x0040 /* MS */
  224. #define WM8961_MS_MASK 0x0040 /* MS */
  225. #define WM8961_MS_SHIFT 6 /* MS */
  226. #define WM8961_MS_WIDTH 1 /* MS */
  227. #define WM8961_DLRSWAP 0x0020 /* DLRSWAP */
  228. #define WM8961_DLRSWAP_MASK 0x0020 /* DLRSWAP */
  229. #define WM8961_DLRSWAP_SHIFT 5 /* DLRSWAP */
  230. #define WM8961_DLRSWAP_WIDTH 1 /* DLRSWAP */
  231. #define WM8961_LRP 0x0010 /* LRP */
  232. #define WM8961_LRP_MASK 0x0010 /* LRP */
  233. #define WM8961_LRP_SHIFT 4 /* LRP */
  234. #define WM8961_LRP_WIDTH 1 /* LRP */
  235. #define WM8961_WL_MASK 0x000C /* WL - [3:2] */
  236. #define WM8961_WL_SHIFT 2 /* WL - [3:2] */
  237. #define WM8961_WL_WIDTH 2 /* WL - [3:2] */
  238. #define WM8961_FORMAT_MASK 0x0003 /* FORMAT - [1:0] */
  239. #define WM8961_FORMAT_SHIFT 0 /* FORMAT - [1:0] */
  240. #define WM8961_FORMAT_WIDTH 2 /* FORMAT - [1:0] */
  241. /*
  242. * R8 (0x08) - Clocking2
  243. */
  244. #define WM8961_DCLKDIV_MASK 0x01C0 /* DCLKDIV - [8:6] */
  245. #define WM8961_DCLKDIV_SHIFT 6 /* DCLKDIV - [8:6] */
  246. #define WM8961_DCLKDIV_WIDTH 3 /* DCLKDIV - [8:6] */
  247. #define WM8961_CLK_SYS_ENA 0x0020 /* CLK_SYS_ENA */
  248. #define WM8961_CLK_SYS_ENA_MASK 0x0020 /* CLK_SYS_ENA */
  249. #define WM8961_CLK_SYS_ENA_SHIFT 5 /* CLK_SYS_ENA */
  250. #define WM8961_CLK_SYS_ENA_WIDTH 1 /* CLK_SYS_ENA */
  251. #define WM8961_CLK_DSP_ENA 0x0010 /* CLK_DSP_ENA */
  252. #define WM8961_CLK_DSP_ENA_MASK 0x0010 /* CLK_DSP_ENA */
  253. #define WM8961_CLK_DSP_ENA_SHIFT 4 /* CLK_DSP_ENA */
  254. #define WM8961_CLK_DSP_ENA_WIDTH 1 /* CLK_DSP_ENA */
  255. #define WM8961_BCLKDIV_MASK 0x000F /* BCLKDIV - [3:0] */
  256. #define WM8961_BCLKDIV_SHIFT 0 /* BCLKDIV - [3:0] */
  257. #define WM8961_BCLKDIV_WIDTH 4 /* BCLKDIV - [3:0] */
  258. /*
  259. * R9 (0x09) - Audio Interface 1
  260. */
  261. #define WM8961_DACCOMP_MASK 0x0018 /* DACCOMP - [4:3] */
  262. #define WM8961_DACCOMP_SHIFT 3 /* DACCOMP - [4:3] */
  263. #define WM8961_DACCOMP_WIDTH 2 /* DACCOMP - [4:3] */
  264. #define WM8961_ADCCOMP_MASK 0x0006 /* ADCCOMP - [2:1] */
  265. #define WM8961_ADCCOMP_SHIFT 1 /* ADCCOMP - [2:1] */
  266. #define WM8961_ADCCOMP_WIDTH 2 /* ADCCOMP - [2:1] */
  267. #define WM8961_LOOPBACK 0x0001 /* LOOPBACK */
  268. #define WM8961_LOOPBACK_MASK 0x0001 /* LOOPBACK */
  269. #define WM8961_LOOPBACK_SHIFT 0 /* LOOPBACK */
  270. #define WM8961_LOOPBACK_WIDTH 1 /* LOOPBACK */
  271. /*
  272. * R10 (0x0A) - Left DAC volume
  273. */
  274. #define WM8961_DACVU 0x0100 /* DACVU */
  275. #define WM8961_DACVU_MASK 0x0100 /* DACVU */
  276. #define WM8961_DACVU_SHIFT 8 /* DACVU */
  277. #define WM8961_DACVU_WIDTH 1 /* DACVU */
  278. #define WM8961_LDACVOL_MASK 0x00FF /* LDACVOL - [7:0] */
  279. #define WM8961_LDACVOL_SHIFT 0 /* LDACVOL - [7:0] */
  280. #define WM8961_LDACVOL_WIDTH 8 /* LDACVOL - [7:0] */
  281. /*
  282. * R11 (0x0B) - Right DAC volume
  283. */
  284. #define WM8961_DACVU 0x0100 /* DACVU */
  285. #define WM8961_DACVU_MASK 0x0100 /* DACVU */
  286. #define WM8961_DACVU_SHIFT 8 /* DACVU */
  287. #define WM8961_DACVU_WIDTH 1 /* DACVU */
  288. #define WM8961_RDACVOL_MASK 0x00FF /* RDACVOL - [7:0] */
  289. #define WM8961_RDACVOL_SHIFT 0 /* RDACVOL - [7:0] */
  290. #define WM8961_RDACVOL_WIDTH 8 /* RDACVOL - [7:0] */
  291. /*
  292. * R14 (0x0E) - Audio Interface 2
  293. */
  294. #define WM8961_LRCLK_RATE_MASK 0x01FF /* LRCLK_RATE - [8:0] */
  295. #define WM8961_LRCLK_RATE_SHIFT 0 /* LRCLK_RATE - [8:0] */
  296. #define WM8961_LRCLK_RATE_WIDTH 9 /* LRCLK_RATE - [8:0] */
  297. /*
  298. * R15 (0x0F) - Software Reset
  299. */
  300. #define WM8961_SW_RST_DEV_ID1_MASK 0xFFFF /* SW_RST_DEV_ID1 - [15:0] */
  301. #define WM8961_SW_RST_DEV_ID1_SHIFT 0 /* SW_RST_DEV_ID1 - [15:0] */
  302. #define WM8961_SW_RST_DEV_ID1_WIDTH 16 /* SW_RST_DEV_ID1 - [15:0] */
  303. /*
  304. * R17 (0x11) - ALC1
  305. */
  306. #define WM8961_ALCSEL_MASK 0x0180 /* ALCSEL - [8:7] */
  307. #define WM8961_ALCSEL_SHIFT 7 /* ALCSEL - [8:7] */
  308. #define WM8961_ALCSEL_WIDTH 2 /* ALCSEL - [8:7] */
  309. #define WM8961_MAXGAIN_MASK 0x0070 /* MAXGAIN - [6:4] */
  310. #define WM8961_MAXGAIN_SHIFT 4 /* MAXGAIN - [6:4] */
  311. #define WM8961_MAXGAIN_WIDTH 3 /* MAXGAIN - [6:4] */
  312. #define WM8961_ALCL_MASK 0x000F /* ALCL - [3:0] */
  313. #define WM8961_ALCL_SHIFT 0 /* ALCL - [3:0] */
  314. #define WM8961_ALCL_WIDTH 4 /* ALCL - [3:0] */
  315. /*
  316. * R18 (0x12) - ALC2
  317. */
  318. #define WM8961_ALCZC 0x0080 /* ALCZC */
  319. #define WM8961_ALCZC_MASK 0x0080 /* ALCZC */
  320. #define WM8961_ALCZC_SHIFT 7 /* ALCZC */
  321. #define WM8961_ALCZC_WIDTH 1 /* ALCZC */
  322. #define WM8961_MINGAIN_MASK 0x0070 /* MINGAIN - [6:4] */
  323. #define WM8961_MINGAIN_SHIFT 4 /* MINGAIN - [6:4] */
  324. #define WM8961_MINGAIN_WIDTH 3 /* MINGAIN - [6:4] */
  325. #define WM8961_HLD_MASK 0x000F /* HLD - [3:0] */
  326. #define WM8961_HLD_SHIFT 0 /* HLD - [3:0] */
  327. #define WM8961_HLD_WIDTH 4 /* HLD - [3:0] */
  328. /*
  329. * R19 (0x13) - ALC3
  330. */
  331. #define WM8961_ALCMODE 0x0100 /* ALCMODE */
  332. #define WM8961_ALCMODE_MASK 0x0100 /* ALCMODE */
  333. #define WM8961_ALCMODE_SHIFT 8 /* ALCMODE */
  334. #define WM8961_ALCMODE_WIDTH 1 /* ALCMODE */
  335. #define WM8961_DCY_MASK 0x00F0 /* DCY - [7:4] */
  336. #define WM8961_DCY_SHIFT 4 /* DCY - [7:4] */
  337. #define WM8961_DCY_WIDTH 4 /* DCY - [7:4] */
  338. #define WM8961_ATK_MASK 0x000F /* ATK - [3:0] */
  339. #define WM8961_ATK_SHIFT 0 /* ATK - [3:0] */
  340. #define WM8961_ATK_WIDTH 4 /* ATK - [3:0] */
  341. /*
  342. * R20 (0x14) - Noise Gate
  343. */
  344. #define WM8961_NGTH_MASK 0x00F8 /* NGTH - [7:3] */
  345. #define WM8961_NGTH_SHIFT 3 /* NGTH - [7:3] */
  346. #define WM8961_NGTH_WIDTH 5 /* NGTH - [7:3] */
  347. #define WM8961_NGG 0x0002 /* NGG */
  348. #define WM8961_NGG_MASK 0x0002 /* NGG */
  349. #define WM8961_NGG_SHIFT 1 /* NGG */
  350. #define WM8961_NGG_WIDTH 1 /* NGG */
  351. #define WM8961_NGAT 0x0001 /* NGAT */
  352. #define WM8961_NGAT_MASK 0x0001 /* NGAT */
  353. #define WM8961_NGAT_SHIFT 0 /* NGAT */
  354. #define WM8961_NGAT_WIDTH 1 /* NGAT */
  355. /*
  356. * R21 (0x15) - Left ADC volume
  357. */
  358. #define WM8961_ADCVU 0x0100 /* ADCVU */
  359. #define WM8961_ADCVU_MASK 0x0100 /* ADCVU */
  360. #define WM8961_ADCVU_SHIFT 8 /* ADCVU */
  361. #define WM8961_ADCVU_WIDTH 1 /* ADCVU */
  362. #define WM8961_LADCVOL_MASK 0x00FF /* LADCVOL - [7:0] */
  363. #define WM8961_LADCVOL_SHIFT 0 /* LADCVOL - [7:0] */
  364. #define WM8961_LADCVOL_WIDTH 8 /* LADCVOL - [7:0] */
  365. /*
  366. * R22 (0x16) - Right ADC volume
  367. */
  368. #define WM8961_ADCVU 0x0100 /* ADCVU */
  369. #define WM8961_ADCVU_MASK 0x0100 /* ADCVU */
  370. #define WM8961_ADCVU_SHIFT 8 /* ADCVU */
  371. #define WM8961_ADCVU_WIDTH 1 /* ADCVU */
  372. #define WM8961_RADCVOL_MASK 0x00FF /* RADCVOL - [7:0] */
  373. #define WM8961_RADCVOL_SHIFT 0 /* RADCVOL - [7:0] */
  374. #define WM8961_RADCVOL_WIDTH 8 /* RADCVOL - [7:0] */
  375. /*
  376. * R23 (0x17) - Additional control(1)
  377. */
  378. #define WM8961_TSDEN 0x0100 /* TSDEN */
  379. #define WM8961_TSDEN_MASK 0x0100 /* TSDEN */
  380. #define WM8961_TSDEN_SHIFT 8 /* TSDEN */
  381. #define WM8961_TSDEN_WIDTH 1 /* TSDEN */
  382. #define WM8961_DMONOMIX 0x0010 /* DMONOMIX */
  383. #define WM8961_DMONOMIX_MASK 0x0010 /* DMONOMIX */
  384. #define WM8961_DMONOMIX_SHIFT 4 /* DMONOMIX */
  385. #define WM8961_DMONOMIX_WIDTH 1 /* DMONOMIX */
  386. #define WM8961_TOEN 0x0001 /* TOEN */
  387. #define WM8961_TOEN_MASK 0x0001 /* TOEN */
  388. #define WM8961_TOEN_SHIFT 0 /* TOEN */
  389. #define WM8961_TOEN_WIDTH 1 /* TOEN */
  390. /*
  391. * R24 (0x18) - Additional control(2)
  392. */
  393. #define WM8961_TRIS 0x0008 /* TRIS */
  394. #define WM8961_TRIS_MASK 0x0008 /* TRIS */
  395. #define WM8961_TRIS_SHIFT 3 /* TRIS */
  396. #define WM8961_TRIS_WIDTH 1 /* TRIS */
  397. /*
  398. * R25 (0x19) - Pwr Mgmt (1)
  399. */
  400. #define WM8961_VMIDSEL_MASK 0x0180 /* VMIDSEL - [8:7] */
  401. #define WM8961_VMIDSEL_SHIFT 7 /* VMIDSEL - [8:7] */
  402. #define WM8961_VMIDSEL_WIDTH 2 /* VMIDSEL - [8:7] */
  403. #define WM8961_VREF 0x0040 /* VREF */
  404. #define WM8961_VREF_MASK 0x0040 /* VREF */
  405. #define WM8961_VREF_SHIFT 6 /* VREF */
  406. #define WM8961_VREF_WIDTH 1 /* VREF */
  407. #define WM8961_AINL 0x0020 /* AINL */
  408. #define WM8961_AINL_MASK 0x0020 /* AINL */
  409. #define WM8961_AINL_SHIFT 5 /* AINL */
  410. #define WM8961_AINL_WIDTH 1 /* AINL */
  411. #define WM8961_AINR 0x0010 /* AINR */
  412. #define WM8961_AINR_MASK 0x0010 /* AINR */
  413. #define WM8961_AINR_SHIFT 4 /* AINR */
  414. #define WM8961_AINR_WIDTH 1 /* AINR */
  415. #define WM8961_ADCL 0x0008 /* ADCL */
  416. #define WM8961_ADCL_MASK 0x0008 /* ADCL */
  417. #define WM8961_ADCL_SHIFT 3 /* ADCL */
  418. #define WM8961_ADCL_WIDTH 1 /* ADCL */
  419. #define WM8961_ADCR 0x0004 /* ADCR */
  420. #define WM8961_ADCR_MASK 0x0004 /* ADCR */
  421. #define WM8961_ADCR_SHIFT 2 /* ADCR */
  422. #define WM8961_ADCR_WIDTH 1 /* ADCR */
  423. #define WM8961_MICB 0x0002 /* MICB */
  424. #define WM8961_MICB_MASK 0x0002 /* MICB */
  425. #define WM8961_MICB_SHIFT 1 /* MICB */
  426. #define WM8961_MICB_WIDTH 1 /* MICB */
  427. /*
  428. * R26 (0x1A) - Pwr Mgmt (2)
  429. */
  430. #define WM8961_DACL 0x0100 /* DACL */
  431. #define WM8961_DACL_MASK 0x0100 /* DACL */
  432. #define WM8961_DACL_SHIFT 8 /* DACL */
  433. #define WM8961_DACL_WIDTH 1 /* DACL */
  434. #define WM8961_DACR 0x0080 /* DACR */
  435. #define WM8961_DACR_MASK 0x0080 /* DACR */
  436. #define WM8961_DACR_SHIFT 7 /* DACR */
  437. #define WM8961_DACR_WIDTH 1 /* DACR */
  438. #define WM8961_LOUT1_PGA 0x0040 /* LOUT1_PGA */
  439. #define WM8961_LOUT1_PGA_MASK 0x0040 /* LOUT1_PGA */
  440. #define WM8961_LOUT1_PGA_SHIFT 6 /* LOUT1_PGA */
  441. #define WM8961_LOUT1_PGA_WIDTH 1 /* LOUT1_PGA */
  442. #define WM8961_ROUT1_PGA 0x0020 /* ROUT1_PGA */
  443. #define WM8961_ROUT1_PGA_MASK 0x0020 /* ROUT1_PGA */
  444. #define WM8961_ROUT1_PGA_SHIFT 5 /* ROUT1_PGA */
  445. #define WM8961_ROUT1_PGA_WIDTH 1 /* ROUT1_PGA */
  446. #define WM8961_SPKL_PGA 0x0010 /* SPKL_PGA */
  447. #define WM8961_SPKL_PGA_MASK 0x0010 /* SPKL_PGA */
  448. #define WM8961_SPKL_PGA_SHIFT 4 /* SPKL_PGA */
  449. #define WM8961_SPKL_PGA_WIDTH 1 /* SPKL_PGA */
  450. #define WM8961_SPKR_PGA 0x0008 /* SPKR_PGA */
  451. #define WM8961_SPKR_PGA_MASK 0x0008 /* SPKR_PGA */
  452. #define WM8961_SPKR_PGA_SHIFT 3 /* SPKR_PGA */
  453. #define WM8961_SPKR_PGA_WIDTH 1 /* SPKR_PGA */
  454. /*
  455. * R27 (0x1B) - Additional Control (3)
  456. */
  457. #define WM8961_SAMPLE_RATE_MASK 0x0007 /* SAMPLE_RATE - [2:0] */
  458. #define WM8961_SAMPLE_RATE_SHIFT 0 /* SAMPLE_RATE - [2:0] */
  459. #define WM8961_SAMPLE_RATE_WIDTH 3 /* SAMPLE_RATE - [2:0] */
  460. /*
  461. * R28 (0x1C) - Anti-pop
  462. */
  463. #define WM8961_BUFDCOPEN 0x0010 /* BUFDCOPEN */
  464. #define WM8961_BUFDCOPEN_MASK 0x0010 /* BUFDCOPEN */
  465. #define WM8961_BUFDCOPEN_SHIFT 4 /* BUFDCOPEN */
  466. #define WM8961_BUFDCOPEN_WIDTH 1 /* BUFDCOPEN */
  467. #define WM8961_BUFIOEN 0x0008 /* BUFIOEN */
  468. #define WM8961_BUFIOEN_MASK 0x0008 /* BUFIOEN */
  469. #define WM8961_BUFIOEN_SHIFT 3 /* BUFIOEN */
  470. #define WM8961_BUFIOEN_WIDTH 1 /* BUFIOEN */
  471. #define WM8961_SOFT_ST 0x0004 /* SOFT_ST */
  472. #define WM8961_SOFT_ST_MASK 0x0004 /* SOFT_ST */
  473. #define WM8961_SOFT_ST_SHIFT 2 /* SOFT_ST */
  474. #define WM8961_SOFT_ST_WIDTH 1 /* SOFT_ST */
  475. /*
  476. * R30 (0x1E) - Clocking 3
  477. */
  478. #define WM8961_CLK_TO_DIV_MASK 0x0180 /* CLK_TO_DIV - [8:7] */
  479. #define WM8961_CLK_TO_DIV_SHIFT 7 /* CLK_TO_DIV - [8:7] */
  480. #define WM8961_CLK_TO_DIV_WIDTH 2 /* CLK_TO_DIV - [8:7] */
  481. #define WM8961_CLK_256K_DIV_MASK 0x007E /* CLK_256K_DIV - [6:1] */
  482. #define WM8961_CLK_256K_DIV_SHIFT 1 /* CLK_256K_DIV - [6:1] */
  483. #define WM8961_CLK_256K_DIV_WIDTH 6 /* CLK_256K_DIV - [6:1] */
  484. #define WM8961_MANUAL_MODE 0x0001 /* MANUAL_MODE */
  485. #define WM8961_MANUAL_MODE_MASK 0x0001 /* MANUAL_MODE */
  486. #define WM8961_MANUAL_MODE_SHIFT 0 /* MANUAL_MODE */
  487. #define WM8961_MANUAL_MODE_WIDTH 1 /* MANUAL_MODE */
  488. /*
  489. * R32 (0x20) - ADCL signal path
  490. */
  491. #define WM8961_LMICBOOST_MASK 0x0030 /* LMICBOOST - [5:4] */
  492. #define WM8961_LMICBOOST_SHIFT 4 /* LMICBOOST - [5:4] */
  493. #define WM8961_LMICBOOST_WIDTH 2 /* LMICBOOST - [5:4] */
  494. /*
  495. * R33 (0x21) - ADCR signal path
  496. */
  497. #define WM8961_RMICBOOST_MASK 0x0030 /* RMICBOOST - [5:4] */
  498. #define WM8961_RMICBOOST_SHIFT 4 /* RMICBOOST - [5:4] */
  499. #define WM8961_RMICBOOST_WIDTH 2 /* RMICBOOST - [5:4] */
  500. /*
  501. * R40 (0x28) - LOUT2 volume
  502. */
  503. #define WM8961_SPKVU 0x0100 /* SPKVU */
  504. #define WM8961_SPKVU_MASK 0x0100 /* SPKVU */
  505. #define WM8961_SPKVU_SHIFT 8 /* SPKVU */
  506. #define WM8961_SPKVU_WIDTH 1 /* SPKVU */
  507. #define WM8961_SPKLZC 0x0080 /* SPKLZC */
  508. #define WM8961_SPKLZC_MASK 0x0080 /* SPKLZC */
  509. #define WM8961_SPKLZC_SHIFT 7 /* SPKLZC */
  510. #define WM8961_SPKLZC_WIDTH 1 /* SPKLZC */
  511. #define WM8961_SPKLVOL_MASK 0x007F /* SPKLVOL - [6:0] */
  512. #define WM8961_SPKLVOL_SHIFT 0 /* SPKLVOL - [6:0] */
  513. #define WM8961_SPKLVOL_WIDTH 7 /* SPKLVOL - [6:0] */
  514. /*
  515. * R41 (0x29) - ROUT2 volume
  516. */
  517. #define WM8961_SPKVU 0x0100 /* SPKVU */
  518. #define WM8961_SPKVU_MASK 0x0100 /* SPKVU */
  519. #define WM8961_SPKVU_SHIFT 8 /* SPKVU */
  520. #define WM8961_SPKVU_WIDTH 1 /* SPKVU */
  521. #define WM8961_SPKRZC 0x0080 /* SPKRZC */
  522. #define WM8961_SPKRZC_MASK 0x0080 /* SPKRZC */
  523. #define WM8961_SPKRZC_SHIFT 7 /* SPKRZC */
  524. #define WM8961_SPKRZC_WIDTH 1 /* SPKRZC */
  525. #define WM8961_SPKRVOL_MASK 0x007F /* SPKRVOL - [6:0] */
  526. #define WM8961_SPKRVOL_SHIFT 0 /* SPKRVOL - [6:0] */
  527. #define WM8961_SPKRVOL_WIDTH 7 /* SPKRVOL - [6:0] */
  528. /*
  529. * R47 (0x2F) - Pwr Mgmt (3)
  530. */
  531. #define WM8961_TEMP_SHUT 0x0002 /* TEMP_SHUT */
  532. #define WM8961_TEMP_SHUT_MASK 0x0002 /* TEMP_SHUT */
  533. #define WM8961_TEMP_SHUT_SHIFT 1 /* TEMP_SHUT */
  534. #define WM8961_TEMP_SHUT_WIDTH 1 /* TEMP_SHUT */
  535. #define WM8961_TEMP_WARN 0x0001 /* TEMP_WARN */
  536. #define WM8961_TEMP_WARN_MASK 0x0001 /* TEMP_WARN */
  537. #define WM8961_TEMP_WARN_SHIFT 0 /* TEMP_WARN */
  538. #define WM8961_TEMP_WARN_WIDTH 1 /* TEMP_WARN */
  539. /*
  540. * R48 (0x30) - Additional Control (4)
  541. */
  542. #define WM8961_TSENSEN 0x0002 /* TSENSEN */
  543. #define WM8961_TSENSEN_MASK 0x0002 /* TSENSEN */
  544. #define WM8961_TSENSEN_SHIFT 1 /* TSENSEN */
  545. #define WM8961_TSENSEN_WIDTH 1 /* TSENSEN */
  546. #define WM8961_MBSEL 0x0001 /* MBSEL */
  547. #define WM8961_MBSEL_MASK 0x0001 /* MBSEL */
  548. #define WM8961_MBSEL_SHIFT 0 /* MBSEL */
  549. #define WM8961_MBSEL_WIDTH 1 /* MBSEL */
  550. /*
  551. * R49 (0x31) - Class D Control 1
  552. */
  553. #define WM8961_SPKR_ENA 0x0080 /* SPKR_ENA */
  554. #define WM8961_SPKR_ENA_MASK 0x0080 /* SPKR_ENA */
  555. #define WM8961_SPKR_ENA_SHIFT 7 /* SPKR_ENA */
  556. #define WM8961_SPKR_ENA_WIDTH 1 /* SPKR_ENA */
  557. #define WM8961_SPKL_ENA 0x0040 /* SPKL_ENA */
  558. #define WM8961_SPKL_ENA_MASK 0x0040 /* SPKL_ENA */
  559. #define WM8961_SPKL_ENA_SHIFT 6 /* SPKL_ENA */
  560. #define WM8961_SPKL_ENA_WIDTH 1 /* SPKL_ENA */
  561. /*
  562. * R51 (0x33) - Class D Control 2
  563. */
  564. #define WM8961_CLASSD_ACGAIN_MASK 0x0007 /* CLASSD_ACGAIN - [2:0] */
  565. #define WM8961_CLASSD_ACGAIN_SHIFT 0 /* CLASSD_ACGAIN - [2:0] */
  566. #define WM8961_CLASSD_ACGAIN_WIDTH 3 /* CLASSD_ACGAIN - [2:0] */
  567. /*
  568. * R56 (0x38) - Clocking 4
  569. */
  570. #define WM8961_CLK_DCS_DIV_MASK 0x01E0 /* CLK_DCS_DIV - [8:5] */
  571. #define WM8961_CLK_DCS_DIV_SHIFT 5 /* CLK_DCS_DIV - [8:5] */
  572. #define WM8961_CLK_DCS_DIV_WIDTH 4 /* CLK_DCS_DIV - [8:5] */
  573. #define WM8961_CLK_SYS_RATE_MASK 0x001E /* CLK_SYS_RATE - [4:1] */
  574. #define WM8961_CLK_SYS_RATE_SHIFT 1 /* CLK_SYS_RATE - [4:1] */
  575. #define WM8961_CLK_SYS_RATE_WIDTH 4 /* CLK_SYS_RATE - [4:1] */
  576. /*
  577. * R57 (0x39) - DSP Sidetone 0
  578. */
  579. #define WM8961_ADCR_DAC_SVOL_MASK 0x00F0 /* ADCR_DAC_SVOL - [7:4] */
  580. #define WM8961_ADCR_DAC_SVOL_SHIFT 4 /* ADCR_DAC_SVOL - [7:4] */
  581. #define WM8961_ADCR_DAC_SVOL_WIDTH 4 /* ADCR_DAC_SVOL - [7:4] */
  582. #define WM8961_ADC_TO_DACR_MASK 0x000C /* ADC_TO_DACR - [3:2] */
  583. #define WM8961_ADC_TO_DACR_SHIFT 2 /* ADC_TO_DACR - [3:2] */
  584. #define WM8961_ADC_TO_DACR_WIDTH 2 /* ADC_TO_DACR - [3:2] */
  585. /*
  586. * R58 (0x3A) - DSP Sidetone 1
  587. */
  588. #define WM8961_ADCL_DAC_SVOL_MASK 0x00F0 /* ADCL_DAC_SVOL - [7:4] */
  589. #define WM8961_ADCL_DAC_SVOL_SHIFT 4 /* ADCL_DAC_SVOL - [7:4] */
  590. #define WM8961_ADCL_DAC_SVOL_WIDTH 4 /* ADCL_DAC_SVOL - [7:4] */
  591. #define WM8961_ADC_TO_DACL_MASK 0x000C /* ADC_TO_DACL - [3:2] */
  592. #define WM8961_ADC_TO_DACL_SHIFT 2 /* ADC_TO_DACL - [3:2] */
  593. #define WM8961_ADC_TO_DACL_WIDTH 2 /* ADC_TO_DACL - [3:2] */
  594. /*
  595. * R60 (0x3C) - DC Servo 0
  596. */
  597. #define WM8961_DCS_ENA_CHAN_INL 0x0080 /* DCS_ENA_CHAN_INL */
  598. #define WM8961_DCS_ENA_CHAN_INL_MASK 0x0080 /* DCS_ENA_CHAN_INL */
  599. #define WM8961_DCS_ENA_CHAN_INL_SHIFT 7 /* DCS_ENA_CHAN_INL */
  600. #define WM8961_DCS_ENA_CHAN_INL_WIDTH 1 /* DCS_ENA_CHAN_INL */
  601. #define WM8961_DCS_TRIG_STARTUP_INL 0x0040 /* DCS_TRIG_STARTUP_INL */
  602. #define WM8961_DCS_TRIG_STARTUP_INL_MASK 0x0040 /* DCS_TRIG_STARTUP_INL */
  603. #define WM8961_DCS_TRIG_STARTUP_INL_SHIFT 6 /* DCS_TRIG_STARTUP_INL */
  604. #define WM8961_DCS_TRIG_STARTUP_INL_WIDTH 1 /* DCS_TRIG_STARTUP_INL */
  605. #define WM8961_DCS_TRIG_SERIES_INL 0x0010 /* DCS_TRIG_SERIES_INL */
  606. #define WM8961_DCS_TRIG_SERIES_INL_MASK 0x0010 /* DCS_TRIG_SERIES_INL */
  607. #define WM8961_DCS_TRIG_SERIES_INL_SHIFT 4 /* DCS_TRIG_SERIES_INL */
  608. #define WM8961_DCS_TRIG_SERIES_INL_WIDTH 1 /* DCS_TRIG_SERIES_INL */
  609. #define WM8961_DCS_ENA_CHAN_INR 0x0008 /* DCS_ENA_CHAN_INR */
  610. #define WM8961_DCS_ENA_CHAN_INR_MASK 0x0008 /* DCS_ENA_CHAN_INR */
  611. #define WM8961_DCS_ENA_CHAN_INR_SHIFT 3 /* DCS_ENA_CHAN_INR */
  612. #define WM8961_DCS_ENA_CHAN_INR_WIDTH 1 /* DCS_ENA_CHAN_INR */
  613. #define WM8961_DCS_TRIG_STARTUP_INR 0x0004 /* DCS_TRIG_STARTUP_INR */
  614. #define WM8961_DCS_TRIG_STARTUP_INR_MASK 0x0004 /* DCS_TRIG_STARTUP_INR */
  615. #define WM8961_DCS_TRIG_STARTUP_INR_SHIFT 2 /* DCS_TRIG_STARTUP_INR */
  616. #define WM8961_DCS_TRIG_STARTUP_INR_WIDTH 1 /* DCS_TRIG_STARTUP_INR */
  617. #define WM8961_DCS_TRIG_SERIES_INR 0x0001 /* DCS_TRIG_SERIES_INR */
  618. #define WM8961_DCS_TRIG_SERIES_INR_MASK 0x0001 /* DCS_TRIG_SERIES_INR */
  619. #define WM8961_DCS_TRIG_SERIES_INR_SHIFT 0 /* DCS_TRIG_SERIES_INR */
  620. #define WM8961_DCS_TRIG_SERIES_INR_WIDTH 1 /* DCS_TRIG_SERIES_INR */
  621. /*
  622. * R61 (0x3D) - DC Servo 1
  623. */
  624. #define WM8961_DCS_ENA_CHAN_HPL 0x0080 /* DCS_ENA_CHAN_HPL */
  625. #define WM8961_DCS_ENA_CHAN_HPL_MASK 0x0080 /* DCS_ENA_CHAN_HPL */
  626. #define WM8961_DCS_ENA_CHAN_HPL_SHIFT 7 /* DCS_ENA_CHAN_HPL */
  627. #define WM8961_DCS_ENA_CHAN_HPL_WIDTH 1 /* DCS_ENA_CHAN_HPL */
  628. #define WM8961_DCS_TRIG_STARTUP_HPL 0x0040 /* DCS_TRIG_STARTUP_HPL */
  629. #define WM8961_DCS_TRIG_STARTUP_HPL_MASK 0x0040 /* DCS_TRIG_STARTUP_HPL */
  630. #define WM8961_DCS_TRIG_STARTUP_HPL_SHIFT 6 /* DCS_TRIG_STARTUP_HPL */
  631. #define WM8961_DCS_TRIG_STARTUP_HPL_WIDTH 1 /* DCS_TRIG_STARTUP_HPL */
  632. #define WM8961_DCS_TRIG_SERIES_HPL 0x0010 /* DCS_TRIG_SERIES_HPL */
  633. #define WM8961_DCS_TRIG_SERIES_HPL_MASK 0x0010 /* DCS_TRIG_SERIES_HPL */
  634. #define WM8961_DCS_TRIG_SERIES_HPL_SHIFT 4 /* DCS_TRIG_SERIES_HPL */
  635. #define WM8961_DCS_TRIG_SERIES_HPL_WIDTH 1 /* DCS_TRIG_SERIES_HPL */
  636. #define WM8961_DCS_ENA_CHAN_HPR 0x0008 /* DCS_ENA_CHAN_HPR */
  637. #define WM8961_DCS_ENA_CHAN_HPR_MASK 0x0008 /* DCS_ENA_CHAN_HPR */
  638. #define WM8961_DCS_ENA_CHAN_HPR_SHIFT 3 /* DCS_ENA_CHAN_HPR */
  639. #define WM8961_DCS_ENA_CHAN_HPR_WIDTH 1 /* DCS_ENA_CHAN_HPR */
  640. #define WM8961_DCS_TRIG_STARTUP_HPR 0x0004 /* DCS_TRIG_STARTUP_HPR */
  641. #define WM8961_DCS_TRIG_STARTUP_HPR_MASK 0x0004 /* DCS_TRIG_STARTUP_HPR */
  642. #define WM8961_DCS_TRIG_STARTUP_HPR_SHIFT 2 /* DCS_TRIG_STARTUP_HPR */
  643. #define WM8961_DCS_TRIG_STARTUP_HPR_WIDTH 1 /* DCS_TRIG_STARTUP_HPR */
  644. #define WM8961_DCS_TRIG_SERIES_HPR 0x0001 /* DCS_TRIG_SERIES_HPR */
  645. #define WM8961_DCS_TRIG_SERIES_HPR_MASK 0x0001 /* DCS_TRIG_SERIES_HPR */
  646. #define WM8961_DCS_TRIG_SERIES_HPR_SHIFT 0 /* DCS_TRIG_SERIES_HPR */
  647. #define WM8961_DCS_TRIG_SERIES_HPR_WIDTH 1 /* DCS_TRIG_SERIES_HPR */
  648. /*
  649. * R63 (0x3F) - DC Servo 3
  650. */
  651. #define WM8961_DCS_FILT_BW_SERIES_MASK 0x0030 /* DCS_FILT_BW_SERIES - [5:4] */
  652. #define WM8961_DCS_FILT_BW_SERIES_SHIFT 4 /* DCS_FILT_BW_SERIES - [5:4] */
  653. #define WM8961_DCS_FILT_BW_SERIES_WIDTH 2 /* DCS_FILT_BW_SERIES - [5:4] */
  654. /*
  655. * R65 (0x41) - DC Servo 5
  656. */
  657. #define WM8961_DCS_SERIES_NO_HP_MASK 0x007F /* DCS_SERIES_NO_HP - [6:0] */
  658. #define WM8961_DCS_SERIES_NO_HP_SHIFT 0 /* DCS_SERIES_NO_HP - [6:0] */
  659. #define WM8961_DCS_SERIES_NO_HP_WIDTH 7 /* DCS_SERIES_NO_HP - [6:0] */
  660. /*
  661. * R68 (0x44) - Analogue PGA Bias
  662. */
  663. #define WM8961_HP_PGAS_BIAS_MASK 0x0007 /* HP_PGAS_BIAS - [2:0] */
  664. #define WM8961_HP_PGAS_BIAS_SHIFT 0 /* HP_PGAS_BIAS - [2:0] */
  665. #define WM8961_HP_PGAS_BIAS_WIDTH 3 /* HP_PGAS_BIAS - [2:0] */
  666. /*
  667. * R69 (0x45) - Analogue HP 0
  668. */
  669. #define WM8961_HPL_RMV_SHORT 0x0080 /* HPL_RMV_SHORT */
  670. #define WM8961_HPL_RMV_SHORT_MASK 0x0080 /* HPL_RMV_SHORT */
  671. #define WM8961_HPL_RMV_SHORT_SHIFT 7 /* HPL_RMV_SHORT */
  672. #define WM8961_HPL_RMV_SHORT_WIDTH 1 /* HPL_RMV_SHORT */
  673. #define WM8961_HPL_ENA_OUTP 0x0040 /* HPL_ENA_OUTP */
  674. #define WM8961_HPL_ENA_OUTP_MASK 0x0040 /* HPL_ENA_OUTP */
  675. #define WM8961_HPL_ENA_OUTP_SHIFT 6 /* HPL_ENA_OUTP */
  676. #define WM8961_HPL_ENA_OUTP_WIDTH 1 /* HPL_ENA_OUTP */
  677. #define WM8961_HPL_ENA_DLY 0x0020 /* HPL_ENA_DLY */
  678. #define WM8961_HPL_ENA_DLY_MASK 0x0020 /* HPL_ENA_DLY */
  679. #define WM8961_HPL_ENA_DLY_SHIFT 5 /* HPL_ENA_DLY */
  680. #define WM8961_HPL_ENA_DLY_WIDTH 1 /* HPL_ENA_DLY */
  681. #define WM8961_HPL_ENA 0x0010 /* HPL_ENA */
  682. #define WM8961_HPL_ENA_MASK 0x0010 /* HPL_ENA */
  683. #define WM8961_HPL_ENA_SHIFT 4 /* HPL_ENA */
  684. #define WM8961_HPL_ENA_WIDTH 1 /* HPL_ENA */
  685. #define WM8961_HPR_RMV_SHORT 0x0008 /* HPR_RMV_SHORT */
  686. #define WM8961_HPR_RMV_SHORT_MASK 0x0008 /* HPR_RMV_SHORT */
  687. #define WM8961_HPR_RMV_SHORT_SHIFT 3 /* HPR_RMV_SHORT */
  688. #define WM8961_HPR_RMV_SHORT_WIDTH 1 /* HPR_RMV_SHORT */
  689. #define WM8961_HPR_ENA_OUTP 0x0004 /* HPR_ENA_OUTP */
  690. #define WM8961_HPR_ENA_OUTP_MASK 0x0004 /* HPR_ENA_OUTP */
  691. #define WM8961_HPR_ENA_OUTP_SHIFT 2 /* HPR_ENA_OUTP */
  692. #define WM8961_HPR_ENA_OUTP_WIDTH 1 /* HPR_ENA_OUTP */
  693. #define WM8961_HPR_ENA_DLY 0x0002 /* HPR_ENA_DLY */
  694. #define WM8961_HPR_ENA_DLY_MASK 0x0002 /* HPR_ENA_DLY */
  695. #define WM8961_HPR_ENA_DLY_SHIFT 1 /* HPR_ENA_DLY */
  696. #define WM8961_HPR_ENA_DLY_WIDTH 1 /* HPR_ENA_DLY */
  697. #define WM8961_HPR_ENA 0x0001 /* HPR_ENA */
  698. #define WM8961_HPR_ENA_MASK 0x0001 /* HPR_ENA */
  699. #define WM8961_HPR_ENA_SHIFT 0 /* HPR_ENA */
  700. #define WM8961_HPR_ENA_WIDTH 1 /* HPR_ENA */
  701. /*
  702. * R71 (0x47) - Analogue HP 2
  703. */
  704. #define WM8961_HPL_VOL_MASK 0x01C0 /* HPL_VOL - [8:6] */
  705. #define WM8961_HPL_VOL_SHIFT 6 /* HPL_VOL - [8:6] */
  706. #define WM8961_HPL_VOL_WIDTH 3 /* HPL_VOL - [8:6] */
  707. #define WM8961_HPR_VOL_MASK 0x0038 /* HPR_VOL - [5:3] */
  708. #define WM8961_HPR_VOL_SHIFT 3 /* HPR_VOL - [5:3] */
  709. #define WM8961_HPR_VOL_WIDTH 3 /* HPR_VOL - [5:3] */
  710. #define WM8961_HP_BIAS_BOOST_MASK 0x0007 /* HP_BIAS_BOOST - [2:0] */
  711. #define WM8961_HP_BIAS_BOOST_SHIFT 0 /* HP_BIAS_BOOST - [2:0] */
  712. #define WM8961_HP_BIAS_BOOST_WIDTH 3 /* HP_BIAS_BOOST - [2:0] */
  713. /*
  714. * R72 (0x48) - Charge Pump 1
  715. */
  716. #define WM8961_CP_ENA 0x0001 /* CP_ENA */
  717. #define WM8961_CP_ENA_MASK 0x0001 /* CP_ENA */
  718. #define WM8961_CP_ENA_SHIFT 0 /* CP_ENA */
  719. #define WM8961_CP_ENA_WIDTH 1 /* CP_ENA */
  720. /*
  721. * R82 (0x52) - Charge Pump B
  722. */
  723. #define WM8961_CP_DYN_PWR_MASK 0x0003 /* CP_DYN_PWR - [1:0] */
  724. #define WM8961_CP_DYN_PWR_SHIFT 0 /* CP_DYN_PWR - [1:0] */
  725. #define WM8961_CP_DYN_PWR_WIDTH 2 /* CP_DYN_PWR - [1:0] */
  726. /*
  727. * R87 (0x57) - Write Sequencer 1
  728. */
  729. #define WM8961_WSEQ_ENA 0x0020 /* WSEQ_ENA */
  730. #define WM8961_WSEQ_ENA_MASK 0x0020 /* WSEQ_ENA */
  731. #define WM8961_WSEQ_ENA_SHIFT 5 /* WSEQ_ENA */
  732. #define WM8961_WSEQ_ENA_WIDTH 1 /* WSEQ_ENA */
  733. #define WM8961_WSEQ_WRITE_INDEX_MASK 0x001F /* WSEQ_WRITE_INDEX - [4:0] */
  734. #define WM8961_WSEQ_WRITE_INDEX_SHIFT 0 /* WSEQ_WRITE_INDEX - [4:0] */
  735. #define WM8961_WSEQ_WRITE_INDEX_WIDTH 5 /* WSEQ_WRITE_INDEX - [4:0] */
  736. /*
  737. * R88 (0x58) - Write Sequencer 2
  738. */
  739. #define WM8961_WSEQ_EOS 0x0100 /* WSEQ_EOS */
  740. #define WM8961_WSEQ_EOS_MASK 0x0100 /* WSEQ_EOS */
  741. #define WM8961_WSEQ_EOS_SHIFT 8 /* WSEQ_EOS */
  742. #define WM8961_WSEQ_EOS_WIDTH 1 /* WSEQ_EOS */
  743. #define WM8961_WSEQ_ADDR_MASK 0x00FF /* WSEQ_ADDR - [7:0] */
  744. #define WM8961_WSEQ_ADDR_SHIFT 0 /* WSEQ_ADDR - [7:0] */
  745. #define WM8961_WSEQ_ADDR_WIDTH 8 /* WSEQ_ADDR - [7:0] */
  746. /*
  747. * R89 (0x59) - Write Sequencer 3
  748. */
  749. #define WM8961_WSEQ_DATA_MASK 0x00FF /* WSEQ_DATA - [7:0] */
  750. #define WM8961_WSEQ_DATA_SHIFT 0 /* WSEQ_DATA - [7:0] */
  751. #define WM8961_WSEQ_DATA_WIDTH 8 /* WSEQ_DATA - [7:0] */
  752. /*
  753. * R90 (0x5A) - Write Sequencer 4
  754. */
  755. #define WM8961_WSEQ_ABORT 0x0100 /* WSEQ_ABORT */
  756. #define WM8961_WSEQ_ABORT_MASK 0x0100 /* WSEQ_ABORT */
  757. #define WM8961_WSEQ_ABORT_SHIFT 8 /* WSEQ_ABORT */
  758. #define WM8961_WSEQ_ABORT_WIDTH 1 /* WSEQ_ABORT */
  759. #define WM8961_WSEQ_START 0x0080 /* WSEQ_START */
  760. #define WM8961_WSEQ_START_MASK 0x0080 /* WSEQ_START */
  761. #define WM8961_WSEQ_START_SHIFT 7 /* WSEQ_START */
  762. #define WM8961_WSEQ_START_WIDTH 1 /* WSEQ_START */
  763. #define WM8961_WSEQ_START_INDEX_MASK 0x003F /* WSEQ_START_INDEX - [5:0] */
  764. #define WM8961_WSEQ_START_INDEX_SHIFT 0 /* WSEQ_START_INDEX - [5:0] */
  765. #define WM8961_WSEQ_START_INDEX_WIDTH 6 /* WSEQ_START_INDEX - [5:0] */
  766. /*
  767. * R91 (0x5B) - Write Sequencer 5
  768. */
  769. #define WM8961_WSEQ_DATA_WIDTH_MASK 0x0070 /* WSEQ_DATA_WIDTH - [6:4] */
  770. #define WM8961_WSEQ_DATA_WIDTH_SHIFT 4 /* WSEQ_DATA_WIDTH - [6:4] */
  771. #define WM8961_WSEQ_DATA_WIDTH_WIDTH 3 /* WSEQ_DATA_WIDTH - [6:4] */
  772. #define WM8961_WSEQ_DATA_START_MASK 0x000F /* WSEQ_DATA_START - [3:0] */
  773. #define WM8961_WSEQ_DATA_START_SHIFT 0 /* WSEQ_DATA_START - [3:0] */
  774. #define WM8961_WSEQ_DATA_START_WIDTH 4 /* WSEQ_DATA_START - [3:0] */
  775. /*
  776. * R92 (0x5C) - Write Sequencer 6
  777. */
  778. #define WM8961_WSEQ_DELAY_MASK 0x000F /* WSEQ_DELAY - [3:0] */
  779. #define WM8961_WSEQ_DELAY_SHIFT 0 /* WSEQ_DELAY - [3:0] */
  780. #define WM8961_WSEQ_DELAY_WIDTH 4 /* WSEQ_DELAY - [3:0] */
  781. /*
  782. * R93 (0x5D) - Write Sequencer 7
  783. */
  784. #define WM8961_WSEQ_BUSY 0x0001 /* WSEQ_BUSY */
  785. #define WM8961_WSEQ_BUSY_MASK 0x0001 /* WSEQ_BUSY */
  786. #define WM8961_WSEQ_BUSY_SHIFT 0 /* WSEQ_BUSY */
  787. #define WM8961_WSEQ_BUSY_WIDTH 1 /* WSEQ_BUSY */
  788. /*
  789. * R252 (0xFC) - General test 1
  790. */
  791. #define WM8961_ARA_ENA 0x0002 /* ARA_ENA */
  792. #define WM8961_ARA_ENA_MASK 0x0002 /* ARA_ENA */
  793. #define WM8961_ARA_ENA_SHIFT 1 /* ARA_ENA */
  794. #define WM8961_ARA_ENA_WIDTH 1 /* ARA_ENA */
  795. #define WM8961_AUTO_INC 0x0001 /* AUTO_INC */
  796. #define WM8961_AUTO_INC_MASK 0x0001 /* AUTO_INC */
  797. #define WM8961_AUTO_INC_SHIFT 0 /* AUTO_INC */
  798. #define WM8961_AUTO_INC_WIDTH 1 /* AUTO_INC */
  799. #endif