V4L/DVB (10266): Add support for TurboSight TBS6920 DVB-S2 PCI-e card.
authorIgor M. Liplianin <liplianin@me.by>
Sat, 17 Jan 2009 15:11:20 +0000 (12:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:23 +0000 (12:42 -0300)
TurboSight TBS6920 DVB-S2 PCI-e card contains cx23885 PCI-e bridge
and cx24116 demodulator.
http://www.linuxtv.org/wiki/index.php/TBS_6920
The card tested by me (Igor).

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
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 35ea130e9898c21231347559f601ea572687cb08..3af13a06ee6efb49a19467d35d2b1fedbe15c923 100644 (file)
@@ -12,3 +12,4 @@
  11 -> DViCO FusionHDTV DVB-T Dual Express                 [18ac:db78]
  12 -> Leadtek Winfast PxDVR3200 H                         [107d:6681]
  13 -> Compro VideoMate E650F                              [185b:e800]
+ 14 -> TurboSight TBS 6920                                 [6920:8888]
index caa098beeecf60f91f0a8482e5e2407d4d2f4fd7..0b050bc88ef542d3fdba7f70b8fa66321f8925fe 100644 (file)
@@ -162,6 +162,10 @@ struct cx23885_board cx23885_boards[] = {
                .name           = "Compro VideoMate E650F",
                .portc          = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_TBS_6920] = {
+               .name           = "TurboSight TBS 6920",
+               .portb          = CX23885_MPEG_DVB,
+       },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -245,6 +249,10 @@ struct cx23885_subid cx23885_subids[] = {
                .subvendor = 0x185b,
                .subdevice = 0xe800,
                .card      = CX23885_BOARD_COMPRO_VIDEOMATE_E650F,
+       }, {
+               .subvendor = 0x6920,
+               .subdevice = 0x8888,
+               .card      = CX23885_BOARD_TBS_6920,
        },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -552,6 +560,11 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
                mdelay(20);
                cx_set(GP0_IO, 0x00040004);
                break;
+       case CX23885_BOARD_TBS_6920:
+               cx_write(MC417_CTL, 0x00000036);
+               cx_write(MC417_OEN, 0x00001000);
+               cx_write(MC417_RWD, 0x00001800);
+               break;
        }
 }
 
@@ -632,6 +645,11 @@ void cx23885_card_setup(struct cx23885_dev *dev)
                ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
                ts2->src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
                break;
+       case CX23885_BOARD_TBS_6920:
+               ts1->gen_ctrl_val  = 0x5; /* Parallel */
+               ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
+               ts1->src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
+               break;
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
        case CX23885_BOARD_HAUPPAUGE_HVR1500:
        case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
index 1c454128a9df9c5fca5b2b6fd7253ed6111d5426..3e0b04074e55d57eb099f517c12bfa853206c115 100644 (file)
@@ -43,6 +43,7 @@
 #include "dib7000p.h"
 #include "dibx000_common.h"
 #include "zl10353.h"
+#include "cx24116.h"
 
 static unsigned int debug;
 
@@ -308,6 +309,24 @@ static struct zl10353_config dvico_fusionhdtv_xc3028 = {
        .no_tuner      = 1,
 };
 
+static int tbs_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
+{
+       struct cx23885_tsport *port = fe->dvb->priv;
+       struct cx23885_dev *dev = port->dev;
+
+       if (voltage == SEC_VOLTAGE_18)
+               cx_write(MC417_RWD, 0x00001e00);/* GPIO-13 high */
+       else if (voltage == SEC_VOLTAGE_13)
+               cx_write(MC417_RWD, 0x00001a00);/* GPIO-13 low */
+       else
+               cx_write(MC417_RWD, 0x00001800);/* GPIO-12 low */
+       return 0;
+}
+
+static struct cx24116_config tbs_cx24116_config = {
+       .demod_address = 0x05,
+};
+
 static int dvb_register(struct cx23885_tsport *port)
 {
        struct cx23885_dev *dev = port->dev;
@@ -525,6 +544,16 @@ static int dvb_register(struct cx23885_tsport *port)
                        if (fe != NULL && fe->ops.tuner_ops.set_config != NULL)
                                fe->ops.tuner_ops.set_config(fe, &ctl);
                }
+               break;
+       case CX23885_BOARD_TBS_6920:
+               i2c_bus = &dev->i2c_bus[0];
+
+               fe0->dvb.frontend = dvb_attach(cx24116_attach,
+                       &tbs_cx24116_config,
+                       &i2c_bus->i2c_adap);
+               if (fe0->dvb.frontend != NULL)
+                       fe0->dvb.frontend->ops.set_voltage = tbs_set_voltage;
+
                break;
        default:
                printk(KERN_INFO "%s: The frontend of your DVB/ATSC card "
index 67828029fc69ed9489ce91ba5f30bdb33a4eb9d9..b4f23238598f0685c9a64ceea2fdaf45e7548a30 100644 (file)
@@ -67,6 +67,7 @@
 #define CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP 11
 #define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H 12
 #define CX23885_BOARD_COMPRO_VIDEOMATE_E650F   13
+#define CX23885_BOARD_TBS_6920                 14
 
 /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */
 #define CX23885_NORMS (\