1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

- Further fixes to the signal quality display, especially SNR.

- Bump PORTREVISION.
This commit is contained in:
Juergen Lock 2012-05-11 17:17:24 +00:00
parent a44b4187c9
commit 2a6dfb7ae6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=296441
3 changed files with 42 additions and 2 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= vdr
PORTVERSION= 1.7.27
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia
MASTER_SITES= ftp://ftp.tvdr.de/vdr/Developer/

View File

@ -8,3 +8,30 @@
#include "dvbdevice.h"
#include <ctype.h>
#include <errno.h>
@@ -592,7 +598,7 @@ int cDvbTuner::GetSignalQuality(void) co
while (1) {
if (ioctl(fd_frontend, FE_READ_SNR, &Snr) != -1)
break;
- if (errno == EOPNOTSUPP) {
+ if (errno == EOPNOTSUPP || errno == ENXIO) {
Snr = 0xFFFF;
HasSnr = false;
break;
@@ -605,7 +611,7 @@ int cDvbTuner::GetSignalQuality(void) co
while (1) {
if (ioctl(fd_frontend, FE_READ_BER, &Ber) != -1)
break;
- if (errno == EOPNOTSUPP) {
+ if (errno == EOPNOTSUPP || errno == ENXIO) {
Ber = 0;
HasBer = false;
break;
@@ -618,7 +624,7 @@ int cDvbTuner::GetSignalQuality(void) co
while (1) {
if (ioctl(fd_frontend, FE_READ_UNCORRECTED_BLOCKS, &Unc) != -1)
break;
- if (errno == EOPNOTSUPP) {
+ if (errno == EOPNOTSUPP || errno == ENXIO) {
Unc = 0;
HasUnc = false;
break;

View File

@ -1,6 +1,6 @@
--- dvbdevice.c.orig
+++ dvbdevice.c
@@ -559,6 +560,12 @@ int cDvbTuner::GetSignalStrength(void) 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)
}
@ -13,3 +13,16 @@
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)