All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-dvb] Patch for select frontends in system with multiple cards
@ 2008-11-28 11:48 Mirek Slugeň
  0 siblings, 0 replies; only message in thread
From: Mirek Slugeň @ 2008-11-28 11:48 UTC (permalink / raw)
  To: linux-dvb

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

Hi, this patch add support for define frontend (satellite or 
terrestrial) in system with more than one cards.

example usage: saa7134-dvb use_frontend=0,1,0,1,1

Mirek Slugen

[-- Attachment #2: satellite.diff --]
[-- Type: text/x-patch, Size: 2212 bytes --]

diff -Naur v4l-dvb-24bc99070e97.old/linux/drivers/media/video/saa7134/saa7134-dvb.c v4l-dvb-24bc99070e97/linux/drivers/media/video/saa7134/saa7134-dvb.c
--- v4l-dvb-24bc99070e97.old/linux/drivers/media/video/saa7134/saa7134-dvb.c	2008-09-29 07:25:40.000000000 +0200
+++ v4l-dvb-24bc99070e97/linux/drivers/media/video/saa7134/saa7134-dvb.c	2008-10-01 10:25:05.000000000 +0200
@@ -57,8 +57,8 @@
 module_param(antenna_pwr, int, 0444);
 MODULE_PARM_DESC(antenna_pwr,"enable antenna power (Pinnacle 300i)");
 
-static int use_frontend;
-module_param(use_frontend, int, 0644);
+static unsigned int use_frontend[]     = {[0 ... (SAA7134_MAXBOARDS - 1)] = 0 };
+module_param_array(use_frontend, int, NULL, 0644);
 MODULE_PARM_DESC(use_frontend,"for cards with multiple frontends (0: terrestrial, 1: satellite)");
 
 static int debug;
@@ -1061,7 +1061,7 @@
 			goto dettach_frontend;
 		break;
 	case SAA7134_BOARD_FLYDVB_TRIO:
-		if (!use_frontend) {	/* terrestrial */
+		if (!use_frontend[dev->nr]) {	/* terrestrial */
 			if (configure_tda827x_fe(dev, &lifeview_trio_config,
 						 &tda827x_cfg_0) < 0)
 				goto dettach_frontend;
@@ -1103,7 +1103,7 @@
 			goto dettach_frontend;
 		break;
 	case SAA7134_BOARD_MEDION_MD8800_QUADRO:
-		if (!use_frontend) {     /* terrestrial */
+		if (!use_frontend[dev->nr]) {     /* terrestrial */
 			if (configure_tda827x_fe(dev, &md8800_dvbt_config,
 						 &tda827x_cfg_0) < 0)
 				goto dettach_frontend;
@@ -1315,7 +1315,7 @@
 		attach_xc3028 = 1;
 		break;
 	case SAA7134_BOARD_ASUSTeK_TIGER_3IN1:
-		if (!use_frontend) {     /* terrestrial */
+		if (!use_frontend[dev->nr]) {     /* terrestrial */
 			if (configure_tda827x_fe(dev, &asus_tiger_3in1_config,
 							&tda827x_cfg_2) < 0)
 				goto dettach_frontend;
@@ -1410,7 +1410,7 @@
 		/* otherwise we don't detect the tuner on next insmod */
 		saa7134_i2c_call_clients(dev, TUNER_SET_CONFIG, &tda9887_cfg);
 	} else if (dev->board == SAA7134_BOARD_MEDION_MD8800_QUADRO) {
-		if ((dev->eedata[2] == 0x07) && use_frontend) {
+		if ((dev->eedata[2] == 0x07) && use_frontend[dev->nr]) {
 			/* turn off the 2nd lnb supply */
 			u8 data = 0x80;
 			struct i2c_msg msg = {.addr = 0x08, .buf = &data, .flags = 0, .len = 1};

[-- Attachment #3: Type: text/plain, Size: 150 bytes --]

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-28 11:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 11:48 [linux-dvb] Patch for select frontends in system with multiple cards Mirek Slugeň

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.