Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-08 Thread Trent Piepho
On Thu, 6 Sep 2007, Manu Abraham wrote:
 Trent Piepho wrote:

  At least for many demods, the frequency range supported is determined by
  the tuner.  One could have a chip that combines the demod and tuner
  functions, or a system where the demod is somehow involved in tuning and
  has some limit.  But that is not the case here.

 Fmclk  2 * Fsmax * Viterbi

 Doesn't apply to a tuner

Of course! Why didn't I see that?  You've made it perfectly clear now.

Using this formula, what is the allowed range for a tda10046 demod with a
TDA827X tuner?  How about with a TDA827XA tuner?

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-08 Thread Manu Abraham
Trent Piepho wrote:
 On Thu, 6 Sep 2007, Manu Abraham wrote:
 Trent Piepho wrote:

 At least for many demods, the frequency range supported is determined by
 the tuner.  One could have a chip that combines the demod and tuner
 functions, or a system where the demod is somehow involved in tuning and
 has some limit.  But that is not the case here.
 Fmclk  2 * Fsmax * Viterbi

 Doesn't apply to a tuner
 
 Of course! Why didn't I see that?  You've made it perfectly clear now.
 

It is the mother of all calculations, for any Digital communication
device (Nyquist Sampling Rate)

Calculations generally are derived off this. The 2 *  is generally
used in the case of the complete spectral width, ie, you can assume that
case to be valid with a ZIF tuner and not otherwise.

Generally it is classified that the bandwidth of a ZIF tuner is twice
that of a normal tuner.

 Using this formula, what is the allowed range for a tda10046 demod with a
 TDA827X tuner?  How about with a TDA827XA tuner?


I don't have the 827x specs (but i will explain what i can, time being
short as well)

Generally, there is a case of confusion when the tda10046 is used:

* the difference being an optional down-converter.

ie, there will be 2 cases basically

* Fsmax = 6/5 * IF1 (Up sampling: 36.15/36.125MHz)
* Fsmax = 4/5 * IF1 (Down sampling: 43.75/57MHz)

Additionally,

specifically for the TDA10046, it reduces to

Fsamp = 55 Mhz as an *absolute* maximum (whatever configuration it might
be). But then this might not be at the Nyquist rate also, in some cases
then.

With the builtin PLL for the ADC clock,
Fsamp = (M / N * P) * Fquartz
where:
M = Clock Multiplier
N = a Clock divider ratio
P = a Clock divider ratio

With default M, N, P values with a default quartz crystal of 4MHz
(according to the specifications, it can go upto 27MHz), the default
sampling frequency becomes 55 Mhz
So as you see in the case of the high IF values, the tda10046 cannot do
Nyquist sampling at the extreme end, but generally this limitation is
not applicable in most cases.

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-07 Thread Paolo Dell'Aquila
hermann pitton wrote:

 Can not reproduce your problem on a 32bit machine with the Asus P7131
 Dual. If I fake frequencies out of range in my tzap channels.conf, the
 error behavior is OK, also I can still tune to the valid frequencies.

YEP YEP YEP

SOLVED

I want to thank you all.

Lot of you asked me to check my channels.conf. That is what put me on 
the right direction.

The card was working fine on my WinXP machine so it wasn't an hardware 
problem.

The reported error was in dmesg so I had only two alternatives: a driver 
problem or a buggy software launched at start time.
Damn... a daemon... or a server...

I checked all my channels.conf: they were right and all the programs 
using channels.conf (vdr, tzap, mplayer) were not launched at boot time.

Mmmm... MythTv-backend was the only one started in background during 
startup...
... so I removed it and...

TA-DA

everything works fine again.

It's a mystery why Mythtv-backend was trying to use the driver: there 
was no scheduled activities...
... and it's a mystery (for me) why it wasn't possible to use the driver 
after that buggy activity.

 Radio doesn't work for you. Are you sure you have still gpio 0x020
 for radio and not 0x000 ?

It wasn't possible to use anything after the mythtv backend activity. 
Just noise on radio and jumping images with a lot of noise with anolog tv.

But now everything is going fine.

## ACTUAL SITUATION ##

