Re: [PATCH] Fix a bug when tunning C-BAND channels with kaffeine

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

 



Manu asked me to comment a little more about this.

Em Qua, 2006-03-29 às 10:57 -0300, Mauro Carvalho Chehab escreveu:
> 
> This patch fixes a bug noticed on some applications when selecting
> a channel at C-BAND. Those applications sends freq - LNBfreq, but,
> at C-BAND, LNB freqs are higher than desired freq.
> Tested with a Gardiner Multipoint LNBf with LO freq 5150 HI freq 5175.

I were not succeeding having my C-Band DVB-S working with the apps, but
szap were working just fine. Also test_dvr were generating a good
stream. What I noticed is that kaffeine were not properly sending the
correct frequency to dst driver.

I was trying to tune at 4169 MHz, with my LNB. 

With szap, it was working:

$ szap -l 5150,5750 -c ~/channels.conf -r BASA -x
reading channels from file '/home/mchehab/channels.conf'
zapping to 48 'BASA':
sat 0, frequency = 4169 MHz V, symbolrate 8140000, vpid = 0x102d, apid =
0x102c sid = 0x0004
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
status 1f | signal 4000 | snr 1780 | ber fffffffe | unc fffffffe |
FE_HAS_LOCK

So, everything were just fine.

Kaffeine were configured to work with my LNBf settings (LO 5150, HI 5175
MHz), but was sending a wrong freq to dst:

dst_set_freq: set Frequency 4293986296
dst_set_frontend: Set Frequency=[-981000]
dst_set_symbolrate: set symrate 8140000
dst_set_polarization: Polarization=[Vertical]
dst_set_frontend: Set Symbolrate=[8140000]

Instead of asking dst to tune at 981 MHz (5150-4169), it was asking to
tune at -981 MHz. Since all drivers use unsigned int, it were like if
trying to tune at 4,293 GHz! DST code have a protection against values
higher than 2.4 GHz, resulting in no tune at all. 

The patch just checks if this is happening, and inverts the signal,
resulting tuning at desired freq of 981 MHz.

Probably the same patch should be needed on other frontends until
applications fix it.

Later I'll test this fix also with other applications, since it seems
that this trouble happens not only with kaffeine (before the patch, I
didn't succeeded making it work with other apps).

My suggestion is to apply such patch at other frontends, since it is
just a consistency check,  and, tuning at 4 THz makes no sense for DTV.
So, this fix doesn't hurt driver code.

Cheers, 
Mauro.



_______________________________________________

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