cx23885-dvb.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. /*
  2. * Driver for the Conexant CX23885 PCIe bridge
  3. *
  4. * Copyright (c) 2006 Steven Toth <stoth@linuxtv.org>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. *
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. #include <linux/module.h>
  22. #include <linux/init.h>
  23. #include <linux/device.h>
  24. #include <linux/fs.h>
  25. #include <linux/kthread.h>
  26. #include <linux/file.h>
  27. #include <linux/suspend.h>
  28. #include "cx23885.h"
  29. #include <media/v4l2-common.h>
  30. #include "s5h1409.h"
  31. #include "s5h1411.h"
  32. #include "mt2131.h"
  33. #include "tda8290.h"
  34. #include "tda18271.h"
  35. #include "lgdt330x.h"
  36. #include "xc5000.h"
  37. #include "tda10048.h"
  38. #include "tuner-xc2028.h"
  39. #include "tuner-simple.h"
  40. #include "dib7000p.h"
  41. #include "dibx000_common.h"
  42. static unsigned int debug;
  43. #define dprintk(level, fmt, arg...)\
  44. do { if (debug >= level)\
  45. printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
  46. } while (0)
  47. /* ------------------------------------------------------------------ */
  48. static unsigned int alt_tuner;
  49. module_param(alt_tuner, int, 0644);
  50. MODULE_PARM_DESC(alt_tuner, "Enable alternate tuner configuration");
  51. DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
  52. /* ------------------------------------------------------------------ */
  53. static int dvb_buf_setup(struct videobuf_queue *q,
  54. unsigned int *count, unsigned int *size)
  55. {
  56. struct cx23885_tsport *port = q->priv_data;
  57. port->ts_packet_size = 188 * 4;
  58. port->ts_packet_count = 32;
  59. *size = port->ts_packet_size * port->ts_packet_count;
  60. *count = 32;
  61. return 0;
  62. }
  63. static int dvb_buf_prepare(struct videobuf_queue *q,
  64. struct videobuf_buffer *vb, enum v4l2_field field)
  65. {
  66. struct cx23885_tsport *port = q->priv_data;
  67. return cx23885_buf_prepare(q, port, (struct cx23885_buffer*)vb, field);
  68. }
  69. static void dvb_buf_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
  70. {
  71. struct cx23885_tsport *port = q->priv_data;
  72. cx23885_buf_queue(port, (struct cx23885_buffer*)vb);
  73. }
  74. static void dvb_buf_release(struct videobuf_queue *q,
  75. struct videobuf_buffer *vb)
  76. {
  77. cx23885_free_buffer(q, (struct cx23885_buffer*)vb);
  78. }
  79. static struct videobuf_queue_ops dvb_qops = {
  80. .buf_setup = dvb_buf_setup,
  81. .buf_prepare = dvb_buf_prepare,
  82. .buf_queue = dvb_buf_queue,
  83. .buf_release = dvb_buf_release,
  84. };
  85. static struct s5h1409_config hauppauge_generic_config = {
  86. .demod_address = 0x32 >> 1,
  87. .output_mode = S5H1409_SERIAL_OUTPUT,
  88. .gpio = S5H1409_GPIO_ON,
  89. .qam_if = 44000,
  90. .inversion = S5H1409_INVERSION_OFF,
  91. .status_mode = S5H1409_DEMODLOCKING,
  92. .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
  93. };
  94. static struct tda10048_config hauppauge_hvr1200_config = {
  95. .demod_address = 0x10 >> 1,
  96. .output_mode = TDA10048_SERIAL_OUTPUT,
  97. .fwbulkwritelen = TDA10048_BULKWRITE_200,
  98. .inversion = TDA10048_INVERSION_ON
  99. };
  100. static struct s5h1409_config hauppauge_ezqam_config = {
  101. .demod_address = 0x32 >> 1,
  102. .output_mode = S5H1409_SERIAL_OUTPUT,
  103. .gpio = S5H1409_GPIO_OFF,
  104. .qam_if = 4000,
  105. .inversion = S5H1409_INVERSION_ON,
  106. .status_mode = S5H1409_DEMODLOCKING,
  107. .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
  108. };
  109. static struct s5h1409_config hauppauge_hvr1800lp_config = {
  110. .demod_address = 0x32 >> 1,
  111. .output_mode = S5H1409_SERIAL_OUTPUT,
  112. .gpio = S5H1409_GPIO_OFF,
  113. .qam_if = 44000,
  114. .inversion = S5H1409_INVERSION_OFF,
  115. .status_mode = S5H1409_DEMODLOCKING,
  116. .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
  117. };
  118. static struct s5h1409_config hauppauge_hvr1500_config = {
  119. .demod_address = 0x32 >> 1,
  120. .output_mode = S5H1409_SERIAL_OUTPUT,
  121. .gpio = S5H1409_GPIO_OFF,
  122. .inversion = S5H1409_INVERSION_OFF,
  123. .status_mode = S5H1409_DEMODLOCKING,
  124. .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
  125. };
  126. static struct mt2131_config hauppauge_generic_tunerconfig = {
  127. 0x61
  128. };
  129. static struct lgdt330x_config fusionhdtv_5_express = {
  130. .demod_address = 0x0e,
  131. .demod_chip = LGDT3303,
  132. .serial_mpeg = 0x40,
  133. };
  134. static struct s5h1409_config hauppauge_hvr1500q_config = {
  135. .demod_address = 0x32 >> 1,
  136. .output_mode = S5H1409_SERIAL_OUTPUT,
  137. .gpio = S5H1409_GPIO_ON,
  138. .qam_if = 44000,
  139. .inversion = S5H1409_INVERSION_OFF,
  140. .status_mode = S5H1409_DEMODLOCKING,
  141. .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
  142. };
  143. static struct s5h1409_config dvico_s5h1409_config = {
  144. .demod_address = 0x32 >> 1,
  145. .output_mode = S5H1409_SERIAL_OUTPUT,
  146. .gpio = S5H1409_GPIO_ON,
  147. .qam_if = 44000,
  148. .inversion = S5H1409_INVERSION_OFF,
  149. .status_mode = S5H1409_DEMODLOCKING,
  150. .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
  151. };
  152. static struct s5h1411_config dvico_s5h1411_config = {
  153. .output_mode = S5H1411_SERIAL_OUTPUT,
  154. .gpio = S5H1411_GPIO_ON,
  155. .qam_if = S5H1411_IF_44000,
  156. .vsb_if = S5H1411_IF_44000,
  157. .inversion = S5H1411_INVERSION_OFF,
  158. .status_mode = S5H1411_DEMODLOCKING,
  159. .mpeg_timing = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
  160. };
  161. static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
  162. .i2c_address = 0x61,
  163. .if_khz = 5380,
  164. .tuner_callback = cx23885_tuner_callback
  165. };
  166. static struct xc5000_config dvico_xc5000_tunerconfig = {
  167. .i2c_address = 0x64,
  168. .if_khz = 5380,
  169. .tuner_callback = cx23885_tuner_callback
  170. };
  171. static struct tda829x_config tda829x_no_probe = {
  172. .probe_tuner = TDA829X_DONT_PROBE,
  173. };
  174. static struct tda18271_std_map hauppauge_tda18271_std_map = {
  175. .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3,
  176. .if_lvl = 6, .rfagc_top = 0x37 },
  177. .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0,
  178. .if_lvl = 6, .rfagc_top = 0x37 },
  179. };
  180. static struct tda18271_config hauppauge_tda18271_config = {
  181. .std_map = &hauppauge_tda18271_std_map,
  182. .gate = TDA18271_GATE_ANALOG,
  183. };
  184. static struct tda18271_config hauppauge_hvr1200_tuner_config = {
  185. .gate = TDA18271_GATE_ANALOG,
  186. };
  187. static struct dibx000_agc_config xc3028_agc_config = {
  188. BAND_VHF | BAND_UHF, /* band_caps */
  189. /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=0,
  190. * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0,
  191. * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0,
  192. * P_agc_nb_est=2, P_agc_write=0
  193. */
  194. (0 << 15) | (0 << 14) | (0 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
  195. (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), /* setup */
  196. 712, /* inv_gain */
  197. 21, /* time_stabiliz */
  198. 0, /* alpha_level */
  199. 118, /* thlock */
  200. 0, /* wbd_inv */
  201. 2867, /* wbd_ref */
  202. 0, /* wbd_sel */
  203. 2, /* wbd_alpha */
  204. 0, /* agc1_max */
  205. 0, /* agc1_min */
  206. 39718, /* agc2_max */
  207. 9930, /* agc2_min */
  208. 0, /* agc1_pt1 */
  209. 0, /* agc1_pt2 */
  210. 0, /* agc1_pt3 */
  211. 0, /* agc1_slope1 */
  212. 0, /* agc1_slope2 */
  213. 0, /* agc2_pt1 */
  214. 128, /* agc2_pt2 */
  215. 29, /* agc2_slope1 */
  216. 29, /* agc2_slope2 */
  217. 17, /* alpha_mant */
  218. 27, /* alpha_exp */
  219. 23, /* beta_mant */
  220. 51, /* beta_exp */
  221. 1, /* perform_agc_softsplit */
  222. };
  223. /* PLL Configuration for COFDM BW_MHz = 8.000000
  224. * With external clock = 30.000000 */
  225. static struct dibx000_bandwidth_config xc3028_bw_config = {
  226. 60000, /* internal */
  227. 30000, /* sampling */
  228. 1, /* pll_cfg: prediv */
  229. 8, /* pll_cfg: ratio */
  230. 3, /* pll_cfg: range */
  231. 1, /* pll_cfg: reset */
  232. 0, /* pll_cfg: bypass */
  233. 0, /* misc: refdiv */
  234. 0, /* misc: bypclk_div */
  235. 1, /* misc: IO_CLK_en_core */
  236. 1, /* misc: ADClkSrc */
  237. 0, /* misc: modulo */
  238. (3 << 14) | (1 << 12) | (524 << 0), /* sad_cfg: refsel, sel, freq_15k */
  239. (1 << 25) | 5816102, /* ifreq = 5.200000 MHz */
  240. 20452225, /* timf */
  241. 30000000 /* xtal_hz */
  242. };
  243. static struct dib7000p_config hauppauge_hvr1400_dib7000_config = {
  244. .output_mpeg2_in_188_bytes = 1,
  245. .hostbus_diversity = 1,
  246. .tuner_is_baseband = 0,
  247. .update_lna = NULL,
  248. .agc_config_count = 1,
  249. .agc = &xc3028_agc_config,
  250. .bw = &xc3028_bw_config,
  251. .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
  252. .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
  253. .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS,
  254. .pwm_freq_div = 0,
  255. .agc_control = NULL,
  256. .spur_protect = 0,
  257. .output_mode = OUTMODE_MPEG2_SERIAL,
  258. };
  259. static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg)
  260. {
  261. struct cx23885_tsport *port = ptr;
  262. struct cx23885_dev *dev = port->dev;
  263. switch (command) {
  264. case XC2028_TUNER_RESET:
  265. /* Send the tuner in then out of reset */
  266. /* GPIO-2 xc3028 tuner */
  267. dprintk(1, "%s: XC2028_TUNER_RESET %d\n", __func__, arg);
  268. cx_set(GP0_IO, 0x00040000);
  269. cx_clear(GP0_IO, 0x00000004);
  270. msleep(5);
  271. cx_set(GP0_IO, 0x00040004);
  272. msleep(5);
  273. break;
  274. case XC2028_RESET_CLK:
  275. dprintk(1, "%s: XC2028_RESET_CLK %d\n", __func__, arg);
  276. break;
  277. default:
  278. dprintk(1, "%s: unknown command %d, arg %d\n", __func__,
  279. command, arg);
  280. return -EINVAL;
  281. }
  282. return 0;
  283. }
  284. static int dvb_register(struct cx23885_tsport *port)
  285. {
  286. struct cx23885_dev *dev = port->dev;
  287. struct cx23885_i2c *i2c_bus = NULL;
  288. /* init struct videobuf_dvb */
  289. port->dvb.name = dev->name;
  290. /* init frontend */
  291. switch (dev->board) {
  292. case CX23885_BOARD_HAUPPAUGE_HVR1250:
  293. i2c_bus = &dev->i2c_bus[0];
  294. port->dvb.frontend = dvb_attach(s5h1409_attach,
  295. &hauppauge_generic_config,
  296. &i2c_bus->i2c_adap);
  297. if (port->dvb.frontend != NULL) {
  298. dvb_attach(mt2131_attach, port->dvb.frontend,
  299. &i2c_bus->i2c_adap,
  300. &hauppauge_generic_tunerconfig, 0);
  301. }
  302. break;
  303. case CX23885_BOARD_HAUPPAUGE_HVR1800:
  304. i2c_bus = &dev->i2c_bus[0];
  305. switch (alt_tuner) {
  306. case 1:
  307. port->dvb.frontend =
  308. dvb_attach(s5h1409_attach,
  309. &hauppauge_ezqam_config,
  310. &i2c_bus->i2c_adap);
  311. if (port->dvb.frontend != NULL) {
  312. dvb_attach(tda829x_attach, port->dvb.frontend,
  313. &dev->i2c_bus[1].i2c_adap, 0x42,
  314. &tda829x_no_probe);
  315. dvb_attach(tda18271_attach, port->dvb.frontend,
  316. 0x60, &dev->i2c_bus[1].i2c_adap,
  317. &hauppauge_tda18271_config);
  318. }
  319. break;
  320. case 0:
  321. default:
  322. port->dvb.frontend =
  323. dvb_attach(s5h1409_attach,
  324. &hauppauge_generic_config,
  325. &i2c_bus->i2c_adap);
  326. if (port->dvb.frontend != NULL)
  327. dvb_attach(mt2131_attach, port->dvb.frontend,
  328. &i2c_bus->i2c_adap,
  329. &hauppauge_generic_tunerconfig, 0);
  330. break;
  331. }
  332. break;
  333. case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
  334. i2c_bus = &dev->i2c_bus[0];
  335. port->dvb.frontend = dvb_attach(s5h1409_attach,
  336. &hauppauge_hvr1800lp_config,
  337. &i2c_bus->i2c_adap);
  338. if (port->dvb.frontend != NULL) {
  339. dvb_attach(mt2131_attach, port->dvb.frontend,
  340. &i2c_bus->i2c_adap,
  341. &hauppauge_generic_tunerconfig, 0);
  342. }
  343. break;
  344. case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
  345. i2c_bus = &dev->i2c_bus[0];
  346. port->dvb.frontend = dvb_attach(lgdt330x_attach,
  347. &fusionhdtv_5_express,
  348. &i2c_bus->i2c_adap);
  349. if (port->dvb.frontend != NULL) {
  350. dvb_attach(simple_tuner_attach, port->dvb.frontend,
  351. &i2c_bus->i2c_adap, 0x61,
  352. TUNER_LG_TDVS_H06XF);
  353. }
  354. break;
  355. case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
  356. i2c_bus = &dev->i2c_bus[1];
  357. port->dvb.frontend = dvb_attach(s5h1409_attach,
  358. &hauppauge_hvr1500q_config,
  359. &dev->i2c_bus[0].i2c_adap);
  360. if (port->dvb.frontend != NULL)
  361. dvb_attach(xc5000_attach, port->dvb.frontend,
  362. &i2c_bus->i2c_adap,
  363. &hauppauge_hvr1500q_tunerconfig, i2c_bus);
  364. break;
  365. case CX23885_BOARD_HAUPPAUGE_HVR1500:
  366. i2c_bus = &dev->i2c_bus[1];
  367. port->dvb.frontend = dvb_attach(s5h1409_attach,
  368. &hauppauge_hvr1500_config,
  369. &dev->i2c_bus[0].i2c_adap);
  370. if (port->dvb.frontend != NULL) {
  371. struct dvb_frontend *fe;
  372. struct xc2028_config cfg = {
  373. .i2c_adap = &i2c_bus->i2c_adap,
  374. .i2c_addr = 0x61,
  375. .callback = cx23885_hvr1500_xc3028_callback,
  376. };
  377. static struct xc2028_ctrl ctl = {
  378. .fname = "xc3028-v27.fw",
  379. .max_len = 64,
  380. .scode_table = XC3028_FE_OREN538,
  381. };
  382. fe = dvb_attach(xc2028_attach,
  383. port->dvb.frontend, &cfg);
  384. if (fe != NULL && fe->ops.tuner_ops.set_config != NULL)
  385. fe->ops.tuner_ops.set_config(fe, &ctl);
  386. }
  387. break;
  388. case CX23885_BOARD_HAUPPAUGE_HVR1200:
  389. case CX23885_BOARD_HAUPPAUGE_HVR1700:
  390. i2c_bus = &dev->i2c_bus[0];
  391. port->dvb.frontend = dvb_attach(tda10048_attach,
  392. &hauppauge_hvr1200_config,
  393. &i2c_bus->i2c_adap);
  394. if (port->dvb.frontend != NULL) {
  395. dvb_attach(tda829x_attach, port->dvb.frontend,
  396. &dev->i2c_bus[1].i2c_adap, 0x42,
  397. &tda829x_no_probe);
  398. dvb_attach(tda18271_attach, port->dvb.frontend,
  399. 0x60, &dev->i2c_bus[1].i2c_adap,
  400. &hauppauge_hvr1200_tuner_config);
  401. }
  402. break;
  403. case CX23885_BOARD_HAUPPAUGE_HVR1400:
  404. i2c_bus = &dev->i2c_bus[0];
  405. port->dvb.frontend = dvb_attach(dib7000p_attach,
  406. &i2c_bus->i2c_adap,
  407. 0x12, &hauppauge_hvr1400_dib7000_config);
  408. if (port->dvb.frontend != NULL) {
  409. struct dvb_frontend *fe;
  410. struct xc2028_config cfg = {
  411. .i2c_adap = &dev->i2c_bus[1].i2c_adap,
  412. .i2c_addr = 0x64,
  413. .callback = cx23885_hvr1500_xc3028_callback,
  414. };
  415. static struct xc2028_ctrl ctl = {
  416. .fname = "xc3028L-v36.fw",
  417. .max_len = 64,
  418. .demod = 5000,
  419. .d2633 = 1
  420. };
  421. fe = dvb_attach(xc2028_attach,
  422. port->dvb.frontend, &cfg);
  423. if (fe != NULL && fe->ops.tuner_ops.set_config != NULL)
  424. fe->ops.tuner_ops.set_config(fe, &ctl);
  425. }
  426. break;
  427. case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
  428. i2c_bus = &dev->i2c_bus[port->nr - 1];
  429. port->dvb.frontend = dvb_attach(s5h1409_attach,
  430. &dvico_s5h1409_config,
  431. &i2c_bus->i2c_adap);
  432. if (port->dvb.frontend == NULL)
  433. port->dvb.frontend = dvb_attach(s5h1411_attach,
  434. &dvico_s5h1411_config,
  435. &i2c_bus->i2c_adap);
  436. if (port->dvb.frontend != NULL)
  437. dvb_attach(xc5000_attach, port->dvb.frontend,
  438. &i2c_bus->i2c_adap,
  439. &dvico_xc5000_tunerconfig, i2c_bus);
  440. break;
  441. default:
  442. printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
  443. dev->name);
  444. break;
  445. }
  446. if (NULL == port->dvb.frontend) {
  447. printk("%s: frontend initialization failed\n", dev->name);
  448. return -1;
  449. }
  450. /* Put the analog decoder in standby to keep it quiet */
  451. cx23885_call_i2c_clients(i2c_bus, TUNER_SET_STANDBY, NULL);
  452. if (port->dvb.frontend->ops.analog_ops.standby)
  453. port->dvb.frontend->ops.analog_ops.standby(port->dvb.frontend);
  454. /* register everything */
  455. return videobuf_dvb_register(&port->dvb, THIS_MODULE, port,
  456. &dev->pci->dev, adapter_nr);
  457. }
  458. int cx23885_dvb_register(struct cx23885_tsport *port)
  459. {
  460. struct cx23885_dev *dev = port->dev;
  461. int err;
  462. dprintk(1, "%s\n", __func__);
  463. dprintk(1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n",
  464. dev->board,
  465. dev->name,
  466. dev->pci_bus,
  467. dev->pci_slot);
  468. err = -ENODEV;
  469. /* dvb stuff */
  470. printk("%s: cx23885 based dvb card\n", dev->name);
  471. videobuf_queue_sg_init(&port->dvb.dvbq, &dvb_qops, &dev->pci->dev, &port->slock,
  472. V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_TOP,
  473. sizeof(struct cx23885_buffer), port);
  474. err = dvb_register(port);
  475. if (err != 0)
  476. printk("%s() dvb_register failed err = %d\n", __func__, err);
  477. return err;
  478. }
  479. int cx23885_dvb_unregister(struct cx23885_tsport *port)
  480. {
  481. /* dvb */
  482. if(port->dvb.frontend)
  483. videobuf_dvb_unregister(&port->dvb);
  484. return 0;
  485. }
  486. /*
  487. * Local variables:
  488. * c-basic-offset: 8
  489. * End:
  490. * kate: eol "unix"; indent-width 3; remove-trailing-space on; replace-trailing-space-save on; tab-width 8; replace-tabs off; space-indent off; mixed-indent off
  491. */