[linux-dvb] PATCH: Generic FE_DISHNETWORK_SEND_LEGACY_CMD support

NooneImportant nxhxzi702 at sneakemail.com
Sat Sep 24 04:42:24 CEST 2005

On 9/22/05, Johannes Stezenbach wrote:
> If you add dishnetwork_send_legacy_command code to dvb_frontend,
> shouldn't stv0299 just use it, too? Otherwise it *is* a duplication
> of code, isn't it?

No.  stv0299 can't use it, because the set_voltage command can take
longer than 8msec on budget cards.  So  need to pull some tricks to
make those work.  This may be true for other frontends as well, but
this falback should work well for most of the rest.

> > +inline s32 dvb_frontend_calc_usec_delay (struct timeval lasttime, struct timeval curtime)
> shouldn't this be called something like timeval_usec_diff()? It isn't
> dvb_frontend specific.
I thought all commands in dvb_frontend.c needed to start with
'dvb_frontend...'  I see now that is not the case.

> BTW, it doesn't look like you need usec
> precision, so it would be better to use msec units.
Actually, I do need usec precision, as being +/- 1msec is too much
error for these switches.

> You might as well add timeval_usec_add().

> dvb_frontend_sleep_until is so idosyncratic, it needs at least a
> comment.

> And of course it will fail to meet its deadline when system
> load is high enough, or with HZ == 100. But I guess there's nothing
> one ca do about it.

> This also needs a comment, and if possible a reference to the
> dishnetwork spec.
There is no spec.  All this code is based upon work done by Jeremey
Hall on this list sometime in May 2002.  I found it while trying to
get my equipment working, and (with the help of an oscilloscope) got
the code working.  I hope the comments I added are sufficient.

I hope this patch is better.

Add support to FE_DISHNETWORK_SEND_LEGACY_CMD code to support other
frontends besides stv0299.  The generic code is a fallback in the case
that it doesn't work for some specific frontends (again stv0299 being
a good example).

Signed Off By: NooneImportant <nxhxzi702 at sneakemail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legacy3.patch
Type: application/octet-stream
Size: 6845 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20050923/7e472723/legacy3.obj

More information about the linux-dvb mailing list