Re: Asys P7131 Hybrid: DVB out of range

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

 



Trent Piepho wrote:
> On Thu, 6 Sep 2007, hermann pitton wrote:
>> Am Mittwoch, den 05.09.2007, 13:29 +0200 schrieb Paolo Dell'Aquila:
>>> Than  I've done some test with Mythtv and auto-scanning
>>> for channels... and now...
>>>
>>> ...now I'm having the following (BIG) problem:
>>> dvb-t doesn't work anymore (also in kaffeiene or tzap).
>>>
>>> dmesg has the following error:
>>> DVB: frontend 0 frequency 2147483647 out of range (51000000..858000000)
>> That sounds really mad, especially as you are in freq. limits of the
>> tda8275 and not of the tda8275a, which for sure you have.
> 
> The limits are comming from the tda10046 info.  I think the correct thing
> to do here is to not have the tda1004x driver define frequency limits, as
> it's the tuner that has the limits.
> 
> But, 2147483647 is not a valid DVB-T frequency.  It looks like some random
> number.

It's not that random: 2147483647 equals INT_MAX and also LONG_MAX on 32
bit systems.

Quoting from the manpage of strtol():

The strtol() function returns the result of the conversion, unless the
value would underflow or overflow.  If an  underflow  occurs,  strtol()
returns  LONG_MIN.   If  an overflow occurs, strtol() returns LONG_MAX.
In both cases, errno is set to ERANGE.  Precisely the  same  holds  for
strtoll()  (with  LLONG_MIN  and  LLONG_MAX  instead  of  LONG_MIN  and
LONG_MAX).

My conclusion: Your channels.conf contains invalid frequency values.
Tzap uses strtol() to parse those values and returns LONG_MAX.

The error could be reported to the user by applying the attached patch.

Regards,
Andreas
diff -r 1923f74d97ae util/szap/azap.c
--- a/util/szap/azap.c	Wed Jun 27 19:46:43 2007 +0200
+++ b/util/szap/azap.c	Thu Sep 06 02:47:52 2007 +0200
@@ -104,6 +104,8 @@ int parse_int(int fd, int *val)
 	};
 
 	*val = strtol(number, NULL, 10);
+	if (errno == ERANGE)
+		return -4;
 
 	return 0;
 }
diff -r 1923f74d97ae util/szap/tzap.c
--- a/util/szap/tzap.c	Wed Jun 27 19:46:43 2007 +0200
+++ b/util/szap/tzap.c	Thu Sep 06 02:47:52 2007 +0200
@@ -180,6 +180,8 @@ int parse_int(int fd, int *val)
 	};
 
 	*val = strtol(number, NULL, 10);
+	if (errno == ERANGE)
+		return -4;
 
 	return 0;
 }
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux