From patchwork Sat Jun 27 15:15:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Werner X-Patchwork-Id: 32683 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5RFFtKm019862 for ; Sat, 27 Jun 2009 15:15:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752509AbZF0PPu (ORCPT ); Sat, 27 Jun 2009 11:15:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753154AbZF0PPu (ORCPT ); Sat, 27 Jun 2009 11:15:50 -0400 Received: from mail.gmx.net ([213.165.64.20]:55960 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752509AbZF0PPt (ORCPT ); Sat, 27 Jun 2009 11:15:49 -0400 Received: (qmail 2431 invoked by uid 0); 27 Jun 2009 15:15:50 -0000 Received: from 88.96.7.158 by www167.gmx.net with HTTP; Sat, 27 Jun 2009 17:15:47 +0200 (CEST) Date: Sat, 27 Jun 2009 17:15:47 +0200 From: "Hans Werner" Message-ID: <20090627151547.42070@gmx.net> MIME-Version: 1.0 Subject: [PATCH] w_scan: allow frontend and demux selection To: linux-media@vger.kernel.org, handygewinnspiel@gmx.de X-Authenticated: #21834385 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX18cGr1+HjIcZvGNLjJ9Xk4saLoF+9WKhxn4SMVrZT i2wFmXtcq2k5rC8eWLQqOrHYAWXraAiFTzdg== X-GMX-UID: wl4zeVslODB6SvtLPmVM9fs9Ji9SWtLG X-FuHaFi: 0.46 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- 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, "?")) {