1) patched v4l with your patches so dvb-t is binded to the same 
analog-tv antenna. (cannot understand why I have to patch also 
saa7134-cards.c with gpi=0x000 bit I did it, LOL)

2) analog tv: perfect

3) Couldn't make the patch cable working. Still have to use aplay or sox

4) kaffeine on dvb-t perfect

5) mplayer with analog tv: perfect

6) mplayer with dvb-t: solved now! It doesn't like all those auto in 
channels.conf. Changed them and mplayer started working.


So the only problem now is with the patch cable.

Thanks again to all of you for helping me to solve this problem.

ciao

paolo






___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-07 Thread hermann pitton
Hi Paolo,

Am Freitag, den 07.09.2007, 10:15 +0200 schrieb Paolo Dell'Aquila:
 hermann pitton wrote:
 
  Can not reproduce your problem on a 32bit machine with the Asus P7131
  Dual. If I fake frequencies out of range in my tzap channels.conf, the
  error behavior is OK, also I can still tune to the valid frequencies.
 
 YEP YEP YEP
 
 SOLVED
 
 I want to thank you all.
 
 Lot of you asked me to check my channels.conf. That is what put me on 
 the right direction.
 
 The card was working fine on my WinXP machine so it wasn't an hardware 
 problem.

fine, at least no hardware damage yet.

 The reported error was in dmesg so I had only two alternatives: a driver 
 problem or a buggy software launched at start time.
 Damn... a daemon... or a server...
 
 I checked all my channels.conf: they were right and all the programs 
 using channels.conf (vdr, tzap, mplayer) were not launched at boot time.
 
 Mmmm... MythTv-backend was the only one started in background during 
 startup...
 ... so I removed it and...
 
 TA-DA
 
 everything works fine again.
 
 It's a mystery why Mythtv-backend was trying to use the driver: there 
 was no scheduled activities...
 ... and it's a mystery (for me) why it wasn't possible to use the driver 
 after that buggy activity.

The application developers will see it the other way round.
These are buggy drivers.

  Radio doesn't work for you. Are you sure you have still gpio 0x020
  for radio and not 0x000 ?
 
 It wasn't possible to use anything after the mythtv backend activity. 
 Just noise on radio and jumping images with a lot of noise with anolog tv.
 
 But now everything is going fine.
 
 ## ACTUAL SITUATION ##
 
 1) patched v4l with your patches so dvb-t is binded to the same 
 analog-tv antenna. (cannot understand why I have to patch also 
 saa7134-cards.c with gpi=0x000 bit I did it, LOL)

I told you, if you want to use DVB-T at once with an external s-video or
composite input, like from a VCR, you need this not to lose DVB-T.

 2) analog tv: perfect
 
 3) Couldn't make the patch cable working. Still have to use aplay or sox
 
 4) kaffeine on dvb-t perfect
 
 5) mplayer with analog tv: perfect
 
 6) mplayer with dvb-t: solved now! It doesn't like all those auto in 
 channels.conf. Changed them and mplayer started working.
 
 
 So the only problem now is with the patch cable.

Since I don't have the card and digging into all postings is lost of
life time, find someone with the same card to confirm the unexpected.

 Thanks again to all of you for helping me to solve this problem.
 
 ciao
 
 paolo
 

Have some fun.

ciao

hermann



___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-07 Thread hermann pitton
Hi Paolo,

Am Freitag, den 07.09.2007, 10:15 +0200 schrieb Paolo Dell'Aquila:
 hermann pitton wrote:
 
  Can not reproduce your problem on a 32bit machine with the Asus P7131
  Dual. If I fake frequencies out of range in my tzap channels.conf, the
  error behavior is OK, also I can still tune to the valid frequencies.
 
 YEP YEP YEP
 
 SOLVED
 
 I want to thank you all.
 
 Lot of you asked me to check my channels.conf. That is what put me on 
 the right direction.
 
 The card was working fine on my WinXP machine so it wasn't an hardware 
 problem.

fine, at least no hardware damage yet.

 The reported error was in dmesg so I had only two alternatives: a driver 
 problem or a buggy software launched at start time.
 Damn... a daemon... or a server...
 
 I checked all my channels.conf: they were right and all the programs 
 using channels.conf (vdr, tzap, mplayer) were not launched at boot time.
 
 Mmmm... MythTv-backend was the only one started in background during 
 startup...
 ... so I removed it and...
 
 TA-DA
 
 everything works fine again.
 
 It's a mystery why Mythtv-backend was trying to use the driver: there 
 was no scheduled activities...
 ... and it's a mystery (for me) why it wasn't possible to use the driver 
 after that buggy activity.

The application developers will see it the other way round.
These are buggy drivers.

  Radio doesn't work for you. Are you sure you have still gpio 0x020
  for radio and not 0x000 ?
 
 It wasn't possible to use anything after the mythtv backend activity. 
 Just noise on radio and jumping images with a lot of noise with anolog tv.
 
 But now everything is going fine.
 
 ## ACTUAL SITUATION ##
 
 1) patched v4l with your patches so dvb-t is binded to the same 
 analog-tv antenna. (cannot understand why I have to patch also 
 saa7134-cards.c with gpi=0x000 bit I did it, LOL)

I told you, if you want to use DVB-T at once with an external s-video or
composite input, like from a VCR, you need this not to lose DVB-T.

 2) analog tv: perfect
 
 3) Couldn't make the patch cable working. Still have to use aplay or sox
 
 4) kaffeine on dvb-t perfect
 
 5) mplayer with analog tv: perfect
 
 6) mplayer with dvb-t: solved now! It doesn't like all those auto in 
 channels.conf. Changed them and mplayer started working.
 
 
 So the only problem now is with the patch cable.

Since I don't have the card and digging into all postings is lost
life time, find someone with the same card to confirm the unexpected.

 Thanks again to all of you for helping me to solve this problem.
 
 ciao
 
 paolo
 

Have some fun.

ciao

hermann



___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Mauro Carvalho Chehab
  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.
 
 Nak. You must not remove these limits unless you make sure
 that all tuner drivers which might be attached to this demod
 have non-zero frequency limits.

IMO, the better would be not to initialize frequency ranges at the
demods (since this is tuner stuff). 

If you are afraid of having a tuner driver with improper values, add a
check can be added, at dvb frontend core, to use the maximum allowed
frequency range, if frequency_max is not defined. The better, however,
is to fix the tuner drivers without frequency limits.

Removing the frequency ranges from demods have two advantages:

1) Avoid bogus values at demods;

2) It helps to decrease the BSS size of the module, used initialize
those two variables that are useless at demod context.

-- 
Cheers,
Mauro


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Manu Abraham

 
 IMO, the better would be not to initialize frequency ranges at the
 demods (since this is tuner stuff). 
 

Ninny approach


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Manu Abraham
Hi Obi,

Andreas Oberritter wrote:

 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


Can you please apply it to the dvb-apps tree ?

Regards,
Manu


 
 
 
 diff -r 1923f74d97ae util/szap/azap.c
 --- a/util/szap/azap.cWed Jun 27 19:46:43 2007 +0200
 +++ b/util/szap/azap.cThu 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.cWed Jun 27 19:46:43 2007 +0200
 +++ b/util/szap/tzap.cThu 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@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Manu Abraham
Hi Obi,

Andreas Oberritter wrote:

 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


Can you please apply it to the dvb-apps tree ?

Regards,
Manu


 
 
 
 diff -r 1923f74d97ae util/szap/azap.c
 --- a/util/szap/azap.cWed Jun 27 19:46:43 2007 +0200
 +++ b/util/szap/azap.cThu 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.cWed Jun 27 19:46:43 2007 +0200
 +++ b/util/szap/tzap.cThu 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@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Johannes Stezenbach
On Thu, Sep 06, 2007, Andreas Oberritter wrote:
 
 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).

You should've read on:

 NOTES
Since  strtol()  can  legitimately  return  0, LONG_MAX, or
LONG_MIN (LLONG_MAX or LLONG_MIN for str‐ toll()) on both
success and failure, the calling program should set errno to 0
before the  call,  and then determine if an error occurred by
checking whether errno has a non-zero value after the call.

