[media] V4L: remove V4L1 compatibility mode

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hans Verkuil 2010-12-24 10:33:19 -03:00 committed by Mauro Carvalho Chehab
parent b69a219e0e
commit 08af245de0
30 changed files with 9 additions and 2116 deletions

View File

@ -53,21 +53,6 @@ config VIDEO_ALLOW_V4L1
If you are unsure as to whether this is required, answer Y.
config VIDEO_V4L1_COMPAT
bool "Enable Video For Linux API 1 compatible Layer" if !VIDEO_ALLOW_V4L1
depends on VIDEO_DEV
default y
---help---
Enables a compatibility API used by most V4L2 devices to allow
its usage with legacy applications that supports only V4L1 api.
Documentation for the original API is included in the file
<Documentation/video4linux/API.html>.
User tools for this are available from
<ftp://ftp.uk.linux.org/pub/linux/video4linux/>.
If you are unsure as to whether this is required, answer Y.
#
# DVB Core

View File

@ -1129,35 +1129,6 @@ static int vidioc_g_chip_ident(struct file *file, void *__fh,
core, g_chip_ident, chip);
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *__fh, struct video_mbuf *mbuf)
{
struct saa7146_fh *fh = __fh;
struct videobuf_queue *q = &fh->video_q;
int err, i;
/* fixme: number of capture buffers and sizes for v4l apps */
int gbuffers = 2;
int gbufsize = 768 * 576 * 4;
DEB_D(("VIDIOCGMBUF \n"));
q = &fh->video_q;
err = videobuf_mmap_setup(q, gbuffers, gbufsize,
V4L2_MEMORY_MMAP);
if (err < 0)
return err;
gbuffers = err;
memset(mbuf, 0, sizeof(*mbuf));
mbuf->frames = gbuffers;
mbuf->size = gbuffers * gbufsize;
for (i = 0; i < gbuffers; i++)
mbuf->offsets[i] = i * gbufsize;
return 0;
}
#endif
const struct v4l2_ioctl_ops saa7146_video_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
@ -1186,9 +1157,6 @@ const struct v4l2_ioctl_ops saa7146_video_ioctl_ops = {
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
.vidioc_g_parm = vidioc_g_parm,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
};
/*********************************************************************************/

View File

@ -22,10 +22,6 @@ endif
obj-$(CONFIG_VIDEO_V4L2_COMMON) += v4l2-common.o
ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y)
obj-$(CONFIG_VIDEO_DEV) += v4l1-compat.o
endif
# All i2c modules must come first:
obj-$(CONFIG_VIDEO_TUNER) += tuner.o

View File

@ -1809,15 +1809,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
return videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags & O_NONBLOCK);
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct au0828_fh *fh = priv;
return videobuf_cgmbuf(&fh->vb_vidq, mbuf, 8);
}
#endif
static struct v4l2_file_operations au0828_v4l_fops = {
.owner = THIS_MODULE,
.open = au0828_v4l2_open,
@ -1861,9 +1852,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_s_register = vidioc_s_register,
#endif
.vidioc_g_chip_ident = vidioc_g_chip_ident,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
};
static const struct video_device au0828_video_template = {

View File

@ -2597,31 +2597,6 @@ static int bttv_s_fmt_vid_overlay(struct file *file, void *priv,
return setup_window_lock(fh, btv, &f->fmt.win, 1);
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
int retval;
unsigned int i;
struct bttv_fh *fh = priv;
retval = __videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize,
V4L2_MEMORY_MMAP);
if (retval < 0) {
return retval;
}
gbuffers = retval;
memset(mbuf, 0, sizeof(*mbuf));
mbuf->frames = gbuffers;
mbuf->size = gbuffers * gbufsize;
for (i = 0; i < gbuffers; i++)
mbuf->offsets[i] = i * gbufsize;
return 0;
}
#endif
static int bttv_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{
@ -3354,9 +3329,6 @@ static const struct v4l2_ioctl_ops bttv_ioctl_ops = {
.vidioc_streamoff = bttv_streamoff,
.vidioc_g_tuner = bttv_g_tuner,
.vidioc_s_tuner = bttv_s_tuner,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
.vidioc_g_crop = bttv_g_crop,
.vidioc_s_crop = bttv_s_crop,
.vidioc_g_fbuf = bttv_g_fbuf,

View File

@ -417,28 +417,6 @@ static int sync(struct camera_data *cam, int frame_nr)
}
}
/******************************************************************************
*
* ioctl_get_mbuf
*
*****************************************************************************/
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int ioctl_get_mbuf(void *arg, struct camera_data *cam)
{
struct video_mbuf *vm;
int i;
vm = arg;
memset(vm, 0, sizeof(*vm));
vm->size = cam->frame_size*cam->num_frames;
vm->frames = cam->num_frames;
for (i = 0; i < cam->num_frames; i++)
vm->offsets[i] = cam->frame_size * i;
return 0;
}
#endif
/******************************************************************************
*
* ioctl_set_gpio
@ -1380,17 +1358,6 @@ static long cpia2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
}
break;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case VIDIOCGMBUF:
{
struct cpia2_fh *fh = file->private_data;
if(fh->prio != V4L2_PRIORITY_RECORD) {
mutex_unlock(&cam->busy_lock);
return -EBUSY;
}
break;
}
#endif
default:
break;
}
@ -1400,11 +1367,6 @@ static long cpia2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
case CPIA2_IOC_SET_GPIO:
retval = ioctl_set_gpio(arg, cam);
break;
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case VIDIOCGMBUF: /* mmap interface */
retval = ioctl_get_mbuf(arg, cam);
break;
#endif
case VIDIOC_QUERYCAP:
retval = ioctl_querycap(arg,cam);
break;

