dib3000mb_priv.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. /*
  2. * dib3000mb_priv.h
  3. *
  4. * Copyright (C) 2004 Patrick Boettcher (patrick.boettcher@desy.de)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation, version 2.
  9. *
  10. * for more information see dib3000mb.c .
  11. */
  12. #ifndef __DIB3000MB_PRIV_H_INCLUDED__
  13. #define __DIB3000MB_PRIV_H_INCLUDED__
  14. /* info and err, taken from usb.h, if there is anything available like by default. */
  15. #define err(format, arg...) printk(KERN_ERR "dib3000: " format "\n" , ## arg)
  16. #define info(format, arg...) printk(KERN_INFO "dib3000: " format "\n" , ## arg)
  17. #define warn(format, arg...) printk(KERN_WARNING "dib3000: " format "\n" , ## arg)
  18. /* handy shortcuts */
  19. #define rd(reg) dib3000_read_reg(state,reg)
  20. #define wr(reg,val) if (dib3000_write_reg(state,reg,val)) \
  21. { err("while sending 0x%04x to 0x%04x.",val,reg); return -EREMOTEIO; }
  22. #define wr_foreach(a,v) { int i; \
  23. if (sizeof(a) != sizeof(v)) \
  24. err("sizeof: %zu %zu is different",sizeof(a),sizeof(v));\
  25. for (i=0; i < sizeof(a)/sizeof(u16); i++) \
  26. wr(a[i],v[i]); \
  27. }
  28. #define set_or(reg,val) wr(reg,rd(reg) | val)
  29. #define set_and(reg,val) wr(reg,rd(reg) & val)
  30. /* debug */
  31. #ifdef CONFIG_DVB_DIBCOM_DEBUG
  32. #define dprintk(level,args...) \
  33. do { if ((debug & level)) { printk(args); } } while (0)
  34. #else
  35. #define dprintk(args...) do { } while (0)
  36. #endif
  37. /* mask for enabling a specific pid for the pid_filter */
  38. #define DIB3000_ACTIVATE_PID_FILTERING (0x2000)
  39. /* common values for tuning */
  40. #define DIB3000_ALPHA_0 ( 0)
  41. #define DIB3000_ALPHA_1 ( 1)
  42. #define DIB3000_ALPHA_2 ( 2)
  43. #define DIB3000_ALPHA_4 ( 4)
  44. #define DIB3000_CONSTELLATION_QPSK ( 0)
  45. #define DIB3000_CONSTELLATION_16QAM ( 1)
  46. #define DIB3000_CONSTELLATION_64QAM ( 2)
  47. #define DIB3000_GUARD_TIME_1_32 ( 0)
  48. #define DIB3000_GUARD_TIME_1_16 ( 1)
  49. #define DIB3000_GUARD_TIME_1_8 ( 2)
  50. #define DIB3000_GUARD_TIME_1_4 ( 3)
  51. #define DIB3000_TRANSMISSION_MODE_2K ( 0)
  52. #define DIB3000_TRANSMISSION_MODE_8K ( 1)
  53. #define DIB3000_SELECT_LP ( 0)
  54. #define DIB3000_SELECT_HP ( 1)
  55. #define DIB3000_FEC_1_2 ( 1)
  56. #define DIB3000_FEC_2_3 ( 2)
  57. #define DIB3000_FEC_3_4 ( 3)
  58. #define DIB3000_FEC_5_6 ( 5)
  59. #define DIB3000_FEC_7_8 ( 7)
  60. #define DIB3000_HRCH_OFF ( 0)
  61. #define DIB3000_HRCH_ON ( 1)
  62. #define DIB3000_DDS_INVERSION_OFF ( 0)
  63. #define DIB3000_DDS_INVERSION_ON ( 1)
  64. #define DIB3000_TUNER_WRITE_ENABLE(a) (0xffff & (a << 8))
  65. #define DIB3000_TUNER_WRITE_DISABLE(a) (0xffff & ((a << 8) | (1 << 7)))
  66. #define DIB3000_REG_MANUFACTOR_ID ( 1025)
  67. #define DIB3000_I2C_ID_DIBCOM (0x01b3)
  68. #define DIB3000_REG_DEVICE_ID ( 1026)
  69. #define DIB3000MB_DEVICE_ID (0x3000)
  70. #define DIB3000MC_DEVICE_ID (0x3001)
  71. #define DIB3000P_DEVICE_ID (0x3002)
  72. /* frontend state */
  73. struct dib3000_state {
  74. struct i2c_adapter* i2c;
  75. /* configuration settings */
  76. struct dib3000_config config;
  77. struct dvb_frontend frontend;
  78. int timing_offset;
  79. int timing_offset_comp_done;
  80. fe_bandwidth_t last_tuned_bw;
  81. u32 last_tuned_freq;
  82. };
  83. /* register addresses and some of their default values */
  84. /* restart subsystems */
  85. #define DIB3000MB_REG_RESTART ( 0)
  86. #define DIB3000MB_RESTART_OFF ( 0)
  87. #define DIB3000MB_RESTART_AUTO_SEARCH (1 << 1)
  88. #define DIB3000MB_RESTART_CTRL (1 << 2)
  89. #define DIB3000MB_RESTART_AGC (1 << 3)
  90. /* FFT size */
  91. #define DIB3000MB_REG_FFT ( 1)
  92. /* Guard time */
  93. #define DIB3000MB_REG_GUARD_TIME ( 2)
  94. /* QAM */
  95. #define DIB3000MB_REG_QAM ( 3)
  96. /* Alpha coefficient high priority Viterbi algorithm */
  97. #define DIB3000MB_REG_VIT_ALPHA ( 4)
  98. /* spectrum inversion */
  99. #define DIB3000MB_REG_DDS_INV ( 5)
  100. /* DDS frequency value (IF position) ad ? values don't match reg_3000mb.txt */
  101. #define DIB3000MB_REG_DDS_FREQ_MSB ( 6)
  102. #define DIB3000MB_REG_DDS_FREQ_LSB ( 7)
  103. #define DIB3000MB_DDS_FREQ_MSB ( 178)
  104. #define DIB3000MB_DDS_FREQ_LSB ( 8990)
  105. /* timing frequency (carrier spacing) */
  106. static u16 dib3000mb_reg_timing_freq[] = { 8,9 };
  107. static u16 dib3000mb_timing_freq[][2] = {
  108. { 126 , 48873 }, /* 6 MHz */
  109. { 147 , 57019 }, /* 7 MHz */
  110. { 168 , 65164 }, /* 8 MHz */
  111. };
  112. /* impulse noise parameter */
  113. /* 36 ??? */
  114. static u16 dib3000mb_reg_impulse_noise[] = { 10,11,12,15,36 };
  115. enum dib3000mb_impulse_noise_type {
  116. DIB3000MB_IMPNOISE_OFF,
  117. DIB3000MB_IMPNOISE_MOBILE,
  118. DIB3000MB_IMPNOISE_FIXED,
  119. DIB3000MB_IMPNOISE_DEFAULT
  120. };
  121. static u16 dib3000mb_impulse_noise_values[][5] = {
  122. { 0x0000, 0x0004, 0x0014, 0x01ff, 0x0399 }, /* off */
  123. { 0x0001, 0x0004, 0x0014, 0x01ff, 0x037b }, /* mobile */
  124. { 0x0001, 0x0004, 0x0020, 0x01bd, 0x0399 }, /* fixed */
  125. { 0x0000, 0x0002, 0x000a, 0x01ff, 0x0399 }, /* default */
  126. };
  127. /*
  128. * Dual Automatic-Gain-Control
  129. * - gains RF in tuner (AGC1)
  130. * - gains IF after filtering (AGC2)
  131. */
  132. /* also from 16 to 18 */
  133. static u16 dib3000mb_reg_agc_gain[] = {
  134. 19,20,21,22,23,24,25,26,27,28,29,30,31,32
  135. };
  136. static u16 dib3000mb_default_agc_gain[] =
  137. { 0x0001, 52429, 623, 128, 166, 195, 61, /* RF ??? */
  138. 0x0001, 53766, 38011, 0, 90, 33, 23 }; /* IF ??? */
  139. /* phase noise */
  140. /* 36 is set when setting the impulse noise */
  141. static u16 dib3000mb_reg_phase_noise[] = { 33,34,35,37,38 };
  142. static u16 dib3000mb_default_noise_phase[] = { 2, 544, 0, 5, 4 };
  143. /* lock duration */
  144. static u16 dib3000mb_reg_lock_duration[] = { 39,40 };
  145. static u16 dib3000mb_default_lock_duration[] = { 135, 135 };
  146. /* AGC loop bandwidth */
  147. static u16 dib3000mb_reg_agc_bandwidth[] = { 43,44,45,46,47,48,49,50 };
  148. static u16 dib3000mb_agc_bandwidth_low[] =
  149. { 2088, 10, 2088, 10, 3448, 5, 3448, 5 };
  150. static u16 dib3000mb_agc_bandwidth_high[] =
  151. { 2349, 5, 2349, 5, 2586, 2, 2586, 2 };
  152. /*
  153. * lock0 definition (coff_lock)
  154. */
  155. #define DIB3000MB_REG_LOCK0_MASK ( 51)
  156. #define DIB3000MB_LOCK0_DEFAULT ( 4)
  157. /*
  158. * lock1 definition (cpil_lock)
  159. * for auto search
  160. * which values hide behind the lock masks
  161. */
  162. #define DIB3000MB_REG_LOCK1_MASK ( 52)
  163. #define DIB3000MB_LOCK1_SEARCH_4 (0x0004)
  164. #define DIB3000MB_LOCK1_SEARCH_2048 (0x0800)
  165. #define DIB3000MB_LOCK1_DEFAULT (0x0001)
  166. /*
  167. * lock2 definition (fec_lock) */
  168. #define DIB3000MB_REG_LOCK2_MASK ( 53)
  169. #define DIB3000MB_LOCK2_DEFAULT (0x0080)
  170. /*
  171. * SEQ ? what was that again ... :)
  172. * changes when, inversion, guard time and fft is
  173. * either automatically detected or not
  174. */
  175. #define DIB3000MB_REG_SEQ ( 54)
  176. /* bandwidth */
  177. static u16 dib3000mb_reg_bandwidth[] = { 55,56,57,58,59,60,61,62,63,64,65,66,67 };
  178. static u16 dib3000mb_bandwidth_6mhz[] =
  179. { 0, 33, 53312, 112, 46635, 563, 36565, 0, 1000, 0, 1010, 1, 45264 };
  180. static u16 dib3000mb_bandwidth_7mhz[] =
  181. { 0, 28, 64421, 96, 39973, 483, 3255, 0, 1000, 0, 1010, 1, 45264 };
  182. static u16 dib3000mb_bandwidth_8mhz[] =
  183. { 0, 25, 23600, 84, 34976, 422, 43808, 0, 1000, 0, 1010, 1, 45264 };
  184. #define DIB3000MB_REG_UNK_68 ( 68)
  185. #define DIB3000MB_UNK_68 ( 0)
  186. #define DIB3000MB_REG_UNK_69 ( 69)
  187. #define DIB3000MB_UNK_69 ( 0)
  188. #define DIB3000MB_REG_UNK_71 ( 71)
  189. #define DIB3000MB_UNK_71 ( 0)
  190. #define DIB3000MB_REG_UNK_77 ( 77)
  191. #define DIB3000MB_UNK_77 ( 6)
  192. #define DIB3000MB_REG_UNK_78 ( 78)
  193. #define DIB3000MB_UNK_78 (0x0080)
  194. /* isi */
  195. #define DIB3000MB_REG_ISI ( 79)
  196. #define DIB3000MB_ISI_ACTIVATE ( 0)
  197. #define DIB3000MB_ISI_INHIBIT ( 1)
  198. /* sync impovement */
  199. #define DIB3000MB_REG_SYNC_IMPROVEMENT ( 84)
  200. #define DIB3000MB_SYNC_IMPROVE_2K_1_8 ( 3)
  201. #define DIB3000MB_SYNC_IMPROVE_DEFAULT ( 0)
  202. /* phase noise compensation inhibition */
  203. #define DIB3000MB_REG_PHASE_NOISE ( 87)
  204. #define DIB3000MB_PHASE_NOISE_DEFAULT ( 0)
  205. #define DIB3000MB_REG_UNK_92 ( 92)
  206. #define DIB3000MB_UNK_92 (0x0080)
  207. #define DIB3000MB_REG_UNK_96 ( 96)
  208. #define DIB3000MB_UNK_96 (0x0010)
  209. #define DIB3000MB_REG_UNK_97 ( 97)
  210. #define DIB3000MB_UNK_97 (0x0009)
  211. /* mobile mode ??? */
  212. #define DIB3000MB_REG_MOBILE_MODE ( 101)
  213. #define DIB3000MB_MOBILE_MODE_ON ( 1)
  214. #define DIB3000MB_MOBILE_MODE_OFF ( 0)
  215. #define DIB3000MB_REG_UNK_106 ( 106)
  216. #define DIB3000MB_UNK_106 (0x0080)
  217. #define DIB3000MB_REG_UNK_107 ( 107)
  218. #define DIB3000MB_UNK_107 (0x0080)
  219. #define DIB3000MB_REG_UNK_108 ( 108)
  220. #define DIB3000MB_UNK_108 (0x0080)
  221. /* fft */
  222. #define DIB3000MB_REG_UNK_121 ( 121)
  223. #define DIB3000MB_UNK_121_2K ( 7)
  224. #define DIB3000MB_UNK_121_DEFAULT ( 5)
  225. #define DIB3000MB_REG_UNK_122 ( 122)
  226. #define DIB3000MB_UNK_122 ( 2867)
  227. /* QAM for mobile mode */
  228. #define DIB3000MB_REG_MOBILE_MODE_QAM ( 126)
  229. #define DIB3000MB_MOBILE_MODE_QAM_64 ( 3)
  230. #define DIB3000MB_MOBILE_MODE_QAM_QPSK_16 ( 1)
  231. #define DIB3000MB_MOBILE_MODE_QAM_OFF ( 0)
  232. /*
  233. * data diversity when having more than one chip on-board
  234. * see also DIB3000MB_OUTPUT_MODE_DATA_DIVERSITY
  235. */
  236. #define DIB3000MB_REG_DATA_IN_DIVERSITY ( 127)
  237. #define DIB3000MB_DATA_DIVERSITY_IN_OFF ( 0)
  238. #define DIB3000MB_DATA_DIVERSITY_IN_ON ( 2)
  239. /* vit hrch */
  240. #define DIB3000MB_REG_VIT_HRCH ( 128)
  241. /* vit code rate */
  242. #define DIB3000MB_REG_VIT_CODE_RATE ( 129)
  243. /* vit select hp */
  244. #define DIB3000MB_REG_VIT_HP ( 130)
  245. /* time frame for Bit-Error-Rate calculation */
  246. #define DIB3000MB_REG_BERLEN ( 135)
  247. #define DIB3000MB_BERLEN_LONG ( 0)
  248. #define DIB3000MB_BERLEN_DEFAULT ( 1)
  249. #define DIB3000MB_BERLEN_MEDIUM ( 2)
  250. #define DIB3000MB_BERLEN_SHORT ( 3)
  251. /* 142 - 152 FIFO parameters
  252. * which is what ?
  253. */
  254. #define DIB3000MB_REG_FIFO_142 ( 142)
  255. #define DIB3000MB_FIFO_142 ( 0)
  256. /* MPEG2 TS output mode */
  257. #define DIB3000MB_REG_MPEG2_OUT_MODE ( 143)
  258. #define DIB3000MB_MPEG2_OUT_MODE_204 ( 0)
  259. #define DIB3000MB_MPEG2_OUT_MODE_188 ( 1)
  260. #define DIB3000MB_REG_PID_PARSE ( 144)
  261. #define DIB3000MB_PID_PARSE_INHIBIT ( 0)
  262. #define DIB3000MB_PID_PARSE_ACTIVATE ( 1)
  263. #define DIB3000MB_REG_FIFO ( 145)
  264. #define DIB3000MB_FIFO_INHIBIT ( 1)
  265. #define DIB3000MB_FIFO_ACTIVATE ( 0)
  266. #define DIB3000MB_REG_FIFO_146 ( 146)
  267. #define DIB3000MB_FIFO_146 ( 3)
  268. #define DIB3000MB_REG_FIFO_147 ( 147)
  269. #define DIB3000MB_FIFO_147 (0x0100)
  270. /*
  271. * pidfilter
  272. * it is not a hardware pidfilter but a filter which drops all pids
  273. * except the ones set. Necessary because of the limited USB1.1 bandwidth.
  274. * regs 153-168
  275. */
  276. #define DIB3000MB_REG_FIRST_PID ( 153)
  277. #define DIB3000MB_NUM_PIDS ( 16)
  278. /*
  279. * output mode
  280. * USB devices have to use 'slave'-mode
  281. * see also DIB3000MB_REG_ELECT_OUT_MODE
  282. */
  283. #define DIB3000MB_REG_OUTPUT_MODE ( 169)
  284. #define DIB3000MB_OUTPUT_MODE_GATED_CLK ( 0)
  285. #define DIB3000MB_OUTPUT_MODE_CONT_CLK ( 1)
  286. #define DIB3000MB_OUTPUT_MODE_SERIAL ( 2)
  287. #define DIB3000MB_OUTPUT_MODE_DATA_DIVERSITY ( 5)
  288. #define DIB3000MB_OUTPUT_MODE_SLAVE ( 6)
  289. /* irq event mask */
  290. #define DIB3000MB_REG_IRQ_EVENT_MASK ( 170)
  291. #define DIB3000MB_IRQ_EVENT_MASK ( 0)
  292. /* filter coefficients */
  293. static u16 dib3000mb_reg_filter_coeffs[] = {
  294. 171, 172, 173, 174, 175, 176, 177, 178,
  295. 179, 180, 181, 182, 183, 184, 185, 186,
  296. 188, 189, 190, 191, 192, 194
  297. };
  298. static u16 dib3000mb_filter_coeffs[] = {
  299. 226, 160, 29,
  300. 979, 998, 19,
  301. 22, 1019, 1006,
  302. 1022, 12, 6,
  303. 1017, 1017, 3,
  304. 6, 1019,
  305. 1021, 2, 3,
  306. 1, 0,
  307. };
  308. /*
  309. * mobile algorithm (when you are moving with your device)
  310. * but not faster than 90 km/h
  311. */
  312. #define DIB3000MB_REG_MOBILE_ALGO ( 195)
  313. #define DIB3000MB_MOBILE_ALGO_ON ( 0)
  314. #define DIB3000MB_MOBILE_ALGO_OFF ( 1)
  315. /* multiple demodulators algorithm */
  316. #define DIB3000MB_REG_MULTI_DEMOD_MSB ( 206)
  317. #define DIB3000MB_REG_MULTI_DEMOD_LSB ( 207)
  318. /* terminator, no more demods */
  319. #define DIB3000MB_MULTI_DEMOD_MSB ( 32767)
  320. #define DIB3000MB_MULTI_DEMOD_LSB ( 4095)
  321. /* bring the device into a known */
  322. #define DIB3000MB_REG_RESET_DEVICE ( 1024)
  323. #define DIB3000MB_RESET_DEVICE (0x812c)
  324. #define DIB3000MB_RESET_DEVICE_RST ( 0)
  325. /* hardware clock configuration */
  326. #define DIB3000MB_REG_CLOCK ( 1027)
  327. #define DIB3000MB_CLOCK_DEFAULT (0x9000)
  328. #define DIB3000MB_CLOCK_DIVERSITY (0x92b0)
  329. /* power down config */
  330. #define DIB3000MB_REG_POWER_CONTROL ( 1028)
  331. #define DIB3000MB_POWER_DOWN ( 1)
  332. #define DIB3000MB_POWER_UP ( 0)
  333. /* electrical output mode */
  334. #define DIB3000MB_REG_ELECT_OUT_MODE ( 1029)
  335. #define DIB3000MB_ELECT_OUT_MODE_OFF ( 0)
  336. #define DIB3000MB_ELECT_OUT_MODE_ON ( 1)
  337. /* set the tuner i2c address */
  338. #define DIB3000MB_REG_TUNER ( 1089)
  339. /* monitoring registers (read only) */
  340. /* agc loop locked (size: 1) */
  341. #define DIB3000MB_REG_AGC_LOCK ( 324)
  342. /* agc power (size: 16) */
  343. #define DIB3000MB_REG_AGC_POWER ( 325)
  344. /* agc1 value (16) */
  345. #define DIB3000MB_REG_AGC1_VALUE ( 326)
  346. /* agc2 value (16) */
  347. #define DIB3000MB_REG_AGC2_VALUE ( 327)
  348. /* total RF power (16), can be used for signal strength */
  349. #define DIB3000MB_REG_RF_POWER ( 328)
  350. /* dds_frequency with offset (24) */
  351. #define DIB3000MB_REG_DDS_VALUE_MSB ( 339)
  352. #define DIB3000MB_REG_DDS_VALUE_LSB ( 340)
  353. /* timing offset signed (24) */
  354. #define DIB3000MB_REG_TIMING_OFFSET_MSB ( 341)
  355. #define DIB3000MB_REG_TIMING_OFFSET_LSB ( 342)
  356. /* fft start position (13) */
  357. #define DIB3000MB_REG_FFT_WINDOW_POS ( 353)
  358. /* carriers locked (1) */
  359. #define DIB3000MB_REG_CARRIER_LOCK ( 355)
  360. /* noise power (24) */
  361. #define DIB3000MB_REG_NOISE_POWER_MSB ( 372)
  362. #define DIB3000MB_REG_NOISE_POWER_LSB ( 373)
  363. #define DIB3000MB_REG_MOBILE_NOISE_MSB ( 374)
  364. #define DIB3000MB_REG_MOBILE_NOISE_LSB ( 375)
  365. /*
  366. * signal power (16), this and the above can be
  367. * used to calculate the signal/noise - ratio
  368. */
  369. #define DIB3000MB_REG_SIGNAL_POWER ( 380)
  370. /* mer (24) */
  371. #define DIB3000MB_REG_MER_MSB ( 381)
  372. #define DIB3000MB_REG_MER_LSB ( 382)
  373. /*
  374. * Transmission Parameter Signalling (TPS)
  375. * the following registers can be used to get TPS-information.
  376. * The values are according to the DVB-T standard.
  377. */
  378. /* TPS locked (1) */
  379. #define DIB3000MB_REG_TPS_LOCK ( 394)
  380. /* QAM from TPS (2) (values according to DIB3000MB_REG_QAM) */
  381. #define DIB3000MB_REG_TPS_QAM ( 398)
  382. /* hierarchy from TPS (1) */
  383. #define DIB3000MB_REG_TPS_HRCH ( 399)
  384. /* alpha from TPS (3) (values according to DIB3000MB_REG_VIT_ALPHA) */
  385. #define DIB3000MB_REG_TPS_VIT_ALPHA ( 400)
  386. /* code rate high priority from TPS (3) (values according to DIB3000MB_FEC_*) */
  387. #define DIB3000MB_REG_TPS_CODE_RATE_HP ( 401)
  388. /* code rate low priority from TPS (3) if DIB3000MB_REG_TPS_VIT_ALPHA */
  389. #define DIB3000MB_REG_TPS_CODE_RATE_LP ( 402)
  390. /* guard time from TPS (2) (values according to DIB3000MB_REG_GUARD_TIME */
  391. #define DIB3000MB_REG_TPS_GUARD_TIME ( 403)
  392. /* fft size from TPS (2) (values according to DIB3000MB_REG_FFT) */
  393. #define DIB3000MB_REG_TPS_FFT ( 404)
  394. /* cell id from TPS (16) */
  395. #define DIB3000MB_REG_TPS_CELL_ID ( 406)
  396. /* TPS (68) */
  397. #define DIB3000MB_REG_TPS_1 ( 408)
  398. #define DIB3000MB_REG_TPS_2 ( 409)
  399. #define DIB3000MB_REG_TPS_3 ( 410)
  400. #define DIB3000MB_REG_TPS_4 ( 411)
  401. #define DIB3000MB_REG_TPS_5 ( 412)
  402. /* bit error rate (before RS correction) (21) */
  403. #define DIB3000MB_REG_BER_MSB ( 414)
  404. #define DIB3000MB_REG_BER_LSB ( 415)
  405. /* packet error rate (uncorrected TS packets) (16) */
  406. #define DIB3000MB_REG_PACKET_ERROR_RATE ( 417)
  407. /* uncorrected packet count (16) */
  408. #define DIB3000MB_REG_UNC ( 420)
  409. /* viterbi locked (1) */
  410. #define DIB3000MB_REG_VIT_LCK ( 421)
  411. /* viterbi inidcator (16) */
  412. #define DIB3000MB_REG_VIT_INDICATOR ( 422)
  413. /* transport stream sync lock (1) */
  414. #define DIB3000MB_REG_TS_SYNC_LOCK ( 423)
  415. /* transport stream RS lock (1) */
  416. #define DIB3000MB_REG_TS_RS_LOCK ( 424)
  417. /* lock mask 0 value (1) */
  418. #define DIB3000MB_REG_LOCK0_VALUE ( 425)
  419. /* lock mask 1 value (1) */
  420. #define DIB3000MB_REG_LOCK1_VALUE ( 426)
  421. /* lock mask 2 value (1) */
  422. #define DIB3000MB_REG_LOCK2_VALUE ( 427)
  423. /* interrupt pending for auto search */
  424. #define DIB3000MB_REG_AS_IRQ_PENDING ( 434)
  425. #endif