I think your patch is buggy, because errno is not guaranteed
to be reset to zero after successful calls (see the errno manpage).


Regards,
Johannes


 diff -r 1923f74d97ae util/szap/azap.c
 --- a/util/szap/azap.cWed Jun 27 19:46:43 2007 +0200
 +++ b/util/szap/azap.cThu 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.cWed Jun 27 19:46:43 2007 +0200
 +++ b/util/szap/tzap.cThu 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@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Trent Piepho
On Thu, 6 Sep 2007, Andreas Oberritter wrote:
 Trent Piepho wrote:
  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.

Very clever, I bet you are right about that!

Previously the frequency range wasn't checked, so something like this could
go undetected.  There wouldn't be any error returned when FE_SET_FRONTEND
was called.  The tuner driver would either reject the value when the tuning
thread tried to set it, or it would program the tuner so some bogus
setting.  Either no signal would be detected, or the frequency would remain
unchanged from whatever it was at before, and so the last channel tuned
might appear, as if it was at 2147483647 Hz.

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Trent Piepho
On Thu, 6 Sep 2007, Mauro Carvalho Chehab wrote:
   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.
 
  Nak. You must not remove these limits unless you make sure
  that all tuner drivers which might be attached to this demod
  have non-zero frequency limits.

So the incorrect limits should be left there?  That isn't right either.

 IMO, the better would be not to initialize frequency ranges at the
 demods (since this is tuner stuff).

At least for many demods, the frequency range supported is determined by
the tuner.  One could have a chip that combines the demod and tuner
functions, or a system where the demod is somehow involved in tuning and
has some limit.  But that is not the case here.

 If you are afraid of having a tuner driver with improper values, add a
 check can be added, at dvb frontend core, to use the maximum allowed
 frequency range, if frequency_max is not defined. The better, however,
 is to fix the tuner drivers without frequency limits.

This would be easy to do.  There is already a function,
dvb_frontend_get_frequeny_limits(), that does this.  It prints a warning
message if neither the demod nor the tuner define a limit.  In this case,
it returns zero for the max frequency, so any attempt to tune with a driver
broken like this will fail.  It could easily return ULONG_MAX in this case,
so tuning would work but there would still be the warning message.

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Andreas Oberritter
Hello Johannes,

Johannes Stezenbach wrote:
   Since  strtol()  can  legitimately  return  0, LONG_MAX, or
   LONG_MIN (LLONG_MAX or LLONG_MIN for str‐ toll()) on both
   success and failure, the calling program should set errno to 0
   before the  call,  and then determine if an error occurred by
   checking whether errno has a non-zero value after the call.
 
 I think your patch is buggy, because errno is not guaranteed
 to be reset to zero after successful calls (see the errno manpage).

Right. Here's an updated patch.

@Manu: I am using hg anonymously and I don't even know whether I have
write access or not. It would be nice if you can commit it.

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 19:04:37 2007 +0200
@@ -103,7 +103,10 @@ int parse_int(int fd, int *val)
 			return -3;	/*  to fit in 32 bit */
 	};
 
+	errno = 0;
 	*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 19:04:37 2007 +0200
@@ -179,7 +179,10 @@ int parse_int(int fd, int *val)
 			return -3;	/*  to fit in 32 bit */
 	};
 
+	errno = 0;
 	*val = strtol(number, NULL, 10);
+	if (errno == ERANGE)
+		return -4;
 
 	return 0;
 }
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Michael Krufky
Andreas Oberritter wrote:
 @Manu: I am using hg anonymously and I don't even know whether I have
 write access or not. It would be nice if you can commit it.

Everybody that had commit access to cvs also now has commit rights to 
hg/dvb-apps

-Mike


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Manu Abraham
Trent Piepho wrote:

 At least for many demods, the frequency range supported is determined by
 the tuner.  One could have a chip that combines the demod and tuner
 functions, or a system where the demod is somehow involved in tuning and
 has some limit.  But that is not the case here.

Fmclk  2 * Fsmax * Viterbi

Doesn't apply to a tuner

HTH


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread hermann pitton
Hi Paolo,

