diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-02-01 07:08:46 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-05 15:33:27 -0500 |
commit | ed57256f6fe8882cf6dde8d99f5fac5fd84c5a2d (patch) | |
tree | 695d90376ef2c588e109bccbdc0e553dbd19e193 /drivers/media | |
parent | 52dec548d4244d9ec86c58e5696e1d4ee98c7b3c (diff) |
[media] tm6000: fix G/TRY_FMT
Two fixes:
- the priv field wasn't set to 0.
- only V4L2_FIELD_INTERLACED is supported.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/tm6000/tm6000-video.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index f41dbb187caf..eab23413a909 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c | |||
@@ -918,6 +918,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv, | |||
918 | (f->fmt.pix.width * fh->fmt->depth) >> 3; | 918 | (f->fmt.pix.width * fh->fmt->depth) >> 3; |
919 | f->fmt.pix.sizeimage = | 919 | f->fmt.pix.sizeimage = |
920 | f->fmt.pix.height * f->fmt.pix.bytesperline; | 920 | f->fmt.pix.height * f->fmt.pix.bytesperline; |
921 | f->fmt.pix.priv = 0; | ||
921 | 922 | ||
922 | return 0; | 923 | return 0; |
923 | } | 924 | } |
@@ -948,12 +949,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, | |||
948 | 949 | ||
949 | field = f->fmt.pix.field; | 950 | field = f->fmt.pix.field; |
950 | 951 | ||
951 | if (field == V4L2_FIELD_ANY) | 952 | field = V4L2_FIELD_INTERLACED; |
952 | field = V4L2_FIELD_SEQ_TB; | ||
953 | else if (V4L2_FIELD_INTERLACED != field) { | ||
954 | dprintk(dev, V4L2_DEBUG_IOCTL_ARG, "Field type invalid.\n"); | ||
955 | return -EINVAL; | ||
956 | } | ||
957 | 953 | ||
958 | tm6000_get_std_res(dev); | 954 | tm6000_get_std_res(dev); |
959 | 955 | ||
@@ -963,6 +959,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, | |||
963 | f->fmt.pix.width &= ~0x01; | 959 | f->fmt.pix.width &= ~0x01; |
964 | 960 | ||
965 | f->fmt.pix.field = field; | 961 | f->fmt.pix.field = field; |
962 | f->fmt.pix.priv = 0; | ||
966 | 963 | ||
967 | f->fmt.pix.bytesperline = | 964 | f->fmt.pix.bytesperline = |
968 | (f->fmt.pix.width * fmt->depth) >> 3; | 965 | (f->fmt.pix.width * fmt->depth) >> 3; |