]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/ttpci/budget.c
V4L/DVB (7654): tda10086: make the xtal frequency a configuration option
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / ttpci / budget.c
index 9268a82bada6c65f42f3b2af9935275965d2d3bd..7adfe17b06160d95c7ddd81c1b7db5988e94ad75 100644 (file)
@@ -257,11 +257,17 @@ static struct ves1820_config alps_tdbe2_config = {
 
 static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
 {
-       struct budget* budget = (struct budget*) fe->dvb->priv;
+       struct budget *budget = fe->dvb->priv;
+       u8 *tuner_addr = fe->tuner_priv;
        u32 div;
        u8 cfg, cpump, band_select;
        u8 data[4];
-       struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) };
+       struct i2c_msg msg = { .flags = 0, .buf = data, .len = sizeof(data) };
+
+       if (tuner_addr)
+               msg.addr = *tuner_addr;
+       else
+               msg.addr = 0x61;
 
        div = (36125000 + params->frequency) / 166666;
 
@@ -292,6 +298,12 @@ static struct l64781_config grundig_29504_401_config = {
        .demod_address = 0x55,
 };
 
+static struct l64781_config grundig_29504_401_config_activy = {
+       .demod_address = 0x54,
+};
+
+static u8 tuner_address_grundig_29504_401_activy = 0x60;
+
 static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
 {
        struct budget* budget = (struct budget*) fe->dvb->priv;
@@ -346,11 +358,14 @@ static int s5h1420_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend
 static struct s5h1420_config s5h1420_config = {
        .demod_address = 0x53,
        .invert = 1,
+       .cdclk_polarity = 1,
 };
 
 static struct tda10086_config tda10086_config = {
        .demod_address = 0x0e,
        .invert = 0,
+       .diseqc_tone = 1,
+       .xtal_freq = TDA10086_XTAL_16M,
 };
 
 static u8 read_pwm(struct budget* budget)
@@ -432,12 +447,20 @@ static void frontend_init(struct budget *budget)
                }
                break;
 
+       case 0x5f61: /* Fujitsu Siemens Activy Budget-T PCI rev GR (L64781/Grundig 29504-401(tsa5060)) */
+               budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config_activy, &budget->i2c_adap);
+               if (budget->dvb_frontend) {
+                       budget->dvb_frontend->tuner_priv = &tuner_address_grundig_29504_401_activy;
+                       budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
+               }
+               break;
+
        case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260))
                budget->dvb_frontend = dvb_attach(s5h1420_attach, &s5h1420_config, &budget->i2c_adap);
                if (budget->dvb_frontend) {
                        budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params;
                        if (dvb_attach(lnbp21_attach, budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) {
-                               printk("%s: No LNBP21 found!\n", __FUNCTION__);
+                               printk("%s: No LNBP21 found!\n", __func__);
                                goto error_out;
                        }
                        break;
@@ -453,9 +476,9 @@ static void frontend_init(struct budget *budget)
                budget->dvb_frontend = dvb_attach(tda10086_attach, &tda10086_config, &budget->i2c_adap);
                if (budget->dvb_frontend) {
                        if (dvb_attach(tda826x_attach, budget->dvb_frontend, 0x60, &budget->i2c_adap, 0) == NULL)
-                               printk("%s: No tda826x found!\n", __FUNCTION__);
+                               printk("%s: No tda826x found!\n", __func__);
                        if (dvb_attach(lnbp21_attach, budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) {
-                               printk("%s: No LNBP21 found!\n", __FUNCTION__);
+                               printk("%s: No LNBP21 found!\n", __func__);
                                goto error_out;
                        }
                        break;
@@ -536,6 +559,7 @@ MAKE_BUDGET_INFO(satel,     "SATELCO Multimedia PCI",       BUDGET_TT_HW_DISEQC);
 MAKE_BUDGET_INFO(ttbs1401, "TT-Budget-S-1401 PCI", BUDGET_TT);
 MAKE_BUDGET_INFO(fsacs0, "Fujitsu Siemens Activy Budget-S PCI (rev GR/grundig frontend)", BUDGET_FS_ACTIVY);
 MAKE_BUDGET_INFO(fsacs1, "Fujitsu Siemens Activy Budget-S PCI (rev AL/alps frontend)", BUDGET_FS_ACTIVY);
+MAKE_BUDGET_INFO(fsact,         "Fujitsu Siemens Activy Budget-T PCI (rev GR/Grundig frontend)", BUDGET_FS_ACTIVY);
 
 static struct pci_device_id pci_tbl[] = {
        MAKE_EXTENSION_PCI(ttbs,  0x13c2, 0x1003),
@@ -546,6 +570,7 @@ static struct pci_device_id pci_tbl[] = {
        MAKE_EXTENSION_PCI(ttbs1401, 0x13c2, 0x1018),
        MAKE_EXTENSION_PCI(fsacs1,0x1131, 0x4f60),
        MAKE_EXTENSION_PCI(fsacs0,0x1131, 0x4f61),
+       MAKE_EXTENSION_PCI(fsact, 0x1131, 0x5f61),
        {
                .vendor    = 0,
        }