V4L/DVB (4806): Saa7134: add support for Hauppauge WinTV-HVR1110 DVB-T/Hybrid
Thomas Genty [Sun, 5 Nov 2006 17:17:30 +0000 (14:17 -0300)]
This patch adds support for the Hauppauge WinTV-HVR1110 DVB-T/Hybrid

Signed-off-by: Thomas Genty <tomlohave@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

Documentation/video4linux/CARDLIST.saa7134
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/saa7134/saa7134.h

index 92ce6e2..ef67ace 100644 (file)
 101 -> Pinnacle PCTV 310i                       [11bd:002f]
 102 -> Avermedia AVerTV Studio 507              [1461:9715]
 103 -> Compro Videomate DVB-T200A
+104 -> Hauppauge WinTV-HVR1110 DVB-T/Hybrid     [0070:6701]
index f5ad450..d8d8142 100644 (file)
@@ -3126,6 +3126,28 @@ struct saa7134_board saa7134_boards[] = {
                        .amux   = LINE2,
                }},
        },
+       [SAA7134_BOARD_HAUPPAUGE_HVR1110] = {
+               /* Thomas Genty <tomlohave@gmail.com> */
+               .name           = "Hauppauge WinTV-HVR1110 DVB-T/Hybrid",
+               .audio_clock    = 0x00187de7,
+               .tuner_type     = TUNER_PHILIPS_TDA8290,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .mpeg           = SAA7134_MPEG_DVB,
+               .gpiomask       = 0x000200000,
+               .inputs         = {{
+                       .name = name_tv,
+                       .vmux = 1,
+                       .amux = TV,
+                       .tv   = 1,
+               }},
+               .radio = {
+                       .name = name_radio,
+                       .amux   = TV,
+                       .gpio   = 0x0200000,
+               },
+       },
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3753,6 +3775,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
                .subdevice    = 0x4876,
                .driver_data  = SAA7134_BOARD_ASUSTeK_P7131_DUAL,
        },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+               .subvendor    = 0x0070,
+               .subdevice    = 0x6701,
+               .driver_data  = SAA7134_BOARD_HAUPPAUGE_HVR1110,
+       },{
                /* --- boards without eeprom + subsystem ID --- */
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -4053,6 +4081,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
        case SAA7134_BOARD_TEVION_DVBT_220RF:
        case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
        case SAA7134_BOARD_MEDION_MD8800_QUADRO:
+       case SAA7134_BOARD_HAUPPAUGE_HVR1110:
                /* this is a hybrid board, initialize to analog mode
                 * and configure firmware eeprom address
                 */
index 098d8a6..a51264f 100644 (file)
@@ -900,6 +900,18 @@ static struct tda1004x_config pinnacle_pctv_310i_config = {
 
 /* ------------------------------------------------------------------ */
 
+static struct tda1004x_config hauppauge_hvr_1110_config = {
+       .demod_address = 0x08,
+       .invert        = 1,
+       .invert_oclk   = 0,
+       .xtal_freq     = TDA10046_XTAL_16M,
+       .agc_config    = TDA10046_AGC_TDA827X,
+       .if_freq       = TDA10046_FREQ_045,
+       .request_firmware = philips_tda1004x_request_firmware,
+};
+
+/* ------------------------------------------------------------------ */
+
 static struct tda1004x_config asus_p7131_dual_config = {
        .demod_address = 0x08,
        .invert        = 1,
@@ -1221,6 +1233,17 @@ static int dvb_init(struct saa7134_dev *dev)
                        dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
                }
                break;
+       case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+               dev->dvb.frontend = dvb_attach(tda10046_attach,
+                                              &hauppauge_hvr_1110_config,
+                                              &dev->i2c_adap);
+               if (dev->dvb.frontend) {
+                       dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
+                       dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
+                       dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
+                       dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
+               }
+               break;
        case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
                dev->dvb.frontend = dvb_attach(tda10046_attach,
                                               &asus_p7131_dual_config,
index 0c0f465..fee7512 100644 (file)
@@ -230,6 +230,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_PINNACLE_PCTV_310i  101
 #define SAA7134_BOARD_AVERMEDIA_STUDIO_507 102
 #define SAA7134_BOARD_VIDEOMATE_DVBT_200A  103
+#define SAA7134_BOARD_HAUPPAUGE_HVR1110 104
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8