]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (4836): Added support for both DVB frontends of the Lifeview Trio
authorNico Sabbi <nsabbi@tiscali.it>
Thu, 16 Nov 2006 01:06:56 +0000 (22:06 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 10:51:28 +0000 (08:51 -0200)
This card (like some others) supports both, DVB-T and a DVB-S.
The patch adds an insmod option to select the frontend:
use_frontend=0 -> DVB-T
use_frontend=1 -> DVB-S

Signed-off-by: Nico Sabbi <nsabbi@tiscali.it>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/saa7134/saa7134-dvb.c

index ce888f70495658c1567a82ff0b6168ac83864591..fa833987909568b586935bb7f124524817c0b253 100644 (file)
@@ -50,6 +50,10 @@ static unsigned int antenna_pwr = 0;
 module_param(antenna_pwr, int, 0444);
 MODULE_PARM_DESC(antenna_pwr,"enable antenna power (Pinnacle 300i)");
 
+static int use_frontent = 0;
+module_param(use_frontent, int, 0644);
+MODULE_PARM_DESC(use_frontent,"for cards with multiple frontends (0: terrestrial, 1: satellite)");
+
 /* ------------------------------------------------------------------ */
 static int pinnacle_antenna_pwr(struct saa7134_dev *dev, int on)
 {
@@ -1299,12 +1303,27 @@ static int dvb_init(struct saa7134_dev *dev)
                }
                break;
        case SAA7134_BOARD_FLYDVB_TRIO:
-               dev->dvb.frontend = dvb_attach(tda10046_attach,
-                                              &lifeview_trio_config,
-                                              &dev->i2c_adap);
-               if (dev->dvb.frontend) {
-                       dev->dvb.frontend->ops.tuner_ops.sleep = lifeview_trio_tuner_sleep;
-                       dev->dvb.frontend->ops.tuner_ops.set_params = lifeview_trio_tuner_set_params;
+               if(! use_frontent) {    //terrestrial
+                       dev->dvb.frontend = dvb_attach(tda10046_attach,
+                                                      &lifeview_trio_config,
+                                                      &dev->i2c_adap);
+                       if (dev->dvb.frontend) {
+                               dev->dvb.frontend->ops.tuner_ops.sleep = lifeview_trio_tuner_sleep;
+                               dev->dvb.frontend->ops.tuner_ops.set_params =
+                                                               lifeview_trio_tuner_set_params;
+                       }
+               } else {              //satellite
+                       dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, &dev->i2c_adap);
+                       if (dev->dvb.frontend) {
+                               if (dvb_attach(tda826x_attach, dev->dvb.frontend, 0x63,
+                                                                       &dev->i2c_adap, 0) == NULL) {
+                                       printk("%s: Lifeview Trio, No tda826x found!\n", __FUNCTION__);
+                               }
+                               if (dvb_attach(isl6421_attach, dev->dvb.frontend, &dev->i2c_adap,
+                                                                               0x08, 0, 0) == NULL) {
+                                       printk("%s: Lifeview Trio, No ISL6421 found!\n", __FUNCTION__);
+                               }
+                       }
                }
                break;
        case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: