[linux-dvb] cx24110 driver question/problem

Peter Hettkamp peter.hettkamp at htp-tel.de
Sun Jul 17 16:03:13 CEST 2005

On Sat, Jul 16, 2005 at 07:49:12PM +0200, Johannes Stezenbach wrote:
> Adam Szalkowski wrote:
> > I'm using a Pinnacle PCTV SAT on a DiSEqC 2.0 multiswitch.
> > Since 2.6.12 these lines have been added to cx24110_send_diseqc_msg() in 
> > cx24110.c:
> >       rv = cx24110_readreg(state, 0x77);
> >       cx24110_writereg(state, 0x77, rv|0x04);
> > 
> > These lines also occur in cx24110_diseqc_send_burst(). When tuning with szap 
> > (using the -r option, of course) the FE reports to have a lock but I still do 
> > not receive any data on some channels. Before 2.6.12 this worked.
> > 
> > When I remove those lines in both functions everything works fine as before 
> > 2.6.12. What is this code supposed to do? Can it be removed again or fixed so 
> > that my card works again with a stock kernel?
> According to CVS these lines were added with this change:
> revision 1.22
> date: 2005-03-08 12:42:00 +0000;  author: kenneth;  state: Exp;  lines: +27 -0
>  - cx24110 diseqc_send_burst (Peter Hettkamp, Uwe Bugla)
> Maybe one of you guys could comment on this?
> Johannes


- When I modified cx24110.c to work again with the refactored drivers around
Kernel 2.6.9, I did not include a diseqc_send_burst function, therefore the
ioctl of the same name was not available with this frontend.

- This broke the usage of szap, because this program uses the ioctl. 

- This was brought to my attention, and I created a patch for it. I had one
problem when creating the patch: The fact that diseqc_send_burst is a
separate ioctl from diseqc_send_message obviously means that an application
can choose to call none, either one or both ioctls in any order. The cx24110
chip, however, knows only a "start_diseqc" sequence, which includes voltage
selection, tone burst (aka Mini-diseqc), DiSEqC message and continuous 22kHz
signal all in one.

- So, I decided to try: when send_burst is called, do a start_diseqc
sequence /without/ the DiSEqC message (set bit 2 of register 0x77).

- when send_message is called, do a start_diseqc sequence /with/ message but
without burst (clear bit 2 of 0x77)

- I had no way of testing whether this approach was working, so I gave the
patch to a few people (those that were complaining over the missing
send_burst ioctl in the first place). When I had no negative responses, Uwe
reformatted the patch and mailed it in.

- for some reason or other, the line cx24110_writereg(state, 0x77,
rv&~0x04); in cx24110_send_diseqc_msg seems to have mutated into
cx24110_writereg(state, 0x77, rv|0x04); in the process, which suppresses the 
sending of DiSEqC messages altogether.

- The best solution might be to only store the requested burst command on a
call to send_burst, and include the correct burst bit in the start_diseqc
sequence in send_msg. This would, however, require applications that want to
send bursts do do so before calling send_msg, and also require them to call
send_msg even if they have no message to send (which may break again since
the hardware always sends at least 3 bytes of diseqc message unless the
message is suppressed completely via bit 2 of 0x77.)
LNBDC and ContinuousTone are easier in this respect, just set the correct
bits in 0x76, and all is well, i.e. according to my reseach they seem to take
immediate effect with or without a start_diseqc sequence.

- If anybody has a better solution for this, feel free to mail me about
this. If anyone feels the need to donate DiSEqC equipment with known
behaviour (does it switch both on Mini-DiSEqC and DiSEqC commands, or,
better, on only one of them), contact me, we can work something out ;)

- As an aside, my email address changed, the old t-online address will cease
to exist one of those days. Could somebody please update my email address
within the source?

Best regards,

"Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)"
(Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20050717/0b4677d0/attachment.pgp

More information about the linux-dvb mailing list