ab8500-codec.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2012
  3. *
  4. * Author: Ola Lilja <ola.o.lilja@stericsson.com>,
  5. * Kristoffer Karlsson <kristoffer.karlsson@stericsson.com>,
  6. * Roger Nilsson <roger.xr.nilsson@stericsson.com>,
  7. * for ST-Ericsson.
  8. *
  9. * Based on the early work done by:
  10. * Mikko J. Lehto <mikko.lehto@symbio.com>,
  11. * Mikko Sarmanne <mikko.sarmanne@symbio.com>,
  12. * for ST-Ericsson.
  13. *
  14. * License terms:
  15. *
  16. * This program is free software; you can redistribute it and/or modify it
  17. * under the terms of the GNU General Public License version 2 as published
  18. * by the Free Software Foundation.
  19. */
  20. #ifndef AB8500_CODEC_REGISTERS_H
  21. #define AB8500_CODEC_REGISTERS_H
  22. #define AB8500_SUPPORTED_RATE (SNDRV_PCM_RATE_48000)
  23. #define AB8500_SUPPORTED_FMT (SNDRV_PCM_FMTBIT_S16_LE)
  24. /* AB8500 interface slot offset definitions */
  25. #define AB8500_AD_DATA0_OFFSET 0
  26. #define AB8500_DA_DATA0_OFFSET 8
  27. #define AB8500_AD_DATA1_OFFSET 16
  28. #define AB8500_DA_DATA1_OFFSET 24
  29. /* AB8500 audio bank (0x0d) register definitions */
  30. #define AB8500_POWERUP 0x00
  31. #define AB8500_AUDSWRESET 0x01
  32. #define AB8500_ADPATHENA 0x02
  33. #define AB8500_DAPATHENA 0x03
  34. #define AB8500_ANACONF1 0x04
  35. #define AB8500_ANACONF2 0x05
  36. #define AB8500_DIGMICCONF 0x06
  37. #define AB8500_ANACONF3 0x07
  38. #define AB8500_ANACONF4 0x08
  39. #define AB8500_DAPATHCONF 0x09
  40. #define AB8500_MUTECONF 0x0A
  41. #define AB8500_SHORTCIRCONF 0x0B
  42. #define AB8500_ANACONF5 0x0C
  43. #define AB8500_ENVCPCONF 0x0D
  44. #define AB8500_SIGENVCONF 0x0E
  45. #define AB8500_PWMGENCONF1 0x0F
  46. #define AB8500_PWMGENCONF2 0x10
  47. #define AB8500_PWMGENCONF3 0x11
  48. #define AB8500_PWMGENCONF4 0x12
  49. #define AB8500_PWMGENCONF5 0x13
  50. #define AB8500_ANAGAIN1 0x14
  51. #define AB8500_ANAGAIN2 0x15
  52. #define AB8500_ANAGAIN3 0x16
  53. #define AB8500_ANAGAIN4 0x17
  54. #define AB8500_DIGLINHSLGAIN 0x18
  55. #define AB8500_DIGLINHSRGAIN 0x19
  56. #define AB8500_ADFILTCONF 0x1A
  57. #define AB8500_DIGIFCONF1 0x1B
  58. #define AB8500_DIGIFCONF2 0x1C
  59. #define AB8500_DIGIFCONF3 0x1D
  60. #define AB8500_DIGIFCONF4 0x1E
  61. #define AB8500_ADSLOTSEL1 0x1F
  62. #define AB8500_ADSLOTSEL2 0x20
  63. #define AB8500_ADSLOTSEL3 0x21
  64. #define AB8500_ADSLOTSEL4 0x22
  65. #define AB8500_ADSLOTSEL5 0x23
  66. #define AB8500_ADSLOTSEL6 0x24
  67. #define AB8500_ADSLOTSEL7 0x25
  68. #define AB8500_ADSLOTSEL8 0x26
  69. #define AB8500_ADSLOTSEL9 0x27
  70. #define AB8500_ADSLOTSEL10 0x28
  71. #define AB8500_ADSLOTSEL11 0x29
  72. #define AB8500_ADSLOTSEL12 0x2A
  73. #define AB8500_ADSLOTSEL13 0x2B
  74. #define AB8500_ADSLOTSEL14 0x2C
  75. #define AB8500_ADSLOTSEL15 0x2D
  76. #define AB8500_ADSLOTSEL16 0x2E
  77. #define AB8500_ADSLOTSEL(slot) (AB8500_ADSLOTSEL1 + (slot >> 1))
  78. #define AB8500_ADSLOTHIZCTRL1 0x2F
  79. #define AB8500_ADSLOTHIZCTRL2 0x30
  80. #define AB8500_ADSLOTHIZCTRL3 0x31
  81. #define AB8500_ADSLOTHIZCTRL4 0x32
  82. #define AB8500_DASLOTCONF1 0x33
  83. #define AB8500_DASLOTCONF2 0x34
  84. #define AB8500_DASLOTCONF3 0x35
  85. #define AB8500_DASLOTCONF4 0x36
  86. #define AB8500_DASLOTCONF5 0x37
  87. #define AB8500_DASLOTCONF6 0x38
  88. #define AB8500_DASLOTCONF7 0x39
  89. #define AB8500_DASLOTCONF8 0x3A
  90. #define AB8500_CLASSDCONF1 0x3B
  91. #define AB8500_CLASSDCONF2 0x3C
  92. #define AB8500_CLASSDCONF3 0x3D
  93. #define AB8500_DMICFILTCONF 0x3E
  94. #define AB8500_DIGMULTCONF1 0x3F
  95. #define AB8500_DIGMULTCONF2 0x40
  96. #define AB8500_ADDIGGAIN1 0x41
  97. #define AB8500_ADDIGGAIN2 0x42
  98. #define AB8500_ADDIGGAIN3 0x43
  99. #define AB8500_ADDIGGAIN4 0x44
  100. #define AB8500_ADDIGGAIN5 0x45
  101. #define AB8500_ADDIGGAIN6 0x46
  102. #define AB8500_DADIGGAIN1 0x47
  103. #define AB8500_DADIGGAIN2 0x48
  104. #define AB8500_DADIGGAIN3 0x49
  105. #define AB8500_DADIGGAIN4 0x4A
  106. #define AB8500_DADIGGAIN5 0x4B
  107. #define AB8500_DADIGGAIN6 0x4C
  108. #define AB8500_ADDIGLOOPGAIN1 0x4D
  109. #define AB8500_ADDIGLOOPGAIN2 0x4E
  110. #define AB8500_HSLEARDIGGAIN 0x4F
  111. #define AB8500_HSRDIGGAIN 0x50
  112. #define AB8500_SIDFIRGAIN1 0x51
  113. #define AB8500_SIDFIRGAIN2 0x52
  114. #define AB8500_ANCCONF1 0x53
  115. #define AB8500_ANCCONF2 0x54
  116. #define AB8500_ANCCONF3 0x55
  117. #define AB8500_ANCCONF4 0x56
  118. #define AB8500_ANCCONF5 0x57
  119. #define AB8500_ANCCONF6 0x58
  120. #define AB8500_ANCCONF7 0x59
  121. #define AB8500_ANCCONF8 0x5A
  122. #define AB8500_ANCCONF9 0x5B
  123. #define AB8500_ANCCONF10 0x5C
  124. #define AB8500_ANCCONF11 0x5D
  125. #define AB8500_ANCCONF12 0x5E
  126. #define AB8500_ANCCONF13 0x5F
  127. #define AB8500_ANCCONF14 0x60
  128. #define AB8500_SIDFIRADR 0x61
  129. #define AB8500_SIDFIRCOEF1 0x62
  130. #define AB8500_SIDFIRCOEF2 0x63
  131. #define AB8500_SIDFIRCONF 0x64
  132. #define AB8500_AUDINTMASK1 0x65
  133. #define AB8500_AUDINTSOURCE1 0x66
  134. #define AB8500_AUDINTMASK2 0x67
  135. #define AB8500_AUDINTSOURCE2 0x68
  136. #define AB8500_FIFOCONF1 0x69
  137. #define AB8500_FIFOCONF2 0x6A
  138. #define AB8500_FIFOCONF3 0x6B
  139. #define AB8500_FIFOCONF4 0x6C
  140. #define AB8500_FIFOCONF5 0x6D
  141. #define AB8500_FIFOCONF6 0x6E
  142. #define AB8500_AUDREV 0x6F
  143. #define AB8500_FIRST_REG AB8500_POWERUP
  144. #define AB8500_LAST_REG AB8500_AUDREV
  145. #define AB8500_CACHEREGNUM (AB8500_LAST_REG + 1)
  146. #define AB8500_MASK_ALL 0xFF
  147. #define AB8500_MASK_SLOT(slot) ((slot & 1) ? 0xF0 : 0x0F)
  148. #define AB8500_MASK_NONE 0x00
  149. /* AB8500_POWERUP */
  150. #define AB8500_POWERUP_POWERUP 7
  151. #define AB8500_POWERUP_ENANA 3
  152. /* AB8500_AUDSWRESET */
  153. #define AB8500_AUDSWRESET_SWRESET 7
  154. /* AB8500_ADPATHENA */
  155. #define AB8500_ADPATHENA_ENAD12 7
  156. #define AB8500_ADPATHENA_ENAD34 5
  157. #define AB8500_ADPATHENA_ENAD5768 3
  158. /* AB8500_DAPATHENA */
  159. #define AB8500_DAPATHENA_ENDA1 7
  160. #define AB8500_DAPATHENA_ENDA2 6
  161. #define AB8500_DAPATHENA_ENDA3 5
  162. #define AB8500_DAPATHENA_ENDA4 4
  163. #define AB8500_DAPATHENA_ENDA5 3
  164. #define AB8500_DAPATHENA_ENDA6 2
  165. /* AB8500_ANACONF1 */
  166. #define AB8500_ANACONF1_HSLOWPOW 7
  167. #define AB8500_ANACONF1_DACLOWPOW1 6
  168. #define AB8500_ANACONF1_DACLOWPOW0 5
  169. #define AB8500_ANACONF1_EARDACLOWPOW 4
  170. #define AB8500_ANACONF1_EARSELCM 2
  171. #define AB8500_ANACONF1_HSHPEN 1
  172. #define AB8500_ANACONF1_EARDRVLOWPOW 0
  173. /* AB8500_ANACONF2 */
  174. #define AB8500_ANACONF2_ENMIC1 7
  175. #define AB8500_ANACONF2_ENMIC2 6
  176. #define AB8500_ANACONF2_ENLINL 5
  177. #define AB8500_ANACONF2_ENLINR 4
  178. #define AB8500_ANACONF2_MUTMIC1 3
  179. #define AB8500_ANACONF2_MUTMIC2 2
  180. #define AB8500_ANACONF2_MUTLINL 1
  181. #define AB8500_ANACONF2_MUTLINR 0
  182. /* AB8500_DIGMICCONF */
  183. #define AB8500_DIGMICCONF_ENDMIC1 7
  184. #define AB8500_DIGMICCONF_ENDMIC2 6
  185. #define AB8500_DIGMICCONF_ENDMIC3 5
  186. #define AB8500_DIGMICCONF_ENDMIC4 4
  187. #define AB8500_DIGMICCONF_ENDMIC5 3
  188. #define AB8500_DIGMICCONF_ENDMIC6 2
  189. #define AB8500_DIGMICCONF_HSFADSPEED 0
  190. /* AB8500_ANACONF3 */
  191. #define AB8500_ANACONF3_MIC1SEL 7
  192. #define AB8500_ANACONF3_LINRSEL 6
  193. #define AB8500_ANACONF3_ENDRVHSL 5
  194. #define AB8500_ANACONF3_ENDRVHSR 4
  195. #define AB8500_ANACONF3_ENADCMIC 2
  196. #define AB8500_ANACONF3_ENADCLINL 1
  197. #define AB8500_ANACONF3_ENADCLINR 0
  198. /* AB8500_ANACONF4 */
  199. #define AB8500_ANACONF4_DISPDVSS 7
  200. #define AB8500_ANACONF4_ENEAR 6
  201. #define AB8500_ANACONF4_ENHSL 5
  202. #define AB8500_ANACONF4_ENHSR 4
  203. #define AB8500_ANACONF4_ENHFL 3
  204. #define AB8500_ANACONF4_ENHFR 2
  205. #define AB8500_ANACONF4_ENVIB1 1
  206. #define AB8500_ANACONF4_ENVIB2 0
  207. /* AB8500_DAPATHCONF */
  208. #define AB8500_DAPATHCONF_ENDACEAR 6
  209. #define AB8500_DAPATHCONF_ENDACHSL 5
  210. #define AB8500_DAPATHCONF_ENDACHSR 4
  211. #define AB8500_DAPATHCONF_ENDACHFL 3
  212. #define AB8500_DAPATHCONF_ENDACHFR 2
  213. #define AB8500_DAPATHCONF_ENDACVIB1 1
  214. #define AB8500_DAPATHCONF_ENDACVIB2 0
  215. /* AB8500_MUTECONF */
  216. #define AB8500_MUTECONF_MUTEAR 6
  217. #define AB8500_MUTECONF_MUTHSL 5
  218. #define AB8500_MUTECONF_MUTHSR 4
  219. #define AB8500_MUTECONF_MUTDACEAR 2
  220. #define AB8500_MUTECONF_MUTDACHSL 1
  221. #define AB8500_MUTECONF_MUTDACHSR 0
  222. /* AB8500_SHORTCIRCONF */
  223. #define AB8500_SHORTCIRCONF_ENSHORTPWD 7
  224. #define AB8500_SHORTCIRCONF_EARSHORTDIS 6
  225. #define AB8500_SHORTCIRCONF_HSSHORTDIS 5
  226. #define AB8500_SHORTCIRCONF_HSPULLDEN 4
  227. #define AB8500_SHORTCIRCONF_HSOSCEN 2
  228. #define AB8500_SHORTCIRCONF_HSFADDIS 1
  229. #define AB8500_SHORTCIRCONF_HSZCDDIS 0
  230. /* Zero cross should be disabled */
  231. /* AB8500_ANACONF5 */
  232. #define AB8500_ANACONF5_ENCPHS 7
  233. #define AB8500_ANACONF5_HSLDACTOLOL 5
  234. #define AB8500_ANACONF5_HSRDACTOLOR 4
  235. #define AB8500_ANACONF5_ENLOL 3
  236. #define AB8500_ANACONF5_ENLOR 2
  237. #define AB8500_ANACONF5_HSAUTOEN 0
  238. /* AB8500_ENVCPCONF */
  239. #define AB8500_ENVCPCONF_ENVDETHTHRE 4
  240. #define AB8500_ENVCPCONF_ENVDETLTHRE 0
  241. #define AB8500_ENVCPCONF_ENVDETHTHRE_MAX 0x0F
  242. #define AB8500_ENVCPCONF_ENVDETLTHRE_MAX 0x0F
  243. /* AB8500_SIGENVCONF */
  244. #define AB8500_SIGENVCONF_CPLVEN 5
  245. #define AB8500_SIGENVCONF_ENVDETCPEN 4
  246. #define AB8500_SIGENVCONF_ENVDETTIME 0
  247. #define AB8500_SIGENVCONF_ENVDETTIME_MAX 0x0F
  248. /* AB8500_PWMGENCONF1 */
  249. #define AB8500_PWMGENCONF1_PWMTOVIB1 7
  250. #define AB8500_PWMGENCONF1_PWMTOVIB2 6
  251. #define AB8500_PWMGENCONF1_PWM1CTRL 5
  252. #define AB8500_PWMGENCONF1_PWM2CTRL 4
  253. #define AB8500_PWMGENCONF1_PWM1NCTRL 3
  254. #define AB8500_PWMGENCONF1_PWM1PCTRL 2
  255. #define AB8500_PWMGENCONF1_PWM2NCTRL 1
  256. #define AB8500_PWMGENCONF1_PWM2PCTRL 0
  257. /* AB8500_PWMGENCONF2 */
  258. /* AB8500_PWMGENCONF3 */
  259. /* AB8500_PWMGENCONF4 */
  260. /* AB8500_PWMGENCONF5 */
  261. #define AB8500_PWMGENCONFX_PWMVIBXPOL 7
  262. #define AB8500_PWMGENCONFX_PWMVIBXDUTCYC 0
  263. #define AB8500_PWMGENCONFX_PWMVIBXDUTCYC_MAX 0x64
  264. /* AB8500_ANAGAIN1 */
  265. /* AB8500_ANAGAIN2 */
  266. #define AB8500_ANAGAINX_ENSEMICX 7
  267. #define AB8500_ANAGAINX_LOWPOWMICX 6
  268. #define AB8500_ANAGAINX_MICXGAIN 0
  269. #define AB8500_ANAGAINX_MICXGAIN_MAX 0x1F
  270. /* AB8500_ANAGAIN3 */
  271. #define AB8500_ANAGAIN3_HSLGAIN 4
  272. #define AB8500_ANAGAIN3_HSRGAIN 0
  273. #define AB8500_ANAGAIN3_HSXGAIN_MAX 0x0F
  274. /* AB8500_ANAGAIN4 */
  275. #define AB8500_ANAGAIN4_LINLGAIN 4
  276. #define AB8500_ANAGAIN4_LINRGAIN 0
  277. #define AB8500_ANAGAIN4_LINXGAIN_MAX 0x0F
  278. /* AB8500_DIGLINHSLGAIN */
  279. /* AB8500_DIGLINHSRGAIN */
  280. #define AB8500_DIGLINHSXGAIN_LINTOHSXGAIN 0
  281. #define AB8500_DIGLINHSXGAIN_LINTOHSXGAIN_MAX 0x13
  282. /* AB8500_ADFILTCONF */
  283. #define AB8500_ADFILTCONF_AD1NH 7
  284. #define AB8500_ADFILTCONF_AD2NH 6
  285. #define AB8500_ADFILTCONF_AD3NH 5
  286. #define AB8500_ADFILTCONF_AD4NH 4
  287. #define AB8500_ADFILTCONF_AD1VOICE 3
  288. #define AB8500_ADFILTCONF_AD2VOICE 2
  289. #define AB8500_ADFILTCONF_AD3VOICE 1
  290. #define AB8500_ADFILTCONF_AD4VOICE 0
  291. /* AB8500_DIGIFCONF1 */
  292. #define AB8500_DIGIFCONF1_ENMASTGEN 7
  293. #define AB8500_DIGIFCONF1_IF1BITCLKOS1 6
  294. #define AB8500_DIGIFCONF1_IF1BITCLKOS0 5
  295. #define AB8500_DIGIFCONF1_ENFSBITCLK1 4
  296. #define AB8500_DIGIFCONF1_IF0BITCLKOS1 2
  297. #define AB8500_DIGIFCONF1_IF0BITCLKOS0 1
  298. #define AB8500_DIGIFCONF1_ENFSBITCLK0 0
  299. /* AB8500_DIGIFCONF2 */
  300. #define AB8500_DIGIFCONF2_FSYNC0P 6
  301. #define AB8500_DIGIFCONF2_BITCLK0P 5
  302. #define AB8500_DIGIFCONF2_IF0DEL 4
  303. #define AB8500_DIGIFCONF2_IF0FORMAT1 3
  304. #define AB8500_DIGIFCONF2_IF0FORMAT0 2
  305. #define AB8500_DIGIFCONF2_IF0WL1 1
  306. #define AB8500_DIGIFCONF2_IF0WL0 0
  307. /* AB8500_DIGIFCONF3 */
  308. #define AB8500_DIGIFCONF3_IF0DATOIF1AD 7
  309. #define AB8500_DIGIFCONF3_IF0CLKTOIF1CLK 6
  310. #define AB8500_DIGIFCONF3_IF1MASTER 5
  311. #define AB8500_DIGIFCONF3_IF1DATOIF0AD 3
  312. #define AB8500_DIGIFCONF3_IF1CLKTOIF0CLK 2
  313. #define AB8500_DIGIFCONF3_IF0MASTER 1
  314. #define AB8500_DIGIFCONF3_IF0BFIFOEN 0
  315. /* AB8500_DIGIFCONF4 */
  316. #define AB8500_DIGIFCONF4_FSYNC1P 6
  317. #define AB8500_DIGIFCONF4_BITCLK1P 5
  318. #define AB8500_DIGIFCONF4_IF1DEL 4
  319. #define AB8500_DIGIFCONF4_IF1FORMAT1 3
  320. #define AB8500_DIGIFCONF4_IF1FORMAT0 2
  321. #define AB8500_DIGIFCONF4_IF1WL1 1
  322. #define AB8500_DIGIFCONF4_IF1WL0 0
  323. /* AB8500_ADSLOTSELX */
  324. #define AB8500_AD_OUT1 0x0
  325. #define AB8500_AD_OUT2 0x1
  326. #define AB8500_AD_OUT3 0x2
  327. #define AB8500_AD_OUT4 0x3
  328. #define AB8500_AD_OUT5 0x4
  329. #define AB8500_AD_OUT6 0x5
  330. #define AB8500_AD_OUT7 0x6
  331. #define AB8500_AD_OUT8 0x7
  332. #define AB8500_ZEROES 0x8
  333. #define AB8500_TRISTATE 0xF
  334. #define AB8500_ADSLOTSELX_EVEN_SHIFT 0
  335. #define AB8500_ADSLOTSELX_ODD_SHIFT 4
  336. #define AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(out, slot) \
  337. ((out) << (((slot) & 1) ? \
  338. AB8500_ADSLOTSELX_ODD_SHIFT : AB8500_ADSLOTSELX_EVEN_SHIFT))
  339. /* AB8500_ADSLOTHIZCTRL1 */
  340. /* AB8500_ADSLOTHIZCTRL2 */
  341. /* AB8500_ADSLOTHIZCTRL3 */
  342. /* AB8500_ADSLOTHIZCTRL4 */
  343. /* AB8500_DASLOTCONF1 */
  344. #define AB8500_DASLOTCONF1_DA12VOICE 7
  345. #define AB8500_DASLOTCONF1_SWAPDA12_34 6
  346. #define AB8500_DASLOTCONF1_DAI7TOADO1 5
  347. /* AB8500_DASLOTCONF2 */
  348. #define AB8500_DASLOTCONF2_DAI8TOADO2 5
  349. /* AB8500_DASLOTCONF3 */
  350. #define AB8500_DASLOTCONF3_DA34VOICE 7
  351. #define AB8500_DASLOTCONF3_DAI7TOADO3 5
  352. /* AB8500_DASLOTCONF4 */
  353. #define AB8500_DASLOTCONF4_DAI8TOADO4 5
  354. /* AB8500_DASLOTCONF5 */
  355. #define AB8500_DASLOTCONF5_DA56VOICE 7
  356. #define AB8500_DASLOTCONF5_DAI7TOADO5 5
  357. /* AB8500_DASLOTCONF6 */
  358. #define AB8500_DASLOTCONF6_DAI8TOADO6 5
  359. /* AB8500_DASLOTCONF7 */
  360. #define AB8500_DASLOTCONF7_DAI8TOADO7 5
  361. /* AB8500_DASLOTCONF8 */
  362. #define AB8500_DASLOTCONF8_DAI7TOADO8 5
  363. #define AB8500_DASLOTCONFX_SLTODAX_SHIFT 0
  364. #define AB8500_DASLOTCONFX_SLTODAX_MASK 0x1F
  365. /* AB8500_CLASSDCONF1 */
  366. #define AB8500_CLASSDCONF1_PARLHF 7
  367. #define AB8500_CLASSDCONF1_PARLVIB 6
  368. #define AB8500_CLASSDCONF1_VIB1SWAPEN 3
  369. #define AB8500_CLASSDCONF1_VIB2SWAPEN 2
  370. #define AB8500_CLASSDCONF1_HFLSWAPEN 1
  371. #define AB8500_CLASSDCONF1_HFRSWAPEN 0
  372. /* AB8500_CLASSDCONF2 */
  373. #define AB8500_CLASSDCONF2_FIRBYP3 7
  374. #define AB8500_CLASSDCONF2_FIRBYP2 6
  375. #define AB8500_CLASSDCONF2_FIRBYP1 5
  376. #define AB8500_CLASSDCONF2_FIRBYP0 4
  377. #define AB8500_CLASSDCONF2_HIGHVOLEN3 3
  378. #define AB8500_CLASSDCONF2_HIGHVOLEN2 2
  379. #define AB8500_CLASSDCONF2_HIGHVOLEN1 1
  380. #define AB8500_CLASSDCONF2_HIGHVOLEN0 0
  381. /* AB8500_CLASSDCONF3 */
  382. #define AB8500_CLASSDCONF3_DITHHPGAIN 4
  383. #define AB8500_CLASSDCONF3_DITHHPGAIN_MAX 0x0A
  384. #define AB8500_CLASSDCONF3_DITHWGAIN 0
  385. #define AB8500_CLASSDCONF3_DITHWGAIN_MAX 0x0A
  386. /* AB8500_DMICFILTCONF */
  387. #define AB8500_DMICFILTCONF_ANCINSEL 7
  388. #define AB8500_DMICFILTCONF_DA3TOEAR 6
  389. #define AB8500_DMICFILTCONF_DMIC1SINC3 5
  390. #define AB8500_DMICFILTCONF_DMIC2SINC3 4
  391. #define AB8500_DMICFILTCONF_DMIC3SINC3 3
  392. #define AB8500_DMICFILTCONF_DMIC4SINC3 2
  393. #define AB8500_DMICFILTCONF_DMIC5SINC3 1
  394. #define AB8500_DMICFILTCONF_DMIC6SINC3 0
  395. /* AB8500_DIGMULTCONF1 */
  396. #define AB8500_DIGMULTCONF1_DATOHSLEN 7
  397. #define AB8500_DIGMULTCONF1_DATOHSREN 6
  398. #define AB8500_DIGMULTCONF1_AD1SEL 5
  399. #define AB8500_DIGMULTCONF1_AD2SEL 4
  400. #define AB8500_DIGMULTCONF1_AD3SEL 3
  401. #define AB8500_DIGMULTCONF1_AD5SEL 2
  402. #define AB8500_DIGMULTCONF1_AD6SEL 1
  403. #define AB8500_DIGMULTCONF1_ANCSEL 0
  404. /* AB8500_DIGMULTCONF2 */
  405. #define AB8500_DIGMULTCONF2_DATOHFREN 7
  406. #define AB8500_DIGMULTCONF2_DATOHFLEN 6
  407. #define AB8500_DIGMULTCONF2_HFRSEL 5
  408. #define AB8500_DIGMULTCONF2_HFLSEL 4
  409. #define AB8500_DIGMULTCONF2_FIRSID1SEL 2
  410. #define AB8500_DIGMULTCONF2_FIRSID2SEL 0
  411. /* AB8500_ADDIGGAIN1 */
  412. /* AB8500_ADDIGGAIN2 */
  413. /* AB8500_ADDIGGAIN3 */
  414. /* AB8500_ADDIGGAIN4 */
  415. /* AB8500_ADDIGGAIN5 */
  416. /* AB8500_ADDIGGAIN6 */
  417. #define AB8500_ADDIGGAINX_FADEDISADX 6
  418. #define AB8500_ADDIGGAINX_ADXGAIN_MAX 0x3F
  419. /* AB8500_DADIGGAIN1 */
  420. /* AB8500_DADIGGAIN2 */
  421. /* AB8500_DADIGGAIN3 */
  422. /* AB8500_DADIGGAIN4 */
  423. /* AB8500_DADIGGAIN5 */
  424. /* AB8500_DADIGGAIN6 */
  425. #define AB8500_DADIGGAINX_FADEDISDAX 6
  426. #define AB8500_DADIGGAINX_DAXGAIN_MAX 0x3F
  427. /* AB8500_ADDIGLOOPGAIN1 */
  428. /* AB8500_ADDIGLOOPGAIN2 */
  429. #define AB8500_ADDIGLOOPGAINX_FADEDISADXL 6
  430. #define AB8500_ADDIGLOOPGAINX_ADXLBGAIN_MAX 0x3F
  431. /* AB8500_HSLEARDIGGAIN */
  432. #define AB8500_HSLEARDIGGAIN_HSSINC1 7
  433. #define AB8500_HSLEARDIGGAIN_FADEDISHSL 4
  434. #define AB8500_HSLEARDIGGAIN_HSLDGAIN_MAX 0x09
  435. /* AB8500_HSRDIGGAIN */
  436. #define AB8500_HSRDIGGAIN_FADESPEED 6
  437. #define AB8500_HSRDIGGAIN_FADEDISHSR 4
  438. #define AB8500_HSRDIGGAIN_HSRDGAIN_MAX 0x09
  439. /* AB8500_SIDFIRGAIN1 */
  440. /* AB8500_SIDFIRGAIN2 */
  441. #define AB8500_SIDFIRGAINX_FIRSIDXGAIN_MAX 0x1F
  442. /* AB8500_ANCCONF1 */
  443. #define AB8500_ANCCONF1_ANCIIRUPDATE 3
  444. #define AB8500_ANCCONF1_ENANC 2
  445. #define AB8500_ANCCONF1_ANCIIRINIT 1
  446. #define AB8500_ANCCONF1_ANCFIRUPDATE 0
  447. /* AB8500_ANCCONF2 */
  448. #define AB8500_ANCCONF2_SHIFT 5
  449. #define AB8500_ANCCONF2_MIN -0x10
  450. #define AB8500_ANCCONF2_MAX 0xF
  451. /* AB8500_ANCCONF3 */
  452. #define AB8500_ANCCONF3_SHIFT 5
  453. #define AB8500_ANCCONF3_MIN -0x10
  454. #define AB8500_ANCCONF3_MAX 0xF
  455. /* AB8500_ANCCONF4 */
  456. #define AB8500_ANCCONF4_SHIFT 5
  457. #define AB8500_ANCCONF4_MIN -0x10
  458. #define AB8500_ANCCONF4_MAX 0xF
  459. /* AB8500_ANC_FIR_COEFFS */
  460. #define AB8500_ANC_FIR_COEFF_MIN -0x8000
  461. #define AB8500_ANC_FIR_COEFF_MAX 0x7FFF
  462. #define AB8500_ANC_FIR_COEFFS 15
  463. /* AB8500_ANC_IIR_COEFFS */
  464. #define AB8500_ANC_IIR_COEFF_MIN -0x800000
  465. #define AB8500_ANC_IIR_COEFF_MAX 0x7FFFFF
  466. #define AB8500_ANC_IIR_COEFFS 24
  467. /* AB8500_ANC_WARP_DELAY */
  468. #define AB8500_ANC_WARP_DELAY_SHIFT 16
  469. #define AB8500_ANC_WARP_DELAY_MIN 0x0000
  470. #define AB8500_ANC_WARP_DELAY_MAX 0xFFFF
  471. /* AB8500_ANCCONF11 */
  472. /* AB8500_ANCCONF12 */
  473. /* AB8500_ANCCONF13 */
  474. /* AB8500_ANCCONF14 */
  475. /* AB8500_SIDFIRADR */
  476. #define AB8500_SIDFIRADR_FIRSIDSET 7
  477. #define AB8500_SIDFIRADR_ADDRESS_SHIFT 0
  478. #define AB8500_SIDFIRADR_ADDRESS_MAX 0x7F
  479. /* AB8500_SIDFIRCOEF1 */
  480. /* AB8500_SIDFIRCOEF2 */
  481. #define AB8500_SID_FIR_COEFF_MIN 0
  482. #define AB8500_SID_FIR_COEFF_MAX 0xFFFF
  483. #define AB8500_SID_FIR_COEFFS 128
  484. /* AB8500_SIDFIRCONF */
  485. #define AB8500_SIDFIRCONF_ENFIRSIDS 2
  486. #define AB8500_SIDFIRCONF_FIRSIDSTOIF1 1
  487. #define AB8500_SIDFIRCONF_FIRSIDBUSY 0
  488. /* AB8500_AUDINTMASK1 */
  489. /* AB8500_AUDINTSOURCE1 */
  490. /* AB8500_AUDINTMASK2 */
  491. /* AB8500_AUDINTSOURCE2 */
  492. /* AB8500_FIFOCONF1 */
  493. #define AB8500_FIFOCONF1_BFIFOMASK 0x80
  494. #define AB8500_FIFOCONF1_BFIFO19M2 0x40
  495. #define AB8500_FIFOCONF1_BFIFOINT_SHIFT 0
  496. #define AB8500_FIFOCONF1_BFIFOINT_MAX 0x3F
  497. /* AB8500_FIFOCONF2 */
  498. #define AB8500_FIFOCONF2_BFIFOTX_SHIFT 0
  499. #define AB8500_FIFOCONF2_BFIFOTX_MAX 0xFF
  500. /* AB8500_FIFOCONF3 */
  501. #define AB8500_FIFOCONF3_BFIFOEXSL_SHIFT 5
  502. #define AB8500_FIFOCONF3_BFIFOEXSL_MAX 0x5
  503. #define AB8500_FIFOCONF3_PREBITCLK0_SHIFT 2
  504. #define AB8500_FIFOCONF3_PREBITCLK0_MAX 0x7
  505. #define AB8500_FIFOCONF3_BFIFOMAST_SHIFT 1
  506. #define AB8500_FIFOCONF3_BFIFORUN_SHIFT 0
  507. /* AB8500_FIFOCONF4 */
  508. #define AB8500_FIFOCONF4_BFIFOFRAMSW_SHIFT 0
  509. #define AB8500_FIFOCONF4_BFIFOFRAMSW_MAX 0xFF
  510. /* AB8500_FIFOCONF5 */
  511. #define AB8500_FIFOCONF5_BFIFOWAKEUP_SHIFT 0
  512. #define AB8500_FIFOCONF5_BFIFOWAKEUP_MAX 0xFF
  513. /* AB8500_FIFOCONF6 */
  514. #define AB8500_FIFOCONF6_BFIFOSAMPLE_SHIFT 0
  515. #define AB8500_FIFOCONF6_BFIFOSAMPLE_MAX 0xFF
  516. /* AB8500_AUDREV */
  517. #endif