diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/bttv-cards.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-video.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/v4l1-compat.c | 14 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 3 |
4 files changed, 16 insertions, 9 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c index 53f28b248..f1d09b44c 100644 --- a/linux/drivers/media/video/bttv-cards.c +++ b/linux/drivers/media/video/bttv-cards.c @@ -119,7 +119,7 @@ MODULE_PARM(remote,"1-" __stringify(BTTV_MAX) "i"); MODULE_PARM(gpiomask,"i"); MODULE_PARM(audioall,"i"); -MODULE_PARM(audiomux,"1-5i"); +MODULE_PARM(audiomux,"1-6i"); /* kernel args */ #ifndef MODULE diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index e281def4f..e40656144 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -1693,7 +1693,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, { struct v4l2_cropcap *cap = arg; - if (cap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || + if (cap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && cap->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) return -EINVAL; cap->bounds = dev->crop_bounds; @@ -1715,7 +1715,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, { struct v4l2_crop * crop = arg; - if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || + if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) return -EINVAL; crop->c = dev->crop_current; @@ -1726,7 +1726,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, struct v4l2_crop *crop = arg; struct v4l2_rect *b = &dev->crop_bounds; - if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE || + if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) return -EINVAL; if (crop->c.height < 0) diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c index ba27685b7..6398d023d 100644 --- a/linux/drivers/media/video/v4l1-compat.c +++ b/linux/drivers/media/video/v4l1-compat.c @@ -301,6 +301,7 @@ v4l_compat_translate_ioctl(struct inode *inode, { struct v4l2_capability *cap2 = NULL; struct v4l2_format *fmt2 = NULL; + enum v4l2_buf_type captype = V4L2_BUF_TYPE_VIDEO_CAPTURE; struct v4l2_framebuffer fbuf2; struct v4l2_input input2; @@ -516,11 +517,10 @@ v4l_compat_translate_ioctl(struct inode *inode, int *on = arg; if (0 == *on) { - enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; /* dirty hack time. But v4l1 has no STREAMOFF * equivalent in the API, and this one at * least comes close ... */ - drv(inode, file, VIDIOC_STREAMOFF, &type); + drv(inode, file, VIDIOC_STREAMOFF, &captype); } err = drv(inode, file, VIDIOC_OVERLAY, arg); if (err < 0) @@ -871,7 +871,6 @@ v4l_compat_translate_ioctl(struct inode *inode, case VIDIOCMCAPTURE: /* capture a frame */ { struct video_mmap *mm = arg; - enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL); memset(&buf2,0,sizeof(buf2)); @@ -912,7 +911,7 @@ v4l_compat_translate_ioctl(struct inode *inode, dprintk("VIDIOCMCAPTURE / VIDIOC_QBUF: %d\n",err); break; } - err = drv(inode, file, VIDIOC_STREAMON, &type); + err = drv(inode, file, VIDIOC_STREAMON, &captype); if (err < 0) dprintk("VIDIOCMCAPTURE / VIDIOC_STREAMON: %d\n",err); break; @@ -935,6 +934,13 @@ v4l_compat_translate_ioctl(struct inode *inode, break; } + /* make sure capture actually runs so we don't block forever */ + err = drv(inode, file, VIDIOC_STREAMON, &captype); + if (err < 0) { + dprintk("VIDIOCSYNC / VIDIOC_STREAMON: %d\n",err); + break; + } + /* Loop as long as the buffer is queued, but not done */ while ((buf2.flags & (V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE)) diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 30c776df2..0ad054e96 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -870,7 +870,7 @@ struct v4l2_streamparm #define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator) #define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency) #define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency) -#define VIDIOC_CROPCAP _IOR ('V', 58, struct v4l2_cropcap) +#define VIDIOC_CROPCAP _IOWR ('V', 58, struct v4l2_cropcap) #define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop) #define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop) #define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression) @@ -888,6 +888,7 @@ struct v4l2_streamparm #define VIDIOC_S_CTRL_OLD _IOW ('V', 28, struct v4l2_control) #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) +#define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ |