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

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

 



Andrew de Quincey wrote:
> On Tuesday 15 Nov 2005 20:22, Johannes Stezenbach wrote:
> >
> > 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?
> 
> Yeah! I've been thinking along those lines myself a bit... discuss in a bit.
> 
> Anyway, here is the latest patch. This one is much better IMO:
> 
> 1) The userspace IOCTL only lets you choose between normal and scan. We can 
> think about doing this using FE_SET_FRONTEND_EXT in a bit.

> diff -a -u -r1.18 frontend.h
> --- linux/include/linux/dvb/frontend.h	2 Mar 2005 21:42:01 -0000	1.18
> +++ linux/include/linux/dvb/frontend.h	15 Nov 2005 21:21:26 -0000
> @@ -67,6 +67,14 @@
>  	FE_CAN_MUTE_TS			= 0x80000000  // frontend can stop spurious TS data output
>  } fe_caps_t;
>  
> +/**
> + * FE_TUNE_MODE_NORMAL - "Normal" tune mode.
> + * FE_TUNE_MODE_SCAN   - Special tune mode specifically for channel scanning.
> + */
> +typedef enum fe_tune_mode {
> +	FE_TUNE_MODE_NORMAL	= 0,
> +	FE_TUNE_MODE_SCAN	= 1,
> +} fe_tune_mode_t;
>  
>  struct dvb_frontend_info {
>  	char       name[128];
> @@ -260,6 +268,7 @@
>  
>  #define FE_SET_FRONTEND		   _IOW('o', 76, struct dvb_frontend_parameters)
>  #define FE_GET_FRONTEND		   _IOR('o', 77, struct dvb_frontend_parameters)
> +#define FE_SET_FRONTEND_TUNE_MODE  _IO('o', 81 /* fe_tune_mode_t */)
>  #define FE_GET_EVENT		   _IOR('o', 78, struct dvb_frontend_event)
>  
>  #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */

We could also change FE_SET_FRONTEND_TUNE_MODE to take an
unsigned int flags argument instead of adding FE_SET_FRONTEND_EXT.
It would yield the same result (with the reset on open feature),
and still allow to add other flags without adding new ioctls.

Johannes


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux