V4L/DVB (7986): cx23885: add initial support for DViCO FusionHDTV7 Dual Express
authorMichael Krufky <mkrufky@linuxtv.org>
Wed, 7 May 2008 04:43:10 +0000 (01:43 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 20 Jul 2008 10:08:09 +0000 (07:08 -0300)
Only one frontend is enabled right now. The second frontend can lock,
but transport doesn't work yet.  The device will be supported as a
single tuner device until the second frontend is working.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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 191194e..f0e613b 100644 (file)
@@ -8,3 +8,4 @@
   7 -> Hauppauge WinTV-HVR1200                             [0070:71d1,0070:71d3]
   8 -> Hauppauge WinTV-HVR1700                             [0070:8101]
   9 -> Hauppauge WinTV-HVR1400                             [0070:8010]
+ 10 -> DViCO FusionHDTV7 Dual Express                      [18ac:d618]
index 20e05f2..fd7112c 100644 (file)
@@ -143,6 +143,10 @@ struct cx23885_board cx23885_boards[] = {
                .name           = "Hauppauge WinTV-HVR1400",
                .portc          = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP] = {
+               .name           = "DViCO FusionHDTV7 Dual Express",
+               .portc          = CX23885_MPEG_DVB,
+       },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -210,6 +214,10 @@ struct cx23885_subid cx23885_subids[] = {
                .subvendor = 0x0070,
                .subdevice = 0x8010,
                .card      = CX23885_BOARD_HAUPPAUGE_HVR1400,
+       },{
+               .subvendor = 0x18ac,
+               .subdevice = 0xd618,
+               .card      = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP,
        },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -477,6 +485,11 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        }
 
        switch (dev->board) {
+       case CX23885_BOARD_DVICO_FUSIONHDTV_7_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;
+               /* break omitted intentionally */
        case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
                ts1->gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
                ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
index 022aa39..51dedb1 100644 (file)
@@ -164,12 +164,28 @@ static struct s5h1409_config hauppauge_hvr1500q_config = {
        .mpeg_timing   = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
 };
 
+static struct s5h1409_config dvico_s5h1409_config = {
+       .demod_address = 0x32 >> 1,
+       .output_mode   = S5H1409_SERIAL_OUTPUT,
+       .gpio          = S5H1409_GPIO_ON,
+       .qam_if        = 44000,
+       .inversion     = S5H1409_INVERSION_OFF,
+       .status_mode   = S5H1409_DEMODLOCKING,
+       .mpeg_timing   = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
+};
+
 static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
        .i2c_address      = 0x61,
        .if_khz           = 5380,
        .tuner_callback   = cx23885_tuner_callback
 };
 
+static struct xc5000_config dvico_xc5000_tunerconfig = {
+       .i2c_address      = 0x64,
+       .if_khz           = 5380,
+       .tuner_callback   = cx23885_tuner_callback
+};
+
 static struct tda829x_config tda829x_no_probe = {
        .probe_tuner = TDA829X_DONT_PROBE,
 };
@@ -453,6 +469,17 @@ static int dvb_register(struct cx23885_tsport *port)
                                fe->ops.tuner_ops.set_config(fe, &ctl);
                }
                break;
+       case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
+               i2c_bus = &dev->i2c_bus[port->nr - 1];
+
+               port->dvb.frontend = dvb_attach(s5h1409_attach,
+                                               &dvico_s5h1409_config,
+                                               &i2c_bus->i2c_adap);
+               if (port->dvb.frontend != NULL)
+                       dvb_attach(xc5000_attach, port->dvb.frontend,
+                               &i2c_bus->i2c_adap,
+                               &dvico_xc5000_tunerconfig, i2c_bus);
+               break;
        default:
                printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
                       dev->name);
index 32af87f..00dfdc8 100644 (file)
@@ -63,6 +63,7 @@
 #define CX23885_BOARD_HAUPPAUGE_HVR1200        7
 #define CX23885_BOARD_HAUPPAUGE_HVR1700        8
 #define CX23885_BOARD_HAUPPAUGE_HVR1400        9
+#define CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP 10
 
 /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */
 #define CX23885_NORMS (\