AudDrv_Afe.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. /*
  2. * Copyright (C) 2007 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*******************************************************************************
  17. *
  18. * Filename:
  19. * ---------
  20. * AudioAfe.h
  21. *
  22. * Project:
  23. * --------
  24. * MT6580 Audio Driver Afe Register setting
  25. *
  26. * Description:
  27. * ------------
  28. * Audio register
  29. *
  30. * Author:
  31. * -------
  32. * Ir Lian (mtk00976)
  33. * Harvey Huang (mtk03996)
  34. * Chipeng Chang (mtk02308)
  35. *
  36. *------------------------------------------------------------------------------
  37. *
  38. *
  39. *******************************************************************************/
  40. #ifndef _AUDDRV_AFE_H_
  41. #define _AUDDRV_AFE_H_
  42. #include "AudDrv_Common.h"
  43. #include "AudDrv_Def.h"
  44. #include <linux/types.h>
  45. /*****************************************************************************
  46. * C O M P I L E R F L A G S
  47. *****************************************************************************/
  48. /*****************************************************************************
  49. * E X T E R N A L R E F E R E N C E S
  50. *****************************************************************************/
  51. /*****************************************************************************
  52. * D A T A T Y P E S
  53. *****************************************************************************/
  54. typedef enum {
  55. AFE_MEM_NONE = 0,
  56. AFE_MEM_DL1,
  57. AFE_MEM_DL1_DATA2,
  58. AFE_MEM_DL2,
  59. AFE_MEM_VUL,
  60. AFE_MEM_DAI,
  61. AFE_MEM_I2S,
  62. AFE_MEM_AWB,
  63. AFE_MEM_MOD_PCM,
  64. } MEM_INTERFACE_T;
  65. typedef enum {
  66. AFE_8000HZ = 0,
  67. AFE_11025HZ = 1,
  68. AFE_12000HZ = 2,
  69. AFE_16000HZ = 3,
  70. AFE_22050HZ = 4,
  71. AFE_24000HZ = 5,
  72. AFE_32000HZ = 6,
  73. AFE_44100HZ = 7,
  74. AFE_48000HZ = 8
  75. } SAMPLINGRATE_T;
  76. typedef enum {
  77. AFE_DAIMOD_8000HZ = 0x0,
  78. AFE_DAIMOD_16000HZ = 0x1,
  79. } DAIMOD_SAMPLINGRATE_T;
  80. typedef enum {
  81. AFE_STEREO = 0x0,
  82. AFE_MONO = 0x1
  83. } MEMIF_CH_CFG_T;
  84. typedef enum {
  85. AFE_MONO_USE_L = 0x0,
  86. AFE_MONO_USE_R = 0x1
  87. } MEMIF_MONO_SEL_T;
  88. typedef enum {
  89. AFE_DUP_WR_DISABLE = 0x0,
  90. AFE_DUP_WR_ENABLE = 0x1
  91. } MEMIF_DUP_WRITE_T;
  92. typedef struct {
  93. uint32 u4AFE_MEMIF_BUF_BASE;
  94. uint32 u4AFE_MEMIF_BUF_END;
  95. uint32 u4AFE_MEMIF_BUF_WP;
  96. uint32 u4AFE_MEMIF_BUF_RP;
  97. } MEMIF_BUF_T;
  98. typedef struct {
  99. MEM_INTERFACE_T eMemInterface;
  100. SAMPLINGRATE_T eSamplingRate;
  101. DAIMOD_SAMPLINGRATE_T eDaiModSamplingRate;
  102. MEMIF_CH_CFG_T eChannelConfig;
  103. MEMIF_MONO_SEL_T eMonoSelect; /* Used when AWB and VUL and data is mono */
  104. MEMIF_DUP_WRITE_T eDupWrite; /* Used when MODPCM and DAI */
  105. MEMIF_BUF_T rBufferSetting;
  106. } MEMIF_CONFIG_T;
  107. /* I2S related */
  108. typedef enum {
  109. I2S_EIAJ = 0x0,
  110. I2S_I2S = 0x1
  111. } I2SFMT_T;
  112. typedef enum {
  113. I2S_16BIT = 0x0,
  114. I2S_32BIT = 0x1
  115. } I2SWLEN_T;
  116. typedef enum {
  117. I2S_NOSWAP = 0x0,
  118. I2S_LRSWAP = 0x1
  119. } I2SSWAP_T;
  120. typedef enum {
  121. I2S_DISABLE = 0x0,
  122. I2S_ENABLE = 0x1
  123. } I2SEN_T;
  124. typedef enum {
  125. I2S_MASTER = 0x0,
  126. I2S_SLAVE = 0x1
  127. } I2SSRC_T;
  128. typedef enum {
  129. I2S_OUT = 0x0,
  130. I2S_IN = 0x1
  131. } I2SDIR_T;
  132. /* PCM related */
  133. typedef enum {
  134. PCM_1 = 0x0, /* (O7, O8, I9) */
  135. PCM_2 = 0x1 /* (O17, O18, I14) */
  136. } PCM_MODULE;
  137. typedef enum {
  138. PCM_DISABLE = 0x0,
  139. PCM_ENABLE = 0x1
  140. } PCMEN_T;
  141. typedef enum {
  142. PCM_I2S = 0x0,
  143. PCM_EIAJ = 0x1,
  144. PCM_MODEA = 0x2,
  145. PCM_MODEB = 0x3
  146. } PCMFMT_T;
  147. typedef enum {
  148. PCM_8K = 0x0,
  149. PCM_16K = 0x1
  150. } PCMMODE_T;
  151. typedef enum {
  152. PCM_16BIT = 0x0,
  153. PCM_32BIT = 0x1
  154. } PCMWLEN_T;
  155. typedef enum {
  156. PCM_MASTER = 0x0,
  157. PCM_SLAVE = 0x1
  158. } PCMCLKSRC_T;
  159. typedef enum {
  160. PCM_GO_ASRC = 0x0, /* (ASRC) Set to 0 when source & destination uses different crystal */
  161. PCM_GO_ASYNC_FIFO = 0x1 /* (Async FIFO) Set to 1 when source & destination uses same crystal */
  162. } PCMBYPASRC_T;
  163. typedef enum {
  164. PCM_DMTX = 0x0, /* dual mic on TX */
  165. PCM_SMTX = 0x1 /* single mic on TX (In BT mode, only L channel data is sent on PCM TX.) */
  166. } PCMBTMODE_T;
  167. typedef enum {
  168. PCM_SYNC_LEN_1_BCK = 0x0,
  169. PCM_SYNC_LEN_N_BCK = 0x1
  170. } PCMSYNCTYPE_T;
  171. typedef enum {
  172. PCM_INT_MD = 0x0,
  173. PCM_EXT_MD = 0x1
  174. } PCMEXTMODEM_T;
  175. typedef enum {
  176. PCM_VBT_16K_MODE_DISABLE = 0x0,
  177. PCM_VBT_16K_MODE_ENABLE = 0x1
  178. } PCMVBT16KMODE_T;
  179. typedef enum {
  180. PCM_NOINV = 0x0,
  181. PCM_INV = 0x1
  182. } PCMCLKINV_T;
  183. typedef enum {
  184. PCM_LB_DISABLE = 0x0,
  185. PCM_LB_ENABLE = 0x1
  186. } PCMLOOPENA_T;
  187. typedef enum {
  188. PCM_TXFIX_OFF = 0x0,
  189. PCM_TXFIX_ON = 0x1
  190. } PCMTXFIXEN_T;
  191. typedef struct {
  192. PCMFMT_T ePcmFmt;
  193. PCMMODE_T ePcm8k16kmode;
  194. PCMWLEN_T ePcmWlen;
  195. PCMCLKSRC_T ePcmClkSrc;
  196. PCMBYPASRC_T ePcmBypassASRC;
  197. PCMEXTMODEM_T ePcmModemSel;
  198. PCMVBT16KMODE_T ePcmVbt16kSel;
  199. } PCM_INFO_T;
  200. /* BT PCM */
  201. typedef enum {
  202. BTPCM_DISABLE = 0x0,
  203. BTPCM_ENABLE = 0x1
  204. } BTPCMEN_T;
  205. typedef enum {
  206. BTPCM_8K = 0x0,
  207. BTPCM_16K = 0x1
  208. } BTPCMMODE_T;
  209. /* Interconnection related */
  210. typedef enum {
  211. I00 = 0,
  212. I01 = 1,
  213. I02 = 2,
  214. I03 = 3,
  215. I04 = 4,
  216. I05 = 5,
  217. I06 = 6,
  218. I07 = 7,
  219. I08 = 8,
  220. I09 = 9,
  221. IN_MAX
  222. } ITRCON_IN_T;
  223. typedef enum {
  224. O00 = 0,
  225. O01 = 1,
  226. O02 = 2,
  227. O03 = 3,
  228. O04 = 4,
  229. O05 = 5,
  230. O06 = 6,
  231. O07 = 7,
  232. O08 = 8,
  233. O09 = 9,
  234. O010 = 10,
  235. O011 = 11,
  236. O012 = 12,
  237. OUT_MAX
  238. } ITRCON_OUT_T;
  239. /* Side tone filter related */
  240. typedef enum {
  241. I3I4 = 0,
  242. HW_SINE = 1,
  243. I5I6 = 2,
  244. } STF_SRC_T;
  245. /* Sine wave generator related */
  246. typedef enum {
  247. SINE_TONE_CH1 = 0,
  248. SINE_TONE_CH2 = 1,
  249. SINE_TONE_STEREO = 2
  250. } SINE_TONE_CH_T;
  251. typedef enum {
  252. SINE_TONE_128 = 0,
  253. SINE_TONE_64 = 1,
  254. SINE_TONE_32 = 2,
  255. SINE_TONE_16 = 3,
  256. SINE_TONE_8 = 4,
  257. SINE_TONE_4 = 5,
  258. SINE_TONE_2 = 6,
  259. SINE_TONE_1 = 7
  260. } SINE_TONE_AMP_T;
  261. typedef enum {
  262. SINE_TONE_8K = 0,
  263. SINE_TONE_11K = 1,
  264. SINE_TONE_12K = 2,
  265. SINE_TONE_16K = 3,
  266. SINE_TONE_22K = 4,
  267. SINE_TONE_24K = 5,
  268. SINE_TONE_32K = 6,
  269. SINE_TONE_44K = 7,
  270. SINE_TONE_48K = 8,
  271. SINE_TONE_LOOPBACK = 9
  272. } SINE_TONE_SINEMODE_T;
  273. typedef enum {
  274. SINE_TONE_LOOPBACK_I0_I1 = 0,
  275. SINE_TONE_LOOPBACK_I2 = 1,
  276. SINE_TONE_LOOPBACK_I3_I4 = 2,
  277. SINE_TONE_LOOPBACK_I5_I6 = 3,
  278. SINE_TONE_LOOPBACK_I7_I8 = 4,
  279. SINE_TONE_LOOPBACK_I9_I10 = 5,
  280. SINE_TONE_LOOPBACK_I11_I12 = 6,
  281. SINE_TONE_LOOPBACK_O0_O1 = 7,
  282. SINE_TONE_LOOPBACK_O2 = 8,
  283. SINE_TONE_LOOPBACK_O3_O4 = 9,
  284. SINE_TONE_LOOPBACK_O5_O6 = 10,
  285. SINE_TONE_LOOPBACK_O7_O8 = 11,
  286. SINE_TONE_LOOPBACK_O9_O10 = 12,
  287. SINE_TONE_LOOPBACK_O11 = 13,
  288. SINE_TONE_LOOPBACK_O12 = 14
  289. } SINE_TONE_LOOPBACK_T;
  290. typedef struct {
  291. uint32 u4ch1_freq_div; /* 64/n sample/period */
  292. SINE_TONE_AMP_T rch1_amp_div;
  293. SINE_TONE_SINEMODE_T rch1_sine_mode;
  294. uint32 u4ch2_freq_div; /* 64/n sample/period */
  295. SINE_TONE_AMP_T rch2_amp_div;
  296. SINE_TONE_SINEMODE_T rch2_sine_mode;
  297. SINE_TONE_LOOPBACK_T rloopback_mode;
  298. } AFE_SINEGEN_INFO_T;
  299. /*****************************************************************************
  300. * C O N S T A N T S
  301. *****************************************************************************/
  302. #define AUDIO_HW_PHYSICAL_BASE (0x11140000L)
  303. #define AUDIO_HW_VIRTUAL_BASE (0xF2070000L)
  304. #ifdef AUDIO_MEM_IOREMAP
  305. #define AFE_BASE (0L)
  306. #else
  307. #define AFE_BASE (AUDIO_HW_VIRTUAL_BASE)
  308. #endif
  309. /* Internal sram: 0x12004000~0x12007FFF (16K) */
  310. #define AFE_INTERNAL_SRAM_PHY_BASE (0x11141000L)
  311. #define AFE_INTERNAL_SRAM_VIR_BASE (AUDIO_HW_VIRTUAL_BASE - 0x70000+0x8000)
  312. #define AFE_INTERNAL_SRAM_SIZE (0x4000)
  313. /* Dram */
  314. #define AFE_EXTERNAL_DRAM_SIZE (0x4000)
  315. /*****************************************************************************
  316. * M A C R O
  317. *****************************************************************************/
  318. /*****************************************************************************
  319. * R E G I S T E R D E F I N I T I O N
  320. *****************************************************************************/
  321. #ifdef AUDIO_TOP_CON0
  322. #undef AUDIO_TOP_CON0
  323. #define AUDIO_TOP_CON0 (AFE_BASE + 0x0000)
  324. #endif
  325. #define AUDIO_TOP_CON0 (AFE_BASE + 0x0000)
  326. #define AUDIO_TOP_CON1 (AFE_BASE + 0x0004)
  327. #define AUDIO_TOP_CON2 (AFE_BASE + 0x0008)
  328. #define AUDIO_TOP_CON3 (AFE_BASE + 0x000C)
  329. #define AFE_DAC_CON0 (AFE_BASE + 0x0010)
  330. #define AFE_DAC_CON1 (AFE_BASE + 0x0014)
  331. #define AFE_I2S_CON (AFE_BASE + 0x0018)
  332. #define AFE_CONN0 (AFE_BASE + 0x0020)
  333. #define AFE_CONN1 (AFE_BASE + 0x0024)
  334. #define AFE_CONN2 (AFE_BASE + 0x0028)
  335. #define AFE_CONN3 (AFE_BASE + 0x002C)
  336. #define AFE_CONN4 (AFE_BASE + 0x0030)
  337. #define AFE_I2S_CON1 (AFE_BASE + 0x0034)
  338. #define AFE_I2S_CON2 (AFE_BASE + 0x0038)
  339. /* Memory interface */
  340. #define AFE_DL1_BASE (AFE_BASE + 0x0040)
  341. #define AFE_DL1_CUR (AFE_BASE + 0x0044)
  342. #define AFE_DL1_END (AFE_BASE + 0x0048)
  343. #define AFE_I2S_CON3 (AFE_BASE + 0x004C)
  344. #define AFE_DL2_BASE (AFE_BASE + 0x0050)
  345. #define AFE_DL2_CUR (AFE_BASE + 0x0054)
  346. #define AFE_DL2_END (AFE_BASE + 0x0058)
  347. #define AFE_AWB_BASE (AFE_BASE + 0x0070)
  348. #define AFE_AWB_END (AFE_BASE + 0x0078)
  349. #define AFE_AWB_CUR (AFE_BASE + 0x007C)
  350. #define AFE_VUL_BASE (AFE_BASE + 0x0080)
  351. #define AFE_VUL_END (AFE_BASE + 0x0088)
  352. #define AFE_VUL_CUR (AFE_BASE + 0x008C)
  353. /* Memory interface monitor */
  354. #define AFE_MEMIF_MON0 (AFE_BASE + 0x00D0)
  355. #define AFE_MEMIF_MON1 (AFE_BASE + 0x00D4)
  356. #define AFE_MEMIF_MON2 (AFE_BASE + 0x00D8)
  357. #define AFE_MEMIF_MON4 (AFE_BASE + 0x00E0)
  358. #define AFE_ADDA_DL_SRC2_CON0 (AFE_BASE+0x00108)
  359. #define AFE_ADDA_DL_SRC2_CON1 (AFE_BASE+0x0010C)
  360. #define AFE_ADDA_UL_SRC_CON0 (AFE_BASE+0x00114)
  361. #define AFE_ADDA_UL_SRC_CON1 (AFE_BASE+0x00118)
  362. #define AFE_ADDA_TOP_CON0 (AFE_BASE+0x00120)
  363. #define AFE_ADDA_UL_DL_CON0 (AFE_BASE+0x00124)
  364. #define AFE_ADDA_SRC_DEBUG (AFE_BASE+0x0012C)
  365. #define AFE_ADDA_SRC_DEBUG_MON0 (AFE_BASE+0x00130)
  366. #define AFE_ADDA_SRC_DEBUG_MON1 (AFE_BASE+0x00134)
  367. #define AFE_ADDA_NEWIF_CFG0 (AFE_BASE+0x00138)
  368. #define AFE_ADDA_NEWIF_CFG1 (AFE_BASE+0x0013C)
  369. #define AFE_SIDETONE_DEBUG (AFE_BASE + 0x01D0)
  370. #define AFE_SIDETONE_MON (AFE_BASE + 0x01D4)
  371. #define AFE_SIDETONE_CON0 (AFE_BASE + 0x01E0)
  372. #define AFE_SIDETONE_COEFF (AFE_BASE + 0x01E4)
  373. #define AFE_SIDETONE_CON1 (AFE_BASE + 0x01E8)
  374. #define AFE_SIDETONE_GAIN (AFE_BASE + 0x01EC)
  375. #define AFE_SGEN_CON0 (AFE_BASE + 0x01F0)
  376. #define AFE_TOP_CON0 (AFE_BASE + 0x0200)
  377. #define AFE_ADDA_PREDIS_CON0 (AFE_BASE+0x00260)
  378. #define AFE_ADDA_PREDIS_CON1 (AFE_BASE+0x00264)
  379. #define AFE_MOD_DAI_BASE (AFE_BASE + 0x0330)
  380. #define AFE_MOD_DAI_END (AFE_BASE + 0x0338)
  381. #define AFE_MOD_DAI_CUR (AFE_BASE + 0x033C)
  382. #define AFE_IRQ_MCU_CON (AFE_BASE + 0x03A0)
  383. #define AFE_IRQ_MCU_STATUS (AFE_BASE + 0x03A4)
  384. #define AFE_IRQ_MCU_CLR (AFE_BASE + 0x03A8)
  385. #define AFE_IRQ_MCU_CNT1 (AFE_BASE + 0x03AC)
  386. #define AFE_IRQ_MCU_CNT2 (AFE_BASE + 0x03B0)
  387. #define AFE_IRQ_MCU_MON2 (AFE_BASE + 0x03B8)
  388. #define AFE_IRQ1_MCU_CNT_MON (AFE_BASE + 0x03C0)
  389. #define AFE_IRQ2_MCU_CNT_MON (AFE_BASE + 0x03C4)
  390. #define AFE_IRQ1_MCU_EN_CNT_MON (AFE_BASE + 0x03C8)
  391. #define AFE_MEMIF_MINLEN (AFE_BASE + 0x03D0)
  392. #define AFE_MEMIF_MAXLEN (AFE_BASE + 0x03D4)
  393. #define AFE_MEMIF_PBUF_SIZE (AFE_BASE + 0x03D8)
  394. /* AFE GAIN CONTROL REGISTER */
  395. #define AFE_GAIN1_CON0 (AFE_BASE + 0x0410)
  396. #define AFE_GAIN1_CON1 (AFE_BASE + 0x0414)
  397. #define AFE_GAIN1_CON2 (AFE_BASE + 0x0418)
  398. #define AFE_GAIN1_CON3 (AFE_BASE + 0x041C)
  399. #define AFE_GAIN1_CONN (AFE_BASE + 0x0420)
  400. #define AFE_GAIN1_CUR (AFE_BASE + 0x0424)
  401. #define AFE_GAIN2_CON0 (AFE_BASE + 0x0428)
  402. #define AFE_GAIN2_CON1 (AFE_BASE + 0x042C)
  403. #define AFE_GAIN2_CON2 (AFE_BASE + 0x0430)
  404. #define AFE_GAIN2_CON3 (AFE_BASE + 0x0434)
  405. #define AFE_GAIN2_CONN (AFE_BASE + 0x0438)
  406. #define AFE_GAIN2_CUR (AFE_BASE + 0x043C)
  407. #define AFE_GAIN2_CONN2 (AFE_BASE + 0x0440)
  408. /* here is only fpga needed */
  409. #define FPGA_CFG2 (AFE_BASE + 0x4B8)
  410. #define FPGA_CFG3 (AFE_BASE + 0x4BC)
  411. #define FPGA_CFG0 (AFE_BASE + 0x4C0)
  412. #define FPGA_CFG1 (AFE_BASE + 0x4C4)
  413. /* #define FPGA_VER (AFE_BASE + 0x4C8) */
  414. #define FPGA_STC (AFE_BASE + 0x4CC)
  415. #define AFE_ASRC_CON0 (AFE_BASE + 0x500)
  416. #define AFE_ASRC_CON1 (AFE_BASE + 0x504)
  417. #define AFE_ASRC_CON2 (AFE_BASE + 0x508)
  418. #define AFE_ASRC_CON3 (AFE_BASE + 0x50C)
  419. #define AFE_ASRC_CON4 (AFE_BASE + 0x510)
  420. #define AFE_ASRC_CON5 (AFE_BASE + 0x514)
  421. #define AFE_ASRC_CON6 (AFE_BASE + 0x518)
  422. #define AFE_ASRC_CON7 (AFE_BASE + 0x51C)
  423. #define AFE_ASRC_CON8 (AFE_BASE + 0x520)
  424. #define AFE_ASRC_CON9 (AFE_BASE + 0x524)
  425. #define AFE_ASRC_CON10 (AFE_BASE + 0x528)
  426. #define AFE_ASRC_CON11 (AFE_BASE + 0x52C)
  427. #define PCM_INTF_CON (AFE_BASE + 0x530)
  428. #define PCM_INTF_CON2 (AFE_BASE + 0x538)
  429. #define PCM2_INTF_CON (AFE_BASE + 0x53C)
  430. /* Add */
  431. #define AFE_ASRC_CON13 (AFE_BASE+0x550)
  432. #define AFE_ASRC_CON14 (AFE_BASE+0x554)
  433. #define AFE_ASRC_CON15 (AFE_BASE+0x558)
  434. #define AFE_ASRC_CON16 (AFE_BASE+0x55C)
  435. #define AFE_ASRC_CON17 (AFE_BASE+0x560)
  436. #define AFE_ASRC_CON18 (AFE_BASE+0x564)
  437. #define AFE_ASRC_CON19 (AFE_BASE+0x568)
  438. #define AFE_ASRC_CON20 (AFE_BASE+0x56C)
  439. #define AFE_ASRC_CON21 (AFE_BASE+0x570)
  440. #define AFE_REGISTER_OFFSET (0x574)
  441. /* #define AFE_MASK_ALL (0xffffffff) */
  442. #define AFE_MAXLENGTH (AFE_BASE + AFE_REGISTER_OFFSET)
  443. /* do afe register ioremap */
  444. void Auddrv_Reg_map(void);
  445. void Afe_Set_Reg(uint32 offset, uint32 value, uint32 mask);
  446. uint32 Afe_Get_Reg(uint32 offset);
  447. /* for debug usage */
  448. void Afe_Log_Print(void);
  449. /* function to get pointer */
  450. dma_addr_t Get_Afe_Sram_Phys_Addr(void);
  451. dma_addr_t Get_Afe_Sram_Capture_Phys_Addr(void);
  452. void *Get_Afe_SramBase_Pointer(void);
  453. void *Get_Afe_SramCaptureBase_Pointer(void);
  454. #endif