V4L/DVB (7082): support for Twinhan Hybrid DTV-DVB 3056 PCI
[deliverable/linux.git] / drivers / media / video / saa7134 / saa7134-dvb.c
index 38d87332cc5dcd312fd815bece3d40709ee38c42..90f495a678040819e9d0fc42e5f0140f1b745f35 100644 (file)
@@ -662,6 +662,7 @@ static struct tda1004x_config hauppauge_hvr_1110_config = {
        .if_freq       = TDA10046_FREQ_045,
        .i2c_gate      = 0x4b,
        .tuner_address = 0x61,
+       .tuner_config  = 1,
        .request_firmware = philips_tda1004x_request_firmware
 };
 
@@ -778,6 +779,21 @@ static struct tda1004x_config avermedia_super_007_config = {
        .request_firmware = philips_tda1004x_request_firmware
 };
 
+static struct tda1004x_config twinhan_dtv_dvb_3056_config = {
+       .demod_address = 0x08,
+       .invert        = 1,
+       .invert_oclk   = 0,
+       .xtal_freq     = TDA10046_XTAL_16M,
+       .agc_config    = TDA10046_AGC_TDA827X,
+       .gpio_config   = TDA10046_GP01_I,
+       .if_freq       = TDA10046_FREQ_045,
+       .i2c_gate      = 0x42,
+       .tuner_address = 0x61,
+       .tuner_config  = 2,
+       .antenna_switch = 1,
+       .request_firmware = philips_tda1004x_request_firmware
+};
+
 /* ------------------------------------------------------------------
  * special case: this card uses saa713x GPIO22 for the mode switch
  */
@@ -1043,6 +1059,9 @@ static int dvb_init(struct saa7134_dev *dev)
        case SAA7134_BOARD_AVERMEDIA_SUPER_007:
                configure_tda827x_fe(dev, &avermedia_super_007_config);
                break;
+       case SAA7134_BOARD_TWINHAN_DTV_DVB_3056:
+               configure_tda827x_fe(dev, &twinhan_dtv_dvb_3056_config);
+               break;
        default:
                wprintk("Huh? unknown DVB card?\n");
                break;
@@ -1072,14 +1091,21 @@ static int dvb_init(struct saa7134_dev *dev)
 
 static int dvb_fini(struct saa7134_dev *dev)
 {
-       static int on  = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE;
+       /* FIXME: I suspect that this code is bogus, since the entry for
+          Pinnacle 300I DVB-T PAL already defines the proper init to allow
+          the detection of mt2032 (TDA9887_PORT2_INACTIVE)
+        */
+       if (dev->board == SAA7134_BOARD_PINNACLE_300I_DVBT_PAL) {
+               struct v4l2_priv_tun_config tda9887_cfg;
+               static int on  = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE;
+
+               tda9887_cfg.tuner = TUNER_TDA9887;
+               tda9887_cfg.priv  = &on;
 
-       switch (dev->board) {
-       case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL:
                /* otherwise we don't detect the tuner on next insmod */
-               saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&on);
-               break;
-       };
+               saa7134_i2c_call_clients(dev, TUNER_SET_CONFIG, &tda9887_cfg);
+       }
+
        videobuf_dvb_unregister(&dev->dvb);
        return 0;
 }
This page took 0.031604 seconds and 5 git commands to generate.