Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] DVB/libdvb bugfixes



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.

This patch is against the latest cvs.


-- 
Andrew de Quincey <adq_dvb@lidskialf.net>
diff -Naur DVB.ORIGINAL/libdvb/devices.cc DVB/libdvb/devices.cc
--- DVB.ORIGINAL/libdvb/devices.cc	2003-01-07 13:32:26.000000000 +0000
+++ DVB/libdvb/devices.cc	2003-01-12 19:32:46.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 DVB.ORIGINAL/libdvb/DVB.cc DVB/libdvb/DVB.cc
--- DVB.ORIGINAL/libdvb/DVB.cc	2003-01-12 19:12:43.000000000 +0000
+++ DVB/libdvb/DVB.cc	2003-01-12 19:33:11.000000000 +0000
@@ -198,7 +198,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