]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7645): Add support for the Hauppauge HVR-1200
authorSteven Toth <stoth@hauppauge.com>
Sat, 19 Apr 2008 04:14:19 +0000 (01:14 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:09:44 +0000 (14:09 -0300)
This adds support for DVB-T mode only, analog mode is not supported.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Documentation/video4linux/CARDLIST.cx23885
drivers/media/video/cx23885/Kconfig
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx23885/cx23885-i2c.c
drivers/media/video/cx23885/cx23885.h

index 0924e6e142c40a2f7d6a5dec0ae107ff5d616d8c..3e9e999e5895134d65fb360d9ab081f447d4d447 100644 (file)
@@ -5,3 +5,4 @@
   4 -> DViCO FusionHDTV5 Express                           [18ac:d500]
   5 -> Hauppauge WinTV-HVR1500Q                            [0070:7790,0070:7797]
   6 -> Hauppauge WinTV-HVR1500                             [0070:7710,0070:7717]
+  7 -> Hauppauge WinTV-HVR1200                             [0070:71d1]
index 1fd326fe41136cd271717eb9b89582701782131f..ca5fbce3a9095bc07dca912ce74e19387f5a4f02 100644 (file)
@@ -8,6 +8,7 @@ config VIDEO_CX23885
        select VIDEO_TVEEPROM
        select VIDEO_IR
        select VIDEOBUF_DVB
+       select VIDEO_CX25840
        select DVB_TUNER_MT2131 if !DVB_FE_CUSTOMISE
        select DVB_S5H1409 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
@@ -16,6 +17,7 @@ config VIDEO_CX23885
        select TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
        select DVB_TDA18271 if !DVB_FE_CUSTOMIZE
        select DVB_TUNER_XC5000 if !DVB_FE_CUSTOMIZE
+       select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
        ---help---
          This is a video4linux driver for Conexant 23885 based
          TV cards.
index 77cd452e6e5b8eff7d568d442be8559ecd5a15ed..8cb32f307a5d342d81e9933c2f42385ccaeadd60 100644 (file)
@@ -130,6 +130,10 @@ struct cx23885_board cx23885_boards[] = {
                .name           = "Hauppauge WinTV-HVR1500",
                .portc          = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_HAUPPAUGE_HVR1200] = {
+               .name           = "Hauppauge WinTV-HVR1200",
+               .portc          = CX23885_MPEG_DVB,
+       },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -181,6 +185,10 @@ struct cx23885_subid cx23885_subids[] = {
                .subvendor = 0x0070,
                .subdevice = 0x7717,
                .card      = CX23885_BOARD_HAUPPAUGE_HVR1500,
+       }, {
+               .subvendor = 0x0070,
+               .subdevice = 0x71d1,
+               .card      = CX23885_BOARD_HAUPPAUGE_HVR1200,
        },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -314,6 +322,17 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
                cx_set(GP0_IO, 0x00040004);
                mdelay(20);
                break;
+       case CX23885_BOARD_HAUPPAUGE_HVR1200:
+               /* GPIO-0 tda10048 demodulator reset */
+               /* GPIO-2 tda18271 tuner reset */
+
+               /* Put the parts into reset and back */
+               cx_set(GP0_IO, 0x00050000);
+               mdelay(20);
+               cx_clear(GP0_IO, 0x00000005);
+               mdelay(20);
+               cx_set(GP0_IO, 0x00050005);
+               break;
        }
 }
 
@@ -324,6 +343,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1500:
        case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
        case CX23885_BOARD_HAUPPAUGE_HVR1800:
+       case CX23885_BOARD_HAUPPAUGE_HVR1200:
                /* FIXME: Implement me */
                break;
        }
@@ -353,6 +373,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
                break;
        case CX23885_BOARD_HAUPPAUGE_HVR1800:
        case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
