oxygen_regs.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. #ifndef OXYGEN_REGS_H_INCLUDED
  2. #define OXYGEN_REGS_H_INCLUDED
  3. /* recording channel A */
  4. #define OXYGEN_DMA_A_ADDRESS 0x00 /* 32-bit base address */
  5. #define OXYGEN_DMA_A_COUNT 0x04 /* buffer counter (dwords) */
  6. #define OXYGEN_DMA_A_TCOUNT 0x06 /* interrupt counter (dwords) */
  7. /* recording channel B */
  8. #define OXYGEN_DMA_B_ADDRESS 0x08
  9. #define OXYGEN_DMA_B_COUNT 0x0c
  10. #define OXYGEN_DMA_B_TCOUNT 0x0e
  11. /* recording channel C */
  12. #define OXYGEN_DMA_C_ADDRESS 0x10
  13. #define OXYGEN_DMA_C_COUNT 0x14
  14. #define OXYGEN_DMA_C_TCOUNT 0x16
  15. /* SPDIF playback channel */
  16. #define OXYGEN_DMA_SPDIF_ADDRESS 0x18
  17. #define OXYGEN_DMA_SPDIF_COUNT 0x1c
  18. #define OXYGEN_DMA_SPDIF_TCOUNT 0x1e
  19. /* multichannel playback channel */
  20. #define OXYGEN_DMA_MULTICH_ADDRESS 0x20
  21. #define OXYGEN_DMA_MULTICH_COUNT 0x24 /* 24 bits */
  22. #define OXYGEN_DMA_MULTICH_TCOUNT 0x28 /* 24 bits */
  23. /* AC'97 (front panel) playback channel */
  24. #define OXYGEN_DMA_AC97_ADDRESS 0x30
  25. #define OXYGEN_DMA_AC97_COUNT 0x34
  26. #define OXYGEN_DMA_AC97_TCOUNT 0x36
  27. /* all registers 0x00..0x36 return current position on read */
  28. #define OXYGEN_DMA_STATUS 0x40 /* 1 = running, 0 = stop */
  29. #define OXYGEN_CHANNEL_A 0x01
  30. #define OXYGEN_CHANNEL_B 0x02
  31. #define OXYGEN_CHANNEL_C 0x04
  32. #define OXYGEN_CHANNEL_SPDIF 0x08
  33. #define OXYGEN_CHANNEL_MULTICH 0x10
  34. #define OXYGEN_CHANNEL_AC97 0x20
  35. #define OXYGEN_DMA_PAUSE 0x41 /* 1 = pause */
  36. /* OXYGEN_CHANNEL_* */
  37. #define OXYGEN_DMA_RESET 0x42
  38. /* OXYGEN_CHANNEL_* */
  39. #define OXYGEN_PLAY_CHANNELS 0x43
  40. #define OXYGEN_PLAY_CHANNELS_MASK 0x03
  41. #define OXYGEN_PLAY_CHANNELS_2 0x00
  42. #define OXYGEN_PLAY_CHANNELS_4 0x01
  43. #define OXYGEN_PLAY_CHANNELS_6 0x02
  44. #define OXYGEN_PLAY_CHANNELS_8 0x03
  45. #define OXYGEN_DMA_A_BURST_MASK 0x04
  46. #define OXYGEN_DMA_A_BURST_8 0x00 /* dwords */
  47. #define OXYGEN_DMA_A_BURST_16 0x04
  48. #define OXYGEN_DMA_MULTICH_BURST_MASK 0x08
  49. #define OXYGEN_DMA_MULTICH_BURST_8 0x00
  50. #define OXYGEN_DMA_MULTICH_BURST_16 0x08
  51. #define OXYGEN_INTERRUPT_MASK 0x44
  52. /* OXYGEN_CHANNEL_* */
  53. #define OXYGEN_INT_SPDIF_IN_DETECT 0x0100
  54. #define OXYGEN_INT_MCU 0x0200
  55. #define OXYGEN_INT_2WIRE 0x0400
  56. #define OXYGEN_INT_GPIO 0x0800
  57. #define OXYGEN_INT_MCB 0x2000
  58. #define OXYGEN_INT_AC97 0x4000
  59. #define OXYGEN_INTERRUPT_STATUS 0x46
  60. /* OXYGEN_CHANNEL_* amd OXYGEN_INT_* */
  61. #define OXYGEN_INT_MIDI 0x1000
  62. #define OXYGEN_MISC 0x48
  63. #define OXYGEN_MISC_WRITE_PCI_SUBID 0x01
  64. #define OXYGEN_MISC_LATENCY_3F 0x02
  65. #define OXYGEN_MISC_REC_C_FROM_SPDIF 0x04
  66. #define OXYGEN_MISC_REC_B_FROM_AC97 0x08
  67. #define OXYGEN_MISC_REC_A_FROM_MULTICH 0x10
  68. #define OXYGEN_MISC_PCI_MEM_W_1_CLOCK 0x20
  69. #define OXYGEN_MISC_MIDI 0x40
  70. #define OXYGEN_MISC_CRYSTAL_MASK 0x80
  71. #define OXYGEN_MISC_CRYSTAL_24576 0x00
  72. #define OXYGEN_MISC_CRYSTAL_27 0x80 /* MHz */
  73. #define OXYGEN_REC_FORMAT 0x4a
  74. #define OXYGEN_REC_FORMAT_A_MASK 0x03
  75. #define OXYGEN_REC_FORMAT_A_SHIFT 0
  76. #define OXYGEN_REC_FORMAT_B_MASK 0x0c
  77. #define OXYGEN_REC_FORMAT_B_SHIFT 2
  78. #define OXYGEN_REC_FORMAT_C_MASK 0x30
  79. #define OXYGEN_REC_FORMAT_C_SHIFT 4
  80. #define OXYGEN_FORMAT_16 0x00
  81. #define OXYGEN_FORMAT_24 0x01
  82. #define OXYGEN_FORMAT_32 0x02
  83. #define OXYGEN_PLAY_FORMAT 0x4b
  84. #define OXYGEN_SPDIF_FORMAT_MASK 0x03
  85. #define OXYGEN_SPDIF_FORMAT_SHIFT 0
  86. #define OXYGEN_MULTICH_FORMAT_MASK 0x0c
  87. #define OXYGEN_MULTICH_FORMAT_SHIFT 2
  88. /* OXYGEN_FORMAT_* */
  89. #define OXYGEN_REC_CHANNELS 0x4c
  90. #define OXYGEN_REC_CHANNELS_MASK 0x07
  91. #define OXYGEN_REC_CHANNELS_2_2_2 0x00 /* DMA A, B, C */
  92. #define OXYGEN_REC_CHANNELS_4_2_2 0x01
  93. #define OXYGEN_REC_CHANNELS_6_0_2 0x02
  94. #define OXYGEN_REC_CHANNELS_6_2_0 0x03
  95. #define OXYGEN_REC_CHANNELS_8_0_0 0x04
  96. #define OXYGEN_FUNCTION 0x50
  97. #define OXYGEN_FUNCTION_CLOCK_MASK 0x01
  98. #define OXYGEN_FUNCTION_CLOCK_PLL 0x00
  99. #define OXYGEN_FUNCTION_CLOCK_CRYSTAL 0x01
  100. #define OXYGEN_FUNCTION_RESET_CODEC 0x02
  101. #define OXYGEN_FUNCTION_RESET_POL 0x04
  102. #define OXYGEN_FUNCTION_PWDN 0x08
  103. #define OXYGEN_FUNCTION_PWDN_EN 0x10
  104. #define OXYGEN_FUNCTION_PWDN_POL 0x20
  105. #define OXYGEN_FUNCTION_2WIRE_SPI_MASK 0x40
  106. #define OXYGEN_FUNCTION_SPI 0x00
  107. #define OXYGEN_FUNCTION_2WIRE 0x40
  108. #define OXYGEN_FUNCTION_ENABLE_SPI_4_5 0x80 /* 0 = EEPROM */
  109. #define OXYGEN_I2S_MULTICH_FORMAT 0x60
  110. #define OXYGEN_I2S_RATE_MASK 0x0007 /* LRCK */
  111. #define OXYGEN_RATE_32000 0x0000
  112. #define OXYGEN_RATE_44100 0x0001
  113. #define OXYGEN_RATE_48000 0x0002
  114. #define OXYGEN_RATE_64000 0x0003
  115. #define OXYGEN_RATE_88200 0x0004
  116. #define OXYGEN_RATE_96000 0x0005
  117. #define OXYGEN_RATE_176400 0x0006
  118. #define OXYGEN_RATE_192000 0x0007
  119. #define OXYGEN_I2S_FORMAT_MASK 0x0008
  120. #define OXYGEN_I2S_FORMAT_I2S 0x0000
  121. #define OXYGEN_I2S_FORMAT_LJUST 0x0008
  122. #define OXYGEN_I2S_MCLK_MASK 0x0030 /* MCLK/LRCK */
  123. #define OXYGEN_I2S_MCLK_SHIFT 4
  124. #define MCLK_128 0
  125. #define MCLK_256 1
  126. #define MCLK_512 2
  127. #define OXYGEN_I2S_MCLK(f) (((f) & 3) << OXYGEN_I2S_MCLK_SHIFT)
  128. #define OXYGEN_I2S_BITS_MASK 0x00c0
  129. #define OXYGEN_I2S_BITS_16 0x0000
  130. #define OXYGEN_I2S_BITS_20 0x0040
  131. #define OXYGEN_I2S_BITS_24 0x0080
  132. #define OXYGEN_I2S_BITS_32 0x00c0
  133. #define OXYGEN_I2S_MASTER 0x0100
  134. #define OXYGEN_I2S_BCLK_MASK 0x0600 /* BCLK/LRCK */
  135. #define OXYGEN_I2S_BCLK_64 0x0000
  136. #define OXYGEN_I2S_BCLK_128 0x0200
  137. #define OXYGEN_I2S_BCLK_256 0x0400
  138. #define OXYGEN_I2S_MUTE_MCLK 0x0800
  139. #define OXYGEN_I2S_A_FORMAT 0x62
  140. #define OXYGEN_I2S_B_FORMAT 0x64
  141. #define OXYGEN_I2S_C_FORMAT 0x66
  142. /* like OXYGEN_I2S_MULTICH_FORMAT */
  143. #define OXYGEN_SPDIF_CONTROL 0x70
  144. #define OXYGEN_SPDIF_OUT_ENABLE 0x00000002
  145. #define OXYGEN_SPDIF_LOOPBACK 0x00000004 /* in to out */
  146. #define OXYGEN_SPDIF_SENSE_MASK 0x00000008
  147. #define OXYGEN_SPDIF_LOCK_MASK 0x00000010
  148. #define OXYGEN_SPDIF_RATE_MASK 0x00000020
  149. #define OXYGEN_SPDIF_SPDVALID 0x00000040
  150. #define OXYGEN_SPDIF_SENSE_PAR 0x00000200
  151. #define OXYGEN_SPDIF_LOCK_PAR 0x00000400
  152. #define OXYGEN_SPDIF_SENSE_STATUS 0x00000800
  153. #define OXYGEN_SPDIF_LOCK_STATUS 0x00001000
  154. #define OXYGEN_SPDIF_SENSE_INT 0x00002000 /* r/wc */
  155. #define OXYGEN_SPDIF_LOCK_INT 0x00004000 /* r/wc */
  156. #define OXYGEN_SPDIF_RATE_INT 0x00008000 /* r/wc */
  157. #define OXYGEN_SPDIF_IN_CLOCK_MASK 0x00010000
  158. #define OXYGEN_SPDIF_IN_CLOCK_96 0x00000000 /* <= 96 kHz */
  159. #define OXYGEN_SPDIF_IN_CLOCK_192 0x00010000 /* > 96 kHz */
  160. #define OXYGEN_SPDIF_OUT_RATE_MASK 0x07000000
  161. #define OXYGEN_SPDIF_OUT_RATE_SHIFT 24
  162. /* OXYGEN_RATE_* << OXYGEN_SPDIF_OUT_RATE_SHIFT */
  163. #define OXYGEN_SPDIF_OUTPUT_BITS 0x74
  164. #define OXYGEN_SPDIF_NONAUDIO 0x00000002
  165. #define OXYGEN_SPDIF_C 0x00000004
  166. #define OXYGEN_SPDIF_PREEMPHASIS 0x00000008
  167. #define OXYGEN_SPDIF_CATEGORY_MASK 0x000007f0
  168. #define OXYGEN_SPDIF_CATEGORY_SHIFT 4
  169. #define OXYGEN_SPDIF_ORIGINAL 0x00000800
  170. #define OXYGEN_SPDIF_CS_RATE_MASK 0x0000f000
  171. #define OXYGEN_SPDIF_CS_RATE_SHIFT 12
  172. #define OXYGEN_SPDIF_V 0x00010000 /* 0 = valid */
  173. #define OXYGEN_SPDIF_INPUT_BITS 0x78
  174. /* 32 bits, IEC958_AES_* */
  175. #define OXYGEN_EEPROM_CONTROL 0x80
  176. #define OXYGEN_EEPROM_ADDRESS_MASK 0x7f
  177. #define OXYGEN_EEPROM_DIR_MASK 0x80
  178. #define OXYGEN_EEPROM_DIR_READ 0x00
  179. #define OXYGEN_EEPROM_DIR_WRITE 0x80
  180. #define OXYGEN_EEPROM_STATUS 0x81
  181. #define OXYGEN_EEPROM_VALID 0x40
  182. #define OXYGEN_EEPROM_BUSY 0x80
  183. #define OXYGEN_EEPROM_DATA 0x82 /* 16 bits */
  184. #define OXYGEN_2WIRE_CONTROL 0x90
  185. #define OXYGEN_2WIRE_DIR_MASK 0x01
  186. #define OXYGEN_2WIRE_DIR_WRITE 0x00
  187. #define OXYGEN_2WIRE_DIR_READ 0x01
  188. #define OXYGEN_2WIRE_ADDRESS_MASK 0xfe /* slave device address */
  189. #define OXYGEN_2WIRE_ADDRESS_SHIFT 1
  190. #define OXYGEN_2WIRE_MAP 0x91 /* address, 8 bits */
  191. #define OXYGEN_2WIRE_DATA 0x92 /* data, 16 bits */
  192. #define OXYGEN_2WIRE_BUS_STATUS 0x94
  193. #define OXYGEN_2WIRE_BUSY 0x0001
  194. #define OXYGEN_2WIRE_LENGTH_MASK 0x0002
  195. #define OXYGEN_2WIRE_LENGTH_8 0x0000
  196. #define OXYGEN_2WIRE_LENGTH_16 0x0002
  197. #define OXYGEN_2WIRE_MANUAL_READ 0x0004 /* 0 = auto read */
  198. #define OXYGEN_2WIRE_WRITE_MAP_ONLY 0x0008
  199. #define OXYGEN_2WIRE_SLAVE_AD_MASK 0x0030 /* AD0, AD1 */
  200. #define OXYGEN_2WIRE_INTERRUPT_MASK 0x0040 /* 0 = int. if not responding */
  201. #define OXYGEN_2WIRE_SLAVE_NO_RESPONSE 0x0080
  202. #define OXYGEN_2WIRE_SPEED_MASK 0x0100
  203. #define OXYGEN_2WIRE_SPEED_STANDARD 0x0000
  204. #define OXYGEN_2WIRE_SPEED_FAST 0x0100
  205. #define OXYGEN_2WIRE_CLOCK_SYNC 0x0200
  206. #define OXYGEN_2WIRE_BUS_RESET 0x0400
  207. #define OXYGEN_SPI_CONTROL 0x98
  208. #define OXYGEN_SPI_BUSY 0x01 /* read */
  209. #define OXYGEN_SPI_TRIGGER 0x01 /* write */
  210. #define OXYGEN_SPI_DATA_LENGTH_MASK 0x02
  211. #define OXYGEN_SPI_DATA_LENGTH_2 0x00
  212. #define OXYGEN_SPI_DATA_LENGTH_3 0x02
  213. #define OXYGEN_SPI_CLOCK_MASK 0x0c
  214. #define OXYGEN_SPI_CLOCK_160 0x00 /* ns */
  215. #define OXYGEN_SPI_CLOCK_320 0x04
  216. #define OXYGEN_SPI_CLOCK_640 0x08
  217. #define OXYGEN_SPI_CLOCK_1280 0x0c
  218. #define OXYGEN_SPI_CODEC_MASK 0x70 /* 0..5 */
  219. #define OXYGEN_SPI_CODEC_SHIFT 4
  220. #define OXYGEN_SPI_CEN_MASK 0x80
  221. #define OXYGEN_SPI_CEN_LATCH_CLOCK_LO 0x00
  222. #define OXYGEN_SPI_CEN_LATCH_CLOCK_HI 0x80
  223. #define OXYGEN_SPI_DATA1 0x99
  224. #define OXYGEN_SPI_DATA2 0x9a
  225. #define OXYGEN_SPI_DATA3 0x9b
  226. #define OXYGEN_MPU401 0xa0
  227. #define OXYGEN_MPU401_CONTROL 0xa2
  228. #define OXYGEN_MPU401_LOOPBACK 0x01 /* TXD to RXD */
  229. #define OXYGEN_GPI_DATA 0xa4
  230. /* bits 0..5 = pin XGPI0..XGPI5 */
  231. #define OXYGEN_GPI_INTERRUPT_MASK 0xa5
  232. /* bits 0..5, 1 = enable */
  233. #define OXYGEN_GPIO_DATA 0xa6
  234. /* bits 0..9 */
  235. #define OXYGEN_GPIO_CONTROL 0xa8
  236. /* bits 0..9, 0 = input, 1 = output */
  237. #define OXYGEN_GPIO1_XSLAVE_RDY 0x8000
  238. #define OXYGEN_GPIO_INTERRUPT_MASK 0xaa
  239. /* bits 0..9, 1 = enable */
  240. #define OXYGEN_DEVICE_SENSE 0xac
  241. #define OXYGEN_HEAD_PHONE_DETECT 0x01
  242. #define OXYGEN_HEAD_PHONE_MASK 0x06
  243. #define OXYGEN_HEAD_PHONE_PASSIVE_SPK 0x00
  244. #define OXYGEN_HEAD_PHONE_HP 0x02
  245. #define OXYGEN_HEAD_PHONE_ACTIVE_SPK 0x04
  246. #define OXYGEN_MCU_2WIRE_DATA 0xb0
  247. #define OXYGEN_MCU_2WIRE_MAP 0xb2
  248. #define OXYGEN_MCU_2WIRE_STATUS 0xb3
  249. #define OXYGEN_MCU_2WIRE_BUSY 0x01
  250. #define OXYGEN_MCU_2WIRE_LENGTH_MASK 0x06
  251. #define OXYGEN_MCU_2WIRE_LENGTH_1 0x00
  252. #define OXYGEN_MCU_2WIRE_LENGTH_2 0x02
  253. #define OXYGEN_MCU_2WIRE_LENGTH_3 0x04
  254. #define OXYGEN_MCU_2WIRE_WRITE 0x08 /* r/wc */
  255. #define OXYGEN_MCU_2WIRE_READ 0x10 /* r/wc */
  256. #define OXYGEN_MCU_2WIRE_DRV_XACT_FAIL 0x20 /* r/wc */
  257. #define OXYGEN_MCU_2WIRE_RESET 0x40
  258. #define OXYGEN_MCU_2WIRE_CONTROL 0xb4
  259. #define OXYGEN_MCU_2WIRE_DRV_ACK 0x01
  260. #define OXYGEN_MCU_2WIRE_DRV_XACT 0x02
  261. #define OXYGEN_MCU_2WIRE_INT_MASK 0x04
  262. #define OXYGEN_MCU_2WIRE_SYNC_MASK 0x08
  263. #define OXYGEN_MCU_2WIRE_SYNC_RDY_PIN 0x00
  264. #define OXYGEN_MCU_2WIRE_SYNC_DATA 0x08
  265. #define OXYGEN_MCU_2WIRE_ADDRESS_MASK 0x30
  266. #define OXYGEN_MCU_2WIRE_ADDRESS_10 0x00
  267. #define OXYGEN_MCU_2WIRE_ADDRESS_12 0x10
  268. #define OXYGEN_MCU_2WIRE_ADDRESS_14 0x20
  269. #define OXYGEN_MCU_2WIRE_ADDRESS_16 0x30
  270. #define OXYGEN_MCU_2WIRE_INT_POL 0x40
  271. #define OXYGEN_MCU_2WIRE_SYNC_ENABLE 0x80
  272. #define OXYGEN_PLAY_ROUTING 0xc0
  273. #define OXYGEN_PLAY_MUTE01 0x0001
  274. #define OXYGEN_PLAY_MUTE23 0x0002
  275. #define OXYGEN_PLAY_MUTE45 0x0004
  276. #define OXYGEN_PLAY_MUTE67 0x0008
  277. #define OXYGEN_PLAY_MUTE_MASK 0x000f
  278. #define OXYGEN_PLAY_MULTICH_MASK 0x0010
  279. #define OXYGEN_PLAY_MULTICH_I2S_DAC 0x0000
  280. #define OXYGEN_PLAY_MULTICH_AC97 0x0010
  281. #define OXYGEN_PLAY_SPDIF_MASK 0x00e0
  282. #define OXYGEN_PLAY_SPDIF_SPDIF 0x0000
  283. #define OXYGEN_PLAY_SPDIF_MULTICH_01 0x0020
  284. #define OXYGEN_PLAY_SPDIF_MULTICH_23 0x0040
  285. #define OXYGEN_PLAY_SPDIF_MULTICH_45 0x0060
  286. #define OXYGEN_PLAY_SPDIF_MULTICH_67 0x0080
  287. #define OXYGEN_PLAY_SPDIF_REC_A 0x00a0
  288. #define OXYGEN_PLAY_SPDIF_REC_B 0x00c0
  289. #define OXYGEN_PLAY_SPDIF_I2S_ADC_3 0x00e0
  290. #define OXYGEN_PLAY_DAC0_SOURCE_MASK 0x0300
  291. #define OXYGEN_PLAY_DAC0_SOURCE_SHIFT 8
  292. #define OXYGEN_PLAY_DAC1_SOURCE_MASK 0x0c00
  293. #define OXYGEN_PLAY_DAC1_SOURCE_SHIFT 10
  294. #define OXYGEN_PLAY_DAC2_SOURCE_MASK 0x3000
  295. #define OXYGEN_PLAY_DAC2_SOURCE_SHIFT 12
  296. #define OXYGEN_PLAY_DAC3_SOURCE_MASK 0xc000
  297. #define OXYGEN_PLAY_DAC3_SOURCE_SHIFT 14
  298. #define OXYGEN_REC_ROUTING 0xc2
  299. #define OXYGEN_MUTE_I2S_ADC_1 0x01
  300. #define OXYGEN_MUTE_I2S_ADC_2 0x02
  301. #define OXYGEN_MUTE_I2S_ADC_3 0x04
  302. #define OXYGEN_REC_A_ROUTE_MASK 0x08
  303. #define OXYGEN_REC_A_ROUTE_I2S_ADC_1 0x00
  304. #define OXYGEN_REC_A_ROUTE_AC97_0 0x08
  305. #define OXYGEN_REC_B_ROUTE_MASK 0x10
  306. #define OXYGEN_REC_B_ROUTE_I2S_ADC_2 0x00
  307. #define OXYGEN_REC_B_ROUTE_AC97_1 0x10
  308. #define OXYGEN_REC_C_ROUTE_MASK 0x20
  309. #define OXYGEN_REC_C_ROUTE_SPDIF 0x00
  310. #define OXYGEN_REC_C_ROUTE_I2S_ADC_3 0x20
  311. #define OXYGEN_ADC_MONITOR 0xc3
  312. #define OXYGEN_ADC_MONITOR_A 0x01
  313. #define OXYGEN_ADC_MONITOR_A_HALF_VOL 0x02
  314. #define OXYGEN_ADC_MONITOR_B 0x04
  315. #define OXYGEN_ADC_MONITOR_B_HALF_VOL 0x08
  316. #define OXYGEN_ADC_MONITOR_C 0x10
  317. #define OXYGEN_ADC_MONITOR_C_HALF_VOL 0x20
  318. #define OXYGEN_A_MONITOR_ROUTING 0xc4
  319. #define OXYGEN_A_MONITOR_ROUTE_0_MASK 0x03
  320. #define OXYGEN_A_MONITOR_ROUTE_0_SHIFT 0
  321. #define OXYGEN_A_MONITOR_ROUTE_1_MASK 0x0c
  322. #define OXYGEN_A_MONITOR_ROUTE_1_SHIFT 2
  323. #define OXYGEN_A_MONITOR_ROUTE_2_MASK 0x30
  324. #define OXYGEN_A_MONITOR_ROUTE_2_SHIFT 4
  325. #define OXYGEN_A_MONITOR_ROUTE_3_MASK 0xc0
  326. #define OXYGEN_A_MONITOR_ROUTE_3_SHIFT 6
  327. #define OXYGEN_AC97_CONTROL 0xd0
  328. #define OXYGEN_AC97_COLD_RESET 0x0001
  329. #define OXYGEN_AC97_SUSPENDED 0x0002 /* read */
  330. #define OXYGEN_AC97_RESUME 0x0002 /* write */
  331. #define OXYGEN_AC97_CLOCK_DISABLE 0x0004
  332. #define OXYGEN_AC97_NO_CODEC_0 0x0008
  333. #define OXYGEN_AC97_CODEC_0 0x0010
  334. #define OXYGEN_AC97_CODEC_1 0x0020
  335. #define OXYGEN_AC97_INTERRUPT_MASK 0xd2
  336. #define OXYGEN_AC97_INT_READ_DONE 0x01
  337. #define OXYGEN_AC97_INT_WRITE_DONE 0x02
  338. #define OXYGEN_AC97_INT_CODEC_0 0x10
  339. #define OXYGEN_AC97_INT_CODEC_1 0x20
  340. #define OXYGEN_AC97_INTERRUPT_STATUS 0xd3
  341. /* OXYGEN_AC97_INT_* */
  342. #define OXYGEN_AC97_OUT_CONFIG 0xd4
  343. #define OXYGEN_AC97_CODEC1_SLOT3 0x00000001
  344. #define OXYGEN_AC97_CODEC1_SLOT3_VSR 0x00000002
  345. #define OXYGEN_AC97_CODEC1_SLOT4 0x00000010
  346. #define OXYGEN_AC97_CODEC1_SLOT4_VSR 0x00000020
  347. #define OXYGEN_AC97_CODEC0_FRONTL 0x00000100
  348. #define OXYGEN_AC97_CODEC0_FRONTR 0x00000200
  349. #define OXYGEN_AC97_CODEC0_SIDEL 0x00000400
  350. #define OXYGEN_AC97_CODEC0_SIDER 0x00000800
  351. #define OXYGEN_AC97_CODEC0_CENTER 0x00001000
  352. #define OXYGEN_AC97_CODEC0_BASE 0x00002000
  353. #define OXYGEN_AC97_CODEC0_REARL 0x00004000
  354. #define OXYGEN_AC97_CODEC0_REARR 0x00008000
  355. #define OXYGEN_AC97_IN_CONFIG 0xd8
  356. #define OXYGEN_AC97_CODEC1_LINEL 0x00000001
  357. #define OXYGEN_AC97_CODEC1_LINEL_VSR 0x00000002
  358. #define OXYGEN_AC97_CODEC1_LINEL_16 0x00000000
  359. #define OXYGEN_AC97_CODEC1_LINEL_18 0x00000004
  360. #define OXYGEN_AC97_CODEC1_LINEL_20 0x00000008
  361. #define OXYGEN_AC97_CODEC1_LINER 0x00000010
  362. #define OXYGEN_AC97_CODEC1_LINER_VSR 0x00000020
  363. #define OXYGEN_AC97_CODEC1_LINER_16 0x00000000
  364. #define OXYGEN_AC97_CODEC1_LINER_18 0x00000040
  365. #define OXYGEN_AC97_CODEC1_LINER_20 0x00000080
  366. #define OXYGEN_AC97_CODEC0_LINEL 0x00000100
  367. #define OXYGEN_AC97_CODEC0_LINER 0x00000200
  368. #define OXYGEN_AC97_REGS 0xdc
  369. #define OXYGEN_AC97_REG_DATA_MASK 0x0000ffff
  370. #define OXYGEN_AC97_REG_ADDR_MASK 0x007f0000
  371. #define OXYGEN_AC97_REG_ADDR_SHIFT 16
  372. #define OXYGEN_AC97_REG_DIR_MASK 0x00800000
  373. #define OXYGEN_AC97_REG_DIR_WRITE 0x00000000
  374. #define OXYGEN_AC97_REG_DIR_READ 0x00800000
  375. #define OXYGEN_AC97_REG_CODEC_MASK 0x01000000
  376. #define OXYGEN_AC97_REG_CODEC_SHIFT 24
  377. #define OXYGEN_TEST 0xe0
  378. #define OXYGEN_TEST_RAM_SUCCEEDED 0x01
  379. #define OXYGEN_TEST_PLAYBACK_RAM 0x02
  380. #define OXYGEN_TEST_RECORD_RAM 0x04
  381. #define OXYGEN_TEST_PLL 0x08
  382. #define OXYGEN_TEST_2WIRE_LOOPBACK 0x10
  383. #define OXYGEN_DMA_FLUSH 0xe1
  384. /* OXYGEN_CHANNEL_* */
  385. #define OXYGEN_CODEC_VERSION 0xe4
  386. #define OXYGEN_CODEC_ID_MASK 0x07
  387. #define OXYGEN_REVISION 0xe6
  388. #define OXYGEN_PACKAGE_ID_MASK 0x0007
  389. #define OXYGEN_PACKAGE_ID_8786 0x0004
  390. #define OXYGEN_PACKAGE_ID_8787 0x0006
  391. #define OXYGEN_PACKAGE_ID_8788 0x0007
  392. #define OXYGEN_REVISION_MASK 0xfff8
  393. #define OXYGEN_REVISION_2 0x0008
  394. #define OXYGEN_OFFSIN_48K 0xe8
  395. #define OXYGEN_OFFSBASE_48K 0xe9
  396. #define OXYGEN_OFFSBASE_MASK 0x0fff
  397. #define OXYGEN_OFFSIN_44K 0xec
  398. #define OXYGEN_OFFSBASE_44K 0xed
  399. #endif