[linux-dvb] [patch] Add support for different tuning algorithms
Johannes Stezenbach
js at linuxtv.org
Tue Nov 15 21:22:51 CET 2005
On Tue, Nov 15, 2005 Andrew de Quincey wrote:
> Hi, this patch allows frontends (and the user) to select from one of several
> different tuning algorithms. The patch adds four possibilities:
>
> 1) SW - the current dvb-kernel software zigzag code.
> 2) HW - the hardware supports zigzagging internally (e.g. DST), so use that as
> it will be faster.
> 3) ADAPTIVE - frontend-specific code exploiting frontend-specific features.
> 4) SIMPLE - just set the frontend once and do nothing else (e.g. for frequency
> scanner apps).
>
> Frontends can specify which algorithms they support using
> FE_CAPS_CAN_TUNE_ALGO_*. They can also specify the default algorithm to use.
> Currently the default is SW for all frontends except the DST (which has HW).
>
> ADAPTIVE is not implemented internally yet. Enough information to do this for
> many frontends is provided on their datasheets - for example I know roughly
> how to do it for the stv0299, stv0297, and sh1420 frontends. This needs
> experimentation before any real adaptive code can be committed to CVS
> however, but I thought it was better to change the API _once_ instead of
> several times. None of the frontends currently set the
> FE_CAN_TUNE_ALGO_ADAPTIVE flag, so it cannot be accidentally enabled.
>
> The userspace app can also choose an algorithm using an IOCTL.
>
> When a frontend device is opened read/write, the tuning algo will
> automatically be set back to whatever the frontend specified as the default -
> so that userspace apps don't have to care if something else changed algos.
I wanted to have a way to turn off zig-zag etc. for a long time.
However, I would prefer to implement this via an
FE_SET_FRONTEND_EXT (bad name, need a better one) ioctl,
which is basically the same as FE_SET_FRONTEND plus an
added flags field. This way you could have one flag
for switching off zig-zag, one for switching band filters
for analog tuning (some FE have IF output to feed an
analog demod) etc.
What do you think?
Johannes
More information about the linux-dvb
mailing list