+       case CX23885_BOARD_HAUPPAUGE_HVR1200:
                if (dev->i2c_bus[0].i2c_rc == 0)
                        hauppauge_eeprom(dev, eeprom+0xc0);
                break;
@@ -369,6 +390,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
        case CX23885_BOARD_HAUPPAUGE_HVR1800:
        case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
+       case CX23885_BOARD_HAUPPAUGE_HVR1200:
        default:
                ts2->gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
                ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
index 1a720abbd066bbe02e2cf9bc1e744ccc1bfbf0a2..18cd90c9c0f3d8f3d4b293af6bb961469f55a462 100644 (file)
@@ -36,6 +36,7 @@
 #include "tda18271.h"
 #include "lgdt330x.h"
 #include "xc5000.h"
+#include "tda10048.h"
 #include "dvb-pll.h"
 #include "tuner-xc2028.h"
 #include "tuner-xc2028-types.h"
@@ -107,6 +108,13 @@ static struct s5h1409_config hauppauge_generic_config = {
        .mpeg_timing   = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
 };
 
+static struct tda10048_config hauppauge_hvr1200_config = {
+       .demod_address    = 0x10 >> 1,
+       .output_mode      = TDA10048_SERIAL_OUTPUT,
+       .fwbulkwritelen   = TDA10048_BULKWRITE_200,
+       .inversion        = TDA10048_INVERSION_ON
+};
+
 static struct s5h1409_config hauppauge_ezqam_config = {
        .demod_address = 0x32 >> 1,
        .output_mode   = S5H1409_SERIAL_OUTPUT,
@@ -178,6 +186,10 @@ static struct tda18271_config hauppauge_tda18271_config = {
        .gate    = TDA18271_GATE_ANALOG,
 };
 
+static struct tda18271_config hauppauge_hvr1200_tuner_config = {
+       .gate    = TDA18271_GATE_ANALOG,
+};
+
 static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg)
 {
        struct cx23885_tsport *port = ptr;
@@ -317,6 +329,20 @@ static int dvb_register(struct cx23885_tsport *port)
                                fe->ops.tuner_ops.set_config(fe, &ctl);
                }
                break;
+       case CX23885_BOARD_HAUPPAUGE_HVR1200:
+               i2c_bus = &dev->i2c_bus[0];
+               port->dvb.frontend = dvb_attach(tda10048_attach,
+                       &hauppauge_hvr1200_config,
+                       &i2c_bus->i2c_adap);
+               if (port->dvb.frontend != NULL) {
+                       dvb_attach(tda829x_attach, port->dvb.frontend,
+                               &dev->i2c_bus[1].i2c_adap, 0x42,
+                               &tda829x_no_probe);
+                       dvb_attach(tda18271_attach, port->dvb.frontend,
+                               0x60, &dev->i2c_bus[1].i2c_adap,
+                               &hauppauge_hvr1200_tuner_config);
+               }
+               break;
        default:
                printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
                       dev->name);
index 8773a1fd97cbeb251ad291035e8ee68a9f07986d..85f9d5ef17d020a0bc55e36e1cd85aa2618a116a 100644 (file)
@@ -353,6 +353,7 @@ static struct i2c_client cx23885_i2c_client_template = {
 };
 
 static char *i2c_devs[128] = {
+       [0x10 >> 1]   = "tda10048",
        [ 0x1c >> 1 ] = "lgdt3303",
        [ 0x86 >> 1 ] = "tda9887",
        [ 0x32 >> 1 ] = "cx24227",
index 7cb2179f26227456ed25a507ee8ac20a1da3047b..5bbfe6f507699c39fd3e580e7519dc0e02e2239e 100644 (file)
@@ -59,6 +59,7 @@
 #define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP   4
 #define CX23885_BOARD_HAUPPAUGE_HVR1500Q       5
 #define CX23885_BOARD_HAUPPAUGE_HVR1500        6
+#define CX23885_BOARD_HAUPPAUGE_HVR1200        7
 
 /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */
 #define CX23885_NORMS (\