Am Donnerstag, den 06.09.2007, 10:01 +0200 schrieb Paolo Dell'Aquila:
 hermann pitton wrote:
 
  OK, you are using the patch to change the digital antenna input, no
  analog used after latest module unload and the IR receiver is not
  plugged.
 
 I've tried both applying your patch for switching antenna and without 
 it. The freq error is still there.

yes, that can't be related to it.

 So I removed the board and putted again on my WinXp machine (yes, I have 
 one, LOL) and there it was working perfectly.
 
 So I reinserted the card into my linux box checking very well the 
 contacts. The problem was still there.
 
 Hope I will be able to watch TV (and more important listening radio) on 
 my linux box as soon as possible.

Please keep at least the dvb ML posted.

Can not reproduce your problem on a 32bit machine with the Asus P7131
Dual. If I fake frequencies out of range in my tzap channels.conf, the
error behavior is OK, also I can still tune to the valid frequencies.

# ./tzap -r TERRA NOVA
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
reading channels from file '/root/.tzap/channels.conf'
tuning to 99800 Hz
ERROR: ioctl FE_SET_FRONTEND failed (Invalid argument)

tda1004x: found firmware revision 26 -- ok
DVB: frontend 0 frequency 99800 out of range (5100..85800)

# ./tzap -r PHOENIX
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
reading channels from file '/root/.tzap/channels.conf'
tuning to 4550 Hz
ERROR: ioctl FE_SET_FRONTEND failed (Invalid argument)

tda1004x: found firmware revision 26 -- ok
DVB: frontend 0 frequency 4550 out of range (5100..85800)

Good enough :)

Did you check your channels.conf for frequencies out of the above range
like suggested? Maybe post it to the mailing list.
If there are such, you could also try with Andreas patch.

Current mercurial dvb-apps don't build here.

CC dvbvideo.o
In file included from dvbvideo.c:28:
/usr/include/linux/dvb/video.h:100: Fehler: expected specifier-qualifier-list 
before »__u32«
make[2]: *** [dvbvideo.o] Fehler 1

Your other machine is fine with the card and on this one even analog is
affected. We have so far all the same, except that my card doesn't have
a LNA.

Radio doesn't work for you. Are you sure you have still gpio 0x020
for radio and not 0x000 ?

If you don't get it fixed with the above, you might consider to remove
all like doing from your copy of v4l-dvb
modprobe -vr saa7134-dvb saa7134-alsa tuner tda827x
make rmmod (webcam/something?)
make rminstall

Check that no *.ko is left in
/lib/modules/your_kernel_version/kernel/drivers/media

Else report and delete it.

You could try now for example with a snapshot from Hartmut Hackmann's
mercurial repository for a test http://www.linuxtv.org/hg
or with your previously working version of v4l-dvb.

If you still have troubles everywhere, voltage problems can corrupt the
i2c traffic on a card and more. Try i2c_debug=1 on the saa7134 driver to
look for failing traffic.

I have no better ideas for now.

Cheers,
Hermann









___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-06 Thread Mauro Carvalho Chehab

 This would be easy to do.  There is already a function,
 dvb_frontend_get_frequeny_limits(), that does this.  It prints a warning
 message if neither the demod nor the tuner define a limit.  In this case,
 it returns zero for the max frequency, so any attempt to tune with a driver
 broken like this will fail.  It could easily return ULONG_MAX in this case,
 so tuning would work but there would still be the warning message.

IMO, this seems to be the proper way for handling this. Both tuner and
demod limits are taken into account by this function. It also takes the
minor limits, between demod and tuner. The message may be improved to
ask people to send an e-mail to the maintainers list for a fix to be
applied. Mkrufky added a warning message also asking for report
submission, if a V4L tuner is detected after the maximum expected i2c
range.

Cheers,
Mauro.


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-05 Thread Paolo Dell'Aquila
This morning I upgraded the kernel of my linux box.
After that I cloned v4l-dvb and compiled everything. I've done it
because couldn't watch digital tv with mplayer but only with
kaffeine.
Mplayer error was:
vb_streaming_read, attempt N. 6 failed with errno 0 when reading ...

So I tried to update bit I didn't solve the problem.


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 (5100..85800)

