wm9081.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. #ifndef WM9081_H
  2. #define WM9081_H
  3. /*
  4. * wm9081.c -- WM9081 ALSA SoC Audio driver
  5. *
  6. * Author: Mark Brown
  7. *
  8. * Copyright 2009 Wolfson Microelectronics plc
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <sound/soc.h>
  15. /*
  16. * SYSCLK sources
  17. */
  18. #define WM9081_SYSCLK_MCLK 1 /* Use MCLK without FLL */
  19. #define WM9081_SYSCLK_FLL_MCLK 2 /* Use MCLK, enabling FLL if required */
  20. /*
  21. * Register values.
  22. */
  23. #define WM9081_SOFTWARE_RESET 0x00
  24. #define WM9081_ANALOGUE_LINEOUT 0x02
  25. #define WM9081_ANALOGUE_SPEAKER_PGA 0x03
  26. #define WM9081_VMID_CONTROL 0x04
  27. #define WM9081_BIAS_CONTROL_1 0x05
  28. #define WM9081_ANALOGUE_MIXER 0x07
  29. #define WM9081_ANTI_POP_CONTROL 0x08
  30. #define WM9081_ANALOGUE_SPEAKER_1 0x09
  31. #define WM9081_ANALOGUE_SPEAKER_2 0x0A
  32. #define WM9081_POWER_MANAGEMENT 0x0B
  33. #define WM9081_CLOCK_CONTROL_1 0x0C
  34. #define WM9081_CLOCK_CONTROL_2 0x0D
  35. #define WM9081_CLOCK_CONTROL_3 0x0E
  36. #define WM9081_FLL_CONTROL_1 0x10
  37. #define WM9081_FLL_CONTROL_2 0x11
  38. #define WM9081_FLL_CONTROL_3 0x12
  39. #define WM9081_FLL_CONTROL_4 0x13
  40. #define WM9081_FLL_CONTROL_5 0x14
  41. #define WM9081_AUDIO_INTERFACE_1 0x16
  42. #define WM9081_AUDIO_INTERFACE_2 0x17
  43. #define WM9081_AUDIO_INTERFACE_3 0x18
  44. #define WM9081_AUDIO_INTERFACE_4 0x19
  45. #define WM9081_INTERRUPT_STATUS 0x1A
  46. #define WM9081_INTERRUPT_STATUS_MASK 0x1B
  47. #define WM9081_INTERRUPT_POLARITY 0x1C
  48. #define WM9081_INTERRUPT_CONTROL 0x1D
  49. #define WM9081_DAC_DIGITAL_1 0x1E
  50. #define WM9081_DAC_DIGITAL_2 0x1F
  51. #define WM9081_DRC_1 0x20
  52. #define WM9081_DRC_2 0x21
  53. #define WM9081_DRC_3 0x22
  54. #define WM9081_DRC_4 0x23
  55. #define WM9081_WRITE_SEQUENCER_1 0x26
  56. #define WM9081_WRITE_SEQUENCER_2 0x27
  57. #define WM9081_MW_SLAVE_1 0x28
  58. #define WM9081_EQ_1 0x2A
  59. #define WM9081_EQ_2 0x2B
  60. #define WM9081_EQ_3 0x2C
  61. #define WM9081_EQ_4 0x2D
  62. #define WM9081_EQ_5 0x2E
  63. #define WM9081_EQ_6 0x2F
  64. #define WM9081_EQ_7 0x30
  65. #define WM9081_EQ_8 0x31
  66. #define WM9081_EQ_9 0x32
  67. #define WM9081_EQ_10 0x33
  68. #define WM9081_EQ_11 0x34
  69. #define WM9081_EQ_12 0x35
  70. #define WM9081_EQ_13 0x36
  71. #define WM9081_EQ_14 0x37
  72. #define WM9081_EQ_15 0x38
  73. #define WM9081_EQ_16 0x39
  74. #define WM9081_EQ_17 0x3A
  75. #define WM9081_EQ_18 0x3B
  76. #define WM9081_EQ_19 0x3C
  77. #define WM9081_EQ_20 0x3D
  78. #define WM9081_REGISTER_COUNT 55
  79. #define WM9081_MAX_REGISTER 0x3D
  80. /*
  81. * Field Definitions.
  82. */
  83. /*
  84. * R0 (0x00) - Software Reset
  85. */
  86. #define WM9081_SW_RST_DEV_ID1_MASK 0xFFFF /* SW_RST_DEV_ID1 - [15:0] */
  87. #define WM9081_SW_RST_DEV_ID1_SHIFT 0 /* SW_RST_DEV_ID1 - [15:0] */
  88. #define WM9081_SW_RST_DEV_ID1_WIDTH 16 /* SW_RST_DEV_ID1 - [15:0] */
  89. /*
  90. * R2 (0x02) - Analogue Lineout
  91. */
  92. #define WM9081_LINEOUT_MUTE 0x0080 /* LINEOUT_MUTE */
  93. #define WM9081_LINEOUT_MUTE_MASK 0x0080 /* LINEOUT_MUTE */
  94. #define WM9081_LINEOUT_MUTE_SHIFT 7 /* LINEOUT_MUTE */
  95. #define WM9081_LINEOUT_MUTE_WIDTH 1 /* LINEOUT_MUTE */
  96. #define WM9081_LINEOUTZC 0x0040 /* LINEOUTZC */
  97. #define WM9081_LINEOUTZC_MASK 0x0040 /* LINEOUTZC */
  98. #define WM9081_LINEOUTZC_SHIFT 6 /* LINEOUTZC */
  99. #define WM9081_LINEOUTZC_WIDTH 1 /* LINEOUTZC */
  100. #define WM9081_LINEOUT_VOL_MASK 0x003F /* LINEOUT_VOL - [5:0] */
  101. #define WM9081_LINEOUT_VOL_SHIFT 0 /* LINEOUT_VOL - [5:0] */
  102. #define WM9081_LINEOUT_VOL_WIDTH 6 /* LINEOUT_VOL - [5:0] */
  103. /*
  104. * R3 (0x03) - Analogue Speaker PGA
  105. */
  106. #define WM9081_SPKPGA_MUTE 0x0080 /* SPKPGA_MUTE */
  107. #define WM9081_SPKPGA_MUTE_MASK 0x0080 /* SPKPGA_MUTE */
  108. #define WM9081_SPKPGA_MUTE_SHIFT 7 /* SPKPGA_MUTE */
  109. #define WM9081_SPKPGA_MUTE_WIDTH 1 /* SPKPGA_MUTE */
  110. #define WM9081_SPKPGAZC 0x0040 /* SPKPGAZC */
  111. #define WM9081_SPKPGAZC_MASK 0x0040 /* SPKPGAZC */
  112. #define WM9081_SPKPGAZC_SHIFT 6 /* SPKPGAZC */
  113. #define WM9081_SPKPGAZC_WIDTH 1 /* SPKPGAZC */
  114. #define WM9081_SPKPGA_VOL_MASK 0x003F /* SPKPGA_VOL - [5:0] */
  115. #define WM9081_SPKPGA_VOL_SHIFT 0 /* SPKPGA_VOL - [5:0] */
  116. #define WM9081_SPKPGA_VOL_WIDTH 6 /* SPKPGA_VOL - [5:0] */
  117. /*
  118. * R4 (0x04) - VMID Control
  119. */
  120. #define WM9081_VMID_BUF_ENA 0x0020 /* VMID_BUF_ENA */
  121. #define WM9081_VMID_BUF_ENA_MASK 0x0020 /* VMID_BUF_ENA */
  122. #define WM9081_VMID_BUF_ENA_SHIFT 5 /* VMID_BUF_ENA */
  123. #define WM9081_VMID_BUF_ENA_WIDTH 1 /* VMID_BUF_ENA */
  124. #define WM9081_VMID_RAMP 0x0008 /* VMID_RAMP */
  125. #define WM9081_VMID_RAMP_MASK 0x0008 /* VMID_RAMP */
  126. #define WM9081_VMID_RAMP_SHIFT 3 /* VMID_RAMP */
  127. #define WM9081_VMID_RAMP_WIDTH 1 /* VMID_RAMP */
  128. #define WM9081_VMID_SEL_MASK 0x0006 /* VMID_SEL - [2:1] */
  129. #define WM9081_VMID_SEL_SHIFT 1 /* VMID_SEL - [2:1] */
  130. #define WM9081_VMID_SEL_WIDTH 2 /* VMID_SEL - [2:1] */
  131. #define WM9081_VMID_FAST_ST 0x0001 /* VMID_FAST_ST */
  132. #define WM9081_VMID_FAST_ST_MASK 0x0001 /* VMID_FAST_ST */
  133. #define WM9081_VMID_FAST_ST_SHIFT 0 /* VMID_FAST_ST */
  134. #define WM9081_VMID_FAST_ST_WIDTH 1 /* VMID_FAST_ST */
  135. /*
  136. * R5 (0x05) - Bias Control 1
  137. */
  138. #define WM9081_BIAS_SRC 0x0040 /* BIAS_SRC */
  139. #define WM9081_BIAS_SRC_MASK 0x0040 /* BIAS_SRC */
  140. #define WM9081_BIAS_SRC_SHIFT 6 /* BIAS_SRC */
  141. #define WM9081_BIAS_SRC_WIDTH 1 /* BIAS_SRC */
  142. #define WM9081_STBY_BIAS_LVL 0x0020 /* STBY_BIAS_LVL */
  143. #define WM9081_STBY_BIAS_LVL_MASK 0x0020 /* STBY_BIAS_LVL */
  144. #define WM9081_STBY_BIAS_LVL_SHIFT 5 /* STBY_BIAS_LVL */
  145. #define WM9081_STBY_BIAS_LVL_WIDTH 1 /* STBY_BIAS_LVL */
  146. #define WM9081_STBY_BIAS_ENA 0x0010 /* STBY_BIAS_ENA */
  147. #define WM9081_STBY_BIAS_ENA_MASK 0x0010 /* STBY_BIAS_ENA */
  148. #define WM9081_STBY_BIAS_ENA_SHIFT 4 /* STBY_BIAS_ENA */
  149. #define WM9081_STBY_BIAS_ENA_WIDTH 1 /* STBY_BIAS_ENA */
  150. #define WM9081_BIAS_LVL_MASK 0x000C /* BIAS_LVL - [3:2] */
  151. #define WM9081_BIAS_LVL_SHIFT 2 /* BIAS_LVL - [3:2] */
  152. #define WM9081_BIAS_LVL_WIDTH 2 /* BIAS_LVL - [3:2] */
  153. #define WM9081_BIAS_ENA 0x0002 /* BIAS_ENA */
  154. #define WM9081_BIAS_ENA_MASK 0x0002 /* BIAS_ENA */
  155. #define WM9081_BIAS_ENA_SHIFT 1 /* BIAS_ENA */
  156. #define WM9081_BIAS_ENA_WIDTH 1 /* BIAS_ENA */
  157. #define WM9081_STARTUP_BIAS_ENA 0x0001 /* STARTUP_BIAS_ENA */
  158. #define WM9081_STARTUP_BIAS_ENA_MASK 0x0001 /* STARTUP_BIAS_ENA */
  159. #define WM9081_STARTUP_BIAS_ENA_SHIFT 0 /* STARTUP_BIAS_ENA */
  160. #define WM9081_STARTUP_BIAS_ENA_WIDTH 1 /* STARTUP_BIAS_ENA */
  161. /*
  162. * R7 (0x07) - Analogue Mixer
  163. */
  164. #define WM9081_DAC_SEL 0x0010 /* DAC_SEL */
  165. #define WM9081_DAC_SEL_MASK 0x0010 /* DAC_SEL */
  166. #define WM9081_DAC_SEL_SHIFT 4 /* DAC_SEL */
  167. #define WM9081_DAC_SEL_WIDTH 1 /* DAC_SEL */
  168. #define WM9081_IN2_VOL 0x0008 /* IN2_VOL */
  169. #define WM9081_IN2_VOL_MASK 0x0008 /* IN2_VOL */
  170. #define WM9081_IN2_VOL_SHIFT 3 /* IN2_VOL */
  171. #define WM9081_IN2_VOL_WIDTH 1 /* IN2_VOL */
  172. #define WM9081_IN2_ENA 0x0004 /* IN2_ENA */
  173. #define WM9081_IN2_ENA_MASK 0x0004 /* IN2_ENA */
  174. #define WM9081_IN2_ENA_SHIFT 2 /* IN2_ENA */
  175. #define WM9081_IN2_ENA_WIDTH 1 /* IN2_ENA */
  176. #define WM9081_IN1_VOL 0x0002 /* IN1_VOL */
  177. #define WM9081_IN1_VOL_MASK 0x0002 /* IN1_VOL */
  178. #define WM9081_IN1_VOL_SHIFT 1 /* IN1_VOL */
  179. #define WM9081_IN1_VOL_WIDTH 1 /* IN1_VOL */
  180. #define WM9081_IN1_ENA 0x0001 /* IN1_ENA */
  181. #define WM9081_IN1_ENA_MASK 0x0001 /* IN1_ENA */
  182. #define WM9081_IN1_ENA_SHIFT 0 /* IN1_ENA */
  183. #define WM9081_IN1_ENA_WIDTH 1 /* IN1_ENA */
  184. /*
  185. * R8 (0x08) - Anti Pop Control
  186. */
  187. #define WM9081_LINEOUT_DISCH 0x0004 /* LINEOUT_DISCH */
  188. #define WM9081_LINEOUT_DISCH_MASK 0x0004 /* LINEOUT_DISCH */
  189. #define WM9081_LINEOUT_DISCH_SHIFT 2 /* LINEOUT_DISCH */
  190. #define WM9081_LINEOUT_DISCH_WIDTH 1 /* LINEOUT_DISCH */
  191. #define WM9081_LINEOUT_VROI 0x0002 /* LINEOUT_VROI */
  192. #define WM9081_LINEOUT_VROI_MASK 0x0002 /* LINEOUT_VROI */
  193. #define WM9081_LINEOUT_VROI_SHIFT 1 /* LINEOUT_VROI */
  194. #define WM9081_LINEOUT_VROI_WIDTH 1 /* LINEOUT_VROI */
  195. #define WM9081_LINEOUT_CLAMP 0x0001 /* LINEOUT_CLAMP */
  196. #define WM9081_LINEOUT_CLAMP_MASK 0x0001 /* LINEOUT_CLAMP */
  197. #define WM9081_LINEOUT_CLAMP_SHIFT 0 /* LINEOUT_CLAMP */
  198. #define WM9081_LINEOUT_CLAMP_WIDTH 1 /* LINEOUT_CLAMP */
  199. /*
  200. * R9 (0x09) - Analogue Speaker 1
  201. */
  202. #define WM9081_SPK_DCGAIN_MASK 0x0038 /* SPK_DCGAIN - [5:3] */
  203. #define WM9081_SPK_DCGAIN_SHIFT 3 /* SPK_DCGAIN - [5:3] */
  204. #define WM9081_SPK_DCGAIN_WIDTH 3 /* SPK_DCGAIN - [5:3] */
  205. #define WM9081_SPK_ACGAIN_MASK 0x0007 /* SPK_ACGAIN - [2:0] */
  206. #define WM9081_SPK_ACGAIN_SHIFT 0 /* SPK_ACGAIN - [2:0] */
  207. #define WM9081_SPK_ACGAIN_WIDTH 3 /* SPK_ACGAIN - [2:0] */
  208. /*
  209. * R10 (0x0A) - Analogue Speaker 2
  210. */
  211. #define WM9081_SPK_MODE 0x0040 /* SPK_MODE */
  212. #define WM9081_SPK_MODE_MASK 0x0040 /* SPK_MODE */
  213. #define WM9081_SPK_MODE_SHIFT 6 /* SPK_MODE */
  214. #define WM9081_SPK_MODE_WIDTH 1 /* SPK_MODE */
  215. #define WM9081_SPK_INV_MUTE 0x0010 /* SPK_INV_MUTE */
  216. #define WM9081_SPK_INV_MUTE_MASK 0x0010 /* SPK_INV_MUTE */
  217. #define WM9081_SPK_INV_MUTE_SHIFT 4 /* SPK_INV_MUTE */
  218. #define WM9081_SPK_INV_MUTE_WIDTH 1 /* SPK_INV_MUTE */
  219. #define WM9081_OUT_SPK_CTRL 0x0008 /* OUT_SPK_CTRL */
  220. #define WM9081_OUT_SPK_CTRL_MASK 0x0008 /* OUT_SPK_CTRL */
  221. #define WM9081_OUT_SPK_CTRL_SHIFT 3 /* OUT_SPK_CTRL */
  222. #define WM9081_OUT_SPK_CTRL_WIDTH 1 /* OUT_SPK_CTRL */
  223. /*
  224. * R11 (0x0B) - Power Management
  225. */
  226. #define WM9081_TSHUT_ENA 0x0100 /* TSHUT_ENA */
  227. #define WM9081_TSHUT_ENA_MASK 0x0100 /* TSHUT_ENA */
  228. #define WM9081_TSHUT_ENA_SHIFT 8 /* TSHUT_ENA */
  229. #define WM9081_TSHUT_ENA_WIDTH 1 /* TSHUT_ENA */
  230. #define WM9081_TSENSE_ENA 0x0080 /* TSENSE_ENA */
  231. #define WM9081_TSENSE_ENA_MASK 0x0080 /* TSENSE_ENA */
  232. #define WM9081_TSENSE_ENA_SHIFT 7 /* TSENSE_ENA */
  233. #define WM9081_TSENSE_ENA_WIDTH 1 /* TSENSE_ENA */
  234. #define WM9081_TEMP_SHUT 0x0040 /* TEMP_SHUT */
  235. #define WM9081_TEMP_SHUT_MASK 0x0040 /* TEMP_SHUT */
  236. #define WM9081_TEMP_SHUT_SHIFT 6 /* TEMP_SHUT */
  237. #define WM9081_TEMP_SHUT_WIDTH 1 /* TEMP_SHUT */
  238. #define WM9081_LINEOUT_ENA 0x0010 /* LINEOUT_ENA */
  239. #define WM9081_LINEOUT_ENA_MASK 0x0010 /* LINEOUT_ENA */
  240. #define WM9081_LINEOUT_ENA_SHIFT 4 /* LINEOUT_ENA */
  241. #define WM9081_LINEOUT_ENA_WIDTH 1 /* LINEOUT_ENA */
  242. #define WM9081_SPKPGA_ENA 0x0004 /* SPKPGA_ENA */
  243. #define WM9081_SPKPGA_ENA_MASK 0x0004 /* SPKPGA_ENA */
  244. #define WM9081_SPKPGA_ENA_SHIFT 2 /* SPKPGA_ENA */
  245. #define WM9081_SPKPGA_ENA_WIDTH 1 /* SPKPGA_ENA */
  246. #define WM9081_SPK_ENA 0x0002 /* SPK_ENA */
  247. #define WM9081_SPK_ENA_MASK 0x0002 /* SPK_ENA */
  248. #define WM9081_SPK_ENA_SHIFT 1 /* SPK_ENA */
  249. #define WM9081_SPK_ENA_WIDTH 1 /* SPK_ENA */
  250. #define WM9081_DAC_ENA 0x0001 /* DAC_ENA */
  251. #define WM9081_DAC_ENA_MASK 0x0001 /* DAC_ENA */
  252. #define WM9081_DAC_ENA_SHIFT 0 /* DAC_ENA */
  253. #define WM9081_DAC_ENA_WIDTH 1 /* DAC_ENA */
  254. /*
  255. * R12 (0x0C) - Clock Control 1
  256. */
  257. #define WM9081_CLK_OP_DIV_MASK 0x1C00 /* CLK_OP_DIV - [12:10] */
  258. #define WM9081_CLK_OP_DIV_SHIFT 10 /* CLK_OP_DIV - [12:10] */
  259. #define WM9081_CLK_OP_DIV_WIDTH 3 /* CLK_OP_DIV - [12:10] */
  260. #define WM9081_CLK_TO_DIV_MASK 0x0300 /* CLK_TO_DIV - [9:8] */
  261. #define WM9081_CLK_TO_DIV_SHIFT 8 /* CLK_TO_DIV - [9:8] */
  262. #define WM9081_CLK_TO_DIV_WIDTH 2 /* CLK_TO_DIV - [9:8] */
  263. #define WM9081_MCLKDIV2 0x0080 /* MCLKDIV2 */
  264. #define WM9081_MCLKDIV2_MASK 0x0080 /* MCLKDIV2 */
  265. #define WM9081_MCLKDIV2_SHIFT 7 /* MCLKDIV2 */
  266. #define WM9081_MCLKDIV2_WIDTH 1 /* MCLKDIV2 */
  267. /*
  268. * R13 (0x0D) - Clock Control 2
  269. */
  270. #define WM9081_CLK_SYS_RATE_MASK 0x00F0 /* CLK_SYS_RATE - [7:4] */
  271. #define WM9081_CLK_SYS_RATE_SHIFT 4 /* CLK_SYS_RATE - [7:4] */
  272. #define WM9081_CLK_SYS_RATE_WIDTH 4 /* CLK_SYS_RATE - [7:4] */
  273. #define WM9081_SAMPLE_RATE_MASK 0x000F /* SAMPLE_RATE - [3:0] */
  274. #define WM9081_SAMPLE_RATE_SHIFT 0 /* SAMPLE_RATE - [3:0] */
  275. #define WM9081_SAMPLE_RATE_WIDTH 4 /* SAMPLE_RATE - [3:0] */
  276. /*
  277. * R14 (0x0E) - Clock Control 3
  278. */
  279. #define WM9081_CLK_SRC_SEL 0x2000 /* CLK_SRC_SEL */
  280. #define WM9081_CLK_SRC_SEL_MASK 0x2000 /* CLK_SRC_SEL */
  281. #define WM9081_CLK_SRC_SEL_SHIFT 13 /* CLK_SRC_SEL */
  282. #define WM9081_CLK_SRC_SEL_WIDTH 1 /* CLK_SRC_SEL */
  283. #define WM9081_CLK_OP_ENA 0x0020 /* CLK_OP_ENA */
  284. #define WM9081_CLK_OP_ENA_MASK 0x0020 /* CLK_OP_ENA */
  285. #define WM9081_CLK_OP_ENA_SHIFT 5 /* CLK_OP_ENA */
  286. #define WM9081_CLK_OP_ENA_WIDTH 1 /* CLK_OP_ENA */
  287. #define WM9081_CLK_TO_ENA 0x0004 /* CLK_TO_ENA */
  288. #define WM9081_CLK_TO_ENA_MASK 0x0004 /* CLK_TO_ENA */
  289. #define WM9081_CLK_TO_ENA_SHIFT 2 /* CLK_TO_ENA */
  290. #define WM9081_CLK_TO_ENA_WIDTH 1 /* CLK_TO_ENA */
  291. #define WM9081_CLK_DSP_ENA 0x0002 /* CLK_DSP_ENA */
  292. #define WM9081_CLK_DSP_ENA_MASK 0x0002 /* CLK_DSP_ENA */
  293. #define WM9081_CLK_DSP_ENA_SHIFT 1 /* CLK_DSP_ENA */
  294. #define WM9081_CLK_DSP_ENA_WIDTH 1 /* CLK_DSP_ENA */
  295. #define WM9081_CLK_SYS_ENA 0x0001 /* CLK_SYS_ENA */
  296. #define WM9081_CLK_SYS_ENA_MASK 0x0001 /* CLK_SYS_ENA */
  297. #define WM9081_CLK_SYS_ENA_SHIFT 0 /* CLK_SYS_ENA */
  298. #define WM9081_CLK_SYS_ENA_WIDTH 1 /* CLK_SYS_ENA */
  299. /*
  300. * R16 (0x10) - FLL Control 1
  301. */
  302. #define WM9081_FLL_HOLD 0x0008 /* FLL_HOLD */
  303. #define WM9081_FLL_HOLD_MASK 0x0008 /* FLL_HOLD */
  304. #define WM9081_FLL_HOLD_SHIFT 3 /* FLL_HOLD */
  305. #define WM9081_FLL_HOLD_WIDTH 1 /* FLL_HOLD */
  306. #define WM9081_FLL_FRAC 0x0004 /* FLL_FRAC */
  307. #define WM9081_FLL_FRAC_MASK 0x0004 /* FLL_FRAC */
  308. #define WM9081_FLL_FRAC_SHIFT 2 /* FLL_FRAC */
  309. #define WM9081_FLL_FRAC_WIDTH 1 /* FLL_FRAC */
  310. #define WM9081_FLL_ENA 0x0001 /* FLL_ENA */
  311. #define WM9081_FLL_ENA_MASK 0x0001 /* FLL_ENA */
  312. #define WM9081_FLL_ENA_SHIFT 0 /* FLL_ENA */
  313. #define WM9081_FLL_ENA_WIDTH 1 /* FLL_ENA */
  314. /*
  315. * R17 (0x11) - FLL Control 2
  316. */
  317. #define WM9081_FLL_OUTDIV_MASK 0x0700 /* FLL_OUTDIV - [10:8] */
  318. #define WM9081_FLL_OUTDIV_SHIFT 8 /* FLL_OUTDIV - [10:8] */
  319. #define WM9081_FLL_OUTDIV_WIDTH 3 /* FLL_OUTDIV - [10:8] */
  320. #define WM9081_FLL_CTRL_RATE_MASK 0x0070 /* FLL_CTRL_RATE - [6:4] */
  321. #define WM9081_FLL_CTRL_RATE_SHIFT 4 /* FLL_CTRL_RATE - [6:4] */
  322. #define WM9081_FLL_CTRL_RATE_WIDTH 3 /* FLL_CTRL_RATE - [6:4] */
  323. #define WM9081_FLL_FRATIO_MASK 0x0007 /* FLL_FRATIO - [2:0] */
  324. #define WM9081_FLL_FRATIO_SHIFT 0 /* FLL_FRATIO - [2:0] */
  325. #define WM9081_FLL_FRATIO_WIDTH 3 /* FLL_FRATIO - [2:0] */
  326. /*
  327. * R18 (0x12) - FLL Control 3
  328. */
  329. #define WM9081_FLL_K_MASK 0xFFFF /* FLL_K - [15:0] */
  330. #define WM9081_FLL_K_SHIFT 0 /* FLL_K - [15:0] */
  331. #define WM9081_FLL_K_WIDTH 16 /* FLL_K - [15:0] */
  332. /*
  333. * R19 (0x13) - FLL Control 4
  334. */
  335. #define WM9081_FLL_N_MASK 0x7FE0 /* FLL_N - [14:5] */
  336. #define WM9081_FLL_N_SHIFT 5 /* FLL_N - [14:5] */
  337. #define WM9081_FLL_N_WIDTH 10 /* FLL_N - [14:5] */
  338. #define WM9081_FLL_GAIN_MASK 0x000F /* FLL_GAIN - [3:0] */
  339. #define WM9081_FLL_GAIN_SHIFT 0 /* FLL_GAIN - [3:0] */
  340. #define WM9081_FLL_GAIN_WIDTH 4 /* FLL_GAIN - [3:0] */
  341. /*
  342. * R20 (0x14) - FLL Control 5
  343. */
  344. #define WM9081_FLL_CLK_REF_DIV_MASK 0x0018 /* FLL_CLK_REF_DIV - [4:3] */
  345. #define WM9081_FLL_CLK_REF_DIV_SHIFT 3 /* FLL_CLK_REF_DIV - [4:3] */
  346. #define WM9081_FLL_CLK_REF_DIV_WIDTH 2 /* FLL_CLK_REF_DIV - [4:3] */
  347. #define WM9081_FLL_CLK_SRC_MASK 0x0003 /* FLL_CLK_SRC - [1:0] */
  348. #define WM9081_FLL_CLK_SRC_SHIFT 0 /* FLL_CLK_SRC - [1:0] */
  349. #define WM9081_FLL_CLK_SRC_WIDTH 2 /* FLL_CLK_SRC - [1:0] */
  350. /*
  351. * R22 (0x16) - Audio Interface 1
  352. */
  353. #define WM9081_AIFDAC_CHAN 0x0040 /* AIFDAC_CHAN */
  354. #define WM9081_AIFDAC_CHAN_MASK 0x0040 /* AIFDAC_CHAN */
  355. #define WM9081_AIFDAC_CHAN_SHIFT 6 /* AIFDAC_CHAN */
  356. #define WM9081_AIFDAC_CHAN_WIDTH 1 /* AIFDAC_CHAN */
  357. #define WM9081_AIFDAC_TDM_SLOT_MASK 0x0030 /* AIFDAC_TDM_SLOT - [5:4] */
  358. #define WM9081_AIFDAC_TDM_SLOT_SHIFT 4 /* AIFDAC_TDM_SLOT - [5:4] */
  359. #define WM9081_AIFDAC_TDM_SLOT_WIDTH 2 /* AIFDAC_TDM_SLOT - [5:4] */
  360. #define WM9081_AIFDAC_TDM_MODE_MASK 0x000C /* AIFDAC_TDM_MODE - [3:2] */
  361. #define WM9081_AIFDAC_TDM_MODE_SHIFT 2 /* AIFDAC_TDM_MODE - [3:2] */
  362. #define WM9081_AIFDAC_TDM_MODE_WIDTH 2 /* AIFDAC_TDM_MODE - [3:2] */
  363. #define WM9081_DAC_COMP 0x0002 /* DAC_COMP */
  364. #define WM9081_DAC_COMP_MASK 0x0002 /* DAC_COMP */
  365. #define WM9081_DAC_COMP_SHIFT 1 /* DAC_COMP */
  366. #define WM9081_DAC_COMP_WIDTH 1 /* DAC_COMP */
  367. #define WM9081_DAC_COMPMODE 0x0001 /* DAC_COMPMODE */
  368. #define WM9081_DAC_COMPMODE_MASK 0x0001 /* DAC_COMPMODE */
  369. #define WM9081_DAC_COMPMODE_SHIFT 0 /* DAC_COMPMODE */
  370. #define WM9081_DAC_COMPMODE_WIDTH 1 /* DAC_COMPMODE */
  371. /*
  372. * R23 (0x17) - Audio Interface 2
  373. */
  374. #define WM9081_AIF_TRIS 0x0200 /* AIF_TRIS */
  375. #define WM9081_AIF_TRIS_MASK 0x0200 /* AIF_TRIS */
  376. #define WM9081_AIF_TRIS_SHIFT 9 /* AIF_TRIS */
  377. #define WM9081_AIF_TRIS_WIDTH 1 /* AIF_TRIS */
  378. #define WM9081_DAC_DAT_INV 0x0100 /* DAC_DAT_INV */
  379. #define WM9081_DAC_DAT_INV_MASK 0x0100 /* DAC_DAT_INV */
  380. #define WM9081_DAC_DAT_INV_SHIFT 8 /* DAC_DAT_INV */
  381. #define WM9081_DAC_DAT_INV_WIDTH 1 /* DAC_DAT_INV */
  382. #define WM9081_AIF_BCLK_INV 0x0080 /* AIF_BCLK_INV */
  383. #define WM9081_AIF_BCLK_INV_MASK 0x0080 /* AIF_BCLK_INV */
  384. #define WM9081_AIF_BCLK_INV_SHIFT 7 /* AIF_BCLK_INV */
  385. #define WM9081_AIF_BCLK_INV_WIDTH 1 /* AIF_BCLK_INV */
  386. #define WM9081_BCLK_DIR 0x0040 /* BCLK_DIR */
  387. #define WM9081_BCLK_DIR_MASK 0x0040 /* BCLK_DIR */
  388. #define WM9081_BCLK_DIR_SHIFT 6 /* BCLK_DIR */
  389. #define WM9081_BCLK_DIR_WIDTH 1 /* BCLK_DIR */
  390. #define WM9081_LRCLK_DIR 0x0020 /* LRCLK_DIR */
  391. #define WM9081_LRCLK_DIR_MASK 0x0020 /* LRCLK_DIR */
  392. #define WM9081_LRCLK_DIR_SHIFT 5 /* LRCLK_DIR */
  393. #define WM9081_LRCLK_DIR_WIDTH 1 /* LRCLK_DIR */
  394. #define WM9081_AIF_LRCLK_INV 0x0010 /* AIF_LRCLK_INV */
  395. #define WM9081_AIF_LRCLK_INV_MASK 0x0010 /* AIF_LRCLK_INV */
  396. #define WM9081_AIF_LRCLK_INV_SHIFT 4 /* AIF_LRCLK_INV */
  397. #define WM9081_AIF_LRCLK_INV_WIDTH 1 /* AIF_LRCLK_INV */
  398. #define WM9081_AIF_WL_MASK 0x000C /* AIF_WL - [3:2] */
  399. #define WM9081_AIF_WL_SHIFT 2 /* AIF_WL - [3:2] */
  400. #define WM9081_AIF_WL_WIDTH 2 /* AIF_WL - [3:2] */
  401. #define WM9081_AIF_FMT_MASK 0x0003 /* AIF_FMT - [1:0] */
  402. #define WM9081_AIF_FMT_SHIFT 0 /* AIF_FMT - [1:0] */
  403. #define WM9081_AIF_FMT_WIDTH 2 /* AIF_FMT - [1:0] */
  404. /*
  405. * R24 (0x18) - Audio Interface 3
  406. */
  407. #define WM9081_BCLK_DIV_MASK 0x001F /* BCLK_DIV - [4:0] */
  408. #define WM9081_BCLK_DIV_SHIFT 0 /* BCLK_DIV - [4:0] */
  409. #define WM9081_BCLK_DIV_WIDTH 5 /* BCLK_DIV - [4:0] */
  410. /*
  411. * R25 (0x19) - Audio Interface 4
  412. */
  413. #define WM9081_LRCLK_RATE_MASK 0x07FF /* LRCLK_RATE - [10:0] */
  414. #define WM9081_LRCLK_RATE_SHIFT 0 /* LRCLK_RATE - [10:0] */
  415. #define WM9081_LRCLK_RATE_WIDTH 11 /* LRCLK_RATE - [10:0] */
  416. /*
  417. * R26 (0x1A) - Interrupt Status
  418. */
  419. #define WM9081_WSEQ_BUSY_EINT 0x0004 /* WSEQ_BUSY_EINT */
  420. #define WM9081_WSEQ_BUSY_EINT_MASK 0x0004 /* WSEQ_BUSY_EINT */
  421. #define WM9081_WSEQ_BUSY_EINT_SHIFT 2 /* WSEQ_BUSY_EINT */
  422. #define WM9081_WSEQ_BUSY_EINT_WIDTH 1 /* WSEQ_BUSY_EINT */
  423. #define WM9081_TSHUT_EINT 0x0001 /* TSHUT_EINT */
  424. #define WM9081_TSHUT_EINT_MASK 0x0001 /* TSHUT_EINT */
  425. #define WM9081_TSHUT_EINT_SHIFT 0 /* TSHUT_EINT */
  426. #define WM9081_TSHUT_EINT_WIDTH 1 /* TSHUT_EINT */
  427. /*
  428. * R27 (0x1B) - Interrupt Status Mask
  429. */
  430. #define WM9081_IM_WSEQ_BUSY_EINT 0x0004 /* IM_WSEQ_BUSY_EINT */
  431. #define WM9081_IM_WSEQ_BUSY_EINT_MASK 0x0004 /* IM_WSEQ_BUSY_EINT */
  432. #define WM9081_IM_WSEQ_BUSY_EINT_SHIFT 2 /* IM_WSEQ_BUSY_EINT */
  433. #define WM9081_IM_WSEQ_BUSY_EINT_WIDTH 1 /* IM_WSEQ_BUSY_EINT */
  434. #define WM9081_IM_TSHUT_EINT 0x0001 /* IM_TSHUT_EINT */
  435. #define WM9081_IM_TSHUT_EINT_MASK 0x0001 /* IM_TSHUT_EINT */
  436. #define WM9081_IM_TSHUT_EINT_SHIFT 0 /* IM_TSHUT_EINT */
  437. #define WM9081_IM_TSHUT_EINT_WIDTH 1 /* IM_TSHUT_EINT */
  438. /*
  439. * R28 (0x1C) - Interrupt Polarity
  440. */
  441. #define WM9081_TSHUT_INV 0x0001 /* TSHUT_INV */
  442. #define WM9081_TSHUT_INV_MASK 0x0001 /* TSHUT_INV */
  443. #define WM9081_TSHUT_INV_SHIFT 0 /* TSHUT_INV */
  444. #define WM9081_TSHUT_INV_WIDTH 1 /* TSHUT_INV */
  445. /*
  446. * R29 (0x1D) - Interrupt Control
  447. */
  448. #define WM9081_IRQ_POL 0x8000 /* IRQ_POL */
  449. #define WM9081_IRQ_POL_MASK 0x8000 /* IRQ_POL */
  450. #define WM9081_IRQ_POL_SHIFT 15 /* IRQ_POL */
  451. #define WM9081_IRQ_POL_WIDTH 1 /* IRQ_POL */
  452. #define WM9081_IRQ_OP_CTRL 0x0001 /* IRQ_OP_CTRL */
  453. #define WM9081_IRQ_OP_CTRL_MASK 0x0001 /* IRQ_OP_CTRL */
  454. #define WM9081_IRQ_OP_CTRL_SHIFT 0 /* IRQ_OP_CTRL */
  455. #define WM9081_IRQ_OP_CTRL_WIDTH 1 /* IRQ_OP_CTRL */
  456. /*
  457. * R30 (0x1E) - DAC Digital 1
  458. */
  459. #define WM9081_DAC_VOL_MASK 0x00FF /* DAC_VOL - [7:0] */
  460. #define WM9081_DAC_VOL_SHIFT 0 /* DAC_VOL - [7:0] */
  461. #define WM9081_DAC_VOL_WIDTH 8 /* DAC_VOL - [7:0] */
  462. /*
  463. * R31 (0x1F) - DAC Digital 2
  464. */
  465. #define WM9081_DAC_MUTERATE 0x0400 /* DAC_MUTERATE */
  466. #define WM9081_DAC_MUTERATE_MASK 0x0400 /* DAC_MUTERATE */
  467. #define WM9081_DAC_MUTERATE_SHIFT 10 /* DAC_MUTERATE */
  468. #define WM9081_DAC_MUTERATE_WIDTH 1 /* DAC_MUTERATE */
  469. #define WM9081_DAC_MUTEMODE 0x0200 /* DAC_MUTEMODE */
  470. #define WM9081_DAC_MUTEMODE_MASK 0x0200 /* DAC_MUTEMODE */
  471. #define WM9081_DAC_MUTEMODE_SHIFT 9 /* DAC_MUTEMODE */
  472. #define WM9081_DAC_MUTEMODE_WIDTH 1 /* DAC_MUTEMODE */
  473. #define WM9081_DAC_MUTE 0x0008 /* DAC_MUTE */
  474. #define WM9081_DAC_MUTE_MASK 0x0008 /* DAC_MUTE */
  475. #define WM9081_DAC_MUTE_SHIFT 3 /* DAC_MUTE */
  476. #define WM9081_DAC_MUTE_WIDTH 1 /* DAC_MUTE */
  477. #define WM9081_DEEMPH_MASK 0x0006 /* DEEMPH - [2:1] */
  478. #define WM9081_DEEMPH_SHIFT 1 /* DEEMPH - [2:1] */
  479. #define WM9081_DEEMPH_WIDTH 2 /* DEEMPH - [2:1] */
  480. /*
  481. * R32 (0x20) - DRC 1
  482. */
  483. #define WM9081_DRC_ENA 0x8000 /* DRC_ENA */
  484. #define WM9081_DRC_ENA_MASK 0x8000 /* DRC_ENA */
  485. #define WM9081_DRC_ENA_SHIFT 15 /* DRC_ENA */
  486. #define WM9081_DRC_ENA_WIDTH 1 /* DRC_ENA */
  487. #define WM9081_DRC_STARTUP_GAIN_MASK 0x07C0 /* DRC_STARTUP_GAIN - [10:6] */
  488. #define WM9081_DRC_STARTUP_GAIN_SHIFT 6 /* DRC_STARTUP_GAIN - [10:6] */
  489. #define WM9081_DRC_STARTUP_GAIN_WIDTH 5 /* DRC_STARTUP_GAIN - [10:6] */
  490. #define WM9081_DRC_FF_DLY 0x0020 /* DRC_FF_DLY */
  491. #define WM9081_DRC_FF_DLY_MASK 0x0020 /* DRC_FF_DLY */
  492. #define WM9081_DRC_FF_DLY_SHIFT 5 /* DRC_FF_DLY */
  493. #define WM9081_DRC_FF_DLY_WIDTH 1 /* DRC_FF_DLY */
  494. #define WM9081_DRC_QR 0x0004 /* DRC_QR */
  495. #define WM9081_DRC_QR_MASK 0x0004 /* DRC_QR */
  496. #define WM9081_DRC_QR_SHIFT 2 /* DRC_QR */
  497. #define WM9081_DRC_QR_WIDTH 1 /* DRC_QR */
  498. #define WM9081_DRC_ANTICLIP 0x0002 /* DRC_ANTICLIP */
  499. #define WM9081_DRC_ANTICLIP_MASK 0x0002 /* DRC_ANTICLIP */
  500. #define WM9081_DRC_ANTICLIP_SHIFT 1 /* DRC_ANTICLIP */
  501. #define WM9081_DRC_ANTICLIP_WIDTH 1 /* DRC_ANTICLIP */
  502. /*
  503. * R33 (0x21) - DRC 2
  504. */
  505. #define WM9081_DRC_ATK_MASK 0xF000 /* DRC_ATK - [15:12] */
  506. #define WM9081_DRC_ATK_SHIFT 12 /* DRC_ATK - [15:12] */
  507. #define WM9081_DRC_ATK_WIDTH 4 /* DRC_ATK - [15:12] */
  508. #define WM9081_DRC_DCY_MASK 0x0F00 /* DRC_DCY - [11:8] */
  509. #define WM9081_DRC_DCY_SHIFT 8 /* DRC_DCY - [11:8] */
  510. #define WM9081_DRC_DCY_WIDTH 4 /* DRC_DCY - [11:8] */
  511. #define WM9081_DRC_QR_THR_MASK 0x00C0 /* DRC_QR_THR - [7:6] */
  512. #define WM9081_DRC_QR_THR_SHIFT 6 /* DRC_QR_THR - [7:6] */
  513. #define WM9081_DRC_QR_THR_WIDTH 2 /* DRC_QR_THR - [7:6] */
  514. #define WM9081_DRC_QR_DCY_MASK 0x0030 /* DRC_QR_DCY - [5:4] */
  515. #define WM9081_DRC_QR_DCY_SHIFT 4 /* DRC_QR_DCY - [5:4] */
  516. #define WM9081_DRC_QR_DCY_WIDTH 2 /* DRC_QR_DCY - [5:4] */
  517. #define WM9081_DRC_MINGAIN_MASK 0x000C /* DRC_MINGAIN - [3:2] */
  518. #define WM9081_DRC_MINGAIN_SHIFT 2 /* DRC_MINGAIN - [3:2] */
  519. #define WM9081_DRC_MINGAIN_WIDTH 2 /* DRC_MINGAIN - [3:2] */
  520. #define WM9081_DRC_MAXGAIN_MASK 0x0003 /* DRC_MAXGAIN - [1:0] */
  521. #define WM9081_DRC_MAXGAIN_SHIFT 0 /* DRC_MAXGAIN - [1:0] */
  522. #define WM9081_DRC_MAXGAIN_WIDTH 2 /* DRC_MAXGAIN - [1:0] */
  523. /*
  524. * R34 (0x22) - DRC 3
  525. */
  526. #define WM9081_DRC_HI_COMP_MASK 0x0038 /* DRC_HI_COMP - [5:3] */
  527. #define WM9081_DRC_HI_COMP_SHIFT 3 /* DRC_HI_COMP - [5:3] */
  528. #define WM9081_DRC_HI_COMP_WIDTH 3 /* DRC_HI_COMP - [5:3] */
  529. #define WM9081_DRC_LO_COMP_MASK 0x0007 /* DRC_LO_COMP - [2:0] */
  530. #define WM9081_DRC_LO_COMP_SHIFT 0 /* DRC_LO_COMP - [2:0] */
  531. #define WM9081_DRC_LO_COMP_WIDTH 3 /* DRC_LO_COMP - [2:0] */
  532. /*
  533. * R35 (0x23) - DRC 4
  534. */
  535. #define WM9081_DRC_KNEE_IP_MASK 0x07E0 /* DRC_KNEE_IP - [10:5] */
  536. #define WM9081_DRC_KNEE_IP_SHIFT 5 /* DRC_KNEE_IP - [10:5] */
  537. #define WM9081_DRC_KNEE_IP_WIDTH 6 /* DRC_KNEE_IP - [10:5] */
  538. #define WM9081_DRC_KNEE_OP_MASK 0x001F /* DRC_KNEE_OP - [4:0] */
  539. #define WM9081_DRC_KNEE_OP_SHIFT 0 /* DRC_KNEE_OP - [4:0] */
  540. #define WM9081_DRC_KNEE_OP_WIDTH 5 /* DRC_KNEE_OP - [4:0] */
  541. /*
  542. * R38 (0x26) - Write Sequencer 1
  543. */
  544. #define WM9081_WSEQ_ENA 0x8000 /* WSEQ_ENA */
  545. #define WM9081_WSEQ_ENA_MASK 0x8000 /* WSEQ_ENA */
  546. #define WM9081_WSEQ_ENA_SHIFT 15 /* WSEQ_ENA */
  547. #define WM9081_WSEQ_ENA_WIDTH 1 /* WSEQ_ENA */
  548. #define WM9081_WSEQ_ABORT 0x0200 /* WSEQ_ABORT */
  549. #define WM9081_WSEQ_ABORT_MASK 0x0200 /* WSEQ_ABORT */
  550. #define WM9081_WSEQ_ABORT_SHIFT 9 /* WSEQ_ABORT */
  551. #define WM9081_WSEQ_ABORT_WIDTH 1 /* WSEQ_ABORT */
  552. #define WM9081_WSEQ_START 0x0100 /* WSEQ_START */
  553. #define WM9081_WSEQ_START_MASK 0x0100 /* WSEQ_START */
  554. #define WM9081_WSEQ_START_SHIFT 8 /* WSEQ_START */
  555. #define WM9081_WSEQ_START_WIDTH 1 /* WSEQ_START */
  556. #define WM9081_WSEQ_START_INDEX_MASK 0x007F /* WSEQ_START_INDEX - [6:0] */
  557. #define WM9081_WSEQ_START_INDEX_SHIFT 0 /* WSEQ_START_INDEX - [6:0] */
  558. #define WM9081_WSEQ_START_INDEX_WIDTH 7 /* WSEQ_START_INDEX - [6:0] */
  559. /*
  560. * R39 (0x27) - Write Sequencer 2
  561. */
  562. #define WM9081_WSEQ_CURRENT_INDEX_MASK 0x07F0 /* WSEQ_CURRENT_INDEX - [10:4] */
  563. #define WM9081_WSEQ_CURRENT_INDEX_SHIFT 4 /* WSEQ_CURRENT_INDEX - [10:4] */
  564. #define WM9081_WSEQ_CURRENT_INDEX_WIDTH 7 /* WSEQ_CURRENT_INDEX - [10:4] */
  565. #define WM9081_WSEQ_BUSY 0x0001 /* WSEQ_BUSY */
  566. #define WM9081_WSEQ_BUSY_MASK 0x0001 /* WSEQ_BUSY */
  567. #define WM9081_WSEQ_BUSY_SHIFT 0 /* WSEQ_BUSY */
  568. #define WM9081_WSEQ_BUSY_WIDTH 1 /* WSEQ_BUSY */
  569. /*
  570. * R40 (0x28) - MW Slave 1
  571. */
  572. #define WM9081_SPI_CFG 0x0020 /* SPI_CFG */
  573. #define WM9081_SPI_CFG_MASK 0x0020 /* SPI_CFG */
  574. #define WM9081_SPI_CFG_SHIFT 5 /* SPI_CFG */
  575. #define WM9081_SPI_CFG_WIDTH 1 /* SPI_CFG */
  576. #define WM9081_SPI_4WIRE 0x0010 /* SPI_4WIRE */
  577. #define WM9081_SPI_4WIRE_MASK 0x0010 /* SPI_4WIRE */
  578. #define WM9081_SPI_4WIRE_SHIFT 4 /* SPI_4WIRE */
  579. #define WM9081_SPI_4WIRE_WIDTH 1 /* SPI_4WIRE */
  580. #define WM9081_ARA_ENA 0x0008 /* ARA_ENA */
  581. #define WM9081_ARA_ENA_MASK 0x0008 /* ARA_ENA */
  582. #define WM9081_ARA_ENA_SHIFT 3 /* ARA_ENA */
  583. #define WM9081_ARA_ENA_WIDTH 1 /* ARA_ENA */
  584. #define WM9081_AUTO_INC 0x0002 /* AUTO_INC */
  585. #define WM9081_AUTO_INC_MASK 0x0002 /* AUTO_INC */
  586. #define WM9081_AUTO_INC_SHIFT 1 /* AUTO_INC */
  587. #define WM9081_AUTO_INC_WIDTH 1 /* AUTO_INC */
  588. /*
  589. * R42 (0x2A) - EQ 1
  590. */
  591. #define WM9081_EQ_B1_GAIN_MASK 0xF800 /* EQ_B1_GAIN - [15:11] */
  592. #define WM9081_EQ_B1_GAIN_SHIFT 11 /* EQ_B1_GAIN - [15:11] */
  593. #define WM9081_EQ_B1_GAIN_WIDTH 5 /* EQ_B1_GAIN - [15:11] */
  594. #define WM9081_EQ_B2_GAIN_MASK 0x07C0 /* EQ_B2_GAIN - [10:6] */
  595. #define WM9081_EQ_B2_GAIN_SHIFT 6 /* EQ_B2_GAIN - [10:6] */
  596. #define WM9081_EQ_B2_GAIN_WIDTH 5 /* EQ_B2_GAIN - [10:6] */
  597. #define WM9081_EQ_B4_GAIN_MASK 0x003E /* EQ_B4_GAIN - [5:1] */
  598. #define WM9081_EQ_B4_GAIN_SHIFT 1 /* EQ_B4_GAIN - [5:1] */
  599. #define WM9081_EQ_B4_GAIN_WIDTH 5 /* EQ_B4_GAIN - [5:1] */
  600. #define WM9081_EQ_ENA 0x0001 /* EQ_ENA */
  601. #define WM9081_EQ_ENA_MASK 0x0001 /* EQ_ENA */
  602. #define WM9081_EQ_ENA_SHIFT 0 /* EQ_ENA */
  603. #define WM9081_EQ_ENA_WIDTH 1 /* EQ_ENA */
  604. /*
  605. * R43 (0x2B) - EQ 2
  606. */
  607. #define WM9081_EQ_B3_GAIN_MASK 0xF800 /* EQ_B3_GAIN - [15:11] */
  608. #define WM9081_EQ_B3_GAIN_SHIFT 11 /* EQ_B3_GAIN - [15:11] */
  609. #define WM9081_EQ_B3_GAIN_WIDTH 5 /* EQ_B3_GAIN - [15:11] */
  610. #define WM9081_EQ_B5_GAIN_MASK 0x07C0 /* EQ_B5_GAIN - [10:6] */
  611. #define WM9081_EQ_B5_GAIN_SHIFT 6 /* EQ_B5_GAIN - [10:6] */
  612. #define WM9081_EQ_B5_GAIN_WIDTH 5 /* EQ_B5_GAIN - [10:6] */
  613. /*
  614. * R44 (0x2C) - EQ 3
  615. */
  616. #define WM9081_EQ_B1_A_MASK 0xFFFF /* EQ_B1_A - [15:0] */
  617. #define WM9081_EQ_B1_A_SHIFT 0 /* EQ_B1_A - [15:0] */
  618. #define WM9081_EQ_B1_A_WIDTH 16 /* EQ_B1_A - [15:0] */
  619. /*
  620. * R45 (0x2D) - EQ 4
  621. */
  622. #define WM9081_EQ_B1_B_MASK 0xFFFF /* EQ_B1_B - [15:0] */
  623. #define WM9081_EQ_B1_B_SHIFT 0 /* EQ_B1_B - [15:0] */
  624. #define WM9081_EQ_B1_B_WIDTH 16 /* EQ_B1_B - [15:0] */
  625. /*
  626. * R46 (0x2E) - EQ 5
  627. */
  628. #define WM9081_EQ_B1_PG_MASK 0xFFFF /* EQ_B1_PG - [15:0] */
  629. #define WM9081_EQ_B1_PG_SHIFT 0 /* EQ_B1_PG - [15:0] */
  630. #define WM9081_EQ_B1_PG_WIDTH 16 /* EQ_B1_PG - [15:0] */
  631. /*
  632. * R47 (0x2F) - EQ 6
  633. */
  634. #define WM9081_EQ_B2_A_MASK 0xFFFF /* EQ_B2_A - [15:0] */
  635. #define WM9081_EQ_B2_A_SHIFT 0 /* EQ_B2_A - [15:0] */
  636. #define WM9081_EQ_B2_A_WIDTH 16 /* EQ_B2_A - [15:0] */
  637. /*
  638. * R48 (0x30) - EQ 7
  639. */
  640. #define WM9081_EQ_B2_B_MASK 0xFFFF /* EQ_B2_B - [15:0] */
  641. #define WM9081_EQ_B2_B_SHIFT 0 /* EQ_B2_B - [15:0] */
  642. #define WM9081_EQ_B2_B_WIDTH 16 /* EQ_B2_B - [15:0] */
  643. /*
  644. * R49 (0x31) - EQ 8
  645. */
  646. #define WM9081_EQ_B2_C_MASK 0xFFFF /* EQ_B2_C - [15:0] */
  647. #define WM9081_EQ_B2_C_SHIFT 0 /* EQ_B2_C - [15:0] */
  648. #define WM9081_EQ_B2_C_WIDTH 16 /* EQ_B2_C - [15:0] */
  649. /*
  650. * R50 (0x32) - EQ 9
  651. */
  652. #define WM9081_EQ_B2_PG_MASK 0xFFFF /* EQ_B2_PG - [15:0] */
  653. #define WM9081_EQ_B2_PG_SHIFT 0 /* EQ_B2_PG - [15:0] */
  654. #define WM9081_EQ_B2_PG_WIDTH 16 /* EQ_B2_PG - [15:0] */
  655. /*
  656. * R51 (0x33) - EQ 10
  657. */
  658. #define WM9081_EQ_B4_A_MASK 0xFFFF /* EQ_B4_A - [15:0] */
  659. #define WM9081_EQ_B4_A_SHIFT 0 /* EQ_B4_A - [15:0] */
  660. #define WM9081_EQ_B4_A_WIDTH 16 /* EQ_B4_A - [15:0] */
  661. /*
  662. * R52 (0x34) - EQ 11
  663. */
  664. #define WM9081_EQ_B4_B_MASK 0xFFFF /* EQ_B4_B - [15:0] */
  665. #define WM9081_EQ_B4_B_SHIFT 0 /* EQ_B4_B - [15:0] */
  666. #define WM9081_EQ_B4_B_WIDTH 16 /* EQ_B4_B - [15:0] */
  667. /*
  668. * R53 (0x35) - EQ 12
  669. */
  670. #define WM9081_EQ_B4_C_MASK 0xFFFF /* EQ_B4_C - [15:0] */
  671. #define WM9081_EQ_B4_C_SHIFT 0 /* EQ_B4_C - [15:0] */
  672. #define WM9081_EQ_B4_C_WIDTH 16 /* EQ_B4_C - [15:0] */
  673. /*
  674. * R54 (0x36) - EQ 13
  675. */
  676. #define WM9081_EQ_B4_PG_MASK 0xFFFF /* EQ_B4_PG - [15:0] */
  677. #define WM9081_EQ_B4_PG_SHIFT 0 /* EQ_B4_PG - [15:0] */
  678. #define WM9081_EQ_B4_PG_WIDTH 16 /* EQ_B4_PG - [15:0] */
  679. /*
  680. * R55 (0x37) - EQ 14
  681. */
  682. #define WM9081_EQ_B3_A_MASK 0xFFFF /* EQ_B3_A - [15:0] */
  683. #define WM9081_EQ_B3_A_SHIFT 0 /* EQ_B3_A - [15:0] */
  684. #define WM9081_EQ_B3_A_WIDTH 16 /* EQ_B3_A - [15:0] */
  685. /*
  686. * R56 (0x38) - EQ 15
  687. */
  688. #define WM9081_EQ_B3_B_MASK 0xFFFF /* EQ_B3_B - [15:0] */
  689. #define WM9081_EQ_B3_B_SHIFT 0 /* EQ_B3_B - [15:0] */
  690. #define WM9081_EQ_B3_B_WIDTH 16 /* EQ_B3_B - [15:0] */
  691. /*
  692. * R57 (0x39) - EQ 16
  693. */
  694. #define WM9081_EQ_B3_C_MASK 0xFFFF /* EQ_B3_C - [15:0] */
  695. #define WM9081_EQ_B3_C_SHIFT 0 /* EQ_B3_C - [15:0] */
  696. #define WM9081_EQ_B3_C_WIDTH 16 /* EQ_B3_C - [15:0] */
  697. /*
  698. * R58 (0x3A) - EQ 17
  699. */
  700. #define WM9081_EQ_B3_PG_MASK 0xFFFF /* EQ_B3_PG - [15:0] */
  701. #define WM9081_EQ_B3_PG_SHIFT 0 /* EQ_B3_PG - [15:0] */
  702. #define WM9081_EQ_B3_PG_WIDTH 16 /* EQ_B3_PG - [15:0] */
  703. /*
  704. * R59 (0x3B) - EQ 18
  705. */
  706. #define WM9081_EQ_B5_A_MASK 0xFFFF /* EQ_B5_A - [15:0] */
  707. #define WM9081_EQ_B5_A_SHIFT 0 /* EQ_B5_A - [15:0] */
  708. #define WM9081_EQ_B5_A_WIDTH 16 /* EQ_B5_A - [15:0] */
  709. /*
  710. * R60 (0x3C) - EQ 19
  711. */
  712. #define WM9081_EQ_B5_B_MASK 0xFFFF /* EQ_B5_B - [15:0] */
  713. #define WM9081_EQ_B5_B_SHIFT 0 /* EQ_B5_B - [15:0] */
  714. #define WM9081_EQ_B5_B_WIDTH 16 /* EQ_B5_B - [15:0] */
  715. /*
  716. * R61 (0x3D) - EQ 20
  717. */
  718. #define WM9081_EQ_B5_PG_MASK 0xFFFF /* EQ_B5_PG - [15:0] */
  719. #define WM9081_EQ_B5_PG_SHIFT 0 /* EQ_B5_PG - [15:0] */
  720. #define WM9081_EQ_B5_PG_WIDTH 16 /* EQ_B5_PG - [15:0] */
  721. #endif