From patchwork Sat May 19 20:32:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Lock X-Patchwork-Id: 12948 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1SVqLm-0007Sz-1y for vdr@linuxtv.org; Sat, 19 May 2012 22:34:38 +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-4) with esmtp for id 1SVqLl-0000xz-BH; Sat, 19 May 2012 22:34:05 +0200 Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 88E611E006FA; Sat, 19 May 2012 22:34:04 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.4) with ESMTP id q4JKW7Wc048389 for ; Sat, 19 May 2012 22:32:07 +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 q4JKW7GX048388 for vdr@linuxtv.org; Sat, 19 May 2012 22:32:07 +0200 (CEST) (envelope-from vdr-l) From: Juergen Lock Date: Sat, 19 May 2012 22:32:07 +0200 To: vdr@linuxtv.org Message-ID: <20120519203207.GA48169@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.5.19.202116 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 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: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, RDNS_NONE=0.793 autolearn=no Subject: [vdr] [PATCH, RFC] STB0899 signal strength (pctv452e, others too?) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 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: Sat, 19 May 2012 20:34:38 -0000 Status: O X-Status: X-Keywords: X-UID: 26267 Hi! (I guess the forums are not the best place to post this, hence reposted here...) By accident I stumbled across the special case for TT-budget S2-3200 (DVB-S/DVB-S2) in vdr's dvbdevice.c, and since both my tuners using the pctv452e driver have the same issue (which are STB0899 too, issue is the red/yellow/green bars in femon/osd didn't appear) I added an OPTION to the FreeBSD port (STB0899_SIGNAL in the port's make config menu) to enable the patch below. Optional since I don't know if there are STB0899-based tuners that don't have the problem, does anyone here know? (see log, if vdr logs like vdr: [29376960] frontend 0/0 provides DVB-S,DVB-S2,DSS with QPSK ("STB0899 Multistandard") and the bars appear without the patch please let us know, noting pci ids for the cards especially if different from 0x13c2:0x1019 or if it's usb, thanx!) Cheers, Juergen And here comes the patch, also at: http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/vdr/files/stb0899-signalstrength.patch?rev=1.2;content-type=text%2Fplain --- dvbdevice.c.orig +++ dvbdevice.c @@ -560,6 +560,12 @@ int cDvbTuner::GetSignalStrength(void) c switch (subsystemId) { case 0x13C21019: MaxSignal = 670; break; // TT-budget S2-3200 (DVB-S/DVB-S2) } +#if 1 + // XXX This is likely not correct for all cards using stb0899 + // but pctv452e usb ones seem to be affected too... + if (!strcmp(device->DeviceName(), "STB0899 Multistandard")) + MaxSignal = 670; +#endif int s = int(Signal) * 100 / MaxSignal; if (s > 100) s = 100; @@ -632,6 +638,12 @@ int cDvbTuner::GetSignalQuality(void) co switch (subsystemId) { case 0x13C21019: MaxSnr = 200; break; // TT-budget S2-3200 (DVB-S/DVB-S2) } +#if 1 + // XXX This is likely not correct for all cards using stb0899 + // but pctv452e usb ones seem to be affected too... + if (!strcmp(device->DeviceName(), "STB0899 Multistandard")) + MaxSnr = 200; +#endif int a = int(Snr) * 100 / MaxSnr; int b = 100 - (Unc * 10 + (Ber / 256) * 5); if (b < 0)