public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hans Werner" <HWerner4@gmx.de>
To: linux-media@vger.kernel.org, handygewinnspiel@gmx.de
Subject: [PATCH] w_scan: allow frontend and demux selection
Date: Sat, 27 Jun 2009 17:15:47 +0200	[thread overview]
Message-ID: <20090627151547.42070@gmx.net> (raw)


I found a problem with w_scan. With the following system
(2x HVR-4000):

/dev/dvb/adapter0/frontend0 : DVB-S/S2
/dev/dvb/adapter0/frontend1 : DVB-T
/dev/dvb/adapter1/frontend0 : DVB-S/S2
/dev/dvb/adapter1/frontend1 : DVB-T

there is no way to do a (DVB-T) scan on adapter1/frontend1 because 
1)the automatic selector will always choose adapter0/frontend1
and 
2)the -a option (manual adapter) always forces frontend = 0.

Here's a patch for w_scan which allows one to precisely choose
which frontend is scanned by adding options to specify frontend (-n)
and demux (-d), to be used with the existing adapter (-a) option.

Hans

Signed-off-by: Hans Werner <hwerner4@gmx.de>

--- scan.c.orig	2009-06-26 23:56:15.000000000 +0100
+++ scan.c	2009-06-27 15:33:43.000000000 +0100
@@ -2418,7 +2418,9 @@
 	"		6 = VDR-1.6.x (default)\n"
 	"		7 = VDR-1.7.x\n"
 	".................Device..................\n"
-	"	-a N	use device /dev/dvb/adapterN/ [default: auto detect]\n"
+	"	-a A    use adapter A  /dev/dvb/adapterA/frontend0 [default: auto detect]\n"
+	"	-n N	(with -a ) use frontend N /dev/dvb/adapterA/frontendN [default: auto detect]\n"
+	"	-d D	(with -a ) use demux D    /dev/dvb/adapterA/demuxD [default: auto detect]\n"
 	"	-F	use long filter timeout\n"
 	"	-t N	tuning timeout\n"
 	"		1 = fastest [default]\n"
@@ -2520,11 +2522,17 @@
 	flags.version = version;
 	start_time = time(NULL);
 
-	while ((opt = getopt(argc, argv, "a:c:e:f:hi:kl:o:p:qr:s:t:vxA:D:E:FHI:O:PQ:R:S:T:VX")) != -1) {
+	while ((opt = getopt(argc, argv, "a:n:d:c:e:f:hi:kl:o:p:qr:s:t:vxA:D:E:FHI:O:PQ:R:S:T:VX")) != -1) {
 		switch (opt) {
 		case 'a': //adapter
 			adapter = strtoul(optarg, NULL, 0);
 			break;
+		case 'n': //frontend
+			frontend = strtoul(optarg, NULL, 0);
+			break;
+		case 'd': //demux
+			demux = strtoul(optarg, NULL, 0);
+			break;
 		case 'c': //country setting
 			country=strdup(optarg);
 			if (0 == strcasecmp(country, "?")) {
-- 
Release early, release often.

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

                 reply	other threads:[~2009-06-27 15:15 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=20090627151547.42070@gmx.net \
    --to=hwerner4@gmx.de \
    --cc=handygewinnspiel@gmx.de \
    --cc=linux-media@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox