Mailing List archive

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

[linux-dvb] Re: Problems with a DVB-T - Patch included




I have now talked to TT, they think it is a hardware problem
and I will send my card to them for a check.

(I think so too, I have spikes at about 18,3MHz on the signal
from the tuner to the demodulator, they seem to originate in
the demod, and 18,3MHz is 1/3 of the demods' clock frequency.
That could explain why my tuner has stability problems and why
I have a high BER. The cause could be one of those solder bridges
on for example a clock output, but I haven't found any bridge
where it should do any harm.)

Thank you to all of you who have helped me tracking this down!


--On den 2 januari 2003 10:42 +0100 Holger Waechtler 
<holger@convergence.de> wrote:

> The stepsize has nothing to do with the 166kHz offsets used in the UK.

Why not? I must have misunderstood something.


>>> Could you please prepare + send a patch?

I have now got the Alps TDLB7 datasheet and have patched the code
accordingly, see below. This change could mean some stability,
tuning and lock time and/or noice improvement for those of you
who have got working cards. Please try it out!

(This code doesn't work nearly as good with my (broken) card
as my other experimental one, so you will have to test it!)


--On den 2 januari 2003 11:33 +0100 Johan Martensson <jom@virrvarr.com> 
wrote:

> My board seems to work ok.  It tunes fine for all transponders but
> one, 754 Mhz.
...
> Ragnar, If you want me to I can try your patches and see if something
> breaks.

Please do!
I too see much more noise on 754MHz. Maybe you will get better
reception with this patch (which will change charge pump level
from zero to one).
I'll include instructions for trying other settings below, if
you like you can try it to see if you can improve it.
In my (broken card) experience, the BER counter in tzap gives
a good indication of signal quality.
I don't know if I have a higher BER on this channel on my set
top receiver too, it normally says "< 1.0 E-8" on all channels,
and I have never seen any mpeg-blocks on any channel unless
provoced (like by disconnecting the antenna).

/ragge

---------------

Instructions for trying different settings for the Alps TDLB7
(Thanks to those who have helped me learn how to do this!)

My TDLB7 has a sp5659 with a 10.666MHz reference. The sp5659
datasheet examples are with a 4MHz reference. Yours will most
probably have a sp5659 or a compatible part too, since it
is the sp5659 you are talking too and which is defining the
i2c interface.

Alps says the tuner has stepsize 166666 and one should be using
charge pump power=1 for channels E21..E59 and power=2 for E60..E69.

Lower stepsize should give you less noise, higher stepsize faster
tuning, to low a charge pump current could make the PLL never
tune to the frequency correctly, to high could make it oscillate
in frequency. Optimal settings may vary with frequency.

With my *broken* card I have good reception with pwr=3 and
stepsize=333333, but changing frequency only ends up with a
locked SP8870 when going from a lower freq to a higher
(I don't know why that is, the sp5659 says it has locked)).
I have very little noise, very fast tuning and tuning working
from both ways with pwr=2 and stepsize=666666. With pwr=3 and
same step I get more noice.
Note that this is with a tuner module that probably is getting
interference through its IF Out! Well working cards will
probably behave differently.

Stepsize 333333:
in sp5659_set_tv_freq, change:
        u32 div = (freq + 36200000) / 166666;
        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x85, (pwr << 6) };
into:
        u32 div = (freq + 36200000) / (2*166666);
        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x84, (pwr << 6) };

For stepsize 666666:
        u32 div = (freq + 36200000) / (4*166666);
        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x83, (pwr << 6) };

Change the charge pump power (0..3) in the call to sp5659_set_tv_freq
in tdlb7_ioctl or directly in sp5659_set_tv_freq.

If you want to try a lower stepsize you will probably also have
to get freq bits 15 and 16 into i2c buf byte 3. I haven't fixed
that since it wasn't necessary for using it according to the spec.

---------------

Index: alps_bsrv2.c
===================================================================
RCS file: /cvs/linuxtv/DVB/driver/frontends/alps_bsrv2.c,v
retrieving revision 1.5
diff -u -d -b -w -r1.5 alps_bsrv2.c
--- alps_bsrv2.c	2 Jan 2003 11:16:38 -0000	1.5
+++ alps_bsrv2.c	3 Jan 2003 03:41:24 -0000
@@ -130,7 +130,7 @@
 int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
 {
         u32 div = (freq + 479500) / 125;
-        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x95, (pwr << 5) | 
0x30 };
+        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x95, (pwr << 6) | 
0x30 };

 	return sp5659_write (i2c, buf);
 }
Index: alps_tdlb7.c
===================================================================
RCS file: /cvs/linuxtv/DVB/driver/frontends/alps_tdlb7.c,v
retrieving revision 1.8
diff -u -d -b -w -r1.8 alps_tdlb7.c
--- alps_tdlb7.c	20 Nov 2002 19:06:25 -0000	1.8
+++ alps_tdlb7.c	3 Jan 2003 03:41:24 -0000
@@ -143,8 +143,8 @@
 static
 int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
 {
-        u32 div = (freq + 36200000) / 166666;
-        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x85, (pwr << 5) | 
0x30 };
+        u32 div = (freq + 36250000) / 166666; // (freq + IF-freq + 
stepsize/2) / stepsize
+        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x85, (pwr << 6) };

 	return sp5659_write (i2c, buf);
 }
@@ -336,7 +336,12 @@
         case FE_SET_FRONTEND:
         {
 		struct dvb_frontend_parameters *p = arg;
-		sp5659_set_tv_freq (i2c, p->frequency, 0);
+
+		if(p->frequency <= 782000000) // between channel 59 and 60
+			sp5659_set_tv_freq (i2c, p->frequency, 1);
+		else
+			sp5659_set_tv_freq (i2c, p->frequency, 2);
+
 	        sp8870_reset (i2c);	// reset default values and restart system 
controller
 		 			// parameters are calculated by system controller
 		break;			






-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index