or51132.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. /*
  2. * Support for OR51132 (pcHDTV HD-3000) - VSB/QAM
  3. *
  4. *
  5. * Copyright (C) 2007 Trent Piepho <xyzzy@speakeasy.org>
  6. *
  7. * Copyright (C) 2005 Kirk Lapray <kirk_lapray@bigfoot.com>
  8. *
  9. * Based on code from Jack Kelliher (kelliher@xmission.com)
  10. * Copyright (C) 2002 & pcHDTV, inc.
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 2 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  25. *
  26. */
  27. /*
  28. * This driver needs two external firmware files. Please copy
  29. * "dvb-fe-or51132-vsb.fw" and "dvb-fe-or51132-qam.fw" to
  30. * /usr/lib/hotplug/firmware/ or /lib/firmware/
  31. * (depending on configuration of firmware hotplug).
  32. */
  33. #define OR51132_VSB_FIRMWARE "dvb-fe-or51132-vsb.fw"
  34. #define OR51132_QAM_FIRMWARE "dvb-fe-or51132-qam.fw"
  35. #include <linux/kernel.h>
  36. #include <linux/module.h>
  37. #include <linux/init.h>
  38. #include <linux/delay.h>
  39. #include <linux/string.h>
  40. #include <linux/slab.h>
  41. #include <asm/byteorder.h>
  42. #include "dvb_math.h"
  43. #include "dvb_frontend.h"
  44. #include "or51132.h"
  45. static int debug;
  46. #define dprintk(args...) \
  47. do { \
  48. if (debug) printk(KERN_DEBUG "or51132: " args); \
  49. } while (0)
  50. struct or51132_state
  51. {
  52. struct i2c_adapter* i2c;
  53. /* Configuration settings */
  54. const struct or51132_config* config;
  55. struct dvb_frontend frontend;
  56. /* Demodulator private data */
  57. fe_modulation_t current_modulation;
  58. u32 snr; /* Result of last SNR calculation */
  59. /* Tuner private data */
  60. u32 current_frequency;
  61. };
  62. /* Write buffer to demod */
  63. static int or51132_writebuf(struct or51132_state *state, const u8 *buf, int len)
  64. {
  65. int err;
  66. struct i2c_msg msg = { .addr = state->config->demod_address,
  67. .flags = 0, .buf = (u8*)buf, .len = len };
  68. /* msleep(20); */ /* doesn't appear to be necessary */
  69. if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
  70. printk(KERN_WARNING "or51132: I2C write (addr 0x%02x len %d) error: %d\n",
  71. msg.addr, msg.len, err);
  72. return -EREMOTEIO;
  73. }
  74. return 0;
  75. }
  76. /* Write constant bytes, e.g. or51132_writebytes(state, 0x04, 0x42, 0x00);
  77. Less code and more efficient that loading a buffer on the stack with
  78. the bytes to send and then calling or51132_writebuf() on that. */
  79. #define or51132_writebytes(state, data...) \
  80. ({ static const u8 _data[] = {data}; \
  81. or51132_writebuf(state, _data, sizeof(_data)); })
  82. /* Read data from demod into buffer. Returns 0 on success. */
  83. static int or51132_readbuf(struct or51132_state *state, u8 *buf, int len)
  84. {
  85. int err;
  86. struct i2c_msg msg = { .addr = state->config->demod_address,
  87. .flags = I2C_M_RD, .buf = buf, .len = len };
  88. /* msleep(20); */ /* doesn't appear to be necessary */
  89. if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
  90. printk(KERN_WARNING "or51132: I2C read (addr 0x%02x len %d) error: %d\n",
  91. msg.addr, msg.len, err);
  92. return -EREMOTEIO;
  93. }
  94. return 0;
  95. }
  96. /* Reads a 16-bit demod register. Returns <0 on error. */
  97. static int or51132_readreg(struct or51132_state *state, u8 reg)
  98. {
  99. u8 buf[2] = { 0x04, reg };
  100. struct i2c_msg msg[2] = {
  101. {.addr = state->config->demod_address, .flags = 0,
  102. .buf = buf, .len = 2 },
  103. {.addr = state->config->demod_address, .flags = I2C_M_RD,
  104. .buf = buf, .len = 2 }};
  105. int err;
  106. if ((err = i2c_transfer(state->i2c, msg, 2)) != 2) {
  107. printk(KERN_WARNING "or51132: I2C error reading register %d: %d\n",
  108. reg, err);
  109. return -EREMOTEIO;
  110. }
  111. return buf[0] | (buf[1] << 8);
  112. }
  113. static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw)
  114. {
  115. struct or51132_state* state = fe->demodulator_priv;
  116. static const u8 run_buf[] = {0x7F,0x01};
  117. u8 rec_buf[8];
  118. u32 firmwareAsize, firmwareBsize;
  119. int i,ret;
  120. dprintk("Firmware is %Zd bytes\n",fw->size);
  121. /* Get size of firmware A and B */
  122. firmwareAsize = le32_to_cpu(*((__le32*)fw->data));
  123. dprintk("FirmwareA is %i bytes\n",firmwareAsize);
  124. firmwareBsize = le32_to_cpu(*((__le32*)(fw->data+4)));
  125. dprintk("FirmwareB is %i bytes\n",firmwareBsize);
  126. /* Upload firmware */
  127. if ((ret = or51132_writebuf(state, &fw->data[8], firmwareAsize))) {
  128. printk(KERN_WARNING "or51132: load_firmware error 1\n");
  129. return ret;
  130. }
  131. if ((ret = or51132_writebuf(state, &fw->data[8+firmwareAsize],
  132. firmwareBsize))) {
  133. printk(KERN_WARNING "or51132: load_firmware error 2\n");
  134. return ret;
  135. }
  136. if ((ret = or51132_writebuf(state, run_buf, 2))) {
  137. printk(KERN_WARNING "or51132: load_firmware error 3\n");
  138. return ret;
  139. }
  140. if ((ret = or51132_writebuf(state, run_buf, 2))) {
  141. printk(KERN_WARNING "or51132: load_firmware error 4\n");
  142. return ret;
  143. }
  144. /* 50ms for operation to begin */
  145. msleep(50);
  146. /* Read back ucode version to besure we loaded correctly and are really up and running */
  147. /* Get uCode version */
  148. if ((ret = or51132_writebytes(state, 0x10, 0x10, 0x00))) {
  149. printk(KERN_WARNING "or51132: load_firmware error a\n");
  150. return ret;
  151. }
  152. if ((ret = or51132_writebytes(state, 0x04, 0x17))) {
  153. printk(KERN_WARNING "or51132: load_firmware error b\n");
  154. return ret;
  155. }
  156. if ((ret = or51132_writebytes(state, 0x00, 0x00))) {
  157. printk(KERN_WARNING "or51132: load_firmware error c\n");
  158. return ret;
  159. }
  160. for (i=0;i<4;i++) {
  161. /* Once upon a time, this command might have had something
  162. to do with getting the firmware version, but it's
  163. not used anymore:
  164. {0x04,0x00,0x30,0x00,i+1} */
  165. /* Read 8 bytes, two bytes at a time */
  166. if ((ret = or51132_readbuf(state, &rec_buf[i*2], 2))) {
  167. printk(KERN_WARNING
  168. "or51132: load_firmware error d - %d\n",i);
  169. return ret;
  170. }
  171. }
  172. printk(KERN_WARNING
  173. "or51132: Version: %02X%02X%02X%02X-%02X%02X%02X%02X (%02X%01X-%01X-%02X%01X-%01X)\n",
  174. rec_buf[1],rec_buf[0],rec_buf[3],rec_buf[2],
  175. rec_buf[5],rec_buf[4],rec_buf[7],rec_buf[6],
  176. rec_buf[3],rec_buf[2]>>4,rec_buf[2]&0x0f,
  177. rec_buf[5],rec_buf[4]>>4,rec_buf[4]&0x0f);
  178. if ((ret = or51132_writebytes(state, 0x10, 0x00, 0x00))) {
  179. printk(KERN_WARNING "or51132: load_firmware error e\n");
  180. return ret;
  181. }
  182. return 0;
  183. };
  184. static int or51132_init(struct dvb_frontend* fe)
  185. {
  186. return 0;
  187. }
  188. static int or51132_read_ber(struct dvb_frontend* fe, u32* ber)
  189. {
  190. *ber = 0;
  191. return 0;
  192. }
  193. static int or51132_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
  194. {
  195. *ucblocks = 0;
  196. return 0;
  197. }
  198. static int or51132_sleep(struct dvb_frontend* fe)
  199. {
  200. return 0;
  201. }
  202. static int or51132_setmode(struct dvb_frontend* fe)
  203. {
  204. struct or51132_state* state = fe->demodulator_priv;
  205. u8 cmd_buf1[3] = {0x04, 0x01, 0x5f};
  206. u8 cmd_buf2[3] = {0x1c, 0x00, 0 };
  207. dprintk("setmode %d\n",(int)state->current_modulation);
  208. switch (state->current_modulation) {
  209. case VSB_8:
  210. /* Auto CH, Auto NTSC rej, MPEGser, MPEG2tr, phase noise-high */
  211. cmd_buf1[2] = 0x50;
  212. /* REC MODE inv IF spectrum, Normal */
  213. cmd_buf2[1] = 0x03;
  214. /* Channel MODE ATSC/VSB8 */
  215. cmd_buf2[2] = 0x06;
  216. break;
  217. /* All QAM modes are:
  218. Auto-deinterleave; MPEGser, MPEG2tr, phase noise-high
  219. REC MODE Normal Carrier Lock */
  220. case QAM_AUTO:
  221. /* Channel MODE Auto QAM64/256 */
  222. cmd_buf2[2] = 0x4f;
  223. break;
  224. case QAM_256:
  225. /* Channel MODE QAM256 */
  226. cmd_buf2[2] = 0x45;
  227. break;
  228. case QAM_64:
  229. /* Channel MODE QAM64 */
  230. cmd_buf2[2] = 0x43;
  231. break;
  232. default:
  233. printk(KERN_WARNING
  234. "or51132: setmode: Modulation set to unsupported value (%d)\n",
  235. state->current_modulation);
  236. return -EINVAL;
  237. }
  238. /* Set Receiver 1 register */
  239. if (or51132_writebuf(state, cmd_buf1, 3)) {
  240. printk(KERN_WARNING "or51132: set_mode error 1\n");
  241. return -EREMOTEIO;
  242. }
  243. dprintk("set #1 to %02x\n", cmd_buf1[2]);
  244. /* Set operation mode in Receiver 6 register */
  245. if (or51132_writebuf(state, cmd_buf2, 3)) {
  246. printk(KERN_WARNING "or51132: set_mode error 2\n");
  247. return -EREMOTEIO;
  248. }
  249. dprintk("set #6 to 0x%02x%02x\n", cmd_buf2[1], cmd_buf2[2]);
  250. return 0;
  251. }
  252. /* Some modulations use the same firmware. This classifies modulations
  253. by the firmware they use. */
  254. #define MOD_FWCLASS_UNKNOWN 0
  255. #define MOD_FWCLASS_VSB 1
  256. #define MOD_FWCLASS_QAM 2
  257. static int modulation_fw_class(fe_modulation_t modulation)
  258. {
  259. switch(modulation) {
  260. case VSB_8:
  261. return MOD_FWCLASS_VSB;
  262. case QAM_AUTO:
  263. case QAM_64:
  264. case QAM_256:
  265. return MOD_FWCLASS_QAM;
  266. default:
  267. return MOD_FWCLASS_UNKNOWN;
  268. }
  269. }
  270. static int or51132_set_parameters(struct dvb_frontend* fe,
  271. struct dvb_frontend_parameters *param)
  272. {
  273. int ret;
  274. struct or51132_state* state = fe->demodulator_priv;
  275. const struct firmware *fw;
  276. const char *fwname;
  277. int clock_mode;
  278. /* Upload new firmware only if we need a different one */
  279. if (modulation_fw_class(state->current_modulation) !=
  280. modulation_fw_class(param->u.vsb.modulation)) {
  281. switch(modulation_fw_class(param->u.vsb.modulation)) {
  282. case MOD_FWCLASS_VSB:
  283. dprintk("set_parameters VSB MODE\n");
  284. fwname = OR51132_VSB_FIRMWARE;
  285. /* Set non-punctured clock for VSB */
  286. clock_mode = 0;
  287. break;
  288. case MOD_FWCLASS_QAM:
  289. dprintk("set_parameters QAM MODE\n");
  290. fwname = OR51132_QAM_FIRMWARE;
  291. /* Set punctured clock for QAM */
  292. clock_mode = 1;
  293. break;
  294. default:
  295. printk("or51132: Modulation type(%d) UNSUPPORTED\n",
  296. param->u.vsb.modulation);
  297. return -1;
  298. }
  299. printk("or51132: Waiting for firmware upload(%s)...\n",
  300. fwname);
  301. ret = request_firmware(&fw, fwname, state->i2c->dev.parent);
  302. if (ret) {
  303. printk(KERN_WARNING "or51132: No firmware up"
  304. "loaded(timeout or file not found?)\n");
  305. return ret;
  306. }
  307. ret = or51132_load_firmware(fe, fw);
  308. release_firmware(fw);
  309. if (ret) {
  310. printk(KERN_WARNING "or51132: Writing firmware to "
  311. "device failed!\n");
  312. return ret;
  313. }
  314. printk("or51132: Firmware upload complete.\n");
  315. state->config->set_ts_params(fe, clock_mode);
  316. }
  317. /* Change only if we are actually changing the modulation */
  318. if (state->current_modulation != param->u.vsb.modulation) {
  319. state->current_modulation = param->u.vsb.modulation;
  320. or51132_setmode(fe);
  321. }
  322. if (fe->ops.tuner_ops.set_params) {
  323. fe->ops.tuner_ops.set_params(fe, param);
  324. if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
  325. }
  326. /* Set to current mode */
  327. or51132_setmode(fe);
  328. /* Update current frequency */
  329. state->current_frequency = param->frequency;
  330. return 0;
  331. }
  332. static int or51132_get_parameters(struct dvb_frontend* fe,
  333. struct dvb_frontend_parameters *param)
  334. {
  335. struct or51132_state* state = fe->demodulator_priv;
  336. int status;
  337. int retry = 1;
  338. start:
  339. /* Receiver Status */
  340. if ((status = or51132_readreg(state, 0x00)) < 0) {
  341. printk(KERN_WARNING "or51132: get_parameters: error reading receiver status\n");
  342. return -EREMOTEIO;
  343. }
  344. switch(status&0xff) {
  345. case 0x06: param->u.vsb.modulation = VSB_8; break;
  346. case 0x43: param->u.vsb.modulation = QAM_64; break;
  347. case 0x45: param->u.vsb.modulation = QAM_256; break;
  348. default:
  349. if (retry--) goto start;
  350. printk(KERN_WARNING "or51132: unknown status 0x%02x\n",
  351. status&0xff);
  352. return -EREMOTEIO;
  353. }
  354. /* FIXME: Read frequency from frontend, take AFC into account */
  355. param->frequency = state->current_frequency;
  356. /* FIXME: How to read inversion setting? Receiver 6 register? */
  357. param->inversion = INVERSION_AUTO;
  358. return 0;
  359. }
  360. static int or51132_read_status(struct dvb_frontend* fe, fe_status_t* status)
  361. {
  362. struct or51132_state* state = fe->demodulator_priv;
  363. int reg;
  364. /* Receiver Status */
  365. if ((reg = or51132_readreg(state, 0x00)) < 0) {
  366. printk(KERN_WARNING "or51132: read_status: error reading receiver status: %d\n", reg);
  367. *status = 0;
  368. return -EREMOTEIO;
  369. }
  370. dprintk("%s: read_status %04x\n", __func__, reg);
  371. if (reg & 0x0100) /* Receiver Lock */
  372. *status = FE_HAS_SIGNAL|FE_HAS_CARRIER|FE_HAS_VITERBI|
  373. FE_HAS_SYNC|FE_HAS_LOCK;
  374. else
  375. *status = 0;
  376. return 0;
  377. }
  378. /* Calculate SNR estimation (scaled by 2^24)
  379. 8-VSB SNR and QAM equations from Oren datasheets
  380. For 8-VSB:
  381. SNR[dB] = 10 * log10(897152044.8282 / MSE^2 ) - K
  382. Where K = 0 if NTSC rejection filter is OFF; and
  383. K = 3 if NTSC rejection filter is ON
  384. For QAM64:
  385. SNR[dB] = 10 * log10(897152044.8282 / MSE^2 )
  386. For QAM256:
  387. SNR[dB] = 10 * log10(907832426.314266 / MSE^2 )
  388. We re-write the snr equation as:
  389. SNR * 2^24 = 10*(c - 2*intlog10(MSE))
  390. Where for QAM256, c = log10(907832426.314266) * 2^24
  391. and for 8-VSB and QAM64, c = log10(897152044.8282) * 2^24 */
  392. static u32 calculate_snr(u32 mse, u32 c)
  393. {
  394. if (mse == 0) /* No signal */
  395. return 0;
  396. mse = 2*intlog10(mse);
  397. if (mse > c) {
  398. /* Negative SNR, which is possible, but realisticly the
  399. demod will lose lock before the signal gets this bad. The
  400. API only allows for unsigned values, so just return 0 */
  401. return 0;
  402. }
  403. return 10*(c - mse);
  404. }
  405. static int or51132_read_snr(struct dvb_frontend* fe, u16* snr)
  406. {
  407. struct or51132_state* state = fe->demodulator_priv;
  408. int noise, reg;
  409. u32 c, usK = 0;
  410. int retry = 1;
  411. start:
  412. /* SNR after Equalizer */
  413. noise = or51132_readreg(state, 0x02);
  414. if (noise < 0) {
  415. printk(KERN_WARNING "or51132: read_snr: error reading equalizer\n");
  416. return -EREMOTEIO;
  417. }
  418. dprintk("read_snr noise (%d)\n", noise);
  419. /* Read status, contains modulation type for QAM_AUTO and
  420. NTSC filter for VSB */
  421. reg = or51132_readreg(state, 0x00);
  422. if (reg < 0) {
  423. printk(KERN_WARNING "or51132: read_snr: error reading receiver status\n");
  424. return -EREMOTEIO;
  425. }
  426. switch (reg&0xff) {
  427. case 0x06:
  428. if (reg & 0x1000) usK = 3 << 24;
  429. /* Fall through to QAM64 case */
  430. case 0x43:
  431. c = 150204167;
  432. break;
  433. case 0x45:
  434. c = 150290396;
  435. break;
  436. default:
  437. printk(KERN_WARNING "or51132: unknown status 0x%02x\n", reg&0xff);
  438. if (retry--) goto start;
  439. return -EREMOTEIO;
  440. }
  441. dprintk("%s: modulation %02x, NTSC rej O%s\n", __func__,
  442. reg&0xff, reg&0x1000?"n":"ff");
  443. /* Calculate SNR using noise, c, and NTSC rejection correction */
  444. state->snr = calculate_snr(noise, c) - usK;
  445. *snr = (state->snr) >> 16;
  446. dprintk("%s: noise = 0x%08x, snr = %d.%02d dB\n", __func__, noise,
  447. state->snr >> 24, (((state->snr>>8) & 0xffff) * 100) >> 16);
  448. return 0;
  449. }
  450. static int or51132_read_signal_strength(struct dvb_frontend* fe, u16* strength)
  451. {
  452. /* Calculate Strength from SNR up to 35dB */
  453. /* Even though the SNR can go higher than 35dB, there is some comfort */
  454. /* factor in having a range of strong signals that can show at 100% */
  455. struct or51132_state* state = (struct or51132_state*) fe->demodulator_priv;
  456. u16 snr;
  457. int ret;
  458. ret = fe->ops.read_snr(fe, &snr);
  459. if (ret != 0)
  460. return ret;
  461. /* Rather than use the 8.8 value snr, use state->snr which is 8.24 */
  462. /* scale the range 0 - 35*2^24 into 0 - 65535 */
  463. if (state->snr >= 8960 * 0x10000)
  464. *strength = 0xffff;
  465. else
  466. *strength = state->snr / 8960;
  467. return 0;
  468. }
  469. static int or51132_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings)
  470. {
  471. fe_tune_settings->min_delay_ms = 500;
  472. fe_tune_settings->step_size = 0;
  473. fe_tune_settings->max_drift = 0;
  474. return 0;
  475. }
  476. static void or51132_release(struct dvb_frontend* fe)
  477. {
  478. struct or51132_state* state = fe->demodulator_priv;
  479. kfree(state);
  480. }
  481. static struct dvb_frontend_ops or51132_ops;
  482. struct dvb_frontend* or51132_attach(const struct or51132_config* config,
  483. struct i2c_adapter* i2c)
  484. {
  485. struct or51132_state* state = NULL;
  486. /* Allocate memory for the internal state */
  487. state = kzalloc(sizeof(struct or51132_state), GFP_KERNEL);
  488. if (state == NULL)
  489. return NULL;
  490. /* Setup the state */
  491. state->config = config;
  492. state->i2c = i2c;
  493. state->current_frequency = -1;
  494. state->current_modulation = -1;
  495. /* Create dvb_frontend */
  496. memcpy(&state->frontend.ops, &or51132_ops, sizeof(struct dvb_frontend_ops));
  497. state->frontend.demodulator_priv = state;
  498. return &state->frontend;
  499. }
  500. static struct dvb_frontend_ops or51132_ops = {
  501. .info = {
  502. .name = "Oren OR51132 VSB/QAM Frontend",
  503. .type = FE_ATSC,
  504. .frequency_min = 44000000,
  505. .frequency_max = 958000000,
  506. .frequency_stepsize = 166666,
  507. .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
  508. FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
  509. FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_QAM_AUTO |
  510. FE_CAN_8VSB
  511. },
  512. .release = or51132_release,
  513. .init = or51132_init,
  514. .sleep = or51132_sleep,
  515. .set_frontend = or51132_set_parameters,
  516. .get_frontend = or51132_get_parameters,
  517. .get_tune_settings = or51132_get_tune_settings,
  518. .read_status = or51132_read_status,
  519. .read_ber = or51132_read_ber,
  520. .read_signal_strength = or51132_read_signal_strength,
  521. .read_snr = or51132_read_snr,
  522. .read_ucblocks = or51132_read_ucblocks,
  523. };
  524. module_param(debug, int, 0644);
  525. MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
  526. MODULE_DESCRIPTION("OR51132 ATSC [pcHDTV HD-3000] (8VSB & ITU J83 AnnexB FEC QAM64/256) Demodulator Driver");
  527. MODULE_AUTHOR("Kirk Lapray");
  528. MODULE_AUTHOR("Trent Piepho");
  529. MODULE_LICENSE("GPL");
  530. EXPORT_SYMBOL(or51132_attach);
  531. /*
  532. * Local variables:
  533. * c-basic-offset: 8
  534. * End:
  535. */