[08/12] usbvision: set field and colorspace.
diff mbox

Message ID 1437397178-5013-9-git-send-email-hverkuil@xs4all.nl
State New
Headers show

Commit Message

Hans Verkuil July 20, 2015, 12:59 p.m. UTC
From: Hans Verkuil <hans.verkuil@cisco.com>

Set the colorspace and field in vidioc_try_fmt_vid_cap().

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/usb/usbvision/usbvision-video.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox

diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index dc0e034..4f425f3 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -880,6 +880,8 @@  static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
 	vf->fmt.pix.bytesperline = vf->fmt.pix.width*
 		usbvision->palette.bytes_per_pixel;
 	vf->fmt.pix.sizeimage = vf->fmt.pix.bytesperline*vf->fmt.pix.height;
+	vf->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+	vf->fmt.pix.field = V4L2_FIELD_NONE; /* Always progressive image */
 
 	return 0;
 }