From patchwork Sun May 8 14:38:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Lock X-Patchwork-Id: 12885 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ59E-0004JD-F1 for vdr@linuxtv.org; Sun, 08 May 2011 16:39:53 +0200 X-tubIT-Incoming-IP: 78.46.108.116 Received: from gelbbaer.kn-bremen.de ([78.46.108.116] helo=smtp.kn-bremen.de) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp for id 1QJ59E-0005cS-D3; Sun, 08 May 2011 16:39:52 +0200 Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 504051E002B5; Sun, 8 May 2011 16:39:51 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p48EcZCm054481 for ; Sun, 8 May 2011 16:38:35 +0200 (CEST) (envelope-from vdr-l@triton8.kn-bremen.de) Received: (from vdr-l@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p48EcZc9054480 for vdr@linuxtv.org; Sun, 8 May 2011 16:38:35 +0200 (CEST) (envelope-from vdr-l) From: Juergen Lock Date: Sun, 8 May 2011 16:38:35 +0200 To: vdr@linuxtv.org Message-ID: <20110508143835.GA53777@triton8.kn-bremen.de> References: <20110507181120.GA23959@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110507181120.GA23959@triton8.kn-bremen.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.5.8.143014 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' SUPERLONG_LINE 0.05, BODY_SIZE_4000_4999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __INT_PROD_TV 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_MAILTO 0, __URI_NS , __USER_AGENT 0' X-LSpam-Score: -5.2 (-----) X-LSpam-Report: No, score=-5.2 required=5.0 tests=AWL=1.438, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4 autolearn=ham Subject: Re: [vdr] dvb-s(2) NumProvidedSystems() vs reelchannelscan X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2011 14:39:53 -0000 Status: O X-Status: X-Keywords: X-UID: 24725 On Sat, May 07, 2011 at 08:11:20PM +0200, Juergen Lock wrote: > Hi! > > There seems to be a change in recent vdr versions regarding > NumProvidedSystems() which at least the reelchannelscan plugin > uses to tell apart a dvb-s2 tuner from a dvb-s one in a few places, > apparently it used to return 2 for a dvb-s2 tuner and now returns 3. > Is this intentional? > > I patched reelchannelscan like below: (would need to check the > vdr version to be general of course, this was for 1.7.18; symptom > was a manual scan wrote out qam32 modulation into the channels.conf > instead of qpsk and of course vdr couldn't tune the new channel(s).) > > Thanx! > Juergen > > --- a/csmenu.c > +++ b/csmenu.c > @@ -243,7 +243,7 @@ void cMenuChannelscan::TunerDetection() > txtstream << tr("DVB-C - Cable") << " (" << tr("Tuner") << ' ' << tuner + 1 << ')'; > stp = CABLE; > } else if (device->ProvidesSource(cSource::stSat)) { > - if (device->NumProvidedSystems() == 2) { > + if (device->NumProvidedSystems() == 3) { > // if(TunerIsRotor(tuner)) > // txtstream << tr("DVB-S2 - Rotor") << " (" << tr("Tuner") << ' ' << tuner + 1 << ')'; > // else > --- a/scan.c > +++ b/scan.c > @@ -421,7 +421,7 @@ void cScan::ScanNitServices() > void cScan::ScanDVB_S(cTransponder * tp, cChannel * c) > { > //const time_t tt = time(NULL); > - int maxmods = device->NumProvidedSystems() == 2? 4 : 2; > + int maxmods = device->NumProvidedSystems() == 3? 4 : 2; > > // esyslog("%s cTransponder* tp = %x cChannel *c = %x", __PRETTY_FUNCTION__); > esyslog("maxmods = %d",maxmods); > @@ -431,7 +431,7 @@ void cScan::ScanDVB_S(cTransponder * tp, > ; > > // skip HD Transonders on SD Tuner > - if ( !device->NumProvidedSystems() == 2 && static_cast < cSatTransponder * >(tp)->System() == 1) > + if ( !device->NumProvidedSystems() == 3 && static_cast < cSatTransponder * >(tp)->System() == 1) > return; > > unsigned int nRadio = radioChannelNames.size(); Sorry for following up to myself, but I forgot to say this is the 0.6.1+beta1.7.15 reelchannelscan snapshot that yavdr uses, ported to FreeBSD: http://www.freshports.org/multimedia/vdr-plugin-reelchannelscan/ http://ppa.launchpad.net/yavdr/stable-vdr/ubuntu/pool/main/v/vdr-plugin-reelchannelscan/vdr-plugin-reelchannelscan_0.6.1+beta1.7.15.orig.tar.gz ..and you can see all the FreeBSD patches I applied here: http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/vdr-plugin-reelchannelscan/files/ files/patch-scan.c also should be relevant on non-FreeBSD too: --- a/scan.c +++ b/scan.c @@ -197,7 +197,7 @@ bool cScan::StartScanning(cScanParameter #ifndef DEVICE_ATTRIBUTES char buffer[265]; - snprintf(buffer, sizeof(buffer), "/dev/dvb/adapter%d/frontend0", cardnr); + snprintf(buffer, sizeof(buffer), "/dev/dvb/adapter%d/frontend0", cDevice::GetDevice(cardnr)->CardIndex()); fd_frontend = open(buffer, O_RDONLY | O_NONBLOCK); if (fd_frontend <= 0) { @@ -932,12 +932,12 @@ void cScan::Action() char *strDate; asprintf(&strDate,"%s", asctime(localtime(&tt))); strDate[strlen(strDate)-1] = 0; - fprintf(fp,"\n\n%s tp=%4d, %6d(%d) TV:%4d Radio:%4d in %3d sec",strDate,i , frequency, !alreadyScanned, tvChannelNames.size()-ntv, radioChannelNames.size()-nradio, (int)difftime(t_out,t_in) ); + fprintf(fp,"\n\n%s tp=%4d, %6d(%d) TV:%4ld Radio:%4ld in %3d sec",strDate,i , frequency, !alreadyScanned, tvChannelNames.size()-ntv, radioChannelNames.size()-nradio, (int)difftime(t_out,t_in) ); fclose(fp); fp = fopen("/tmp/tScan.log","a"); //fprintf(fp,"\n\n%s tp=%4d, %6d/%2d/%5d TV:%4d Radio:%4d in %3dsec",strDate,i , frequency,(*tp)->Modulation(), (*tp)->Symbolrate(), tvChannelNames.size()-ntv, radioChannelNames.size()-nradio, (int)difftime(t_out,t_in) ); - fprintf(fp,"\n\ntp=%4d, %6d/%2d/%5d TV:%4d Radio:%4d in %3dsec new:%3d",i , frequency,(*tp)->Modulation(), (*tp)->Symbolrate(), tvChannelNames.size()-ntv, radioChannelNames.size()-nradio, (int)difftime(t_out,t_in),tvChannelNames.size()-ntv+ radioChannelNames.size()-nradio ); + fprintf(fp,"\n\ntp=%4d, %6d/%2d/%5d TV:%4ld Radio:%4ld in %3dsec new:%3ld",i , frequency,(*tp)->Modulation(), (*tp)->Symbolrate(), tvChannelNames.size()-ntv, radioChannelNames.size()-nradio, (int)difftime(t_out,t_in),tvChannelNames.size()-ntv+ radioChannelNames.size()-nradio ); fclose(fp); free(strDate);