or51211.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  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. * or /lib/firmware (depending on configuration of firmware hotplug).
  29. */
  30. #define OR51211_DEFAULT_FIRMWARE "dvb-fe-or51211.fw"
  31. #include <linux/kernel.h>
  32. #include <linux/module.h>
  33. #include <linux/moduleparam.h>
  34. #include <linux/device.h>
  35. #include <linux/firmware.h>
  36. #include <linux/string.h>
  37. #include <linux/slab.h>
  38. #include <asm/byteorder.h>
  39. #include "dvb_frontend.h"
  40. #include "or51211.h"
  41. static int debug;
  42. #define dprintk(args...) \
  43. do { \
  44. if (debug) printk(KERN_DEBUG "or51211: " args); \
  45. } while (0)
  46. static u8 run_buf[] = {0x7f,0x01};
  47. static u8 cmd_buf[] = {0x04,0x01,0x50,0x80,0x06}; // ATSC
  48. struct or51211_state {
  49. struct i2c_adapter* i2c;
  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 %zd 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. u32 signal_strength;
  289. /* SNR after Equalizer */
  290. snd_buf[0] = 0x04;
  291. snd_buf[1] = 0x00;
  292. snd_buf[2] = 0x04;
  293. snd_buf[3] = 0x00;
  294. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  295. printk(KERN_WARNING "or51211: read_status write error\n");
  296. return -1;
  297. }
  298. msleep(3);
  299. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  300. printk(KERN_WARNING "or51211: read_status read error\n");
  301. return -1;
  302. }
  303. snr_equ = rec_buf[0] & 0xff;
  304. /* The value reported back from the frontend will be FFFF=100% 0000=0% */
  305. signal_strength = (((5334 - i20Log10(snr_equ))/3+5)*65535)/1000;
  306. if (signal_strength > 0xffff)
  307. *strength = 0xffff;
  308. else
  309. *strength = signal_strength;
  310. dprintk("read_signal_strength %i\n",*strength);
  311. return 0;
  312. }
  313. static int or51211_read_snr(struct dvb_frontend* fe, u16* snr)
  314. {
  315. struct or51211_state* state = fe->demodulator_priv;
  316. u8 rec_buf[2];
  317. u8 snd_buf[4];
  318. /* SNR after Equalizer */
  319. snd_buf[0] = 0x04;
  320. snd_buf[1] = 0x00;
  321. snd_buf[2] = 0x04;
  322. snd_buf[3] = 0x00;
  323. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  324. printk(KERN_WARNING "or51211: read_status write error\n");
  325. return -1;
  326. }
  327. msleep(3);
  328. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  329. printk(KERN_WARNING "or51211: read_status read error\n");
  330. return -1;
  331. }
  332. *snr = rec_buf[0] & 0xff;
  333. dprintk("read_snr %i\n",*snr);
  334. return 0;
  335. }
  336. static int or51211_read_ber(struct dvb_frontend* fe, u32* ber)
  337. {
  338. *ber = -ENOSYS;
  339. return 0;
  340. }
  341. static int or51211_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
  342. {
  343. *ucblocks = -ENOSYS;
  344. return 0;
  345. }
  346. static int or51211_sleep(struct dvb_frontend* fe)
  347. {
  348. return 0;
  349. }
  350. static int or51211_init(struct dvb_frontend* fe)
  351. {
  352. struct or51211_state* state = fe->demodulator_priv;
  353. const struct or51211_config* config = state->config;
  354. const struct firmware* fw;
  355. unsigned char get_ver_buf[] = {0x04,0x00,0x30,0x00,0x00};
  356. unsigned char rec_buf[14];
  357. int ret,i;
  358. if (!state->initialized) {
  359. /* Request the firmware, this will block until it uploads */
  360. printk(KERN_INFO "or51211: Waiting for firmware upload "
  361. "(%s)...\n", OR51211_DEFAULT_FIRMWARE);
  362. ret = config->request_firmware(fe, &fw,
  363. OR51211_DEFAULT_FIRMWARE);
  364. printk(KERN_INFO "or51211:Got Hotplug firmware\n");
  365. if (ret) {
  366. printk(KERN_WARNING "or51211: No firmware uploaded "
  367. "(timeout or file not found?)\n");
  368. return ret;
  369. }
  370. ret = or51211_load_firmware(fe, fw);
  371. release_firmware(fw);
  372. if (ret) {
  373. printk(KERN_WARNING "or51211: Writing firmware to "
  374. "device failed!\n");
  375. return ret;
  376. }
  377. printk(KERN_INFO "or51211: Firmware upload complete.\n");
  378. /* Set operation mode in Receiver 1 register;
  379. * type 1:
  380. * data 0x50h Automatic sets receiver channel conditions
  381. * Automatic NTSC rejection filter
  382. * Enable MPEG serial data output
  383. * MPEG2tr
  384. * High tuner phase noise
  385. * normal +/-150kHz Carrier acquisition range
  386. */
  387. if (i2c_writebytes(state,state->config->demod_address,
  388. cmd_buf,3)) {
  389. printk(KERN_WARNING "or51211: Load DVR Error 5\n");
  390. return -1;
  391. }
  392. /* Read back ucode version to besure we loaded correctly */
  393. /* and are really up and running */
  394. rec_buf[0] = 0x04;
  395. rec_buf[1] = 0x00;
  396. rec_buf[2] = 0x03;
  397. rec_buf[3] = 0x00;
  398. msleep(30);
  399. if (i2c_writebytes(state,state->config->demod_address,
  400. rec_buf,3)) {
  401. printk(KERN_WARNING "or51211: Load DVR Error A\n");
  402. return -1;
  403. }
  404. msleep(3);
  405. if (i2c_readbytes(state,state->config->demod_address,
  406. &rec_buf[10],2)) {
  407. printk(KERN_WARNING "or51211: Load DVR Error B\n");
  408. return -1;
  409. }
  410. rec_buf[0] = 0x04;
  411. rec_buf[1] = 0x00;
  412. rec_buf[2] = 0x01;
  413. rec_buf[3] = 0x00;
  414. msleep(20);
  415. if (i2c_writebytes(state,state->config->demod_address,
  416. rec_buf,3)) {
  417. printk(KERN_WARNING "or51211: Load DVR Error C\n");
  418. return -1;
  419. }
  420. msleep(3);
  421. if (i2c_readbytes(state,state->config->demod_address,
  422. &rec_buf[12],2)) {
  423. printk(KERN_WARNING "or51211: Load DVR Error D\n");
  424. return -1;
  425. }
  426. for (i = 0; i < 8; i++)
  427. rec_buf[i]=0xed;
  428. for (i = 0; i < 5; i++) {
  429. msleep(30);
  430. get_ver_buf[4] = i+1;
  431. if (i2c_writebytes(state,state->config->demod_address,
  432. get_ver_buf,5)) {
  433. printk(KERN_WARNING "or51211:Load DVR Error 6"
  434. " - %d\n",i);
  435. return -1;
  436. }
  437. msleep(3);
  438. if (i2c_readbytes(state,state->config->demod_address,
  439. &rec_buf[i*2],2)) {
  440. printk(KERN_WARNING "or51211:Load DVR Error 7"
  441. " - %d\n",i);
  442. return -1;
  443. }
  444. /* If we didn't receive the right index, try again */
  445. if ((int)rec_buf[i*2+1]!=i+1){
  446. i--;
  447. }
  448. }
  449. dprintk("read_fwbits %x %x %x %x %x %x %x %x %x %x\n",
  450. rec_buf[0], rec_buf[1], rec_buf[2], rec_buf[3],
  451. rec_buf[4], rec_buf[5], rec_buf[6], rec_buf[7],
  452. rec_buf[8], rec_buf[9]);
  453. printk(KERN_INFO "or51211: ver TU%02x%02x%02x VSB mode %02x"
  454. " Status %02x\n",
  455. rec_buf[2], rec_buf[4],rec_buf[6],
  456. rec_buf[12],rec_buf[10]);
  457. rec_buf[0] = 0x04;
  458. rec_buf[1] = 0x00;
  459. rec_buf[2] = 0x03;
  460. rec_buf[3] = 0x00;
  461. msleep(20);
  462. if (i2c_writebytes(state,state->config->demod_address,
  463. rec_buf,3)) {
  464. printk(KERN_WARNING "or51211: Load DVR Error 8\n");
  465. return -1;
  466. }
  467. msleep(20);
  468. if (i2c_readbytes(state,state->config->demod_address,
  469. &rec_buf[8],2)) {
  470. printk(KERN_WARNING "or51211: Load DVR Error 9\n");
  471. return -1;
  472. }
  473. state->initialized = 1;
  474. }
  475. return 0;
  476. }
  477. static int or51211_get_tune_settings(struct dvb_frontend* fe,
  478. struct dvb_frontend_tune_settings* fesettings)
  479. {
  480. fesettings->min_delay_ms = 500;
  481. fesettings->step_size = 0;
  482. fesettings->max_drift = 0;
  483. return 0;
  484. }
  485. static void or51211_release(struct dvb_frontend* fe)
  486. {
  487. struct or51211_state* state = fe->demodulator_priv;
  488. state->config->sleep(fe);
  489. kfree(state);
  490. }
  491. static struct dvb_frontend_ops or51211_ops;
  492. struct dvb_frontend* or51211_attach(const struct or51211_config* config,
  493. struct i2c_adapter* i2c)
  494. {
  495. struct or51211_state* state = NULL;
  496. /* Allocate memory for the internal state */
  497. state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL);
  498. if (state == NULL)
  499. goto error;
  500. /* Setup the state */
  501. state->config = config;
  502. state->i2c = i2c;
  503. state->initialized = 0;
  504. state->current_frequency = 0;
  505. /* Create dvb_frontend */
  506. memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
  507. state->frontend.demodulator_priv = state;
  508. return &state->frontend;
  509. error:
  510. kfree(state);
  511. return NULL;
  512. }
  513. static struct dvb_frontend_ops or51211_ops = {
  514. .info = {
  515. .name = "Oren OR51211 VSB Frontend",
  516. .type = FE_ATSC,
  517. .frequency_min = 44000000,
  518. .frequency_max = 958000000,
  519. .frequency_stepsize = 166666,
  520. .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
  521. FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
  522. FE_CAN_8VSB
  523. },
  524. .release = or51211_release,
  525. .init = or51211_init,
  526. .sleep = or51211_sleep,
  527. .set_frontend = or51211_set_parameters,
  528. .get_tune_settings = or51211_get_tune_settings,
  529. .read_status = or51211_read_status,
  530. .read_ber = or51211_read_ber,
  531. .read_signal_strength = or51211_read_signal_strength,
  532. .read_snr = or51211_read_snr,
  533. .read_ucblocks = or51211_read_ucblocks,
  534. };
  535. module_param(debug, int, 0644);
  536. MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
  537. MODULE_DESCRIPTION("Oren OR51211 VSB [pcHDTV HD-2000] Demodulator Driver");
  538. MODULE_AUTHOR("Kirk Lapray");
  539. MODULE_LICENSE("GPL");
  540. EXPORT_SYMBOL(or51211_attach);