All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mirek Slugeň" <thunder.m@email.cz>
To: linux-dvb@linuxtv.org
Subject: [linux-dvb] Patch for select frontends in system with multiple cards
Date: Fri, 28 Nov 2008 12:48:42 +0100	[thread overview]
Message-ID: <492FDA9A.3060206@email.cz> (raw)

[-- 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

                 reply	other threads:[~2008-11-28 11:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492FDA9A.3060206@email.cz \
    --to=thunder.m@email.cz \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.