Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: DVB/libdvb bugfixes
On Sun, 2003-01-12 at 19:59, Marcus Metzler wrote:
> > Hi, I've been having some problems with videolan tuning. I've found two
> > small bugs in DVB/libdvb (which it uses) which stopped it from tuning
> > correctly.
> The latest version of libdvb is at
> http://www.metzlerbros.de/mbros/dvb/
Thanks. here's a patch against v0.2 as found on your page. Is there a CVS
I can patch against?
diff -Naur libdvb-0.2.ORIGINAL/devices.cc libdvb-0.2/devices.cc
--- libdvb-0.2.ORIGINAL/devices.cc 2003-01-12 21:05:40.000000000 +0000
+++ libdvb-0.2/devices.cc 2003-01-12 21:06:07.000000000 +0000
@@ -3,7 +3,7 @@
static char *feckeys[]={"NONE", "1/2", "2/3", "3/4", "4/5", "5/6", "6/7",
"7/8", "8/9", "AUTO", "0", "1", "2", "3", "4", "5",
- "6", "7"};
+ "6", "7", "8", "9"};
enum { TID=0, TNAME, TTYP, TFREQ, TPOL, TQAM, TSRATE, TFEC, TSAT, TONID,
TBANDWIDTH, TGUARD_INTERVAL, THIERARCHY, THP_RATE, TLP_RATE,
@@ -312,8 +312,10 @@
case TFEC:
ins >> keybuf;
x.fec = findkey(keybuf, feckeys);
- if (x.fec > FEC_AUTO )
- x.fec = FEC_AUTO;
+ if (x.fec > int(FEC_AUTO) )
+ x.fec -= (int(FEC_AUTO) + 1);
+ if ((x.fec < 0) || (x.fec > int(FEC_AUTO)))
+ x.fec = FEC_AUTO;
break;
case TSAT:
ins >> hex >> x.satid;
@@ -325,20 +327,18 @@
case THP_RATE:
ins >> keybuf;
x.hp_rate = findkey(keybuf, feckeys);
- if (x.hp_rate > int(FEC_NONE) )
- if ( (n = x.hp_rate - int(FEC_NONE) -1 ) < 7)
- x.hp_rate = n;
- else
- x.hp_rate = int(FEC_AUTO);
+ if (x.hp_rate > int(FEC_AUTO) )
+ x.hp_rate -= (int(FEC_AUTO) + 1);
+ if ((x.hp_rate < 0) || (x.hp_rate > int(FEC_AUTO)))
+ x.hp_rate = FEC_AUTO;
break;
case TLP_RATE:
ins >> keybuf;
x.lp_rate = findkey(keybuf, feckeys);
- if (x.lp_rate > int(FEC_NONE) )
- if ( (n = x.lp_rate - int(FEC_NONE) -1 ) < 7)
- x.lp_rate = n;
- else
- x.lp_rate = int(FEC_AUTO);
+ if (x.lp_rate > int(FEC_AUTO) )
+ x.lp_rate -= (int(FEC_AUTO) + 1);
+ if ((x.lp_rate < 0) || (x.lp_rate > int(FEC_AUTO)))
+ x.lp_rate = FEC_AUTO;
break;
case TMODULATION:
ins >> dec >> x.mod;
diff -Naur libdvb-0.2.ORIGINAL/DVB.cc libdvb-0.2/DVB.cc
--- libdvb-0.2.ORIGINAL/DVB.cc 2003-01-12 21:05:40.000000000 +0000
+++ libdvb-0.2/DVB.cc 2003-01-12 21:06:07.000000000 +0000
@@ -201,7 +201,7 @@
case FE_OFDM:
front_param.frequency = tp->freq;
- front_param.inversion = INVERSION_AUTO;
+ front_param.inversion = INVERSION_OFF;
front_param.u.ofdm.bandwidth = (fe_bandwidth_t)tp->band;
front_param.u.ofdm.code_rate_HP = (fe_code_rate_t)tp->hp_rate;
front_param.u.ofdm.code_rate_LP = (fe_code_rate_t)tp->lp_rate;
Home |
Main Index |
Thread Index