or51211.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. /*
  2. * Support for OR51211 (pcHDTV HD-2000) - VSB
  3. *
  4. * Copyright (C) 2005 Kirk Lapray <kirk_lapray@bigfoot.com>
  5. *
  6. * Based on code from Jack Kelliher (kelliher@xmission.com)
  7. * Copyright (C) 2002 & pcHDTV, inc.
  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. * This driver needs external firmware. Please use the command
  26. * "<kerneldir>/Documentation/dvb/get_dvb_firmware or51211" to
  27. * download/extract it, and then copy it to /usr/lib/hotplug/firmware.
  28. */
  29. #define OR51211_DEFAULT_FIRMWARE "dvb-fe-or51211.fw"
  30. #include <linux/kernel.h>
  31. #include <linux/module.h>
  32. #include <linux/moduleparam.h>
  33. #include <linux/device.h>
  34. #include <linux/firmware.h>
  35. #include <linux/string.h>
  36. #include <linux/slab.h>
  37. #include <asm/byteorder.h>
  38. #include "dvb_frontend.h"
  39. #include "or51211.h"
  40. static int debug;
  41. #define dprintk(args...) \
  42. do { \
  43. if (debug) printk(KERN_DEBUG "or51211: " args); \
  44. } while (0)
  45. static u8 run_buf[] = {0x7f,0x01};
  46. static u8 cmd_buf[] = {0x04,0x01,0x50,0x80,0x06}; // ATSC
  47. struct or51211_state {
  48. struct i2c_adapter* i2c;
  49. struct dvb_frontend_ops ops;
  50. /* Configuration settings */
  51. const struct or51211_config* config;
  52. struct dvb_frontend frontend;
  53. struct bt878* bt;
  54. /* Demodulator private data */
  55. u8 initialized:1;
  56. /* Tuner private data */
  57. u32 current_frequency;
  58. };
  59. static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf,
  60. int len)
  61. {
  62. int err;
  63. struct i2c_msg msg;
  64. msg.addr = reg;
  65. msg.flags = 0;
  66. msg.len = len;
  67. msg.buf = buf;
  68. if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
  69. printk(KERN_WARNING "or51211: i2c_writebytes error "
  70. "(addr %02x, err == %i)\n", reg, err);
  71. return -EREMOTEIO;
  72. }
  73. return 0;
  74. }
  75. static u8 i2c_readbytes (struct or51211_state* state, u8 reg, u8* buf, int len)
  76. {
  77. int err;
  78. struct i2c_msg msg;
  79. msg.addr = reg;
  80. msg.flags = I2C_M_RD;
  81. msg.len = len;
  82. msg.buf = buf;
  83. if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
  84. printk(KERN_WARNING "or51211: i2c_readbytes error "
  85. "(addr %02x, err == %i)\n", reg, err);
  86. return -EREMOTEIO;
  87. }
  88. return 0;
  89. }
  90. static int or51211_load_firmware (struct dvb_frontend* fe,
  91. const struct firmware *fw)
  92. {
  93. struct or51211_state* state = fe->demodulator_priv;
  94. u8 tudata[585];
  95. int i;
  96. dprintk("Firmware is %d bytes\n",fw->size);
  97. /* Get eprom data */
  98. tudata[0] = 17;
  99. if (i2c_writebytes(state,0x50,tudata,1)) {
  100. printk(KERN_WARNING "or51211:load_firmware error eprom addr\n");
  101. return -1;
  102. }
  103. if (i2c_readbytes(state,0x50,&tudata[145],192)) {
  104. printk(KERN_WARNING "or51211: load_firmware error eprom\n");
  105. return -1;
  106. }
  107. /* Create firmware buffer */
  108. for (i = 0; i < 145; i++)
  109. tudata[i] = fw->data[i];
  110. for (i = 0; i < 248; i++)
  111. tudata[i+337] = fw->data[145+i];
  112. state->config->reset(fe);
  113. if (i2c_writebytes(state,state->config->demod_address,tudata,585)) {
  114. printk(KERN_WARNING "or51211: load_firmware error 1\n");
  115. return -1;
  116. }
  117. msleep(1);
  118. if (i2c_writebytes(state,state->config->demod_address,
  119. &fw->data[393],8125)) {
  120. printk(KERN_WARNING "or51211: load_firmware error 2\n");
  121. return -1;
  122. }
  123. msleep(1);
  124. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  125. printk(KERN_WARNING "or51211: load_firmware error 3\n");
  126. return -1;
  127. }
  128. /* Wait at least 5 msec */
  129. msleep(10);
  130. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  131. printk(KERN_WARNING "or51211: load_firmware error 4\n");
  132. return -1;
  133. }
  134. msleep(10);
  135. printk("or51211: Done.\n");
  136. return 0;
  137. };
  138. static int or51211_setmode(struct dvb_frontend* fe, int mode)
  139. {
  140. struct or51211_state* state = fe->demodulator_priv;
  141. u8 rec_buf[14];
  142. state->config->setmode(fe, mode);
  143. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  144. printk(KERN_WARNING "or51211: setmode error 1\n");
  145. return -1;
  146. }
  147. /* Wait at least 5 msec */
  148. msleep(10);
  149. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  150. printk(KERN_WARNING "or51211: setmode error 2\n");
  151. return -1;
  152. }
  153. msleep(10);
  154. /* Set operation mode in Receiver 1 register;
  155. * type 1:
  156. * data 0x50h Automatic sets receiver channel conditions
  157. * Automatic NTSC rejection filter
  158. * Enable MPEG serial data output
  159. * MPEG2tr
  160. * High tuner phase noise
  161. * normal +/-150kHz Carrier acquisition range
  162. */
  163. if (i2c_writebytes(state,state->config->demod_address,cmd_buf,3)) {
  164. printk(KERN_WARNING "or51211: setmode error 3\n");
  165. return -1;
  166. }
  167. rec_buf[0] = 0x04;
  168. rec_buf[1] = 0x00;
  169. rec_buf[2] = 0x03;
  170. rec_buf[3] = 0x00;
  171. msleep(20);
  172. if (i2c_writebytes(state,state->config->demod_address,rec_buf,3)) {
  173. printk(KERN_WARNING "or51211: setmode error 5\n");
  174. }
  175. msleep(3);
  176. if (i2c_readbytes(state,state->config->demod_address,&rec_buf[10],2)) {
  177. printk(KERN_WARNING "or51211: setmode error 6");
  178. return -1;
  179. }
  180. dprintk("setmode rec status %02x %02x\n",rec_buf[10],rec_buf[11]);
  181. return 0;
  182. }
  183. static int or51211_set_parameters(struct dvb_frontend* fe,
  184. struct dvb_frontend_parameters *param)
  185. {
  186. struct or51211_state* state = fe->demodulator_priv;
  187. u32 freq = 0;
  188. u16 tunerfreq = 0;
  189. u8 buf[4];
  190. /* Change only if we are actually changing the channel */
  191. if (state->current_frequency != param->frequency) {
  192. freq = 44000 + (param->frequency/1000);
  193. tunerfreq = freq * 16/1000;
  194. dprintk("set_parameters frequency = %d (tunerfreq = %d)\n",
  195. param->frequency,tunerfreq);
  196. buf[0] = (tunerfreq >> 8) & 0x7F;
  197. buf[1] = (tunerfreq & 0xFF);
  198. buf[2] = 0x8E;
  199. if (param->frequency < 157250000) {
  200. buf[3] = 0xA0;
  201. dprintk("set_parameters VHF low range\n");
  202. } else if (param->frequency < 454000000) {
  203. buf[3] = 0x90;
  204. dprintk("set_parameters VHF high range\n");
  205. } else {
  206. buf[3] = 0x30;
  207. dprintk("set_parameters UHF range\n");
  208. }
  209. dprintk("set_parameters tuner bytes: 0x%02x 0x%02x "
  210. "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]);
  211. if (i2c_writebytes(state,0xC2>>1,buf,4))
  212. printk(KERN_WARNING "or51211:set_parameters error "
  213. "writing to tuner\n");
  214. /* Set to ATSC mode */
  215. or51211_setmode(fe,0);
  216. /* Update current frequency */
  217. state->current_frequency = param->frequency;
  218. }
  219. return 0;
  220. }
  221. static int or51211_read_status(struct dvb_frontend* fe, fe_status_t* status)
  222. {
  223. struct or51211_state* state = fe->demodulator_priv;
  224. unsigned char rec_buf[2];
  225. unsigned char snd_buf[] = {0x04,0x00,0x03,0x00};
  226. *status = 0;
  227. /* Receiver Status */
  228. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  229. printk(KERN_WARNING "or51132: read_status write error\n");
  230. return -1;
  231. }
  232. msleep(3);
  233. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  234. printk(KERN_WARNING "or51132: read_status read error\n");
  235. return -1;
  236. }
  237. dprintk("read_status %x %x\n",rec_buf[0],rec_buf[1]);
  238. if (rec_buf[0] & 0x01) { /* Receiver Lock */
  239. *status |= FE_HAS_SIGNAL;
  240. *status |= FE_HAS_CARRIER;
  241. *status |= FE_HAS_VITERBI;
  242. *status |= FE_HAS_SYNC;
  243. *status |= FE_HAS_LOCK;
  244. }
  245. return 0;
  246. }
  247. /* log10-1 table at .5 increments from 1 to 100.5 */
  248. static unsigned int i100x20log10[] = {
  249. 0, 352, 602, 795, 954, 1088, 1204, 1306, 1397, 1480,
  250. 1556, 1625, 1690, 1750, 1806, 1858, 1908, 1955, 2000, 2042,
  251. 2082, 2121, 2158, 2193, 2227, 2260, 2292, 2322, 2352, 2380,
  252. 2408, 2434, 2460, 2486, 2510, 2534, 2557, 2580, 2602, 2623,
  253. 2644, 2664, 2684, 2704, 2723, 2742, 2760, 2778, 2795, 2813,
  254. 2829, 2846, 2862, 2878, 2894, 2909, 2924, 2939, 2954, 2968,
  255. 2982, 2996, 3010, 3023, 3037, 3050, 3062, 3075, 3088, 3100,
  256. 3112, 3124, 3136, 3148, 3159, 3170, 3182, 3193, 3204, 3214,
  257. 3225, 3236, 3246, 3256, 3266, 3276, 3286, 3296, 3306, 3316,
  258. 3325, 3334, 3344, 3353, 3362, 3371, 3380, 3389, 3397, 3406,
  259. 3415, 3423, 3432, 3440, 3448, 3456, 3464, 3472, 3480, 3488,
  260. 3496, 3504, 3511, 3519, 3526, 3534, 3541, 3549, 3556, 3563,
  261. 3570, 3577, 3584, 3591, 3598, 3605, 3612, 3619, 3625, 3632,
  262. 3639, 3645, 3652, 3658, 3665, 3671, 3677, 3683, 3690, 3696,
  263. 3702, 3708, 3714, 3720, 3726, 3732, 3738, 3744, 3750, 3755,
  264. 3761, 3767, 3772, 3778, 3784, 3789, 3795, 3800, 3806, 3811,
  265. 3816, 3822, 3827, 3832, 3838, 3843, 3848, 3853, 3858, 3863,
  266. 3868, 3874, 3879, 3884, 3888, 3893, 3898, 3903, 3908, 3913,
  267. 3918, 3922, 3927, 3932, 3936, 3941, 3946, 3950, 3955, 3960,
  268. 3964, 3969, 3973, 3978, 3982, 3986, 3991, 3995, 4000, 4004,
  269. };
  270. static unsigned int denom[] = {1,1,100,1000,10000,100000,1000000,10000000,100000000};
  271. static unsigned int i20Log10(unsigned short val)
  272. {
  273. unsigned int rntval = 100;
  274. unsigned int tmp = val;
  275. unsigned int exp = 1;
  276. while(tmp > 100) {tmp /= 100; exp++;}
  277. val = (2 * val)/denom[exp];
  278. if (exp > 1) rntval = 2000*exp;
  279. rntval += i100x20log10[val];
  280. return rntval;
  281. }
  282. static int or51211_read_signal_strength(struct dvb_frontend* fe, u16* strength)
  283. {
  284. struct or51211_state* state = fe->demodulator_priv;
  285. u8 rec_buf[2];
  286. u8 snd_buf[4];
  287. u8 snr_equ;
  288. /* SNR after Equalizer */
  289. snd_buf[0] = 0x04;
  290. snd_buf[1] = 0x00;
  291. snd_buf[2] = 0x04;
  292. snd_buf[3] = 0x00;
  293. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  294. printk(KERN_WARNING "or51211: read_status write error\n");
  295. return -1;
  296. }
  297. msleep(3);
  298. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  299. printk(KERN_WARNING "or51211: read_status read error\n");
  300. return -1;
  301. }
  302. snr_equ = rec_buf[0] & 0xff;
  303. /* The value reported back from the frontend will be FFFF=100% 0000=0% */
  304. *strength = (((5334 - i20Log10(snr_equ))/3+5)*65535)/1000;
  305. dprintk("read_signal_strength %i\n",*strength);
  306. return 0;
  307. }
  308. static int or51211_read_snr(struct dvb_frontend* fe, u16* snr)
  309. {
  310. struct or51211_state* state = fe->demodulator_priv;
  311. u8 rec_buf[2];
  312. u8 snd_buf[4];
  313. /* SNR after Equalizer */
  314. snd_buf[0] = 0x04;
  315. snd_buf[1] = 0x00;
  316. snd_buf[2] = 0x04;
  317. snd_buf[3] = 0x00;
  318. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  319. printk(KERN_WARNING "or51211: read_status write error\n");
  320. return -1;
  321. }
  322. msleep(3);
  323. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  324. printk(KERN_WARNING "or51211: read_status read error\n");
  325. return -1;
  326. }
  327. *snr = rec_buf[0] & 0xff;
  328. dprintk("read_snr %i\n",*snr);
  329. return 0;
  330. }
  331. static int or51211_read_ber(struct dvb_frontend* fe, u32* ber)
  332. {
  333. *ber = -ENOSYS;
  334. return 0;
  335. }
  336. static int or51211_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
  337. {
  338. *ucblocks = -ENOSYS;
  339. return 0;
  340. }
  341. static int or51211_sleep(struct dvb_frontend* fe)
  342. {
  343. return 0;
  344. }
  345. static int or51211_init(struct dvb_frontend* fe)
  346. {
  347. struct or51211_state* state = fe->demodulator_priv;
  348. const struct or51211_config* config = state->config;
  349. const struct firmware* fw;
  350. unsigned char get_ver_buf[] = {0x04,0x00,0x30,0x00,0x00};
  351. unsigned char rec_buf[14];
  352. int ret,i;
  353. if (!state->initialized) {
  354. /* Request the firmware, this will block until it uploads */
  355. printk(KERN_INFO "or51211: Waiting for firmware upload "
  356. "(%s)...\n", OR51211_DEFAULT_FIRMWARE);
  357. ret = config->request_firmware(fe, &fw,
  358. OR51211_DEFAULT_FIRMWARE);
  359. printk(KERN_INFO "or51211:Got Hotplug firmware\n");
  360. if (ret) {
  361. printk(KERN_WARNING "or51211: No firmware uploaded "
  362. "(timeout or file not found?)\n");
  363. return ret;
  364. }
  365. ret = or51211_load_firmware(fe, fw);
  366. if (ret) {
  367. printk(KERN_WARNING "or51211: Writing firmware to "
  368. "device failed!\n");
  369. release_firmware(fw);
  370. return ret;
  371. }
  372. printk(KERN_INFO "or51211: Firmware upload complete.\n");
  373. /* Set operation mode in Receiver 1 register;
  374. * type 1:
  375. * data 0x50h Automatic sets receiver channel conditions
  376. * Automatic NTSC rejection filter
  377. * Enable MPEG serial data output
  378. * MPEG2tr
  379. * High tuner phase noise
  380. * normal +/-150kHz Carrier acquisition range
  381. */
  382. if (i2c_writebytes(state,state->config->demod_address,
  383. cmd_buf,3)) {
  384. printk(KERN_WARNING "or51211: Load DVR Error 5\n");
  385. return -1;
  386. }
  387. /* Read back ucode version to besure we loaded correctly */
  388. /* and are really up and running */
  389. rec_buf[0] = 0x04;
  390. rec_buf[1] = 0x00;
  391. rec_buf[2] = 0x03;
  392. rec_buf[3] = 0x00;
  393. msleep(30);
  394. if (i2c_writebytes(state,state->config->demod_address,
  395. rec_buf,3)) {
  396. printk(KERN_WARNING "or51211: Load DVR Error A\n");
  397. return -1;
  398. }
  399. msleep(3);
  400. if (i2c_readbytes(state,state->config->demod_address,
  401. &rec_buf[10],2)) {
  402. printk(KERN_WARNING "or51211: Load DVR Error B\n");
  403. return -1;
  404. }
  405. rec_buf[0] = 0x04;
  406. rec_buf[1] = 0x00;
  407. rec_buf[2] = 0x01;
  408. rec_buf[3] = 0x00;
  409. msleep(20);
  410. if (i2c_writebytes(state,state->config->demod_address,
  411. rec_buf,3)) {
  412. printk(KERN_WARNING "or51211: Load DVR Error C\n");
  413. return -1;
  414. }
  415. msleep(3);
  416. if (i2c_readbytes(state,state->config->demod_address,
  417. &rec_buf[12],2)) {
  418. printk(KERN_WARNING "or51211: Load DVR Error D\n");
  419. return -1;
  420. }
  421. for (i = 0; i < 8; i++)
  422. rec_buf[i]=0xed;
  423. for (i = 0; i < 5; i++) {
  424. msleep(30);
  425. get_ver_buf[4] = i+1;
  426. if (i2c_writebytes(state,state->config->demod_address,
  427. get_ver_buf,5)) {
  428. printk(KERN_WARNING "or51211:Load DVR Error 6"
  429. " - %d\n",i);
  430. return -1;
  431. }
  432. msleep(3);
  433. if (i2c_readbytes(state,state->config->demod_address,
  434. &rec_buf[i*2],2)) {
  435. printk(KERN_WARNING "or51211:Load DVR Error 7"
  436. " - %d\n",i);
  437. return -1;
  438. }
  439. /* If we didn't receive the right index, try again */
  440. if ((int)rec_buf[i*2+1]!=i+1){
  441. i--;
  442. }
  443. }
  444. dprintk("read_fwbits %x %x %x %x %x %x %x %x %x %x\n",
  445. rec_buf[0], rec_buf[1], rec_buf[2], rec_buf[3],
  446. rec_buf[4], rec_buf[5], rec_buf[6], rec_buf[7],
  447. rec_buf[8], rec_buf[9]);
  448. printk(KERN_INFO "or51211: ver TU%02x%02x%02x VSB mode %02x"
  449. " Status %02x\n",
  450. rec_buf[2], rec_buf[4],rec_buf[6],
  451. rec_buf[12],rec_buf[10]);
  452. rec_buf[0] = 0x04;
  453. rec_buf[1] = 0x00;
  454. rec_buf[2] = 0x03;
  455. rec_buf[3] = 0x00;
  456. msleep(20);
  457. if (i2c_writebytes(state,state->config->demod_address,
  458. rec_buf,3)) {
  459. printk(KERN_WARNING "or51211: Load DVR Error 8\n");
  460. return -1;
  461. }
  462. msleep(20);
  463. if (i2c_readbytes(state,state->config->demod_address,
  464. &rec_buf[8],2)) {
  465. printk(KERN_WARNING "or51211: Load DVR Error 9\n");
  466. return -1;
  467. }
  468. state->initialized = 1;
  469. }
  470. return 0;
  471. }
  472. static int or51211_get_tune_settings(struct dvb_frontend* fe,
  473. struct dvb_frontend_tune_settings* fesettings)
  474. {
  475. fesettings->min_delay_ms = 500;
  476. fesettings->step_size = 0;
  477. fesettings->max_drift = 0;
  478. return 0;
  479. }
  480. static void or51211_release(struct dvb_frontend* fe)
  481. {
  482. struct or51211_state* state = fe->demodulator_priv;
  483. state->config->sleep(fe);
  484. kfree(state);
  485. }
  486. static struct dvb_frontend_ops or51211_ops;
  487. struct dvb_frontend* or51211_attach(const struct or51211_config* config,
  488. struct i2c_adapter* i2c)
  489. {
  490. struct or51211_state* state = NULL;
  491. /* Allocate memory for the internal state */
  492. state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL);
  493. if (state == NULL)
  494. goto error;
  495. /* Setup the state */
  496. state->config = config;
  497. state->i2c = i2c;
  498. memcpy(&state->ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
  499. state->initialized = 0;
  500. state->current_frequency = 0;
  501. /* Create dvb_frontend */
  502. state->frontend.ops = &state->ops;
  503. state->frontend.demodulator_priv = state;
  504. return &state->frontend;
  505. error:
  506. kfree(state);
  507. return NULL;
  508. }
  509. static struct dvb_frontend_ops or51211_ops = {
  510. .info = {
  511. .name = "Oren OR51211 VSB Frontend",
  512. .type = FE_ATSC,
  513. .frequency_min = 44000000,
  514. .frequency_max = 958000000,
  515. .frequency_stepsize = 166666,
  516. .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
  517. FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
  518. FE_CAN_8VSB
  519. },
  520. .release = or51211_release,
  521. .init = or51211_init,
  522. .sleep = or51211_sleep,
  523. .set_frontend = or51211_set_parameters,
  524. .get_tune_settings = or51211_get_tune_settings,
  525. .read_status = or51211_read_status,
  526. .read_ber = or51211_read_ber,
  527. .read_signal_strength = or51211_read_signal_strength,
  528. .read_snr = or51211_read_snr,
  529. .read_ucblocks = or51211_read_ucblocks,
  530. };
  531. module_param(debug, int, 0644);
  532. MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
  533. MODULE_DESCRIPTION("Oren OR51211 VSB [pcHDTV HD-2000] Demodulator Driver");
  534. MODULE_AUTHOR("Kirk Lapray");
  535. MODULE_LICENSE("GPL");
  536. EXPORT_SYMBOL(or51211_attach);