diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-22 13:45:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:45 -0400 |
commit | 9507901ef329b2dd3417372c7c9b2abcfd5c1885 (patch) | |
tree | c75414bbc36905375c7615b971d88a1f26a74c88 /drivers/media/video/cx88/cx88-dvb.c | |
parent | c2cb8fcc006ce59255de67e3fe9f65fb79db633b (diff) |
V4L/DVB (7257): cx88: Add xc2028/3028 boards
This patch ports a patch from Markus Rechberger to work with tuner-xc2028.
It adds entries for several cx88 boards with xc2038/3028 tuners.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 735376060df2..c786d951a04b 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -434,8 +434,16 @@ static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { | |||
434 | .tuner_callback = cx88_tuner_callback, | 434 | .tuner_callback = cx88_tuner_callback, |
435 | }; | 435 | }; |
436 | 436 | ||
437 | static struct zl10353_config cx88_geniatech_x8000_mt = { | ||
438 | .demod_address = (0x1e >> 1), | ||
439 | .no_tuner = 1, | ||
440 | }; | ||
441 | |||
442 | |||
437 | static int dvb_register(struct cx8802_dev *dev) | 443 | static int dvb_register(struct cx8802_dev *dev) |
438 | { | 444 | { |
445 | int attach_xc3028 = 0; | ||
446 | |||
439 | /* init struct videobuf_dvb */ | 447 | /* init struct videobuf_dvb */ |
440 | dev->dvb.name = dev->core->name; | 448 | dev->dvb.name = dev->core->name; |
441 | dev->ts_gen_cntrl = 0x0c; | 449 | dev->ts_gen_cntrl = 0x0c; |
@@ -727,16 +735,50 @@ static int dvb_register(struct cx8802_dev *dev) | |||
727 | fe->ops.tuner_ops.set_config(fe, &ctl); | 735 | fe->ops.tuner_ops.set_config(fe, &ctl); |
728 | } | 736 | } |
729 | break; | 737 | break; |
738 | case CX88_BOARD_PINNACLE_HYBRID_PCTV: | ||
739 | dev->dvb.frontend = dvb_attach(zl10353_attach, | ||
740 | &cx88_geniatech_x8000_mt, | ||
741 | &dev->core->i2c_adap); | ||
742 | attach_xc3028 = 1; | ||
743 | break; | ||
744 | case CX88_BOARD_GENIATECH_X8000_MT: | ||
745 | dev->ts_gen_cntrl = 0x00; | ||
746 | |||
747 | dev->dvb.frontend = dvb_attach(zl10353_attach, | ||
748 | &cx88_geniatech_x8000_mt, | ||
749 | &dev->core->i2c_adap); | ||
750 | attach_xc3028 = 1; | ||
751 | break; | ||
730 | default: | 752 | default: |
731 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", | 753 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", |
732 | dev->core->name); | 754 | dev->core->name); |
733 | break; | 755 | break; |
734 | } | 756 | } |
735 | if (NULL == dev->dvb.frontend) { | 757 | if (NULL == dev->dvb.frontend) { |
736 | printk(KERN_ERR "%s/2: frontend initialization failed\n", dev->core->name); | 758 | printk(KERN_ERR |
759 | "%s/2: frontend initialization failed\n", | ||
760 | dev->core->name); | ||
737 | return -1; | 761 | return -1; |
738 | } | 762 | } |
739 | 763 | ||
764 | if (attach_xc3028) { | ||
765 | struct dvb_frontend *fe; | ||
766 | struct xc2028_config cfg = { | ||
767 | .i2c_adap = &dev->core->i2c_adap, | ||
768 | .i2c_addr = 0x61, | ||
769 | .video_dev = dev->core, | ||
770 | }; | ||
771 | fe = dvb_attach(xc2028_attach, dev->dvb.frontend, &cfg); | ||
772 | if (!fe) { | ||
773 | printk(KERN_ERR "%s/2: xc3028 attach failed\n", | ||
774 | dev->core->name); | ||
775 | dvb_frontend_detach(dev->dvb.frontend); | ||
776 | dvb_unregister_frontend(dev->dvb.frontend); | ||
777 | dev->dvb.frontend = NULL; | ||
778 | return -1; | ||
779 | } | ||
780 | } | ||
781 | |||
740 | /* Ensure all frontends negotiate bus access */ | 782 | /* Ensure all frontends negotiate bus access */ |
741 | dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; | 783 | dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; |
742 | 784 | ||