[media] saa7164: Add support for another HVR2200 hardware revision
authorTony Jago <tony@hammertelecom.com.au>
Fri, 12 Aug 2011 03:19:11 +0000 (00:19 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Sep 2011 17:27:59 +0000 (14:27 -0300)
Hauppauge have released a new model rev, sub id 8940, this adds
support.

[stoth@kernellabs.com: I modified Tony's patch slightly in relation to the
 card numbering in saa7164.h, appending rather than inserting the new card
 - normal practise]
Signed-off-by: Tony Jago <tony@hammertelecom.com.au>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7164/saa7164-cards.c
drivers/media/video/saa7164/saa7164-dvb.c
drivers/media/video/saa7164/saa7164.h

index 69822a4e727502b72f5ccaaa9ced649a27bdda44..c71369173fae6231735c3df7b123e9ff53135a46 100644 (file)
@@ -203,6 +203,66 @@ struct saa7164_board saa7164_boards[] = {
                        .i2c_reg_len    = REGLEN_8bit,
                } },
        },
+       [SAA7164_BOARD_HAUPPAUGE_HVR2200_4] = {
+               .name           = "Hauppauge WinTV-HVR2200",
+               .porta          = SAA7164_MPEG_DVB,
+               .portb          = SAA7164_MPEG_DVB,
+               .portc          = SAA7164_MPEG_ENCODER,
+               .portd          = SAA7164_MPEG_ENCODER,
+               .porte          = SAA7164_MPEG_VBI,
+               .portf          = SAA7164_MPEG_VBI,
+               .chiprev        = SAA7164_CHIP_REV3,
+               .unit           = {{
+                       .id             = 0x1d,
+                       .type           = SAA7164_UNIT_EEPROM,
+                       .name           = "4K EEPROM",
+                       .i2c_bus_nr     = SAA7164_I2C_BUS_0,
+                       .i2c_bus_addr   = 0xa0 >> 1,
+                       .i2c_reg_len    = REGLEN_8bit,
+               }, {
+                       .id             = 0x04,
+                       .type           = SAA7164_UNIT_TUNER,
+                       .name           = "TDA18271-1",
+                       .i2c_bus_nr     = SAA7164_I2C_BUS_1,
+                       .i2c_bus_addr   = 0xc0 >> 1,
+                       .i2c_reg_len    = REGLEN_8bit,
+               }, {
+                       .id             = 0x05,
+                       .type           = SAA7164_UNIT_ANALOG_DEMODULATOR,
+                       .name           = "TDA8290-1",
+                       .i2c_bus_nr     = SAA7164_I2C_BUS_1,
+                       .i2c_bus_addr   = 0x84 >> 1,
+                       .i2c_reg_len    = REGLEN_8bit,
+               }, {
+                       .id             = 0x1b,
+                       .type           = SAA7164_UNIT_TUNER,
+                       .name           = "TDA18271-2",
+                       .i2c_bus_nr     = SAA7164_I2C_BUS_2,
+                       .i2c_bus_addr   = 0xc0 >> 1,
+                       .i2c_reg_len    = REGLEN_8bit,
+               }, {
+                       .id             = 0x1c,
+                       .type           = SAA7164_UNIT_ANALOG_DEMODULATOR,
+                       .name           = "TDA8290-2",
+                       .i2c_bus_nr     = SAA7164_I2C_BUS_2,
+                       .i2c_bus_addr   = 0x84 >> 1,
+                       .i2c_reg_len    = REGLEN_8bit,
+               }, {
+                       .id             = 0x1e,
+                       .type           = SAA7164_UNIT_DIGITAL_DEMODULATOR,
+                       .name           = "TDA10048-1",
+                       .i2c_bus_nr     = SAA7164_I2C_BUS_1,
+                       .i2c_bus_addr   = 0x10 >> 1,
+                       .i2c_reg_len    = REGLEN_8bit,
+               }, {
+                       .id             = 0x1f,
+                       .type           = SAA7164_UNIT_DIGITAL_DEMODULATOR,
+                       .name           = "TDA10048-2",
+                       .i2c_bus_nr     = SAA7164_I2C_BUS_2,
+                       .i2c_bus_addr   = 0x12 >> 1,
+                       .i2c_reg_len    = REGLEN_8bit,
+               } },
+       },
        [SAA7164_BOARD_HAUPPAUGE_HVR2250] = {
                .name           = "Hauppauge WinTV-HVR2250",
                .porta          = SAA7164_MPEG_DVB,
@@ -426,6 +486,10 @@ struct saa7164_subid saa7164_subids[] = {
                .subvendor = 0x0070,
                .subdevice = 0x8851,
                .card      = SAA7164_BOARD_HAUPPAUGE_HVR2250_2,
+       }, {
+               .subvendor = 0x0070,
+               .subdevice = 0x8940,
+               .card      = SAA7164_BOARD_HAUPPAUGE_HVR2200_4,
        },
 };
 const unsigned int saa7164_idcount = ARRAY_SIZE(saa7164_subids);
@@ -469,6 +533,7 @@ void saa7164_gpio_setup(struct saa7164_dev *dev)
        case SAA7164_BOARD_HAUPPAUGE_HVR2200:
        case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
        case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+       case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
        case SAA7164_BOARD_HAUPPAUGE_HVR2250:
        case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
        case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
@@ -549,6 +614,7 @@ void saa7164_card_setup(struct saa7164_dev *dev)
        case SAA7164_BOARD_HAUPPAUGE_HVR2200:
        case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
        case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+       case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
        case SAA7164_BOARD_HAUPPAUGE_HVR2250:
        case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
        case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
index f65eab63ca871fb634be16d0f17a0457ee1d933c..d3779379197fa757daf7a8ee719b665a38a7ff1f 100644 (file)
@@ -475,6 +475,7 @@ int saa7164_dvb_register(struct saa7164_port *port)
        case SAA7164_BOARD_HAUPPAUGE_HVR2200:
        case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
        case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+       case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
                i2c_bus = &dev->i2c_bus[port->nr + 1];
                switch (port->nr) {
                case 0:
index 6678bf1e78168bc0401453de3599e4c5ebc2ad7d..35b64306ba95637e78e5073957ab74802b85e913 100644 (file)
@@ -82,6 +82,7 @@
 #define SAA7164_BOARD_HAUPPAUGE_HVR2200_3      6
 #define SAA7164_BOARD_HAUPPAUGE_HVR2250_2      7
 #define SAA7164_BOARD_HAUPPAUGE_HVR2250_3      8
+#define SAA7164_BOARD_HAUPPAUGE_HVR2200_4      9
 
 #define SAA7164_MAX_UNITS              8
 #define SAA7164_TS_NUMBER_OF_LINES     312