diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index fa21666966e6..735376060df2 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -45,6 +45,8 @@ | |||
45 | #include "nxt200x.h" | 45 | #include "nxt200x.h" |
46 | #include "cx24123.h" | 46 | #include "cx24123.h" |
47 | #include "isl6421.h" | 47 | #include "isl6421.h" |
48 | #include "tuner-xc2028.h" | ||
49 | #include "tuner-xc2028-types.h" | ||
48 | 50 | ||
49 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); | 51 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); |
50 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); | 52 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
@@ -357,6 +359,40 @@ static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe, | |||
357 | return 0; | 359 | return 0; |
358 | } | 360 | } |
359 | 361 | ||
362 | static int cx88_xc3028_callback(void *ptr, int command, int arg) | ||
363 | { | ||
364 | struct cx88_core *core = ptr; | ||
365 | |||
366 | switch (command) { | ||
367 | case XC2028_TUNER_RESET: | ||
368 | /* Send the tuner in then out of reset */ | ||
369 | dprintk(1, "%s: XC2028_TUNER_RESET %d\n", __FUNCTION__, arg); | ||
370 | |||
371 | switch (core->boardnr) { | ||
372 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: | ||
373 | /* GPIO-4 xc3028 tuner */ | ||
374 | |||
375 | cx_set(MO_GP0_IO, 0x00001000); | ||
376 | cx_clear(MO_GP0_IO, 0x00000010); | ||
377 | msleep(100); | ||
378 | cx_set(MO_GP0_IO, 0x00000010); | ||
379 | msleep(100); | ||
380 | break; | ||
381 | } | ||
382 | |||
383 | break; | ||
384 | case XC2028_RESET_CLK: | ||
385 | dprintk(1, "%s: XC2028_RESET_CLK %d\n", __FUNCTION__, arg); | ||
386 | break; | ||
387 | default: | ||
388 | dprintk(1, "%s: unknown command %d, arg %d\n", __FUNCTION__, | ||
389 | command, arg); | ||
390 | return -EINVAL; | ||
391 | } | ||
392 | |||
393 | return 0; | ||
394 | } | ||
395 | |||
360 | static struct cx24123_config geniatech_dvbs_config = { | 396 | static struct cx24123_config geniatech_dvbs_config = { |
361 | .demod_address = 0x55, | 397 | .demod_address = 0x55, |
362 | .set_ts_params = cx24123_set_ts_param, | 398 | .set_ts_params = cx24123_set_ts_param, |
@@ -383,6 +419,15 @@ static struct s5h1409_config pinnacle_pctv_hd_800i_config = { | |||
383 | .mpeg_timing = S5H1409_MPEGTIMING_NONCONTINOUS_NONINVERTING_CLOCK, | 419 | .mpeg_timing = S5H1409_MPEGTIMING_NONCONTINOUS_NONINVERTING_CLOCK, |
384 | }; | 420 | }; |
385 | 421 | ||
422 | static struct s5h1409_config dvico_hdtv5_pci_nano_config = { | ||
423 | .demod_address = 0x32 >> 1, | ||
424 | .output_mode = S5H1409_SERIAL_OUTPUT, | ||
425 | .gpio = S5H1409_GPIO_OFF, | ||
426 | .inversion = S5H1409_INVERSION_OFF, | ||
427 | .status_mode = S5H1409_DEMODLOCKING, | ||
428 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, | ||
429 | }; | ||
430 | |||
386 | static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { | 431 | static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { |
387 | .i2c_address = 0x64, | 432 | .i2c_address = 0x64, |
388 | .if_khz = 5380, | 433 | .if_khz = 5380, |
@@ -658,6 +703,30 @@ static int dvb_register(struct cx8802_dev *dev) | |||
658 | &pinnacle_pctv_hd_800i_tuner_config); | 703 | &pinnacle_pctv_hd_800i_tuner_config); |
659 | } | 704 | } |
660 | break; | 705 | break; |
706 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: | ||
707 | dev->dvb.frontend = dvb_attach(s5h1409_attach, | ||
708 | &dvico_hdtv5_pci_nano_config, | ||
709 | &dev->core->i2c_adap); | ||
710 | if (dev->dvb.frontend != NULL) { | ||
711 | struct dvb_frontend *fe; | ||
712 | struct xc2028_config cfg = { | ||
713 | .i2c_adap = &dev->core->i2c_adap, | ||
714 | .i2c_addr = 0x61, | ||
715 | .video_dev = dev->core, | ||
716 | .callback = cx88_xc3028_callback, | ||
717 | }; | ||
718 | static struct xc2028_ctrl ctl = { | ||
719 | .fname = "xc3028-v27.fw", | ||
720 | .max_len = 64, | ||
721 | .scode_table = OREN538, | ||
722 | }; | ||
723 | |||
724 | fe = dvb_attach(xc2028_attach, | ||
725 | dev->dvb.frontend, &cfg); | ||
726 | if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) | ||
727 | fe->ops.tuner_ops.set_config(fe, &ctl); | ||
728 | } | ||
729 | break; | ||
661 | default: | 730 | default: |
662 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", | 731 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", |
663 | dev->core->name); | 732 | dev->core->name); |