cx88-reg.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. /*
  2. cx88x-hw.h - CX2388x register offsets
  3. Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
  4. 2001 Michael Eskin
  5. 2002 Yurij Sysoev <yurij@naturesoft.net>
  6. 2003 Gerd Knorr <kraxel@bytesex.org>
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19. #ifndef _CX88_REG_H_
  20. #define _CX88_REG_H_
  21. /* ---------------------------------------------------------------------- */
  22. /* PCI IDs and config space */
  23. #ifndef PCI_VENDOR_ID_CONEXANT
  24. # define PCI_VENDOR_ID_CONEXANT 0x14F1
  25. #endif
  26. #ifndef PCI_DEVICE_ID_CX2300_VID
  27. # define PCI_DEVICE_ID_CX2300_VID 0x8800
  28. #endif
  29. #define CX88X_DEVCTRL 0x40
  30. #define CX88X_EN_TBFX 0x02
  31. #define CX88X_EN_VSFX 0x04
  32. /* ---------------------------------------------------------------------- */
  33. /* PCI controller registers */
  34. /* Command and Status Register */
  35. #define F0_CMD_STAT_MM 0x2f0004
  36. #define F1_CMD_STAT_MM 0x2f0104
  37. #define F2_CMD_STAT_MM 0x2f0204
  38. #define F3_CMD_STAT_MM 0x2f0304
  39. #define F4_CMD_STAT_MM 0x2f0404
  40. /* Device Control #1 */
  41. #define F0_DEV_CNTRL1_MM 0x2f0040
  42. #define F1_DEV_CNTRL1_MM 0x2f0140
  43. #define F2_DEV_CNTRL1_MM 0x2f0240
  44. #define F3_DEV_CNTRL1_MM 0x2f0340
  45. #define F4_DEV_CNTRL1_MM 0x2f0440
  46. /* Device Control #1 */
  47. #define F0_BAR0_MM 0x2f0010
  48. #define F1_BAR0_MM 0x2f0110
  49. #define F2_BAR0_MM 0x2f0210
  50. #define F3_BAR0_MM 0x2f0310
  51. #define F4_BAR0_MM 0x2f0410
  52. /* ---------------------------------------------------------------------- */
  53. /* DMA Controller registers */
  54. #define MO_PDMA_STHRSH 0x200000 // Source threshold
  55. #define MO_PDMA_STADRS 0x200004 // Source target address
  56. #define MO_PDMA_SIADRS 0x200008 // Source internal address
  57. #define MO_PDMA_SCNTRL 0x20000C // Source control
  58. #define MO_PDMA_DTHRSH 0x200010 // Destination threshold
  59. #define MO_PDMA_DTADRS 0x200014 // Destination target address
  60. #define MO_PDMA_DIADRS 0x200018 // Destination internal address
  61. #define MO_PDMA_DCNTRL 0x20001C // Destination control
  62. #define MO_LD_SSID 0x200030 // Load subsystem ID
  63. #define MO_DEV_CNTRL2 0x200034 // Device control
  64. #define MO_PCI_INTMSK 0x200040 // PCI interrupt mask
  65. #define MO_PCI_INTSTAT 0x200044 // PCI interrupt status
  66. #define MO_PCI_INTMSTAT 0x200048 // PCI interrupt masked status
  67. #define MO_VID_INTMSK 0x200050 // Video interrupt mask
  68. #define MO_VID_INTSTAT 0x200054 // Video interrupt status
  69. #define MO_VID_INTMSTAT 0x200058 // Video interrupt masked status
  70. #define MO_VID_INTSSTAT 0x20005C // Video interrupt set status
  71. #define MO_AUD_INTMSK 0x200060 // Audio interrupt mask
  72. #define MO_AUD_INTSTAT 0x200064 // Audio interrupt status
  73. #define MO_AUD_INTMSTAT 0x200068 // Audio interrupt masked status
  74. #define MO_AUD_INTSSTAT 0x20006C // Audio interrupt set status
  75. #define MO_TS_INTMSK 0x200070 // Transport stream interrupt mask
  76. #define MO_TS_INTSTAT 0x200074 // Transport stream interrupt status
  77. #define MO_TS_INTMSTAT 0x200078 // Transport stream interrupt mask status
  78. #define MO_TS_INTSSTAT 0x20007C // Transport stream interrupt set status
  79. #define MO_VIP_INTMSK 0x200080 // VIP interrupt mask
  80. #define MO_VIP_INTSTAT 0x200084 // VIP interrupt status
  81. #define MO_VIP_INTMSTAT 0x200088 // VIP interrupt masked status
  82. #define MO_VIP_INTSSTAT 0x20008C // VIP interrupt set status
  83. #define MO_GPHST_INTMSK 0x200090 // Host interrupt mask
  84. #define MO_GPHST_INTSTAT 0x200094 // Host interrupt status
  85. #define MO_GPHST_INTMSTAT 0x200098 // Host interrupt masked status
  86. #define MO_GPHST_INTSSTAT 0x20009C // Host interrupt set status
  87. // DMA Channels 1-6 belong to SPIPE
  88. #define MO_DMA7_PTR1 0x300018 // {24}RW* DMA Current Ptr : Ch#7
  89. #define MO_DMA8_PTR1 0x30001C // {24}RW* DMA Current Ptr : Ch#8
  90. // DMA Channels 9-20 belong to SPIPE
  91. #define MO_DMA21_PTR1 0x300080 // {24}R0* DMA Current Ptr : Ch#21
  92. #define MO_DMA22_PTR1 0x300084 // {24}R0* DMA Current Ptr : Ch#22
  93. #define MO_DMA23_PTR1 0x300088 // {24}R0* DMA Current Ptr : Ch#23
  94. #define MO_DMA24_PTR1 0x30008C // {24}R0* DMA Current Ptr : Ch#24
  95. #define MO_DMA25_PTR1 0x300090 // {24}R0* DMA Current Ptr : Ch#25
  96. #define MO_DMA26_PTR1 0x300094 // {24}R0* DMA Current Ptr : Ch#26
  97. #define MO_DMA27_PTR1 0x300098 // {24}R0* DMA Current Ptr : Ch#27
  98. #define MO_DMA28_PTR1 0x30009C // {24}R0* DMA Current Ptr : Ch#28
  99. #define MO_DMA29_PTR1 0x3000A0 // {24}R0* DMA Current Ptr : Ch#29
  100. #define MO_DMA30_PTR1 0x3000A4 // {24}R0* DMA Current Ptr : Ch#30
  101. #define MO_DMA31_PTR1 0x3000A8 // {24}R0* DMA Current Ptr : Ch#31
  102. #define MO_DMA32_PTR1 0x3000AC // {24}R0* DMA Current Ptr : Ch#32
  103. #define MO_DMA21_PTR2 0x3000C0 // {24}RW* DMA Tab Ptr : Ch#21
  104. #define MO_DMA22_PTR2 0x3000C4 // {24}RW* DMA Tab Ptr : Ch#22
  105. #define MO_DMA23_PTR2 0x3000C8 // {24}RW* DMA Tab Ptr : Ch#23
  106. #define MO_DMA24_PTR2 0x3000CC // {24}RW* DMA Tab Ptr : Ch#24
  107. #define MO_DMA25_PTR2 0x3000D0 // {24}RW* DMA Tab Ptr : Ch#25
  108. #define MO_DMA26_PTR2 0x3000D4 // {24}RW* DMA Tab Ptr : Ch#26
  109. #define MO_DMA27_PTR2 0x3000D8 // {24}RW* DMA Tab Ptr : Ch#27
  110. #define MO_DMA28_PTR2 0x3000DC // {24}RW* DMA Tab Ptr : Ch#28
  111. #define MO_DMA29_PTR2 0x3000E0 // {24}RW* DMA Tab Ptr : Ch#29
  112. #define MO_DMA30_PTR2 0x3000E4 // {24}RW* DMA Tab Ptr : Ch#30
  113. #define MO_DMA31_PTR2 0x3000E8 // {24}RW* DMA Tab Ptr : Ch#31
  114. #define MO_DMA32_PTR2 0x3000EC // {24}RW* DMA Tab Ptr : Ch#32
  115. #define MO_DMA21_CNT1 0x300100 // {11}RW* DMA Buffer Size : Ch#21
  116. #define MO_DMA22_CNT1 0x300104 // {11}RW* DMA Buffer Size : Ch#22
  117. #define MO_DMA23_CNT1 0x300108 // {11}RW* DMA Buffer Size : Ch#23
  118. #define MO_DMA24_CNT1 0x30010C // {11}RW* DMA Buffer Size : Ch#24
  119. #define MO_DMA25_CNT1 0x300110 // {11}RW* DMA Buffer Size : Ch#25
  120. #define MO_DMA26_CNT1 0x300114 // {11}RW* DMA Buffer Size : Ch#26
  121. #define MO_DMA27_CNT1 0x300118 // {11}RW* DMA Buffer Size : Ch#27
  122. #define MO_DMA28_CNT1 0x30011C // {11}RW* DMA Buffer Size : Ch#28
  123. #define MO_DMA29_CNT1 0x300120 // {11}RW* DMA Buffer Size : Ch#29
  124. #define MO_DMA30_CNT1 0x300124 // {11}RW* DMA Buffer Size : Ch#30
  125. #define MO_DMA31_CNT1 0x300128 // {11}RW* DMA Buffer Size : Ch#31
  126. #define MO_DMA32_CNT1 0x30012C // {11}RW* DMA Buffer Size : Ch#32
  127. #define MO_DMA21_CNT2 0x300140 // {11}RW* DMA Table Size : Ch#21
  128. #define MO_DMA22_CNT2 0x300144 // {11}RW* DMA Table Size : Ch#22
  129. #define MO_DMA23_CNT2 0x300148 // {11}RW* DMA Table Size : Ch#23
  130. #define MO_DMA24_CNT2 0x30014C // {11}RW* DMA Table Size : Ch#24
  131. #define MO_DMA25_CNT2 0x300150 // {11}RW* DMA Table Size : Ch#25
  132. #define MO_DMA26_CNT2 0x300154 // {11}RW* DMA Table Size : Ch#26
  133. #define MO_DMA27_CNT2 0x300158 // {11}RW* DMA Table Size : Ch#27
  134. #define MO_DMA28_CNT2 0x30015C // {11}RW* DMA Table Size : Ch#28
  135. #define MO_DMA29_CNT2 0x300160 // {11}RW* DMA Table Size : Ch#29
  136. #define MO_DMA30_CNT2 0x300164 // {11}RW* DMA Table Size : Ch#30
  137. #define MO_DMA31_CNT2 0x300168 // {11}RW* DMA Table Size : Ch#31
  138. #define MO_DMA32_CNT2 0x30016C // {11}RW* DMA Table Size : Ch#32
  139. /* ---------------------------------------------------------------------- */
  140. /* Video registers */
  141. #define MO_VIDY_DMA 0x310000 // {64}RWp Video Y
  142. #define MO_VIDU_DMA 0x310008 // {64}RWp Video U
  143. #define MO_VIDV_DMA 0x310010 // {64}RWp Video V
  144. #define MO_VBI_DMA 0x310018 // {64}RWp VBI (Vertical blanking interval)
  145. #define MO_DEVICE_STATUS 0x310100
  146. #define MO_INPUT_FORMAT 0x310104
  147. #define MO_AGC_BURST 0x31010c
  148. #define MO_CONTR_BRIGHT 0x310110
  149. #define MO_UV_SATURATION 0x310114
  150. #define MO_HUE 0x310118
  151. #define MO_HTOTAL 0x310120
  152. #define MO_HDELAY_EVEN 0x310124
  153. #define MO_HDELAY_ODD 0x310128
  154. #define MO_VDELAY_ODD 0x31012c
  155. #define MO_VDELAY_EVEN 0x310130
  156. #define MO_HACTIVE_EVEN 0x31013c
  157. #define MO_HACTIVE_ODD 0x310140
  158. #define MO_VACTIVE_EVEN 0x310144
  159. #define MO_VACTIVE_ODD 0x310148
  160. #define MO_HSCALE_EVEN 0x31014c
  161. #define MO_HSCALE_ODD 0x310150
  162. #define MO_VSCALE_EVEN 0x310154
  163. #define MO_FILTER_EVEN 0x31015c
  164. #define MO_VSCALE_ODD 0x310158
  165. #define MO_FILTER_ODD 0x310160
  166. #define MO_OUTPUT_FORMAT 0x310164
  167. #define MO_PLL_REG 0x310168 // PLL register
  168. #define MO_PLL_ADJ_CTRL 0x31016c // PLL adjust control register
  169. #define MO_SCONV_REG 0x310170 // sample rate conversion register
  170. #define MO_SCONV_FIFO 0x310174 // sample rate conversion fifo
  171. #define MO_SUB_STEP 0x310178 // subcarrier step size
  172. #define MO_SUB_STEP_DR 0x31017c // subcarrier step size for DR line
  173. #define MO_CAPTURE_CTRL 0x310180 // capture control
  174. #define MO_COLOR_CTRL 0x310184
  175. #define MO_VBI_PACKET 0x310188 // vbi packet size / delay
  176. #define MO_FIELD_COUNT 0x310190 // field counter
  177. #define MO_VIP_CONFIG 0x310194
  178. #define MO_VBOS_CONTROL 0x3101a8
  179. #define MO_AGC_BACK_VBI 0x310200
  180. #define MO_AGC_SYNC_TIP1 0x310208
  181. #define MO_VIDY_GPCNT 0x31C020 // {16}RO Video Y general purpose counter
  182. #define MO_VIDU_GPCNT 0x31C024 // {16}RO Video U general purpose counter
  183. #define MO_VIDV_GPCNT 0x31C028 // {16}RO Video V general purpose counter
  184. #define MO_VBI_GPCNT 0x31C02C // {16}RO VBI general purpose counter
  185. #define MO_VIDY_GPCNTRL 0x31C030 // {2}WO Video Y general purpose control
  186. #define MO_VIDU_GPCNTRL 0x31C034 // {2}WO Video U general purpose control
  187. #define MO_VIDV_GPCNTRL 0x31C038 // {2}WO Video V general purpose control
  188. #define MO_VBI_GPCNTRL 0x31C03C // {2}WO VBI general purpose counter
  189. #define MO_VID_DMACNTRL 0x31C040 // {8}RW Video DMA control
  190. #define MO_VID_XFR_STAT 0x31C044 // {1}RO Video transfer status
  191. /* ---------------------------------------------------------------------- */
  192. /* audio registers */
  193. #define MO_AUDD_DMA 0x320000 // {64}RWp Audio downstream
  194. #define MO_AUDU_DMA 0x320008 // {64}RWp Audio upstream
  195. #define MO_AUDR_DMA 0x320010 // {64}RWp Audio RDS (downstream)
  196. #define MO_AUDD_GPCNT 0x32C020 // {16}RO Audio down general purpose counter
  197. #define MO_AUDU_GPCNT 0x32C024 // {16}RO Audio up general purpose counter
  198. #define MO_AUDR_GPCNT 0x32C028 // {16}RO Audio RDS general purpose counter
  199. #define MO_AUDD_GPCNTRL 0x32C030 // {2}WO Audio down general purpose control
  200. #define MO_AUDU_GPCNTRL 0x32C034 // {2}WO Audio up general purpose control
  201. #define MO_AUDR_GPCNTRL 0x32C038 // {2}WO Audio RDS general purpose control
  202. #define MO_AUD_DMACNTRL 0x32C040 // {6}RW Audio DMA control
  203. #define MO_AUD_XFR_STAT 0x32C044 // {1}RO Audio transfer status
  204. #define MO_AUDD_LNGTH 0x32C048 // {12}RW Audio down line length
  205. #define MO_AUDR_LNGTH 0x32C04C // {12}RW Audio RDS line length
  206. #define AUD_INIT 0x320100
  207. #define AUD_INIT_LD 0x320104
  208. #define AUD_SOFT_RESET 0x320108
  209. #define AUD_I2SINPUTCNTL 0x320120
  210. #define AUD_BAUDRATE 0x320124
  211. #define AUD_I2SOUTPUTCNTL 0x320128
  212. #define AAGC_HYST 0x320134
  213. #define AAGC_GAIN 0x320138
  214. #define AAGC_DEF 0x32013c
  215. #define AUD_IIR1_0_SEL 0x320150
  216. #define AUD_IIR1_0_SHIFT 0x320154
  217. #define AUD_IIR1_1_SEL 0x320158
  218. #define AUD_IIR1_1_SHIFT 0x32015c
  219. #define AUD_IIR1_2_SEL 0x320160
  220. #define AUD_IIR1_2_SHIFT 0x320164
  221. #define AUD_IIR1_3_SEL 0x320168
  222. #define AUD_IIR1_3_SHIFT 0x32016c
  223. #define AUD_IIR1_4_SEL 0x320170
  224. #define AUD_IIR1_4_SHIFT 0x32017c
  225. #define AUD_IIR1_5_SEL 0x320180
  226. #define AUD_IIR1_5_SHIFT 0x320184
  227. #define AUD_IIR2_0_SEL 0x320190
  228. #define AUD_IIR2_0_SHIFT 0x320194
  229. #define AUD_IIR2_1_SEL 0x320198
  230. #define AUD_IIR2_1_SHIFT 0x32019c
  231. #define AUD_IIR2_2_SEL 0x3201a0
  232. #define AUD_IIR2_2_SHIFT 0x3201a4
  233. #define AUD_IIR2_3_SEL 0x3201a8
  234. #define AUD_IIR2_3_SHIFT 0x3201ac
  235. #define AUD_IIR3_0_SEL 0x3201c0
  236. #define AUD_IIR3_0_SHIFT 0x3201c4
  237. #define AUD_IIR3_1_SEL 0x3201c8
  238. #define AUD_IIR3_1_SHIFT 0x3201cc
  239. #define AUD_IIR3_2_SEL 0x3201d0
  240. #define AUD_IIR3_2_SHIFT 0x3201d4
  241. #define AUD_IIR4_0_SEL 0x3201e0
  242. #define AUD_IIR4_0_SHIFT 0x3201e4
  243. #define AUD_IIR4_1_SEL 0x3201e8
  244. #define AUD_IIR4_1_SHIFT 0x3201ec
  245. #define AUD_IIR4_2_SEL 0x3201f0
  246. #define AUD_IIR4_2_SHIFT 0x3201f4
  247. #define AUD_IIR4_0_CA0 0x320200
  248. #define AUD_IIR4_0_CA1 0x320204
  249. #define AUD_IIR4_0_CA2 0x320208
  250. #define AUD_IIR4_0_CB0 0x32020c
  251. #define AUD_IIR4_0_CB1 0x320210
  252. #define AUD_IIR4_1_CA0 0x320214
  253. #define AUD_IIR4_1_CA1 0x320218
  254. #define AUD_IIR4_1_CA2 0x32021c
  255. #define AUD_IIR4_1_CB0 0x320220
  256. #define AUD_IIR4_1_CB1 0x320224
  257. #define AUD_IIR4_2_CA0 0x320228
  258. #define AUD_IIR4_2_CA1 0x32022c
  259. #define AUD_IIR4_2_CA2 0x320230
  260. #define AUD_IIR4_2_CB0 0x320234
  261. #define AUD_IIR4_2_CB1 0x320238
  262. #define AUD_HP_MD_IIR4_1 0x320250
  263. #define AUD_HP_PROG_IIR4_1 0x320254
  264. #define AUD_FM_MODE_ENABLE 0x320258
  265. #define AUD_POLY0_DDS_CONSTANT 0x320270
  266. #define AUD_DN0_FREQ 0x320274
  267. #define AUD_DN1_FREQ 0x320278
  268. #define AUD_DN1_FREQ_SHIFT 0x32027c
  269. #define AUD_DN1_AFC 0x320280
  270. #define AUD_DN1_SRC_SEL 0x320284
  271. #define AUD_DN1_SHFT 0x320288
  272. #define AUD_DN2_FREQ 0x32028c
  273. #define AUD_DN2_FREQ_SHIFT 0x320290
  274. #define AUD_DN2_AFC 0x320294
  275. #define AUD_DN2_SRC_SEL 0x320298
  276. #define AUD_DN2_SHFT 0x32029c
  277. #define AUD_CRDC0_SRC_SEL 0x320300
  278. #define AUD_CRDC0_SHIFT 0x320304
  279. #define AUD_CORDIC_SHIFT_0 0x320308
  280. #define AUD_CRDC1_SRC_SEL 0x32030c
  281. #define AUD_CRDC1_SHIFT 0x320310
  282. #define AUD_CORDIC_SHIFT_1 0x320314
  283. #define AUD_DCOC_0_SRC 0x320320
  284. #define AUD_DCOC0_SHIFT 0x320324
  285. #define AUD_DCOC_0_SHIFT_IN0 0x320328
  286. #define AUD_DCOC_0_SHIFT_IN1 0x32032c
  287. #define AUD_DCOC_1_SRC 0x320330
  288. #define AUD_DCOC1_SHIFT 0x320334
  289. #define AUD_DCOC_1_SHIFT_IN0 0x320338
  290. #define AUD_DCOC_1_SHIFT_IN1 0x32033c
  291. #define AUD_DCOC_2_SRC 0x320340
  292. #define AUD_DCOC2_SHIFT 0x320344
  293. #define AUD_DCOC_2_SHIFT_IN0 0x320348
  294. #define AUD_DCOC_2_SHIFT_IN1 0x32034c
  295. #define AUD_DCOC_PASS_IN 0x320350
  296. #define AUD_PDET_SRC 0x320370
  297. #define AUD_PDET_SHIFT 0x320374
  298. #define AUD_PILOT_BQD_1_K0 0x320380
  299. #define AUD_PILOT_BQD_1_K1 0x320384
  300. #define AUD_PILOT_BQD_1_K2 0x320388
  301. #define AUD_PILOT_BQD_1_K3 0x32038c
  302. #define AUD_PILOT_BQD_1_K4 0x320390
  303. #define AUD_PILOT_BQD_2_K0 0x320394
  304. #define AUD_PILOT_BQD_2_K1 0x320398
  305. #define AUD_PILOT_BQD_2_K2 0x32039c
  306. #define AUD_PILOT_BQD_2_K3 0x3203a0
  307. #define AUD_PILOT_BQD_2_K4 0x3203a4
  308. #define AUD_THR_FR 0x3203c0
  309. #define AUD_X_PROG 0x3203c4
  310. #define AUD_Y_PROG 0x3203c8
  311. #define AUD_HARMONIC_MULT 0x3203cc
  312. #define AUD_C1_UP_THR 0x3203d0
  313. #define AUD_C1_LO_THR 0x3203d4
  314. #define AUD_C2_UP_THR 0x3203d8
  315. #define AUD_C2_LO_THR 0x3203dc
  316. #define AUD_PLL_EN 0x320400
  317. #define AUD_PLL_SRC 0x320404
  318. #define AUD_PLL_SHIFT 0x320408
  319. #define AUD_PLL_IF_SEL 0x32040c
  320. #define AUD_PLL_IF_SHIFT 0x320410
  321. #define AUD_BIQUAD_PLL_K0 0x320414
  322. #define AUD_BIQUAD_PLL_K1 0x320418
  323. #define AUD_BIQUAD_PLL_K2 0x32041c
  324. #define AUD_BIQUAD_PLL_K3 0x320420
  325. #define AUD_BIQUAD_PLL_K4 0x320424
  326. #define AUD_DEEMPH0_SRC_SEL 0x320440
  327. #define AUD_DEEMPH0_SHIFT 0x320444
  328. #define AUD_DEEMPH0_G0 0x320448
  329. #define AUD_DEEMPH0_A0 0x32044c
  330. #define AUD_DEEMPH0_B0 0x320450
  331. #define AUD_DEEMPH0_A1 0x320454
  332. #define AUD_DEEMPH0_B1 0x320458
  333. #define AUD_DEEMPH1_SRC_SEL 0x32045c
  334. #define AUD_DEEMPH1_SHIFT 0x320460
  335. #define AUD_DEEMPH1_G0 0x320464
  336. #define AUD_DEEMPH1_A0 0x320468
  337. #define AUD_DEEMPH1_B0 0x32046c
  338. #define AUD_DEEMPH1_A1 0x320470
  339. #define AUD_DEEMPH1_B1 0x320474
  340. #define AUD_OUT0_SEL 0x320490
  341. #define AUD_OUT0_SHIFT 0x320494
  342. #define AUD_OUT1_SEL 0x320498
  343. #define AUD_OUT1_SHIFT 0x32049c
  344. #define AUD_RDSI_SEL 0x3204a0
  345. #define AUD_RDSI_SHIFT 0x3204a4
  346. #define AUD_RDSQ_SEL 0x3204a8
  347. #define AUD_RDSQ_SHIFT 0x3204ac
  348. #define AUD_DBX_IN_GAIN 0x320500
  349. #define AUD_DBX_WBE_GAIN 0x320504
  350. #define AUD_DBX_SE_GAIN 0x320508
  351. #define AUD_DBX_RMS_WBE 0x32050c
  352. #define AUD_DBX_RMS_SE 0x320510
  353. #define AUD_DBX_SE_BYPASS 0x320514
  354. #define AUD_FAWDETCTL 0x320530
  355. #define AUD_FAWDETWINCTL 0x320534
  356. #define AUD_DEEMPHGAIN_R 0x320538
  357. #define AUD_DEEMPHNUMER1_R 0x32053c
  358. #define AUD_DEEMPHNUMER2_R 0x320540
  359. #define AUD_DEEMPHDENOM1_R 0x320544
  360. #define AUD_DEEMPHDENOM2_R 0x320548
  361. #define AUD_ERRLOGPERIOD_R 0x32054c
  362. #define AUD_ERRINTRPTTHSHLD1_R 0x320550
  363. #define AUD_ERRINTRPTTHSHLD2_R 0x320554
  364. #define AUD_ERRINTRPTTHSHLD3_R 0x320558
  365. #define AUD_NICAM_STATUS1 0x32055c
  366. #define AUD_NICAM_STATUS2 0x320560
  367. #define AUD_ERRLOG1 0x320564
  368. #define AUD_ERRLOG2 0x320568
  369. #define AUD_ERRLOG3 0x32056c
  370. #define AUD_DAC_BYPASS_L 0x320580
  371. #define AUD_DAC_BYPASS_R 0x320584
  372. #define AUD_DAC_BYPASS_CTL 0x320588
  373. #define AUD_CTL 0x32058c
  374. #define AUD_STATUS 0x320590
  375. #define AUD_VOL_CTL 0x320594
  376. #define AUD_BAL_CTL 0x320598
  377. #define AUD_START_TIMER 0x3205b0
  378. #define AUD_MODE_CHG_TIMER 0x3205b4
  379. #define AUD_POLYPH80SCALEFAC 0x3205b8
  380. #define AUD_DMD_RA_DDS 0x3205bc
  381. #define AUD_I2S_RA_DDS 0x3205c0
  382. #define AUD_RATE_THRES_DMD 0x3205d0
  383. #define AUD_RATE_THRES_I2S 0x3205d4
  384. #define AUD_RATE_ADJ1 0x3205d8
  385. #define AUD_RATE_ADJ2 0x3205dc
  386. #define AUD_RATE_ADJ3 0x3205e0
  387. #define AUD_RATE_ADJ4 0x3205e4
  388. #define AUD_RATE_ADJ5 0x3205e8
  389. #define AUD_APB_IN_RATE_ADJ 0x3205ec
  390. #define AUD_I2SCNTL 0x3205ec
  391. #define AUD_PHASE_FIX_CTL 0x3205f0
  392. #define AUD_PLL_PRESCALE 0x320600
  393. #define AUD_PLL_DDS 0x320604
  394. #define AUD_PLL_INT 0x320608
  395. #define AUD_PLL_FRAC 0x32060c
  396. #define AUD_PLL_JTAG 0x320620
  397. #define AUD_PLL_SPMP 0x320624
  398. #define AUD_AFE_12DB_EN 0x320628
  399. // Audio QAM Register Addresses
  400. #define AUD_PDF_DDS_CNST_BYTE2 0x320d01
  401. #define AUD_PDF_DDS_CNST_BYTE1 0x320d02
  402. #define AUD_PDF_DDS_CNST_BYTE0 0x320d03
  403. #define AUD_PHACC_FREQ_8MSB 0x320d2a
  404. #define AUD_PHACC_FREQ_8LSB 0x320d2b
  405. #define AUD_QAM_MODE 0x320d04
  406. /* ---------------------------------------------------------------------- */
  407. /* transport stream registers */
  408. #define MO_TS_DMA 0x330000 // {64}RWp Transport stream downstream
  409. #define MO_TS_GPCNT 0x33C020 // {16}RO TS general purpose counter
  410. #define MO_TS_GPCNTRL 0x33C030 // {2}WO TS general purpose control
  411. #define MO_TS_DMACNTRL 0x33C040 // {6}RW TS DMA control
  412. #define MO_TS_XFR_STAT 0x33C044 // {1}RO TS transfer status
  413. #define MO_TS_LNGTH 0x33C048 // {12}RW TS line length
  414. #define TS_HW_SOP_CNTRL 0x33C04C
  415. #define TS_GEN_CNTRL 0x33C050
  416. #define TS_BD_PKT_STAT 0x33C054
  417. #define TS_SOP_STAT 0x33C058
  418. #define TS_FIFO_OVFL_STAT 0x33C05C
  419. #define TS_VALERR_CNTRL 0x33C060
  420. /* ---------------------------------------------------------------------- */
  421. /* VIP registers */
  422. #define MO_VIPD_DMA 0x340000 // {64}RWp VIP downstream
  423. #define MO_VIPU_DMA 0x340008 // {64}RWp VIP upstream
  424. #define MO_VIPD_GPCNT 0x34C020 // {16}RO VIP down general purpose counter
  425. #define MO_VIPU_GPCNT 0x34C024 // {16}RO VIP up general purpose counter
  426. #define MO_VIPD_GPCNTRL 0x34C030 // {2}WO VIP down general purpose control
  427. #define MO_VIPU_GPCNTRL 0x34C034 // {2}WO VIP up general purpose control
  428. #define MO_VIP_DMACNTRL 0x34C040 // {6}RW VIP DMA control
  429. #define MO_VIP_XFR_STAT 0x34C044 // {1}RO VIP transfer status
  430. #define MO_VIP_CFG 0x340048 // VIP configuration
  431. #define MO_VIPU_CNTRL 0x34004C // VIP upstream control #1
  432. #define MO_VIPD_CNTRL 0x340050 // VIP downstream control #2
  433. #define MO_VIPD_LNGTH 0x340054 // VIP downstream line length
  434. #define MO_VIP_BRSTLN 0x340058 // VIP burst length
  435. #define MO_VIP_INTCNTRL 0x34C05C // VIP Interrupt Control
  436. #define MO_VIP_XFTERM 0x340060 // VIP transfer terminate
  437. /* ---------------------------------------------------------------------- */
  438. /* misc registers */
  439. #define MO_M2M_DMA 0x350000 // {64}RWp Mem2Mem DMA Bfr
  440. #define MO_GP0_IO 0x350010 // {32}RW* GPIOoutput enablesdata I/O
  441. #define MO_GP1_IO 0x350014 // {32}RW* GPIOoutput enablesdata I/O
  442. #define MO_GP2_IO 0x350018 // {32}RW* GPIOoutput enablesdata I/O
  443. #define MO_GP3_IO 0x35001C // {32}RW* GPIO Mode/Ctrloutput enables
  444. #define MO_GPIO 0x350020 // {32}RW* GPIO I2C Ctrldata I/O
  445. #define MO_GPOE 0x350024 // {32}RW GPIO I2C Ctrloutput enables
  446. #define MO_GP_ISM 0x350028 // {16}WO GPIO Intr Sens/Pol
  447. #define MO_PLL_B 0x35C008 // {32}RW* PLL Control for ASB bus clks
  448. #define MO_M2M_CNT 0x35C024 // {32}RW Mem2Mem DMA Cnt
  449. #define MO_M2M_XSUM 0x35C028 // {32}RO M2M XOR-Checksum
  450. #define MO_CRC 0x35C02C // {16}RW CRC16 init/result
  451. #define MO_CRC_D 0x35C030 // {32}WO CRC16 new data in
  452. #define MO_TM_CNT_LDW 0x35C034 // {32}RO Timer : Counter low dword
  453. #define MO_TM_CNT_UW 0x35C038 // {16}RO Timer : Counter high word
  454. #define MO_TM_LMT_LDW 0x35C03C // {32}RW Timer : Limit low dword
  455. #define MO_TM_LMT_UW 0x35C040 // {32}RW Timer : Limit high word
  456. #define MO_PINMUX_IO 0x35C044 // {8}RW Pin Mux Control
  457. #define MO_TSTSEL_IO 0x35C048 // {2}RW Pin Mux Control
  458. #define MO_AFECFG_IO 0x35C04C // AFE configuration reg
  459. #define MO_DDS_IO 0x35C050 // DDS Increment reg
  460. #define MO_DDSCFG_IO 0x35C054 // DDS Configuration reg
  461. #define MO_SAMPLE_IO 0x35C058 // IRIn sample reg
  462. #define MO_SRST_IO 0x35C05C // Output system reset reg
  463. #define MO_INT1_MSK 0x35C060 // DMA RISC interrupt mask
  464. #define MO_INT1_STAT 0x35C064 // DMA RISC interrupt status
  465. #define MO_INT1_MSTAT 0x35C068 // DMA RISC interrupt masked status
  466. /* ---------------------------------------------------------------------- */
  467. /* i2c bus registers */
  468. #define MO_I2C 0x368000 // I2C data/control
  469. #define MO_I2C_DIV (0xf<<4)
  470. #define MO_I2C_SYNC (1<<3)
  471. #define MO_I2C_W3B (1<<2)
  472. #define MO_I2C_SCL (1<<1)
  473. #define MO_I2C_SDA (1<<0)
  474. /* ---------------------------------------------------------------------- */
  475. /* general purpose host registers */
  476. /* FIXME: tyops? s/0x35/0x38/ ?? */
  477. #define MO_GPHSTD_DMA 0x350000 // {64}RWp Host downstream
  478. #define MO_GPHSTU_DMA 0x350008 // {64}RWp Host upstream
  479. #define MO_GPHSTU_CNTRL 0x380048 // Host upstream control #1
  480. #define MO_GPHSTD_CNTRL 0x38004C // Host downstream control #2
  481. #define MO_GPHSTD_LNGTH 0x380050 // Host downstream line length
  482. #define MO_GPHST_WSC 0x380054 // Host wait state control
  483. #define MO_GPHST_XFR 0x380058 // Host transfer control
  484. #define MO_GPHST_WDTH 0x38005C // Host interface width
  485. #define MO_GPHST_HDSHK 0x380060 // Host peripheral handshake
  486. #define MO_GPHST_MUX16 0x380064 // Host muxed 16-bit transfer parameters
  487. #define MO_GPHST_MODE 0x380068 // Host mode select
  488. #define MO_GPHSTD_GPCNT 0x35C020 // Host down general purpose counter
  489. #define MO_GPHSTU_GPCNT 0x35C024 // Host up general purpose counter
  490. #define MO_GPHSTD_GPCNTRL 0x38C030 // Host down general purpose control
  491. #define MO_GPHSTU_GPCNTRL 0x38C034 // Host up general purpose control
  492. #define MO_GPHST_DMACNTRL 0x38C040 // Host DMA control
  493. #define MO_GPHST_XFR_STAT 0x38C044 // Host transfer status
  494. #define MO_GPHST_SOFT_RST 0x38C06C // Host software reset
  495. /* ---------------------------------------------------------------------- */
  496. /* RISC instructions */
  497. #define RISC_SYNC 0x80000000
  498. #define RISC_SYNC_ODD 0x80000000
  499. #define RISC_SYNC_EVEN 0x80000200
  500. #define RISC_RESYNC 0x80008000
  501. #define RISC_RESYNC_ODD 0x80008000
  502. #define RISC_RESYNC_EVEN 0x80008200
  503. #define RISC_WRITE 0x10000000
  504. #define RISC_WRITEC 0x50000000
  505. #define RISC_READ 0x90000000
  506. #define RISC_READC 0xA0000000
  507. #define RISC_JUMP 0x70000000
  508. #define RISC_SKIP 0x20000000
  509. #define RISC_WRITERM 0xB0000000
  510. #define RISC_WRITECM 0xC0000000
  511. #define RISC_WRITECR 0xD0000000
  512. #define RISC_IMM 0x00000001
  513. #define RISC_SOL 0x08000000
  514. #define RISC_EOL 0x04000000
  515. #define RISC_IRQ2 0x02000000
  516. #define RISC_IRQ1 0x01000000
  517. #define RISC_CNT_NONE 0x00000000
  518. #define RISC_CNT_INC 0x00010000
  519. #define RISC_CNT_RSVR 0x00020000
  520. #define RISC_CNT_RESET 0x00030000
  521. #define RISC_JMP_SRP 0x01
  522. /* ---------------------------------------------------------------------- */
  523. /* various constants */
  524. // DMA
  525. /* Interrupt mask/status */
  526. #define PCI_INT_VIDINT (1 << 0)
  527. #define PCI_INT_AUDINT (1 << 1)
  528. #define PCI_INT_TSINT (1 << 2)
  529. #define PCI_INT_VIPINT (1 << 3)
  530. #define PCI_INT_HSTINT (1 << 4)
  531. #define PCI_INT_TM1INT (1 << 5)
  532. #define PCI_INT_SRCDMAINT (1 << 6)
  533. #define PCI_INT_DSTDMAINT (1 << 7)
  534. #define PCI_INT_RISC_RD_BERRINT (1 << 10)
  535. #define PCI_INT_RISC_WR_BERRINT (1 << 11)
  536. #define PCI_INT_BRDG_BERRINT (1 << 12)
  537. #define PCI_INT_SRC_DMA_BERRINT (1 << 13)
  538. #define PCI_INT_DST_DMA_BERRINT (1 << 14)
  539. #define PCI_INT_IPB_DMA_BERRINT (1 << 15)
  540. #define PCI_INT_I2CDONE (1 << 16)
  541. #define PCI_INT_I2CRACK (1 << 17)
  542. #define PCI_INT_IR_SMPINT (1 << 18)
  543. #define PCI_INT_GPIO_INT0 (1 << 19)
  544. #define PCI_INT_GPIO_INT1 (1 << 20)
  545. #define SEL_BTSC 0x01
  546. #define SEL_EIAJ 0x02
  547. #define SEL_A2 0x04
  548. #define SEL_SAP 0x08
  549. #define SEL_NICAM 0x10
  550. #define SEL_FMRADIO 0x20
  551. // AUD_CTL
  552. #define AUD_INT_DN_RISCI1 (1 << 0)
  553. #define AUD_INT_UP_RISCI1 (1 << 1)
  554. #define AUD_INT_RDS_DN_RISCI1 (1 << 2)
  555. #define AUD_INT_DN_RISCI2 (1 << 4) /* yes, 3 is skipped */
  556. #define AUD_INT_UP_RISCI2 (1 << 5)
  557. #define AUD_INT_RDS_DN_RISCI2 (1 << 6)
  558. #define AUD_INT_DN_SYNC (1 << 12)
  559. #define AUD_INT_UP_SYNC (1 << 13)
  560. #define AUD_INT_RDS_DN_SYNC (1 << 14)
  561. #define AUD_INT_OPC_ERR (1 << 16)
  562. #define AUD_INT_BER_IRQ (1 << 20)
  563. #define AUD_INT_MCHG_IRQ (1 << 21)
  564. #define EN_BTSC_FORCE_MONO 0
  565. #define EN_BTSC_FORCE_STEREO 1
  566. #define EN_BTSC_FORCE_SAP 2
  567. #define EN_BTSC_AUTO_STEREO 3
  568. #define EN_BTSC_AUTO_SAP 4
  569. #define EN_A2_FORCE_MONO1 8
  570. #define EN_A2_FORCE_MONO2 9
  571. #define EN_A2_FORCE_STEREO 10
  572. #define EN_A2_AUTO_MONO2 11
  573. #define EN_A2_AUTO_STEREO 12
  574. #define EN_EIAJ_FORCE_MONO1 16
  575. #define EN_EIAJ_FORCE_MONO2 17
  576. #define EN_EIAJ_FORCE_STEREO 18
  577. #define EN_EIAJ_AUTO_MONO2 19
  578. #define EN_EIAJ_AUTO_STEREO 20
  579. #define EN_NICAM_FORCE_MONO1 32
  580. #define EN_NICAM_FORCE_MONO2 33
  581. #define EN_NICAM_FORCE_STEREO 34
  582. #define EN_NICAM_AUTO_MONO2 35
  583. #define EN_NICAM_AUTO_STEREO 36
  584. #define EN_FMRADIO_FORCE_MONO 24
  585. #define EN_FMRADIO_FORCE_STEREO 25
  586. #define EN_FMRADIO_AUTO_STEREO 26
  587. #define EN_NICAM_AUTO_FALLBACK 0x00000040
  588. #define EN_FMRADIO_EN_RDS 0x00000200
  589. #define EN_NICAM_TRY_AGAIN_BIT 0x00000400
  590. #define EN_DAC_ENABLE 0x00001000
  591. #define EN_I2SOUT_ENABLE 0x00002000
  592. #define EN_I2SIN_STR2DAC 0x00004000
  593. #define EN_I2SIN_ENABLE 0x00008000
  594. #define EN_DMTRX_SUMDIFF (0 << 7)
  595. #define EN_DMTRX_SUMR (1 << 7)
  596. #define EN_DMTRX_LR (2 << 7)
  597. #define EN_DMTRX_MONO (3 << 7)
  598. #define EN_DMTRX_BYPASS (1 << 11)
  599. // Video
  600. #define VID_CAPTURE_CONTROL 0x310180
  601. #define CX23880_CAP_CTL_CAPTURE_VBI_ODD (1<<3)
  602. #define CX23880_CAP_CTL_CAPTURE_VBI_EVEN (1<<2)
  603. #define CX23880_CAP_CTL_CAPTURE_ODD (1<<1)
  604. #define CX23880_CAP_CTL_CAPTURE_EVEN (1<<0)
  605. #define VideoInputMux0 0x0
  606. #define VideoInputMux1 0x1
  607. #define VideoInputMux2 0x2
  608. #define VideoInputMux3 0x3
  609. #define VideoInputTuner 0x0
  610. #define VideoInputComposite 0x1
  611. #define VideoInputSVideo 0x2
  612. #define VideoInputOther 0x3
  613. #define Xtal0 0x1
  614. #define Xtal1 0x2
  615. #define XtalAuto 0x3
  616. #define VideoFormatAuto 0x0
  617. #define VideoFormatNTSC 0x1
  618. #define VideoFormatNTSCJapan 0x2
  619. #define VideoFormatNTSC443 0x3
  620. #define VideoFormatPAL 0x4
  621. #define VideoFormatPALB 0x4
  622. #define VideoFormatPALD 0x4
  623. #define VideoFormatPALG 0x4
  624. #define VideoFormatPALH 0x4
  625. #define VideoFormatPALI 0x4
  626. #define VideoFormatPALBDGHI 0x4
  627. #define VideoFormatPALM 0x5
  628. #define VideoFormatPALN 0x6
  629. #define VideoFormatPALNC 0x7
  630. #define VideoFormatPAL60 0x8
  631. #define VideoFormatSECAM 0x9
  632. #define VideoFormatAuto27MHz 0x10
  633. #define VideoFormatNTSC27MHz 0x11
  634. #define VideoFormatNTSCJapan27MHz 0x12
  635. #define VideoFormatNTSC44327MHz 0x13
  636. #define VideoFormatPAL27MHz 0x14
  637. #define VideoFormatPALB27MHz 0x14
  638. #define VideoFormatPALD27MHz 0x14
  639. #define VideoFormatPALG27MHz 0x14
  640. #define VideoFormatPALH27MHz 0x14
  641. #define VideoFormatPALI27MHz 0x14
  642. #define VideoFormatPALBDGHI27MHz 0x14
  643. #define VideoFormatPALM27MHz 0x15
  644. #define VideoFormatPALN27MHz 0x16
  645. #define VideoFormatPALNC27MHz 0x17
  646. #define VideoFormatPAL6027MHz 0x18
  647. #define VideoFormatSECAM27MHz 0x19
  648. #define NominalUSECAM 0x87
  649. #define NominalVSECAM 0x85
  650. #define NominalUNTSC 0xFE
  651. #define NominalVNTSC 0xB4
  652. #define NominalContrast 0xD8
  653. #define HFilterAutoFormat 0x0
  654. #define HFilterCIF 0x1
  655. #define HFilterQCIF 0x2
  656. #define HFilterICON 0x3
  657. #define VFilter2TapInterpolate 0
  658. #define VFilter3TapInterpolate 1
  659. #define VFilter4TapInterpolate 2
  660. #define VFilter5TapInterpolate 3
  661. #define VFilter2TapNoInterpolate 4
  662. #define VFilter3TapNoInterpolate 5
  663. #define VFilter4TapNoInterpolate 6
  664. #define VFilter5TapNoInterpolate 7
  665. #define ColorFormatRGB32 0x0000
  666. #define ColorFormatRGB24 0x0011
  667. #define ColorFormatRGB16 0x0022
  668. #define ColorFormatRGB15 0x0033
  669. #define ColorFormatYUY2 0x0044
  670. #define ColorFormatBTYUV 0x0055
  671. #define ColorFormatY8 0x0066
  672. #define ColorFormatRGB8 0x0077
  673. #define ColorFormatPL422 0x0088
  674. #define ColorFormatPL411 0x0099
  675. #define ColorFormatYUV12 0x00AA
  676. #define ColorFormatYUV9 0x00BB
  677. #define ColorFormatRAW 0x00EE
  678. #define ColorFormatBSWAP 0x0300
  679. #define ColorFormatWSWAP 0x0c00
  680. #define ColorFormatEvenMask 0x050f
  681. #define ColorFormatOddMask 0x0af0
  682. #define ColorFormatGamma 0x1000
  683. #define Interlaced 0x1
  684. #define NonInterlaced 0x0
  685. #define FieldEven 0x1
  686. #define FieldOdd 0x0
  687. #define TGReadWriteMode 0x0
  688. #define TGEnableMode 0x1
  689. #define DV_CbAlign 0x0
  690. #define DV_Y0Align 0x1
  691. #define DV_CrAlign 0x2
  692. #define DV_Y1Align 0x3
  693. #define DVF_Analog 0x0
  694. #define DVF_CCIR656 0x1
  695. #define DVF_ByteStream 0x2
  696. #define DVF_ExtVSYNC 0x4
  697. #define DVF_ExtField 0x5
  698. #define CHANNEL_VID_Y 0x1
  699. #define CHANNEL_VID_U 0x2
  700. #define CHANNEL_VID_V 0x3
  701. #define CHANNEL_VID_VBI 0x4
  702. #define CHANNEL_AUD_DN 0x5
  703. #define CHANNEL_AUD_UP 0x6
  704. #define CHANNEL_AUD_RDS_DN 0x7
  705. #define CHANNEL_MPEG_DN 0x8
  706. #define CHANNEL_VIP_DN 0x9
  707. #define CHANNEL_VIP_UP 0xA
  708. #define CHANNEL_HOST_DN 0xB
  709. #define CHANNEL_HOST_UP 0xC
  710. #define CHANNEL_FIRST 0x1
  711. #define CHANNEL_LAST 0xC
  712. #define GP_COUNT_CONTROL_NONE 0x0
  713. #define GP_COUNT_CONTROL_INC 0x1
  714. #define GP_COUNT_CONTROL_RESERVED 0x2
  715. #define GP_COUNT_CONTROL_RESET 0x3
  716. #define PLL_PRESCALE_BY_2 2
  717. #define PLL_PRESCALE_BY_3 3
  718. #define PLL_PRESCALE_BY_4 4
  719. #define PLL_PRESCALE_BY_5 5
  720. #define HLNotchFilter4xFsc 0
  721. #define HLNotchFilterSquare 1
  722. #define HLNotchFilter135NTSC 2
  723. #define HLNotchFilter135PAL 3
  724. #define NTSC_8x_SUB_CARRIER 28.63636E6
  725. #define PAL_8x_SUB_CARRIER 35.46895E6
  726. // Default analog settings
  727. #define DEFAULT_HUE_NTSC 0x00
  728. #define DEFAULT_BRIGHTNESS_NTSC 0x00
  729. #define DEFAULT_CONTRAST_NTSC 0x39
  730. #define DEFAULT_SAT_U_NTSC 0x7F
  731. #define DEFAULT_SAT_V_NTSC 0x5A
  732. typedef enum
  733. {
  734. SOURCE_TUNER = 0,
  735. SOURCE_COMPOSITE,
  736. SOURCE_SVIDEO,
  737. SOURCE_OTHER1,
  738. SOURCE_OTHER2,
  739. SOURCE_COMPVIASVIDEO,
  740. SOURCE_CCIR656
  741. } VIDEOSOURCETYPE;
  742. #endif /* _CX88_REG_H_ */