[linux-dvb] [patch] Add support for different tuning algorithms

Andrew de Quincey adq_dvb at lidskialf.net
Tue Nov 15 22:37:29 CET 2005

On Tuesday 15 Nov 2005 20:22, Johannes Stezenbach wrote:
> 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.

DVB_SET_CONFIGURATION ? dunno if thats any better tho.

I assume it would be something like this?

struct dvb_configuration {
	unsigned char tune_mode:1 /* 0=>normal tuning, 1=>frequency scanning */

#define FE_SET_CONFIGURATION  _IOR('o', 81, struct dvb_configuration)

And we'd extend dvb_configuration (or whatever) as we need to...

More information about the linux-dvb mailing list