Mark McClelland wrote:
> >
> >For the implementation of selection the antenna polarization and other
> >satellite related switches it is IMHO better to have an own struct,
> >e.g. struct v4l2_antenna and two ioctl calls for reading and setting
> >this struct. This would make the API more cleaner.
> >
>
> You're probably right about that. Some other things could be added to
> that struct too, like rotator control. I think we should wait until we
> have a good selection of hardware to study before adding any of that to
> the API, though (the same goes for ATSC for the most part). These things
> can be implemented as driver-specific ioctls or even v4l2 controls at
> first, and then added to the official API once we have more experience.
I started writing a driver for my satellite tv card a while ago and the
problem of how to tell this tv card to select polarisation or another
satellite position in a clean way is still there. Currently these flags
are being filled in the MSB's of the tuner-frequency, which is a
quick-and-dirty solution, but allowed me to continue my work.
A possible struct and ioctl, which would make it easier for my driver
to handle satellite equipment, could be like this:
struct v4l2_antenna
{
__u16 input; /* number of antenna input */
__u16 capabilities;
#define V4L2_ANTENNA_1814V 1 /* can set 18/14V (1 = yes/18V)
*/
#define V4L2_ANTENNA_22KHZ 2 /* can switch 22kHz (1 =
yes/22kHz on) */
#define V4L2_ANTENNA_POWER 4 /* can switch LNB power supply (1
= yes/on) */
#define V4L2_ANTENNA_12V 8 /* has a controlable 12V output
(1 = yes/on) */
#define V4L2_ANTENNA_SKEW 16 /* has a magnetic polarizer (1 =
yes/set value in 'skew') */
#define V4L2_ANTENNA_22KHZ_BURST 32 /* can send a 22kHz burst (1 =
yes/send data burst) */
#define V4L2_ANTENNA_SIMPLE_DISEQC 64 /* can do 'Simple' DiSEqC */
#define V4L2_ANTENNA_DISEQC_1 128 /* can do DiSEqC version 1.x */
#define V4L2_ANTENNA_DISEQC_2 256 /* can do DiSEqC version 2.x */
#define V4L2_ANTENNA_DISEQC_3 512 /* can do DiSEqC version 3.x */
__u16 settings; /* are the same as in
'capabilities' */
__s16 skew; /* set skew value for magnetic
polarizers,
/* if in 'capabilities' and
'settings'
/* V4L2_ANTENNA_SKEW is true */
__u8 diseqc[32]; /* array for submitting DiSEqC
command bytes */
/* diseqc[0] has the number of
bytes to be send */
/* the command-sequence starts at
diseqc[1] */
};
#define VIDIOC_G_ANTENNA _IOR('V', 70, struct v4l2_antenna)
#define VIDIOC_S_ANTENNA _IOW('V', 71, struct v4l2_antenna)
According to the documents the DiSEqC standard deals with
'positioner commands' and this may include rotator control, too.
There is already a lot of hardware out there which listens to
DiSEqC commands.
cya
Peter
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/video4linux-list