summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-03-15 12:46:39 +0000
committerGerd Knorr <devnull@localhost>2004-03-15 12:46:39 +0000
commitd846a435c328a8bca2b9f4a16fe7d93e783461f5 (patch)
tree25ae4db7a87cdce34760a7f7384afe9bff37f15d /linux/drivers/media/video
parenta4aa47a04f79c3c3818091f8021a0cf8ee40b8aa (diff)
downloadmediapointer-dvb-s2-d846a435c328a8bca2b9f4a16fe7d93e783461f5.tar.gz
mediapointer-dvb-s2-d846a435c328a8bca2b9f4a16fe7d93e783461f5.tar.bz2
- cropcap fixes.
- v4l1-compat fix.
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/bttv-cards.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c6
-rw-r--r--linux/drivers/media/video/v4l1-compat.c14
3 files changed, 14 insertions, 8 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))