View File

@ -2044,15 +2044,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
return videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags & O_NONBLOCK);
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct cx231xx_fh *fh = priv;
return videobuf_cgmbuf(&fh->vb_vidq, mbuf, 8);
}
#endif
/* ----------------------------------------------------------- */
/* RADIO ESPECIFIC IOCTLS */
/* ----------------------------------------------------------- */
@ -2507,9 +2498,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_g_register = vidioc_g_register,
.vidioc_s_register = vidioc_s_register,
#endif
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
};
static struct video_device cx231xx_vbi_template;

View File

@ -1024,35 +1024,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
return 0;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv,
struct video_mbuf *mbuf)
{
struct cx23885_fh *fh = priv;
struct videobuf_queue *q;
struct v4l2_requestbuffers req;
unsigned int i;
int err;
q = get_queue(fh);
memset(&req, 0, sizeof(req));
req.type = q->type;
req.count = 8;
req.memory = V4L2_MEMORY_MMAP;
err = videobuf_reqbufs(q, &req);
if (err < 0)
return err;
mbuf->frames = req.count;
mbuf->size = 0;
for (i = 0; i < mbuf->frames; i++) {
mbuf->offsets[i] = q->bufs[i]->boff;
mbuf->size += q->bufs[i]->bsize;
}
return 0;
}
#endif
static int vidioc_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *p)
{
@ -1427,9 +1398,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_s_ctrl = vidioc_s_ctrl,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
.vidioc_g_frequency = vidioc_g_frequency,

View File

@ -1179,15 +1179,6 @@ static int vidioc_enum_fmt_vid_cap (struct file *file, void *priv,
return 0;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct cx8800_fh *fh = priv;
return videobuf_cgmbuf (get_queue(fh), mbuf, 8);
}
#endif
static int vidioc_reqbufs (struct file *file, void *priv, struct v4l2_requestbuffers *p)
{
struct cx8800_fh *fh = priv;
@ -1731,9 +1722,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_s_ctrl = vidioc_s_ctrl,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
.vidioc_g_frequency = vidioc_g_frequency,

View File

@ -1934,19 +1934,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
O_NONBLOCK);
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct em28xx_fh *fh = priv;
if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
return videobuf_cgmbuf(&fh->vb_vidq, mbuf, 8);
else
return videobuf_cgmbuf(&fh->vb_vbiq, mbuf, 8);
}
#endif
/* ----------------------------------------------------------- */
/* RADIO ESPECIFIC IOCTLS */
/* ----------------------------------------------------------- */
@ -2359,9 +2346,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_s_register = vidioc_s_register,
.vidioc_g_chip_ident = vidioc_g_chip_ident,
#endif
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
};
static const struct video_device em28xx_video_template = {

View File

@ -852,8 +852,8 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
#endif
default :
ret = v4l_compat_translate_ioctl(file, cmd,
arg, pvr2_v4l2_do_ioctl);
ret = -EINVAL;
break;
}
pvr2_hdw_commit_ctl(hdw);

View File

@ -362,23 +362,6 @@ long pwc_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
switch (cmd) {
#ifdef CONFIG_VIDEO_V4L1_COMPAT
/* mmap() functions */
case VIDIOCGMBUF:
{
/* Tell the user program how much memory is needed for a mmap() */
struct video_mbuf *vm = arg;
int i;
memset(vm, 0, sizeof(*vm));
vm->size = pwc_mbufs * pdev->len_per_image;
vm->frames = pwc_mbufs; /* double buffering should be enough for most applications */
for (i = 0; i < pwc_mbufs; i++)
vm->offsets[i] = i * pdev->len_per_image;
break;
}
#endif
/* V4L2 Layer */
case VIDIOC_QUERYCAP:
{

View File

@ -1097,15 +1097,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
return rc;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidioc_cgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct s2255_fh *fh = priv;
return videobuf_cgmbuf(&fh->vb_vidq, mbuf, 8);
}
#endif
/* write to the configuration pipe, synchronously */
static int s2255_write_config(struct usb_device *udev, unsigned char *pbuf,
int size)
@ -1909,9 +1900,6 @@ static const struct v4l2_ioctl_ops s2255_ioctl_ops = {
.vidioc_s_ctrl = vidioc_s_ctrl,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidioc_cgmbuf,
#endif
.vidioc_s_jpegcomp = vidioc_s_jpegcomp,
.vidioc_g_jpegcomp = vidioc_g_jpegcomp,
.vidioc_s_parm = vidioc_s_parm,

View File

@ -2211,14 +2211,6 @@ static int saa7134_overlay(struct file *file, void *f, unsigned int on)
return 0;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct saa7134_fh *fh = file->private_data;
return videobuf_cgmbuf(saa7134_queue(fh), mbuf, 8);
}
#endif
static int saa7134_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *p)
{
@ -2456,9 +2448,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_streamoff = saa7134_streamoff,
.vidioc_g_tuner = saa7134_g_tuner,
.vidioc_s_tuner = saa7134_s_tuner,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
.vidioc_g_crop = saa7134_g_crop,
.vidioc_s_crop = saa7134_s_crop,
.vidioc_g_fbuf = saa7134_g_fbuf,

View File

@ -1273,9 +1273,6 @@ static const struct v4l2_ioctl_ops usbvision_ioctl_ops = {
.vidioc_s_ctrl = vidioc_s_ctrl,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
/* .vidiocgmbuf = vidiocgmbuf, */
#endif
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
.vidioc_g_frequency = vidioc_g_frequency,

View File

@ -1035,11 +1035,8 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
return uvc_xu_ctrl_query(chain, arg, 1);
default:
if ((ret = v4l_compat_translate_ioctl(file, cmd, arg,
uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD)
uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n",
cmd);
return ret;
uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n", cmd);
return -EINVAL;
}
return ret;

File diff suppressed because it is too large Load Diff

View File

@ -22,212 +22,6 @@
#ifdef CONFIG_COMPAT
#ifdef CONFIG_VIDEO_V4L1_COMPAT
struct video_tuner32 {
compat_int_t tuner;
char name[32];
compat_ulong_t rangelow, rangehigh;
u32 flags; /* It is really u32 in videodev.h */
u16 mode, signal;
};
static int get_video_tuner32(struct video_tuner *kp, struct video_tuner32 __user *up)
{
if (!access_ok(VERIFY_READ, up, sizeof(struct video_tuner32)) ||
get_user(kp->tuner, &up->tuner) ||
copy_from_user(kp->name, up->name, 32) ||
get_user(kp->rangelow, &up->rangelow) ||
get_user(kp->rangehigh, &up->rangehigh) ||
get_user(kp->flags, &up->flags) ||
get_user(kp->mode, &up->mode) ||
get_user(kp->signal, &up->signal))
return -EFAULT;
return 0;
}
static int put_video_tuner32(struct video_tuner *kp, struct video_tuner32 __user *up)
{
if (!access_ok(VERIFY_WRITE, up, sizeof(struct video_tuner32)) ||
put_user(kp->tuner, &up->tuner) ||
copy_to_user(up->name, kp->name, 32) ||
put_user(kp->rangelow, &up->rangelow) ||
put_user(kp->rangehigh, &up->rangehigh) ||
put_user(kp->flags, &up->flags) ||
put_user(kp->mode, &up->mode) ||
put_user(kp->signal, &up->signal))
return -EFAULT;
return 0;
}
struct video_buffer32 {
compat_caddr_t base;
compat_int_t height, width, depth, bytesperline;
};
static int get_video_buffer32(struct video_buffer *kp, struct video_buffer32 __user *up)
{
u32 tmp;
if (!access_ok(VERIFY_READ, up, sizeof(struct video_buffer32)) ||
get_user(tmp, &up->base) ||
get_user(kp->height, &up->height) ||
get_user(kp->width, &up->width) ||
get_user(kp->depth, &up->depth) ||
get_user(kp->bytesperline, &up->bytesperline))
return -EFAULT;
/* This is actually a physical address stored
* as a void pointer.
*/
kp->base = (void *)(unsigned long) tmp;
return 0;
}
static int put_video_buffer32(struct video_buffer *kp, struct video_buffer32 __user *up)
{
u32 tmp = (u32)((unsigned long)kp->base);
if (!access_ok(VERIFY_WRITE, up, sizeof(struct video_buffer32)) ||
put_user(tmp, &up->base) ||
put_user(kp->height, &up->height) ||
put_user(kp->width, &up->width) ||
put_user(kp->depth, &up->depth) ||
put_user(kp->bytesperline, &up->bytesperline))
return -EFAULT;
return 0;
}
struct video_clip32 {
s32 x, y, width, height; /* It's really s32 in videodev.h */
compat_caddr_t next;
};
struct video_window32 {
u32 x, y, width, height, chromakey, flags;
compat_caddr_t clips;
compat_int_t clipcount;
};
static int get_video_window32(struct video_window *kp, struct video_window32 __user *up)
{
struct video_clip __user *uclips;
struct video_clip __user *kclips;
compat_caddr_t p;
int nclips;
if (!access_ok(VERIFY_READ, up, sizeof(struct video_window32)))
return -EFAULT;
if (get_user(nclips, &up->clipcount))
return -EFAULT;
if (!access_ok(VERIFY_READ, up, sizeof(struct video_window32)) ||
get_user(kp->x, &up->x) ||
get_user(kp->y, &up->y) ||
get_user(kp->width, &up->width) ||
get_user(kp->height, &up->height) ||
get_user(kp->chromakey, &up->chromakey) ||
get_user(kp->flags, &up->flags) ||
get_user(kp->clipcount, &up->clipcount))
return -EFAULT;
nclips = kp->clipcount;
kp->clips = NULL;
if (nclips == 0)
return 0;
if (get_user(p, &up->clips))
return -EFAULT;
uclips = compat_ptr(p);
/* If nclips < 0, then it is a clipping bitmap of size
VIDEO_CLIPMAP_SIZE */
if (nclips < 0) {
if (!access_ok(VERIFY_READ, uclips, VIDEO_CLIPMAP_SIZE))
return -EFAULT;
kp->clips = compat_alloc_user_space(VIDEO_CLIPMAP_SIZE);
if (copy_in_user(kp->clips, uclips, VIDEO_CLIPMAP_SIZE))
return -EFAULT;
return 0;
}
/* Otherwise it is an array of video_clip structs. */
if (!access_ok(VERIFY_READ, uclips, nclips * sizeof(struct video_clip)))
return -EFAULT;
kp->clips = compat_alloc_user_space(nclips * sizeof(struct video_clip));
kclips = kp->clips;
while (nclips--) {
int err;
err = copy_in_user(&kclips->x, &uclips->x, sizeof(kclips->x));
err |= copy_in_user(&kclips->y, &uclips->y, sizeof(kclips->y));
err |= copy_in_user(&kclips->width, &uclips->width, sizeof(kclips->width));
err |= copy_in_user(&kclips->height, &uclips->height, sizeof(kclips->height));
kclips->next = NULL;
if (err)
return -EFAULT;
kclips++;
uclips++;
}
return 0;
}
/* You get back everything except the clips... */
static int put_video_window32(struct video_window *kp, struct video_window32 __user *up)
{
if (!access_ok(VERIFY_WRITE, up, sizeof(struct video_window32)) ||
put_user(kp->x, &up->x) ||
put_user(kp->y, &up->y) ||
put_user(kp->width, &up->width) ||
put_user(kp->height, &up->height) ||
put_user(kp->chromakey, &up->chromakey) ||
put_user(kp->flags, &up->flags) ||
put_user(kp->clipcount, &up->clipcount))
return -EFAULT;
return 0;
}
struct video_code32 {
char loadwhat[16]; /* name or tag of file being passed */
compat_int_t datasize;
compat_uptr_t data;
};
static struct video_code __user *get_microcode32(struct video_code32 *kp)
{
struct video_code __user *up;
up = compat_alloc_user_space(sizeof(*up));
/*
* NOTE! We don't actually care if these fail. If the
* user address is invalid, the native ioctl will do
* the error handling for us
*/
(void) copy_to_user(up->loadwhat, kp->loadwhat, sizeof(up->loadwhat));
(void) put_user(kp->datasize, &up->datasize);
(void) put_user(compat_ptr(kp->data), &up->data);
return up;
}
#define VIDIOCGTUNER32 _IOWR('v', 4, struct video_tuner32)
#define VIDIOCSTUNER32 _IOW('v', 5, struct video_tuner32)
#define VIDIOCGWIN32 _IOR('v', 9, struct video_window32)
#define VIDIOCSWIN32 _IOW('v', 10, struct video_window32)
#define VIDIOCGFBUF32 _IOR('v', 11, struct video_buffer32)
#define VIDIOCSFBUF32 _IOW('v', 12, struct video_buffer32)
#define VIDIOCGFREQ32 _IOR('v', 14, u32)
#define VIDIOCSFREQ32 _IOW('v', 15, u32)
#define VIDIOCSMICROCODE32 _IOW('v', 27, struct video_code32)
#define VIDIOCCAPTURE32 _IOW('v', 8, s32)
#define VIDIOCSYNC32 _IOW('v', 18, s32)
#define VIDIOCSWRITEMODE32 _IOW('v', 25, s32)
#endif
static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
long ret = -ENOIOCTLCMD;
@ -741,13 +535,6 @@ static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext
static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
union {
#ifdef CONFIG_VIDEO_V4L1_COMPAT
struct video_tuner vt;
struct video_buffer vb;
struct video_window vw;
struct video_code32 vc;
struct video_audio va;
#endif
struct v4l2_format v2f;
struct v4l2_buffer v2b;
struct v4l2_framebuffer v2fb;
@ -763,17 +550,6 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
/* First, convert the command. */
switch (cmd) {
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break;
case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break;
case VIDIOCGWIN32: cmd = VIDIOCGWIN; break;
case VIDIOCSWIN32: cmd = VIDIOCSWIN; break;
case VIDIOCGFBUF32: cmd = VIDIOCGFBUF; break;
case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break;
case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break;
case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break;
case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break;
#endif
case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break;
case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break;
case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break;
@ -800,46 +576,6 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
}
switch (cmd) {
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case VIDIOCSTUNER:
case VIDIOCGTUNER:
err = get_video_tuner32(&karg.vt, up);
compatible_arg = 0;
break;
case VIDIOCSFBUF:
err = get_video_buffer32(&karg.vb, up);
compatible_arg = 0;
break;
case VIDIOCSWIN:
err = get_video_window32(&karg.vw, up);
compatible_arg = 0;
break;
case VIDIOCGWIN:
case VIDIOCGFBUF:
case VIDIOCGFREQ:
compatible_arg = 0;
break;
case VIDIOCSMICROCODE:
/* Copy the 32-bit "video_code32" to kernel space */
if (copy_from_user(&karg.vc, up, sizeof(karg.vc)))
return -EFAULT;
/* Convert the 32-bit version to a 64-bit version in user space */
up = get_microcode32(&karg.vc);
break;
case VIDIOCSFREQ:
err = get_user(karg.vx, (u32 __user *)up);
compatible_arg = 0;
break;
case VIDIOCCAPTURE:
case VIDIOCSYNC:
case VIDIOCSWRITEMODE:
#endif
case VIDIOC_OVERLAY:
case VIDIOC_STREAMON:
case VIDIOC_STREAMOFF:
@ -922,23 +658,6 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
return err;
switch (cmd) {
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case VIDIOCGTUNER:
err = put_video_tuner32(&karg.vt, up);
break;
case VIDIOCGWIN:
err = put_video_window32(&karg.vw, up);
break;
case VIDIOCGFBUF:
err = put_video_buffer32(&karg.vb, up);
break;
case VIDIOCGFREQ:
err = put_user(((u32)karg.vx), (u32 __user *)up);
break;
#endif
case VIDIOC_S_INPUT:
case VIDIOC_S_OUTPUT:
case VIDIOC_G_INPUT:
@ -981,37 +700,6 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
return ret;
switch (cmd) {
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case VIDIOCGCAP:
case VIDIOCGCHAN:
case VIDIOCSCHAN:
case VIDIOCGTUNER32:
case VIDIOCSTUNER32:
case VIDIOCGPICT:
case VIDIOCSPICT:
case VIDIOCCAPTURE32:
case VIDIOCGWIN32:
case VIDIOCSWIN32:
case VIDIOCGFBUF32:
case VIDIOCSFBUF32:
case VIDIOCKEY:
case VIDIOCGFREQ32:
case VIDIOCSFREQ32:
case VIDIOCGAUDIO:
case VIDIOCSAUDIO:
case VIDIOCSYNC32:
case VIDIOCMCAPTURE:
case VIDIOCGMBUF:
case VIDIOCGUNIT:
case VIDIOCGCAPTURE:
case VIDIOCSCAPTURE:
case VIDIOCSPLAYMODE:
case VIDIOCSWRITEMODE32:
case VIDIOCGPLAYINFO:
case VIDIOCSMICROCODE32:
case VIDIOCGVBIFMT:
case VIDIOCSVBIFMT:
#endif
#ifdef __OLD_VIDIOC_
case VIDIOC_OVERLAY32_OLD:
case VIDIOC_S_PARM_OLD:
@ -1096,19 +784,6 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
ret = do_video_ioctl(file, cmd, arg);
break;
#ifdef CONFIG_VIDEO_V4L1_COMPAT
/* BTTV specific... */
case _IOW('v', BASE_VIDIOCPRIVATE+0, char [256]):
case _IOR('v', BASE_VIDIOCPRIVATE+1, char [256]):
case _IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int):
case _IOW('v' , BASE_VIDIOCPRIVATE+3, char [16]): /* struct bttv_pll_info */
case _IOR('v' , BASE_VIDIOCPRIVATE+4, int):
case _IOR('v' , BASE_VIDIOCPRIVATE+5, int):
case _IOR('v' , BASE_VIDIOCPRIVATE+6, int):
case _IOR('v' , BASE_VIDIOCPRIVATE+7, int):
ret = native_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
break;
#endif
default:
printk(KERN_WARNING "compat_ioctl32: "
"unknown ioctl '%c', dir=%d, #%d (0x%08x)\n",

View File

@ -18,12 +18,8 @@
#include <linux/kernel.h>
#define __OLD_VIDIOC_ /* To allow fixing old calls */
#include <linux/videodev.h>
#include <linux/videodev2.h>
#ifdef CONFIG_VIDEO_V4L1
#include <linux/videodev.h>
#endif
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
@ -183,42 +179,6 @@ static const char *v4l2_memory_names[] = {
/* ------------------------------------------------------------------ */
/* debug help functions */
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static const char *v4l1_ioctls[] = {
[_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP",
[_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN",
[_IOC_NR(VIDIOCSCHAN)] = "VIDIOCSCHAN",
[_IOC_NR(VIDIOCGTUNER)] = "VIDIOCGTUNER",
[_IOC_NR(VIDIOCSTUNER)] = "VIDIOCSTUNER",
[_IOC_NR(VIDIOCGPICT)] = "VIDIOCGPICT",
[_IOC_NR(VIDIOCSPICT)] = "VIDIOCSPICT",
[_IOC_NR(VIDIOCCAPTURE)] = "VIDIOCCAPTURE",
[_IOC_NR(VIDIOCGWIN)] = "VIDIOCGWIN",
[_IOC_NR(VIDIOCSWIN)] = "VIDIOCSWIN",
[_IOC_NR(VIDIOCGFBUF)] = "VIDIOCGFBUF",
[_IOC_NR(VIDIOCSFBUF)] = "VIDIOCSFBUF",
[_IOC_NR(VIDIOCKEY)] = "VIDIOCKEY",
[_IOC_NR(VIDIOCGFREQ)] = "VIDIOCGFREQ",
[_IOC_NR(VIDIOCSFREQ)] = "VIDIOCSFREQ",
[_IOC_NR(VIDIOCGAUDIO)] = "VIDIOCGAUDIO",
[_IOC_NR(VIDIOCSAUDIO)] = "VIDIOCSAUDIO",
[_IOC_NR(VIDIOCSYNC)] = "VIDIOCSYNC",
[_IOC_NR(VIDIOCMCAPTURE)] = "VIDIOCMCAPTURE",
[_IOC_NR(VIDIOCGMBUF)] = "VIDIOCGMBUF",
[_IOC_NR(VIDIOCGUNIT)] = "VIDIOCGUNIT",
[_IOC_NR(VIDIOCGCAPTURE)] = "VIDIOCGCAPTURE",
[_IOC_NR(VIDIOCSCAPTURE)] = "VIDIOCSCAPTURE",
[_IOC_NR(VIDIOCSPLAYMODE)] = "VIDIOCSPLAYMODE",
[_IOC_NR(VIDIOCSWRITEMODE)] = "VIDIOCSWRITEMODE",
[_IOC_NR(VIDIOCGPLAYINFO)] = "VIDIOCGPLAYINFO",
[_IOC_NR(VIDIOCSMICROCODE)] = "VIDIOCSMICROCODE",
[_IOC_NR(VIDIOCGVBIFMT)] = "VIDIOCGVBIFMT",
[_IOC_NR(VIDIOCSVBIFMT)] = "VIDIOCSVBIFMT"
};
#define V4L1_IOCTLS ARRAY_SIZE(v4l1_ioctls)
#endif
static const char *v4l2_ioctls[] = {
[_IOC_NR(VIDIOC_QUERYCAP)] = "VIDIOC_QUERYCAP",
[_IOC_NR(VIDIOC_RESERVED)] = "VIDIOC_RESERVED",
@ -310,15 +270,6 @@ void v4l_printk_ioctl(unsigned int cmd)
case 'd':
type = "v4l2_int";
break;
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case 'v':
if (_IOC_NR(cmd) >= V4L1_IOCTLS) {
type = "v4l1";
break;
}
printk("%s", v4l1_ioctls[_IOC_NR(cmd)]);
return;
#endif
case 'V':
if (_IOC_NR(cmd) >= V4L2_IOCTLS) {
type = "v4l2";
@ -622,20 +573,6 @@ static long __video_do_ioctl(struct file *file,
return -EINVAL;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
/********************************************************
All other V4L1 calls are handled by v4l1_compat module.
Those calls will be translated into V4L2 calls, and
__video_do_ioctl will be called again, with one or more
V4L2 ioctls.
********************************************************/
if (_IOC_TYPE(cmd) == 'v' && cmd != VIDIOCGMBUF &&
_IOC_NR(cmd) < BASE_VIDIOCPRIVATE) {
return v4l_compat_translate_ioctl(file, cmd, arg,
__video_do_ioctl);
}
#endif
if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
!(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
v4l_print_ioctl(vfd->name, cmd);
@ -644,29 +581,6 @@ static long __video_do_ioctl(struct file *file,
switch (cmd) {
#ifdef CONFIG_VIDEO_V4L1_COMPAT
/***********************************************************
Handles calls to the obsoleted V4L1 API
Due to the nature of VIDIOCGMBUF, each driver that supports
V4L1 should implement its own handler for this ioctl.
***********************************************************/
/* --- streaming capture ------------------------------------- */
case VIDIOCGMBUF:
{
struct video_mbuf *p = arg;
if (!ops->vidiocgmbuf)
break;
ret = ops->vidiocgmbuf(file, fh, p);
if (!ret)
dbgarg(cmd, "size=%d, frames=%d, offsets=0x%08lx\n",
p->size, p->frames,
(unsigned long)p->offsets);
break;
}
#endif
/* --- capabilities ------------------------------------------ */
case VIDIOC_QUERYCAP:
{

View File

@ -1161,16 +1161,6 @@ out:
return ret;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int viacam_vidiocgmbuf(struct file *filp, void *priv,
struct video_mbuf *mbuf)
{
struct via_camera *cam = priv;
return videobuf_cgmbuf(&cam->vb_queue, mbuf, 6);
}
#endif
/* G/S_PARM */
static int viacam_g_parm(struct file *filp, void *priv,
@ -1251,9 +1241,6 @@ static const struct v4l2_ioctl_ops viacam_ioctl_ops = {
.vidioc_s_parm = viacam_s_parm,
.vidioc_enum_framesizes = viacam_enum_framesizes,
.vidioc_enum_frameintervals = viacam_enum_frameintervals,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = viacam_vidiocgmbuf,
#endif
};
/*----------------------------------------------------------------------------*/

View File

@ -1202,33 +1202,3 @@ int videobuf_mmap_mapper(struct videobuf_queue *q, struct vm_area_struct *vma)
return rc;
}
EXPORT_SYMBOL_GPL(videobuf_mmap_mapper);
#ifdef CONFIG_VIDEO_V4L1_COMPAT
int videobuf_cgmbuf(struct videobuf_queue *q,
struct video_mbuf *mbuf, int count)
{
struct v4l2_requestbuffers req;
int rc, i;
MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS);
memset(&req, 0, sizeof(req));
req.type = q->type;
req.count = count;
req.memory = V4L2_MEMORY_MMAP;
rc = videobuf_reqbufs(q, &req);
if (rc < 0)
return rc;
mbuf->frames = req.count;
mbuf->size = 0;
for (i = 0; i < mbuf->frames; i++) {
mbuf->offsets[i] = q->bufs[i]->boff;
mbuf->size += PAGE_ALIGN(q->bufs[i]->bsize);
}
return 0;
}
EXPORT_SYMBOL_GPL(videobuf_cgmbuf);
#endif

View File

@ -570,29 +570,6 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
}
last = first;
#ifdef CONFIG_VIDEO_V4L1_COMPAT
if (size != (vma->vm_end - vma->vm_start)) {
/* look for last buffer to map */
for (last = first + 1; last < VIDEO_MAX_FRAME; last++) {
if (NULL == q->bufs[last])
continue;
if (V4L2_MEMORY_MMAP != q->bufs[last]->memory)
continue;
if (q->bufs[last]->map) {
retval = -EBUSY;
goto done;
}
size += PAGE_ALIGN(q->bufs[last]->bsize);
if (size == (vma->vm_end - vma->vm_start))
break;
}
if (VIDEO_MAX_FRAME == last) {
dprintk(1, "mmap app bug: size invalid [size=0x%lx]\n",
(vma->vm_end - vma->vm_start));
goto done;
}
}
#endif
/* create mapping + update buffer list */
retval = -ENOMEM;

View File

@ -870,15 +870,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
file->f_flags & O_NONBLOCK);
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct vivi_dev *dev = video_drvdata(file);
return videobuf_cgmbuf(&dev->vb_vidq, mbuf, 8);
}
#endif
static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
{
struct vivi_dev *dev = video_drvdata(file);
@ -1105,9 +1096,6 @@ static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
.vidioc_queryctrl = vidioc_queryctrl,
.vidioc_g_ctrl = vidioc_g_ctrl,
.vidioc_s_ctrl = vidioc_s_ctrl,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
};
static struct video_device vivi_template = {

View File

@ -1188,34 +1188,6 @@ int cx25821_vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
return 0;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
int cx25821_vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct cx25821_fh *fh = priv;
struct videobuf_queue *q;
struct v4l2_requestbuffers req;
unsigned int i;
int err;
q = get_queue(fh);
memset(&req, 0, sizeof(req));
req.type = q->type;
req.count = 8;
req.memory = V4L2_MEMORY_MMAP;
err = videobuf_reqbufs(q, &req);
if (err < 0)
return err;
mbuf->frames = req.count;
mbuf->size = 0;
for (i = 0; i < mbuf->frames; i++) {
mbuf->offsets[i] = q->bufs[i]->boff;
mbuf->size += q->bufs[i]->bsize;
}
return 0;
}
#endif
int cx25821_vidioc_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *p)
{
struct cx25821_fh *fh = priv;
@ -2016,9 +1988,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_log_status = vidioc_log_status,
.vidioc_g_priority = cx25821_vidioc_g_priority,
.vidioc_s_priority = cx25821_vidioc_s_priority,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = cx25821_vidiocgmbuf,
#endif
#ifdef TUNER_FLAG
.vidioc_g_tuner = cx25821_vidioc_g_tuner,
.vidioc_s_tuner = cx25821_vidioc_s_tuner,

View File

@ -40,11 +40,6 @@
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#ifdef CONFIG_VIDEO_V4L1_COMPAT
/* Include V4L1 specific functions. Should be removed soon */
#include <linux/videodev.h>
#endif
#define TUNER_FLAG
#define VIDEO_DEBUG 0
@ -134,7 +129,6 @@ extern int cx25821_vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *cap);
extern int cx25821_vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f);
extern int cx25821_vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf);
extern int cx25821_vidioc_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *p);
extern int cx25821_vidioc_querybuf(struct file *file, void *priv,

View File

@ -876,9 +876,6 @@ static const struct v4l2_ioctl_ops dt3155_ioctl_ops = {
.vidioc_s_crop = dt3155_ioc_s_crop,
.vidioc_enum_framesizes = dt3155_ioc_enum_framesizes,
.vidioc_enum_frameintervals = dt3155_ioc_enum_frameintervals,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = iocgmbuf,
#endif
*/
};

View File

@ -986,15 +986,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
file->f_flags & O_NONBLOCK);
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct tm6000_fh *fh = priv;
return videobuf_cgmbuf(&fh->vb_vidq, mbuf, 8);
}
#endif
static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
{
struct tm6000_fh *fh = priv;
@ -1438,9 +1429,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_querybuf = vidioc_querybuf,
.vidioc_qbuf = vidioc_qbuf,
.vidioc_dqbuf = vidioc_dqbuf,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
};
static struct video_device tm6000_template = {

View File

@ -16,24 +16,7 @@
#include <linux/ioctl.h>
#include <linux/videodev2.h>
#if defined(__MIN_V4L1) && defined (__KERNEL__)
/*
* Used by those V4L2 core functions that need a minimum V4L1 support,
* in order to allow V4L1 Compatibilty code compilation.
*/
struct video_mbuf
{
int size; /* Total memory to map */
int frames; /* Frames */
int offsets[VIDEO_MAX_FRAME];
};
#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
#else
#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
#if defined(CONFIG_VIDEO_V4L1) || defined(CONFIG_VIDEO_V4L1_MODULE) || !defined(__KERNEL__)
#define VID_TYPE_CAPTURE 1 /* Can capture */
#define VID_TYPE_TUNER 2 /* Can tune */
@ -328,8 +311,7 @@ struct video_code
#define VID_PLAY_RESET 13
#define VID_PLAY_END_MARK 14
#endif /* CONFIG_VIDEO_V4L1_COMPAT */
#endif /* __MIN_V4L1 */
#endif /* CONFIG_VIDEO_V4L1 */
#endif /* __LINUX_VIDEODEV_H */

View File

@ -14,12 +14,7 @@
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/compiler.h> /* need __user */
#ifdef CONFIG_VIDEO_V4L1_COMPAT
#define __MIN_V4L1
#include <linux/videodev.h>
#else
#include <linux/videodev2.h>
#endif
struct v4l2_fh;
@ -113,10 +108,6 @@ struct v4l2_ioctl_ops {
int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
#ifdef CONFIG_VIDEO_V4L1_COMPAT
/* buffer type is struct vidio_mbuf * */
int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p);
#endif
int (*vidioc_g_fbuf) (struct file *file, void *fh,
struct v4l2_framebuffer *a);
int (*vidioc_s_fbuf) (struct file *file, void *fh,
@ -300,22 +291,15 @@ extern void v4l_printk_ioctl(unsigned int cmd);
extern const char *v4l2_field_names[];
extern const char *v4l2_type_names[];
/* Compatibility layer interface -- v4l1-compat module */
typedef long (*v4l2_kioctl)(struct file *file,
unsigned int cmd, void *arg);
#ifdef CONFIG_VIDEO_V4L1_COMPAT
long v4l_compat_translate_ioctl(struct file *file,
int cmd, void *arg, v4l2_kioctl driver_ioctl);
#else
#define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL)
#endif
#ifdef CONFIG_COMPAT
/* 32 Bits compatibility layer for 64 bits processors */
extern long v4l2_compat_ioctl32(struct file *file, unsigned int cmd,
unsigned long arg);
#endif
typedef long (*v4l2_kioctl)(struct file *file,
unsigned int cmd, void *arg);
/* Include support for obsoleted stuff */
extern long video_usercopy(struct file *file, unsigned int cmd,
unsigned long arg, v4l2_kioctl func);

View File

@ -17,10 +17,6 @@
#define _VIDEOBUF_CORE_H
#include <linux/poll.h>
#ifdef CONFIG_VIDEO_V4L1_COMPAT
#define __MIN_V4L1
#include <linux/videodev.h>
#endif
#include <linux/videodev2.h>
#define UNSET (-1U)
@ -212,10 +208,6 @@ int videobuf_qbuf(struct videobuf_queue *q,
struct v4l2_buffer *b);
int videobuf_dqbuf(struct videobuf_queue *q,
struct v4l2_buffer *b, int nonblocking);
#ifdef CONFIG_VIDEO_V4L1_COMPAT
int videobuf_cgmbuf(struct videobuf_queue *q,
struct video_mbuf *mbuf, int count);
#endif
int videobuf_streamon(struct videobuf_queue *q);
int videobuf_streamoff(struct videobuf_queue *q);