After this mess up, analogical TV is no more properly working, before 
was really perfect.

Going crazy...


thank you for your help.


P.S.
I would like to know is some of you could use a patch cable between 
P7131 and motherboard for listen TV. I've tried sever time but no sound 
at all and I have to use sox or aplay.


Some information about my system:
SO: Ubuntu 7.07 - Linux linux 2.6.20-16-generic

dmesg:
[...]
[   18.020064] saa7130/34: v4l2 driver version 0.2.14 loaded
[   18.020132] ACPI: PCI Interrupt :01:09.0[A] - GSI 17 (level, 
low) - IRQ 17
[   18.020144] saa7133[0]: found at :01:09.0, rev: 209, irq: 17, 
latency: 64, mmio: 0xcdcff800
[   18.020152] saa7133[0]: subsystem: 1043:4876, board: ASUSTeK P7131 
Hybrid [card=112,autodetected]
[   18.020163] saa7133[0]: board init: gpio is 20
[   18.020239] input: saa7134 IR (ASUSTeK P7131 Hybri as /class/input/input4
[   18.054492] intel_rng: FWH not detected
[   18.148302] nvidia: module license 'NVIDIA' taints kernel.
[   18.14] saa7133[0]: i2c eeprom 00: 43 10 76 48 54 20 1c 00 43 43 
a9 1c 55 d2 b2 92
[   18.155568] saa7133[0]: i2c eeprom 10: ff ff ff 0f ff 20 ff ff ff ff 
ff ff ff ff ff ff
[   18.155581] saa7133[0]: i2c eeprom 20: 01 40 01 02 03 01 01 03 08 ff 
00 d5 ff ff ff ff
[   18.155593] saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff
[   18.155605] saa7133[0]: i2c eeprom 40: ff 21 00 c2 96 10 03 32 55 50 
ff ff ff ff ff ff
[   18.155617] saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff
[   18.155630] saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff
[   18.155642] saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff
[   18.562616] tuner 0-004b: chip found @ 0x96 (saa7133[0])
[   18.610496] tda8290 0-004b: setting tuner address to 61
[   18.611021] NET: Registered protocol family 17
[   18.714276] tuner 0-004b: type set to tda8290+75a
[   18.762213] tda8290 0-004b: setting tuner address to 61
[   18.866006] tuner 0-004b: type set to tda8290+75a
[   18.873190] saa7133[0]: registered device video0 [v4l2]
[   18.873229] saa7133[0]: registered device vbi0
[   18.873256] saa7133[0]: registered device radio0
[   18.873732] ACPI: PCI Interrupt :00:1b.0[A] - GSI 16 (level, 
low) - IRQ 16
[   18.873766] PCI: Setting latency timer of device :00:1b.0 to 64
[   18.911272] saa7134 ALSA driver for DMA sound loaded
[   18.911615] saa7133[0]/alsa: saa7133[0] at 0xcdcff800 irq 17 
registered as card -2
[   19.051812] DVB: registering new adapter (saa7133[0])
[   19.051821] DVB: registering frontend 0 (Philips TDA10046H DVB-T)...
[   19.121478] tda1004x: setting up plls for 48MHz sampling clock
[   19.141824] ACPI: PCI Interrupt :05:00.0[A] - GSI 16 (level, 
low) - IRQ 16
[   19.141839] PCI: Setting latency timer of device :05:00.0 to 64
[   19.141970] NVRM: loading NVIDIA UNIX x86 Kernel Module  1.0-9755 
Mon Feb 26 23:21:15 PST 2007
[   19.404784] tda1004x: found firmware revision 29 -- ok
[...]
[   49.092508] tda1004x: setting up plls for 48MHz sampling clock
[   49.455718] tda1004x: found firmware revision 29 -- ok
[   49.796042] DVB: frontend 0 frequency 2147483647 out of range 
(5100..85800)
[   49.834811] DVB: frontend 0 frequency 2147483647 out of range 
(5100..85800)

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-05 Thread hermann pitton
Hi Paolo,

Am Mittwoch, den 05.09.2007, 13:29 +0200 schrieb Paolo Dell'Aquila:
 This morning I upgraded the kernel of my linux box.
 After that I cloned v4l-dvb and compiled everything. I've done it
 because couldn't watch digital tv with mplayer but only with
 kaffeine.
 Mplayer error was:
 vb_streaming_read, attempt N. 6 failed with errno 0 when reading ...

no such issues here.

 So I tried to update bit I didn't solve the problem.
 
 
 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 (5100..85800)

That sounds really mad, especially as you are in freq. limits of the
tda8275 and not of the tda8275a, which for sure you have.

 After this mess up, analogical TV is no more properly working, before 
 was really perfect.
 
 Going crazy...
 
 
 thank you for your help.
 
 
 P.S.
 I would like to know is some of you could use a patch cable between 
 P7131 and motherboard for listen TV. I've tried sever time but no sound 
 at all and I have to use sox or aplay.

Yes, I do this without any problems, but on the prior P7131 Dual without
LNA. From the bottom, left is left and right is right and the two pins
in the middle are ground.

 
 Some information about my system:
 SO: Ubuntu 7.07 - Linux linux 2.6.20-16-generic
 
 dmesg:
 [...]
 [   18.020064] saa7130/34: v4l2 driver version 0.2.14 loaded
 [   18.020132] ACPI: PCI Interrupt :01:09.0[A] - GSI 17 (level, 
 low) - IRQ 17
 [   18.020144] saa7133[0]: found at :01:09.0, rev: 209, irq: 17, 
 latency: 64, mmio: 0xcdcff800
 [   18.020152] saa7133[0]: subsystem: 1043:4876, board: ASUSTeK P7131 
 Hybrid [card=112,autodetected]
 [   18.020163] saa7133[0]: board init: gpio is 20

OK, you are using the patch to change the digital antenna input, no
analog used after latest module unload and the IR receiver is not
plugged.

 [   18.020239] input: saa7134 IR (ASUSTeK P7131 Hybri as /class/input/input4
 [   18.054492] intel_rng: FWH not detected
 [   18.148302] nvidia: module license 'NVIDIA' taints kernel.
 [   18.14] saa7133[0]: i2c eeprom 00: 43 10 76 48 54 20 1c 00 43 43 
 a9 1c 55 d2 b2 92
 [   18.155568] saa7133[0]: i2c eeprom 10: ff ff ff 0f ff 20 ff ff ff ff 
 ff ff ff ff ff ff
 [   18.155581] saa7133[0]: i2c eeprom 20: 01 40 01 02 03 01 01 03 08 ff 
 00 d5 ff ff ff ff
 [   18.155593] saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff 
 ff ff ff ff ff ff
 [   18.155605] saa7133[0]: i2c eeprom 40: ff 21 00 c2 96 10 03 32 55 50 
 ff ff ff ff ff ff
 [   18.155617] saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff 
 ff ff ff ff ff ff
 [   18.155630] saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff 
 ff ff ff ff ff ff
 [   18.155642] saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff 
 ff ff ff ff ff ff
 [   18.562616] tuner 0-004b: chip found @ 0x96 (saa7133[0])
 [   18.610496] tda8290 0-004b: setting tuner address to 61
 [   18.611021] NET: Registered protocol family 17
 [   18.714276] tuner 0-004b: type set to tda8290+75a
 [   18.762213] tda8290 0-004b: setting tuner address to 61
 [   18.866006] tuner 0-004b: type set to tda8290+75a

Analog detects the right tuner type here.

 [   18.873190] saa7133[0]: registered device video0 [v4l2]
 [   18.873229] saa7133[0]: registered device vbi0
 [   18.873256] saa7133[0]: registered device radio0
 [   18.873732] ACPI: PCI Interrupt :00:1b.0[A] - GSI 16 (level, 
 low) - IRQ 16
 [   18.873766] PCI: Setting latency timer of device :00:1b.0 to 64
 [   18.911272] saa7134 ALSA driver for DMA sound loaded
 [   18.911615] saa7133[0]/alsa: saa7133[0] at 0xcdcff800 irq 17 
 registered as card -2
 [   19.051812] DVB: registering new adapter (saa7133[0])
 [   19.051821] DVB: registering frontend 0 (Philips TDA10046H DVB-T)...
 [   19.121478] tda1004x: setting up plls for 48MHz sampling clock
 [   19.141824] ACPI: PCI Interrupt :05:00.0[A] - GSI 16 (level, 
 low) - IRQ 16
 [   19.141839] PCI: Setting latency timer of device :05:00.0 to 64
 [   19.141970] NVRM: loading NVIDIA UNIX x86 Kernel Module  1.0-9755 
 Mon Feb 26 23:21:15 PST 2007
 [   19.404784] tda1004x: found firmware revision 29 -- ok
 [...]
 [   49.092508] tda1004x: setting up plls for 48MHz sampling clock
 [   49.455718] tda1004x: found firmware revision 29 -- ok
 [   49.796042] DVB: frontend 0 frequency 2147483647 out of range 
 (5100..85800)
 [   49.834811] DVB: frontend 0 frequency 2147483647 out of range 
 (5100..85800)

For Michael, I'm running latest with all his patches from 20070902 on
two different machines down to 2.6.20, except other analog stuff, the
tda8275a Asus P7131 Dual and a md7134 with FMD1216ME (the triple, but
don't get the second PCI bridge in an analog orange colored MSI
slot ...) and all is fine, means no new issues.

Make sure all old modules are 

Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-05 Thread Trent Piepho
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 (5100..85800)

 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.

---
# HG changeset patch
# User Trent Piepho [EMAIL PROTECTED]
# Date 1189035269 25200
# Node ID 0f6fa7f9db1241806c7d91ff6a9775f12fe1d6dd
# Parent  1387dc197077ad89fdc4014c927c4d8c9ae56193
tda1004x: Remove frequency limits

From: Trent Piepho [EMAIL PROTECTED]

The frequency limits are defined by the tuner.  The demodulator's input comes
in at a fixed intermediate frequency, and it doesn't care or know what
frequency it was at originally.

Signed-off-by: Trent Piepho [EMAIL PROTECTED]

diff -r 1387dc197077 -r 0f6fa7f9db12 
linux/drivers/media/dvb/frontends/tda1004x.c
--- a/linux/drivers/media/dvb/frontends/tda1004x.c  Sun Sep 02 07:56:18 
2007 +0100
+++ b/linux/drivers/media/dvb/frontends/tda1004x.c  Wed Sep 05 16:34:29 
2007 -0700
@@ -1216,8 +1216,6 @@ static struct dvb_frontend_ops tda10045_
.info = {
.name = Philips TDA10045H DVB-T,
.type = FE_OFDM,
-   .frequency_min = 5100,
-   .frequency_max = 85800,
.frequency_stepsize = 17,
.caps =
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
@@ -1275,8 +1273,6 @@ static struct dvb_frontend_ops tda10046_
.info = {
.name = Philips TDA10046H DVB-T,
.type = FE_OFDM,
-   .frequency_min = 5100,
-   .frequency_max = 85800,
.frequency_stepsize = 17,
.caps =
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-05 Thread Andreas Oberritter
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 (5100..85800)
 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@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-05 Thread Oliver Endriss
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 (5100..85800)
 
  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.

Nak. You must not remove these limits unless you make sure
that all tuner drivers which might be attached to this demod
have non-zero frequency limits.

 But, 2147483647 is not a valid DVB-T frequency.  It looks like some random
 number.

Ack, this frequency is bogus. The application must be fixed.

CU
Oliver

-- 

VDR Remote Plugin 0.3.9: http://www.escape-edv.de/endriss/vdr/



___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Asys P7131 Hybrid: DVB out of range

2007-09-05 Thread hermann pitton
Am Mittwoch, den 05.09.2007, 16:36 -0700 schrieb Trent Piepho:
 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 (5100..85800)
 
  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.

You are totally right.

/me and others tried on this over and over again.
For some price ..., not worth at all! f*

 But, 2147483647 is not a valid DVB-T frequency.  It looks like some random
 number.

Hopefully, that is the little remaining soon gone.

Cheers,
Hermann






___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb