diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-26 08:43:25 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-26 08:43:25 -0200 |
commit | e6cc6013f48d85e640660ad8017e735f025dfc6d (patch) | |
tree | fb8a67587bdd593b8d493851e34158568723b7c6 /linux/drivers/media/video/vivi.c | |
parent | 1b8100cf5d467b816dd1c7ba5d59e837de5bf839 (diff) | |
download | mediapointer-dvb-s2-e6cc6013f48d85e640660ad8017e735f025dfc6d.tar.gz mediapointer-dvb-s2-e6cc6013f48d85e640660ad8017e735f025dfc6d.tar.bz2 |
usbvision fix: It was using "&&" instead "&"
From: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/vivi.c')
-rw-r--r-- | linux/drivers/media/video/vivi.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index 5370538bc..6cfac3836 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -744,8 +744,8 @@ static void free_buffer(struct videobuf_queue *vq, struct vivi_buffer *buf) buf->vb.state = STATE_NEEDS_INIT; } -#define norm_maxw() 1024 -#define norm_maxh() 768 +#define norm_maxw() 720 +#define norm_maxh() 480 static int buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, enum v4l2_field field) @@ -757,8 +757,8 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, // dprintk(1,"%s, field=%d\n",__FUNCTION__,field); BUG_ON(NULL == fh->fmt); - if (fh->width < 48 || fh->width > norm_maxw() || - fh->height < 32 || fh->height > norm_maxh()) + if (fh->width != norm_maxw() || + fh->height != norm_maxh()) return -EINVAL; buf->vb.size = fh->width*fh->height*2; if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) @@ -1001,15 +1001,8 @@ static int vidioc_try_fmt_cap (struct file *file, void *priv, maxh = norm_maxh(); f->fmt.pix.field = field; - if (f->fmt.pix.height < 32) - f->fmt.pix.height = 32; - if (f->fmt.pix.height > maxh) - f->fmt.pix.height = maxh; - if (f->fmt.pix.width < 48) - f->fmt.pix.width = 48; - if (f->fmt.pix.width > maxw) - f->fmt.pix.width = maxw; - f->fmt.pix.width &= ~0x03; + f->fmt.pix.height = maxh; + f->fmt.pix.width = maxw; f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3; f->fmt.pix.sizeimage = @@ -1256,8 +1249,8 @@ static int vivi_open(struct inode *inode, struct file *file) fh->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; fh->fmt = &format; - fh->width = 640; - fh->height = 480; + fh->width = norm_maxw(); + fh->height = norm_maxh(); /* Put all controls at a sane state */ for (i = 0; i < ARRAY_SIZE(vivi_qctrl); i++) |