V4L/DVB (8644): Add support for DViCO FusionHDTV DVB-T Dual Express
authorSteven Toth <stoth@hauppauge.com>
Tue, 5 Aug 2008 00:39:53 +0000 (21:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:49 +0000 (09:36 -0200)
Add support for the DViCO FusionHDTV DVB-T Dual Express card, based on
work by Chris Pascoe and Stephen Backway.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/video4linux/CARDLIST.cx23885
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx23885/cx23885.h

index f0e613ba55b8bd2f1ed0f39b7e93699ec3b9d5bc..bccafd3578531252dae9dae08449040b94f33afd 100644 (file)
@@ -9,3 +9,4 @@
   8 -> Hauppauge WinTV-HVR1700                             [0070:8101]
   9 -> Hauppauge WinTV-HVR1400                             [0070:8010]
  10 -> DViCO FusionHDTV7 Dual Express                      [18ac:d618]
+ 11 -> DViCO FusionHDTV DVB-T Dual Express                 [18ac:db78]
index 93ad7f8ce203e06a4fd6b916bf8bb495fa9574f4..7caa2465e7fb1a4fd8927322e76c1bdc3e4b0f93 100644 (file)
@@ -149,6 +149,11 @@ struct cx23885_board cx23885_boards[] = {
                .portb          = CX23885_MPEG_DVB,
                .portc          = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP] = {
+               .name           = "DViCO FusionHDTV DVB-T Dual Express",
+               .portb          = CX23885_MPEG_DVB,
+               .portc          = CX23885_MPEG_DVB,
+       },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -220,6 +225,10 @@ struct cx23885_subid cx23885_subids[] = {
                .subvendor = 0x18ac,
                .subdevice = 0xd618,
                .card      = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP,
+       },{
+               .subvendor = 0x18ac,
+               .subdevice = 0xdb78,
+               .card      = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP,
        },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -340,6 +349,7 @@ static int cx23885_tuner_callback(struct cx23885_dev *dev, int port,
                        bitmask = 0x04;
                break;
        case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
+       case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
                if (command == 0) {
 
                        /* Two identical tuners on two different i2c buses,
@@ -476,6 +486,19 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
                /* GPIO-2 xc5000 tuner reset i2c bus 1 */
                /* GPIO-3 s5h1409 demod reset i2c bus 0 */
 
+               /* Put the parts into reset and back */
+               cx_set(GP0_IO, 0x000f0000);
+               mdelay(20);
+               cx_clear(GP0_IO, 0x0000000f);
+               mdelay(20);
+               cx_set(GP0_IO, 0x000f000f);
+               break;
+       case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
+               /* GPIO-0 portb xc3028 reset */
+               /* GPIO-1 portb zl10353 reset */
+               /* GPIO-2 portc xc3028 reset */
+               /* GPIO-3 portc zl10353 reset */
+
                /* Put the parts into reset and back */
                cx_set(GP0_IO, 0x000f0000);
                mdelay(20);
@@ -534,6 +557,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
 
        switch (dev->board) {
        case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
+       case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
                ts2->gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
                ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
                ts2->src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
index 45670051e7d5de897058a860e9265de1da166b07..dbbbf5b0d2e154afbf0b09b6ac3edf81266569d4 100644 (file)
@@ -42,6 +42,7 @@
 #include "tuner-simple.h"
 #include "dib7000p.h"
 #include "dibx000_common.h"
+#include "zl10353.h"
 
 static unsigned int debug;
 
@@ -303,6 +304,12 @@ static struct dib7000p_config hauppauge_hvr1400_dib7000_config = {
        .output_mode = OUTMODE_MPEG2_SERIAL,
 };
 
+static struct zl10353_config dvico_fusionhdtv_xc3028 = {
+       .demod_address = 0x0f,
+       .if2           = 45600,
+       .no_tuner      = 1,
+};
+
 static int dvb_register(struct cx23885_tsport *port)
 {
        struct cx23885_dev *dev = port->dev;
@@ -465,6 +472,33 @@ static int dvb_register(struct cx23885_tsport *port)
                                &i2c_bus->i2c_adap,
                                &dvico_xc5000_tunerconfig, i2c_bus);
                break;
+       case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: {
+               i2c_bus = &dev->i2c_bus[port->nr - 1];
+
+               port->dvb.frontend = dvb_attach(zl10353_attach,
+                                              &dvico_fusionhdtv_xc3028,
+                                              &i2c_bus->i2c_adap);
+               if (port->dvb.frontend != NULL) {
+                       struct dvb_frontend      *fe;
+                       struct xc2028_config      cfg = {
+                               .i2c_adap  = &i2c_bus->i2c_adap,
+                               .i2c_addr  = 0x61,
+                               .video_dev = port,
+                               .callback  = cx23885_xc3028_tuner_callback,
+                       };
+                       static struct xc2028_ctrl ctl = {
+                               .fname       = "xc3028-v27.fw",
+                               .max_len     = 64,
+                               .demod       = XC3028_FE_ZARLINK456,
+                       };
+
+                       fe = dvb_attach(xc2028_attach, port->dvb.frontend,
+                                       &cfg);
+                       if (fe != NULL && fe->ops.tuner_ops.set_config != NULL)
+                               fe->ops.tuner_ops.set_config(fe, &ctl);
+               }
+               break;
+       }
        default:
                printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
                       dev->name);
index 64827fb669a2fcbb46abed46703566b3b029c8a8..08b4c1390e164e6da21233b0b2ecc3bfebd60f9c 100644 (file)
@@ -64,6 +64,7 @@
 #define CX23885_BOARD_HAUPPAUGE_HVR1700        8
 #define CX23885_BOARD_HAUPPAUGE_HVR1400        9
 #define CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP 10
+#define CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP 11
 
 /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */
 #define CX23885_NORMS (\