Re: v4l2 Bttv coding problems?

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



Ronald Bultje wrote:
>  Hi Brian,
>  
>  On Thu, 2002-08-22 at 10:17, Brian W Grasby wrote:
> > where vFrq is a struct v4l2_frequency
>  
>  The BTTV driver (0.8) uses an integer as argument, not a struct
>  v4l2_frequency. Use the latest BTTV-0.8 from http://bytesex.org/bttv/
>  and use an integer instead of the struct:

Well, there are *two* ioctls for tuning a frequency.  One is
VIDIOC_S_FREQ which takes an integer and the other is VIDIOC_G_FREQUENCY
which takes struct v4l2_frequency:

bogomips kraxel ~/kernel/v4l2# grep FREQ videodev2.h 
#define VIDIOC_G_FREQ           _IOR  ('V', 31, int)
#define VIDIOC_S_FREQ           _IOWR ('V', 32, int)
#define VIDIOC_G_FREQUENCY      _IOWR ('V', 56, struct v4l2_frequency)
#define VIDIOC_S_FREQUENCY      _IOW  ('V', 57, struct v4l2_frequency)

>  integer freq = <some_number>;
>  ioctl(fd, VIDIOC_S_FREQ, &freq);

That should work, yes.  bttv simply doesn't support VIDIOC_G_FREQUENCY
(yet).

>  You can set the input for this tuner using VIDIOC_S_TUNER.

VIDIOC_G_FREQUENCY doesn't switch inputs.  It was added to handle cards
with multiple tuners correctly, and the tuners are refered by the input
they are connected to.

  Gerd

-- 
You can't please everybody.  And usually if you _try_ to please
everybody, the end result is one big mess.
				-- Linus Torvalds, 2002-04-20





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux