lgdt330x.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. /*
  2. * Support for LGDT3302 & LGDT3303 (DViCO FusionHDTV Gold) - VSB/QAM
  3. *
  4. * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net>
  5. *
  6. * Based on code from Kirk Lapray <kirk_lapray@bigfoot.com>
  7. * Copyright (C) 2005
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. *
  23. */
  24. /*
  25. * NOTES ABOUT THIS DRIVER
  26. *
  27. * This driver supports DViCO FusionHDTV Gold under Linux.
  28. *
  29. * TODO:
  30. * BER and signal strength always return 0.
  31. * Include support for LGDT3303
  32. *
  33. */
  34. #include <linux/kernel.h>
  35. #include <linux/module.h>
  36. #include <linux/moduleparam.h>
  37. #include <linux/init.h>
  38. #include <linux/delay.h>
  39. #include <asm/byteorder.h>
  40. #include "dvb_frontend.h"
  41. #include "dvb-pll.h"
  42. #include "lgdt330x_priv.h"
  43. #include "lgdt330x.h"
  44. static int debug = 0;
  45. module_param(debug, int, 0644);
  46. MODULE_PARM_DESC(debug,"Turn on/off lgdt330x frontend debugging (default:off).");
  47. #define dprintk(args...) \
  48. do { \
  49. if (debug) printk(KERN_DEBUG "lgdt330x: " args); \
  50. } while (0)
  51. struct lgdt330x_state
  52. {
  53. struct i2c_adapter* i2c;
  54. struct dvb_frontend_ops ops;
  55. /* Configuration settings */
  56. const struct lgdt330x_config* config;
  57. struct dvb_frontend frontend;
  58. /* Demodulator private data */
  59. fe_modulation_t current_modulation;
  60. /* Tuner private data */
  61. u32 current_frequency;
  62. };
  63. static int i2c_writebytes (struct lgdt330x_state* state,
  64. u8 addr, /* demod_address or pll_address */
  65. u8 *buf, /* data bytes to send */
  66. int len /* number of bytes to send */ )
  67. {
  68. u8 tmp[] = { buf[0], buf[1] };
  69. struct i2c_msg msg =
  70. { .addr = addr, .flags = 0, .buf = tmp, .len = 2 };
  71. int err;
  72. int i;
  73. for (i=1; i<len; i++) {
  74. tmp[1] = buf[i];
  75. if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
  76. printk(KERN_WARNING "lgdt330x: %s error (addr %02x <- %02x, err == %i)\n", __FUNCTION__, addr, buf[0], err);
  77. if (err < 0)
  78. return err;
  79. else
  80. return -EREMOTEIO;
  81. }
  82. tmp[0]++;
  83. }
  84. return 0;
  85. }
  86. #if 0
  87. static int i2c_readbytes (struct lgdt330x_state* state,
  88. u8 addr, /* demod_address or pll_address */
  89. u8 *buf, /* holds data bytes read */
  90. int len /* number of bytes to read */ )
  91. {
  92. struct i2c_msg msg =
  93. { .addr = addr, .flags = I2C_M_RD, .buf = buf, .len = len };
  94. int err;
  95. if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
  96. printk(KERN_WARNING "lgdt330x: %s error (addr %02x, err == %i)\n", __FUNCTION__, addr, err);
  97. return -EREMOTEIO;
  98. }
  99. return 0;
  100. }
  101. #endif
  102. /*
  103. * This routine writes the register (reg) to the demod bus
  104. * then reads the data returned for (len) bytes.
  105. */
  106. static u8 i2c_selectreadbytes (struct lgdt330x_state* state,
  107. enum I2C_REG reg, u8* buf, int len)
  108. {
  109. u8 wr [] = { reg };
  110. struct i2c_msg msg [] = {
  111. { .addr = state->config->demod_address,
  112. .flags = 0, .buf = wr, .len = 1 },
  113. { .addr = state->config->demod_address,
  114. .flags = I2C_M_RD, .buf = buf, .len = len },
  115. };
  116. int ret;
  117. ret = i2c_transfer(state->i2c, msg, 2);
  118. if (ret != 2) {
  119. printk(KERN_WARNING "lgdt330x: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __FUNCTION__, state->config->demod_address, reg, ret);
  120. } else {
  121. ret = 0;
  122. }
  123. return ret;
  124. }
  125. /* Software reset */
  126. int lgdt330x_SwReset(struct lgdt330x_state* state)
  127. {
  128. u8 ret;
  129. u8 reset[] = {
  130. IRQ_MASK,
  131. 0x00 /* bit 6 is active low software reset
  132. * bits 5-0 are 1 to mask interrupts */
  133. };
  134. ret = i2c_writebytes(state,
  135. state->config->demod_address,
  136. reset, sizeof(reset));
  137. if (ret == 0) {
  138. /* spec says reset takes 100 ns why wait */
  139. /* mdelay(100); */ /* keep low for 100mS */
  140. reset[1] = 0x7f; /* force reset high (inactive)
  141. * and unmask interrupts */
  142. ret = i2c_writebytes(state,
  143. state->config->demod_address,
  144. reset, sizeof(reset));
  145. }
  146. /* Spec does not indicate a need for this either */
  147. /*mdelay(5); */ /* wait 5 msec before doing more */
  148. return ret;
  149. }
  150. static int lgdt330x_init(struct dvb_frontend* fe)
  151. {
  152. /* Hardware reset is done using gpio[0] of cx23880x chip.
  153. * I'd like to do it here, but don't know how to find chip address.
  154. * cx88-cards.c arranges for the reset bit to be inactive (high).
  155. * Maybe there needs to be a callable function in cx88-core or
  156. * the caller of this function needs to do it. */
  157. dprintk("%s entered\n", __FUNCTION__);
  158. return lgdt330x_SwReset((struct lgdt330x_state*) fe->demodulator_priv);
  159. }
  160. static int lgdt330x_read_ber(struct dvb_frontend* fe, u32* ber)
  161. {
  162. *ber = 0; /* Dummy out for now */
  163. return 0;
  164. }
  165. static int lgdt330x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
  166. {
  167. struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv;
  168. u8 buf[2];
  169. i2c_selectreadbytes(state, PACKET_ERR_COUNTER1, buf, sizeof(buf));
  170. *ucblocks = (buf[0] << 8) | buf[1];
  171. return 0;
  172. }
  173. static int lgdt330x_set_parameters(struct dvb_frontend* fe,
  174. struct dvb_frontend_parameters *param)
  175. {
  176. struct lgdt330x_state* state =
  177. (struct lgdt330x_state*) fe->demodulator_priv;
  178. /* Use 50MHz parameter values from spec sheet since xtal is 50 */
  179. static u8 top_ctrl_cfg[] = { TOP_CONTROL, 0x03 };
  180. static u8 vsb_freq_cfg[] = { VSB_CARRIER_FREQ0, 0x00, 0x87, 0x8e, 0x01 };
  181. static u8 demux_ctrl_cfg[] = { DEMUX_CONTROL, 0xfb };
  182. static u8 agc_rf_cfg[] = { AGC_RF_BANDWIDTH0, 0x40, 0x93, 0x00 };
  183. static u8 agc_ctrl_cfg[] = { AGC_FUNC_CTRL2, 0xc6, 0x40 };
  184. static u8 agc_delay_cfg[] = { AGC_DELAY0, 0x07, 0x00, 0xfe };
  185. static u8 agc_loop_cfg[] = { AGC_LOOP_BANDWIDTH0, 0x08, 0x9a };
  186. /* Change only if we are actually changing the modulation */
  187. if (state->current_modulation != param->u.vsb.modulation) {
  188. switch(param->u.vsb.modulation) {
  189. case VSB_8:
  190. dprintk("%s: VSB_8 MODE\n", __FUNCTION__);
  191. /* Select VSB mode and serial MPEG interface */
  192. top_ctrl_cfg[1] = 0x07;
  193. /* Select ANT connector if supported by card */
  194. if (state->config->pll_rf_set)
  195. state->config->pll_rf_set(fe, 1);
  196. break;
  197. case QAM_64:
  198. dprintk("%s: QAM_64 MODE\n", __FUNCTION__);
  199. /* Select QAM_64 mode and serial MPEG interface */
  200. top_ctrl_cfg[1] = 0x04;
  201. /* Select CABLE connector if supported by card */
  202. if (state->config->pll_rf_set)
  203. state->config->pll_rf_set(fe, 0);
  204. break;
  205. case QAM_256:
  206. dprintk("%s: QAM_256 MODE\n", __FUNCTION__);
  207. /* Select QAM_256 mode and serial MPEG interface */
  208. top_ctrl_cfg[1] = 0x05;
  209. /* Select CABLE connector if supported by card */
  210. if (state->config->pll_rf_set)
  211. state->config->pll_rf_set(fe, 0);
  212. break;
  213. default:
  214. printk(KERN_WARNING "lgdt330x: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation);
  215. return -1;
  216. }
  217. /* Initializations common to all modes */
  218. /* Select the requested mode */
  219. i2c_writebytes(state, state->config->demod_address,
  220. top_ctrl_cfg, sizeof(top_ctrl_cfg));
  221. /* Change the value of IFBW[11:0]
  222. of AGC IF/RF loop filter bandwidth register */
  223. i2c_writebytes(state, state->config->demod_address,
  224. agc_rf_cfg, sizeof(agc_rf_cfg));
  225. /* Change the value of bit 6, 'nINAGCBY' and
  226. 'NSSEL[1:0] of ACG function control register 2 */
  227. /* Change the value of bit 6 'RFFIX'
  228. of AGC function control register 3 */
  229. i2c_writebytes(state, state->config->demod_address,
  230. agc_ctrl_cfg, sizeof(agc_ctrl_cfg));
  231. /* Change the TPCLK pin polarity
  232. data is valid on falling clock */
  233. i2c_writebytes(state, state->config->demod_address,
  234. demux_ctrl_cfg, sizeof(demux_ctrl_cfg));
  235. /* Change the value of NCOCTFV[25:0] of carrier
  236. recovery center frequency register */
  237. i2c_writebytes(state, state->config->demod_address,
  238. vsb_freq_cfg, sizeof(vsb_freq_cfg));
  239. /* Set the value of 'INLVTHD' register 0x2a/0x2c to 0x7fe */
  240. i2c_writebytes(state, state->config->demod_address,
  241. agc_delay_cfg, sizeof(agc_delay_cfg));
  242. /* Change the value of IAGCBW[15:8]
  243. of inner AGC loop filter bandwith */
  244. i2c_writebytes(state, state->config->demod_address,
  245. agc_loop_cfg, sizeof(agc_loop_cfg));
  246. state->config->set_ts_params(fe, 0);
  247. state->current_modulation = param->u.vsb.modulation;
  248. }
  249. /* Change only if we are actually changing the channel */
  250. if (state->current_frequency != param->frequency) {
  251. u8 buf[5];
  252. struct i2c_msg msg = { .flags = 0, .buf = &buf[1], .len = 4 };
  253. int err;
  254. state->config->pll_set(fe, param, buf);
  255. msg.addr = buf[0];
  256. dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x "
  257. "0x%02x 0x%02x\n", __FUNCTION__,
  258. buf[0],buf[1],buf[2],buf[3],buf[4]);
  259. if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
  260. printk(KERN_WARNING "lgdt330x: %s error (addr %02x <- %02x, err = %i)\n", __FUNCTION__, buf[0], buf[1], err);
  261. if (err < 0)
  262. return err;
  263. else
  264. return -EREMOTEIO;
  265. }
  266. #if 0
  267. /* Check the status of the tuner pll */
  268. i2c_readbytes(state, buf[0], &buf[1], 1);
  269. dprintk("%s: tuner status byte = 0x%02x\n", __FUNCTION__, buf[1]);
  270. #endif
  271. /* Update current frequency */
  272. state->current_frequency = param->frequency;
  273. }
  274. lgdt330x_SwReset(state);
  275. return 0;
  276. }
  277. static int lgdt330x_get_frontend(struct dvb_frontend* fe,
  278. struct dvb_frontend_parameters* param)
  279. {
  280. struct lgdt330x_state *state = fe->demodulator_priv;
  281. param->frequency = state->current_frequency;
  282. return 0;
  283. }
  284. static int lgdt330x_read_status(struct dvb_frontend* fe, fe_status_t* status)
  285. {
  286. struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv;
  287. u8 buf[3];
  288. *status = 0; /* Reset status result */
  289. /*
  290. * You must set the Mask bits to 1 in the IRQ_MASK in order
  291. * to see that status bit in the IRQ_STATUS register.
  292. * This is done in SwReset();
  293. */
  294. /* AGC status register */
  295. i2c_selectreadbytes(state, AGC_STATUS, buf, 1);
  296. dprintk("%s: AGC_STATUS = 0x%02x\n", __FUNCTION__, buf[0]);
  297. if ((buf[0] & 0x0c) == 0x8){
  298. /* Test signal does not exist flag */
  299. /* as well as the AGC lock flag. */
  300. *status |= FE_HAS_SIGNAL;
  301. } else {
  302. /* Without a signal all other status bits are meaningless */
  303. return 0;
  304. }
  305. /* signal status */
  306. i2c_selectreadbytes(state, TOP_CONTROL, buf, sizeof(buf));
  307. dprintk("%s: TOP_CONTROL = 0x%02x, IRO_MASK = 0x%02x, IRQ_STATUS = 0x%02x\n", __FUNCTION__, buf[0], buf[1], buf[2]);
  308. #if 0
  309. /* Alternative method to check for a signal */
  310. /* using the SNR good/bad interrupts. */
  311. if ((buf[2] & 0x30) == 0x10)
  312. *status |= FE_HAS_SIGNAL;
  313. #endif
  314. /* sync status */
  315. if ((buf[2] & 0x03) == 0x01) {
  316. *status |= FE_HAS_SYNC;
  317. }
  318. /* FEC error status */
  319. if ((buf[2] & 0x0c) == 0x08) {
  320. *status |= FE_HAS_LOCK;
  321. *status |= FE_HAS_VITERBI;
  322. }
  323. /* Carrier Recovery Lock Status Register */
  324. i2c_selectreadbytes(state, CARRIER_LOCK, buf, 1);
  325. dprintk("%s: CARRIER_LOCK = 0x%02x\n", __FUNCTION__, buf[0]);
  326. switch (state->current_modulation) {
  327. case QAM_256:
  328. case QAM_64:
  329. /* Need to undestand why there are 3 lock levels here */
  330. if ((buf[0] & 0x07) == 0x07)
  331. *status |= FE_HAS_CARRIER;
  332. break;
  333. case VSB_8:
  334. if ((buf[0] & 0x80) == 0x80)
  335. *status |= FE_HAS_CARRIER;
  336. break;
  337. default:
  338. printk("KERN_WARNING lgdt330x: %s: Modulation set to unsupported value\n", __FUNCTION__);
  339. }
  340. return 0;
  341. }
  342. static int lgdt330x_read_signal_strength(struct dvb_frontend* fe, u16* strength)
  343. {
  344. /* not directly available. */
  345. return 0;
  346. }
  347. static int lgdt330x_read_snr(struct dvb_frontend* fe, u16* snr)
  348. {
  349. #ifdef SNR_IN_DB
  350. /*
  351. * Spec sheet shows formula for SNR_EQ = 10 log10(25 * 24**2 / noise)
  352. * and SNR_PH = 10 log10(25 * 32**2 / noise) for equalizer and phase tracker
  353. * respectively. The following tables are built on these formulas.
  354. * The usual definition is SNR = 20 log10(signal/noise)
  355. * If the specification is wrong the value retuned is 1/2 the actual SNR in db.
  356. *
  357. * This table is a an ordered list of noise values computed by the
  358. * formula from the spec sheet such that the index into the table
  359. * starting at 43 or 45 is the SNR value in db. There are duplicate noise
  360. * value entries at the beginning because the SNR varies more than
  361. * 1 db for a change of 1 digit in noise at very small values of noise.
  362. *
  363. * Examples from SNR_EQ table:
  364. * noise SNR
  365. * 0 43
  366. * 1 42
  367. * 2 39
  368. * 3 37
  369. * 4 36
  370. * 5 35
  371. * 6 34
  372. * 7 33
  373. * 8 33
  374. * 9 32
  375. * 10 32
  376. * 11 31
  377. * 12 31
  378. * 13 30
  379. */
  380. static const u32 SNR_EQ[] =
  381. { 1, 2, 2, 2, 3, 3, 4, 4, 5, 7,
  382. 9, 11, 13, 17, 21, 26, 33, 41, 52, 65,
  383. 81, 102, 129, 162, 204, 257, 323, 406, 511, 644,
  384. 810, 1020, 1284, 1616, 2035, 2561, 3224, 4059, 5110, 6433,
  385. 8098, 10195, 12835, 16158, 20341, 25608, 32238, 40585, 51094, 64323,
  386. 80978, 101945, 128341, 161571, 203406, 256073, 0x40000
  387. };
  388. static const u32 SNR_PH[] =
  389. { 1, 2, 2, 2, 3, 3, 4, 5, 6, 8,
  390. 10, 12, 15, 19, 23, 29, 37, 46, 58, 73,
  391. 91, 115, 144, 182, 229, 288, 362, 456, 574, 722,
  392. 909, 1144, 1440, 1813, 2282, 2873, 3617, 4553, 5732, 7216,
  393. 9084, 11436, 14396, 18124, 22817, 28724, 36161, 45524, 57312, 72151,
  394. 90833, 114351, 143960, 181235, 228161, 0x040000
  395. };
  396. static u8 buf[5];/* read data buffer */
  397. static u32 noise; /* noise value */
  398. static u32 snr_db; /* index into SNR_EQ[] */
  399. struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv;
  400. /* read both equalizer and pase tracker noise data */
  401. i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf));
  402. if (state->current_modulation == VSB_8) {
  403. /* Equalizer Mean-Square Error Register for VSB */
  404. noise = ((buf[0] & 7) << 16) | (buf[1] << 8) | buf[2];
  405. /*
  406. * Look up noise value in table.
  407. * A better search algorithm could be used...
  408. * watch out there are duplicate entries.
  409. */
  410. for (snr_db = 0; snr_db < sizeof(SNR_EQ); snr_db++) {
  411. if (noise < SNR_EQ[snr_db]) {
  412. *snr = 43 - snr_db;
  413. break;
  414. }
  415. }
  416. } else {
  417. /* Phase Tracker Mean-Square Error Register for QAM */
  418. noise = ((buf[0] & 7<<3) << 13) | (buf[3] << 8) | buf[4];
  419. /* Look up noise value in table. */
  420. for (snr_db = 0; snr_db < sizeof(SNR_PH); snr_db++) {
  421. if (noise < SNR_PH[snr_db]) {
  422. *snr = 45 - snr_db;
  423. break;
  424. }
  425. }
  426. }
  427. #else
  428. /* Return the raw noise value */
  429. static u8 buf[5];/* read data buffer */
  430. static u32 noise; /* noise value */
  431. struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv;
  432. /* read both equalizer and pase tracker noise data */
  433. i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf));
  434. if (state->current_modulation == VSB_8) {
  435. /* Equalizer Mean-Square Error Register for VSB */
  436. noise = ((buf[0] & 7) << 16) | (buf[1] << 8) | buf[2];
  437. } else {
  438. /* Phase Tracker Mean-Square Error Register for QAM */
  439. noise = ((buf[0] & 7<<3) << 13) | (buf[3] << 8) | buf[4];
  440. }
  441. /* Small values for noise mean signal is better so invert noise */
  442. /* Noise is 19 bit value so discard 3 LSB*/
  443. *snr = ~noise>>3;
  444. #endif
  445. dprintk("%s: noise = 0x%05x, snr = %idb\n",__FUNCTION__, noise, *snr);
  446. return 0;
  447. }
  448. static int lgdt330x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings)
  449. {
  450. /* I have no idea about this - it may not be needed */
  451. fe_tune_settings->min_delay_ms = 500;
  452. fe_tune_settings->step_size = 0;
  453. fe_tune_settings->max_drift = 0;
  454. return 0;
  455. }
  456. static void lgdt330x_release(struct dvb_frontend* fe)
  457. {
  458. struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv;
  459. kfree(state);
  460. }
  461. static struct dvb_frontend_ops lgdt330x_ops;
  462. struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config,
  463. struct i2c_adapter* i2c)
  464. {
  465. struct lgdt330x_state* state = NULL;
  466. u8 buf[1];
  467. /* Allocate memory for the internal state */
  468. state = (struct lgdt330x_state*) kmalloc(sizeof(struct lgdt330x_state), GFP_KERNEL);
  469. if (state == NULL)
  470. goto error;
  471. memset(state,0,sizeof(*state));
  472. /* Setup the state */
  473. state->config = config;
  474. state->i2c = i2c;
  475. memcpy(&state->ops, &lgdt330x_ops, sizeof(struct dvb_frontend_ops));
  476. /* Verify communication with demod chip */
  477. if (i2c_selectreadbytes(state, 2, buf, 1))
  478. goto error;
  479. state->current_frequency = -1;
  480. state->current_modulation = -1;
  481. /* Create dvb_frontend */
  482. state->frontend.ops = &state->ops;
  483. state->frontend.demodulator_priv = state;
  484. return &state->frontend;
  485. error:
  486. if (state)
  487. kfree(state);
  488. dprintk("%s: ERROR\n",__FUNCTION__);
  489. return NULL;
  490. }
  491. static struct dvb_frontend_ops lgdt330x_ops = {
  492. .info = {
  493. .name= "LG Electronics lgdt330x VSB/QAM Frontend",
  494. .type = FE_ATSC,
  495. .frequency_min= 54000000,
  496. .frequency_max= 858000000,
  497. .frequency_stepsize= 62500,
  498. /* Symbol rate is for all VSB modes need to check QAM */
  499. .symbol_rate_min = 10762000,
  500. .symbol_rate_max = 10762000,
  501. .caps = FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB
  502. },
  503. .init = lgdt330x_init,
  504. .set_frontend = lgdt330x_set_parameters,
  505. .get_frontend = lgdt330x_get_frontend,
  506. .get_tune_settings = lgdt330x_get_tune_settings,
  507. .read_status = lgdt330x_read_status,
  508. .read_ber = lgdt330x_read_ber,
  509. .read_signal_strength = lgdt330x_read_signal_strength,
  510. .read_snr = lgdt330x_read_snr,
  511. .read_ucblocks = lgdt330x_read_ucblocks,
  512. .release = lgdt330x_release,
  513. };
  514. MODULE_DESCRIPTION("lgdt330x [DViCO FusionHDTV 3 Gold] (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulator Driver");
  515. MODULE_AUTHOR("Wilson Michaels");
  516. MODULE_LICENSE("GPL");
  517. EXPORT_SYMBOL(lgdt330x_attach);
  518. /*
  519. * Local variables:
  520. * c-basic-offset: 8
  521. * compile-command: "make DVB=1"
  522. * End:
  523. */