Mailing List archive

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

[linux-dvb] Re: Question regarding stv0299_send_diseqc_msg



Manfred Petz wrote:
> It's reproducible, I don't think, that this is a timing issue. Can someone 
> explain me that or give me a hint where to search? It seems  that the 
> STV0299 is just ignoring the command...?

I would think that the timing is the only thing that is different
between 2.4 and 2.6. If I were you I would first try to skip
the tone burst (you don't need it with a diseqc switch) or ensure
that the time between the burst and the diseqc sequence is long enough.
The time after the diseqc seq and enabling 22KHz tone must also
be long enough.
See the diseqc spec for timing details.

Reading the code for stv0299_wait_diseqc_fifo|idle(), there are
a few things fishy:
- timeout is apparently in jiffies, but 2.4 and 2.6 use the same
  value (100) which means 1 second for 2.4 and 0.1 second for 2.6
- it doesn't use time_after() which means that the timeout will
  fail when jiffies wraps (i.e. a few minutes after boot)
- 2.4 uses dvb_delay() which will shedule(), 2.6 mdelay() which
  busy waits; maybe this is what makes the difference

A patch to clean this up would be gladly accepted.

Johannes




Home | Main Index | Thread Index