]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (11771): cx23885: add DVB-T tuning support for Hauppauge WinTV-HVR1210
authorMichael Krufky <mkrufky@kernellabs.com>
Tue, 12 May 2009 20:32:17 +0000 (17:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Jun 2009 21:21:04 +0000 (18:21 -0300)
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
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 e7ed710f7ea996885293f041cc844fe52b957323..948e436108bc5dd30572df28ecf21eedefe794a5 100644 (file)
@@ -19,3 +19,4 @@
  18 -> Hauppauge WinTV-HVR1270                             [0070:2211]
  19 -> Hauppauge WinTV-HVR1275                             [0070:2215]
  20 -> Hauppauge WinTV-HVR1255                             [0070:2251]
+ 21 -> Hauppauge WinTV-HVR1210                             [0070:2291,0070:2295]
index 604ceb180522855c812ef7ff9454c59feaed4825..82fc2577b5ee2b7ce43a3055cb9af5019a6c0c48 100644 (file)
@@ -193,6 +193,10 @@ struct cx23885_board cx23885_boards[] = {
                .name           = "Hauppauge WinTV-HVR1255",
                .portc          = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_HAUPPAUGE_HVR1210] = {
+               .name           = "Hauppauge WinTV-HVR1210",
+               .portc          = CX23885_MPEG_DVB,
+       },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -304,6 +308,14 @@ struct cx23885_subid cx23885_subids[] = {
                .subvendor = 0x0070,
                .subdevice = 0x2251,
                .card      = CX23885_BOARD_HAUPPAUGE_HVR1255,
+       }, {
+               .subvendor = 0x0070,
+               .subdevice = 0x2291,
+               .card      = CX23885_BOARD_HAUPPAUGE_HVR1210,
+       }, {
+               .subvendor = 0x0070,
+               .subdevice = 0x2295,
+               .card      = CX23885_BOARD_HAUPPAUGE_HVR1210,
        },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -646,9 +658,10 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1270:
        case CX23885_BOARD_HAUPPAUGE_HVR1275:
        case CX23885_BOARD_HAUPPAUGE_HVR1255:
+       case CX23885_BOARD_HAUPPAUGE_HVR1210:
                /* GPIO-5 RF Control: 0 = RF1 Terrestrial, 1 = RF2 Cable */
-               /* GPIO-6 I2C Gate which can isolate the 3305 from the bus */
-               /* GPIO-9 LG3305 reset */
+               /* GPIO-6 I2C Gate which can isolate the demod from the bus */
+               /* GPIO-9 Demod reset */
 
                /* Put the parts into reset and back */
                cx23885_gpio_enable(dev, GPIO_9 | GPIO_6 | GPIO_5, 1);
@@ -672,6 +685,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1270:
        case CX23885_BOARD_HAUPPAUGE_HVR1275:
        case CX23885_BOARD_HAUPPAUGE_HVR1255:
+       case CX23885_BOARD_HAUPPAUGE_HVR1210:
                /* FIXME: Implement me */
                break;
        case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
@@ -710,6 +724,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1270:
        case CX23885_BOARD_HAUPPAUGE_HVR1275:
        case CX23885_BOARD_HAUPPAUGE_HVR1255:
+       case CX23885_BOARD_HAUPPAUGE_HVR1210:
                if (dev->i2c_bus[0].i2c_rc == 0)
                        hauppauge_eeprom(dev, eeprom+0xc0);
                break;
@@ -770,6 +785,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1270:
        case CX23885_BOARD_HAUPPAUGE_HVR1275:
        case CX23885_BOARD_HAUPPAUGE_HVR1255:
+       case CX23885_BOARD_HAUPPAUGE_HVR1210:
        default:
                ts2->gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
                ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
index b440b55f22c9a70d00b8a1fa85598ce13094ad1a..22d1aefc0bf984d3fd1f452c3b945176763217fc 100644 (file)
@@ -128,6 +128,15 @@ static struct tda10048_config hauppauge_hvr1200_config = {
        .clk_freq_khz     = TDA10048_CLK_16000,
 };
 
+static struct tda10048_config hauppauge_hvr1210_config = {
+       .demod_address    = 0x10 >> 1,
+       .output_mode      = TDA10048_SERIAL_OUTPUT,
+       .fwbulkwritelen   = TDA10048_BULKWRITE_200,
+       .inversion        = TDA10048_INVERSION_ON,
+       .if_freq_khz      = TDA10048_IF_4000,
+       .clk_freq_khz     = TDA10048_CLK_16000,
+};
+
 static struct s5h1409_config hauppauge_ezqam_config = {
        .demod_address = 0x32 >> 1,
        .output_mode   = S5H1409_SERIAL_OUTPUT,
@@ -237,6 +246,10 @@ static struct tda18271_config hauppauge_hvr1200_tuner_config = {
        .gate    = TDA18271_GATE_ANALOG,
 };
 
+static struct tda18271_config hauppauge_hvr1210_tuner_config = {
+       .gate    = TDA18271_GATE_DIGITAL,
+};
+
 static struct tda18271_std_map hcw_lgdt3305_tda18271_std_map = {
        .atsc_6   = { .if_freq = 3250, .agc_mode = 3, .std = 4,
                      .if_lvl = 1, .rfagc_top = 0x58 },
@@ -554,6 +567,17 @@ static int dvb_register(struct cx23885_tsport *port)
                                &hauppauge_hvr1200_tuner_config);
                }
                break;
+       case CX23885_BOARD_HAUPPAUGE_HVR1210:
+               i2c_bus = &dev->i2c_bus[0];
+               fe0->dvb.frontend = dvb_attach(tda10048_attach,
+                       &hauppauge_hvr1210_config,
+                       &i2c_bus->i2c_adap);
+               if (fe0->dvb.frontend != NULL) {
+                       dvb_attach(tda18271_attach, fe0->dvb.frontend,
+                               0x60, &dev->i2c_bus[1].i2c_adap,
+                               &hauppauge_hvr1210_tuner_config);
+               }
+               break;
        case CX23885_BOARD_HAUPPAUGE_HVR1400:
                i2c_bus = &dev->i2c_bus[0];
                fe0->dvb.frontend = dvb_attach(dib7000p_attach,
index 9b42e41f30f6d0a8ae0fb97b8c877b31f6dba7c9..5067c19b6594f2fef01d8ef7090c513acf797a42 100644 (file)
@@ -74,6 +74,7 @@
 #define CX23885_BOARD_HAUPPAUGE_HVR1270        18
 #define CX23885_BOARD_HAUPPAUGE_HVR1275        19
 #define CX23885_BOARD_HAUPPAUGE_HVR1255        20
+#define CX23885_BOARD_HAUPPAUGE_HVR1210        21
 
 #define GPIO_0 0x00000001
 #define GPIO_1 0x00000002