diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-06-02 06:50:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-21 10:25:37 -0400 |
commit | df462902ea81de9931ea33c3cb3b50ae819db296 (patch) | |
tree | 7d3f8d45f7986567c4d1dd6099598a17746d3497 | |
parent | 1fc21a1979fc799b9e7b3ac35e9864ebc593524b (diff) |
[media] zr364xx: fix querycap and fill in colorspace
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/zr364xx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index 974515dd19d6..a1729b39a85b 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c | |||
@@ -731,9 +731,10 @@ static int zr364xx_vidioc_querycap(struct file *file, void *priv, | |||
731 | strlcpy(cap->card, cam->udev->product, sizeof(cap->card)); | 731 | strlcpy(cap->card, cam->udev->product, sizeof(cap->card)); |
732 | strlcpy(cap->bus_info, dev_name(&cam->udev->dev), | 732 | strlcpy(cap->bus_info, dev_name(&cam->udev->dev), |
733 | sizeof(cap->bus_info)); | 733 | sizeof(cap->bus_info)); |
734 | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | | 734 | cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | |
735 | V4L2_CAP_READWRITE | | 735 | V4L2_CAP_READWRITE | |
736 | V4L2_CAP_STREAMING; | 736 | V4L2_CAP_STREAMING; |
737 | cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; | ||
737 | 738 | ||
738 | return 0; | 739 | return 0; |
739 | } | 740 | } |
@@ -828,7 +829,7 @@ static int zr364xx_vidioc_try_fmt_vid_cap(struct file *file, void *priv, | |||
828 | f->fmt.pix.field = V4L2_FIELD_NONE; | 829 | f->fmt.pix.field = V4L2_FIELD_NONE; |
829 | f->fmt.pix.bytesperline = f->fmt.pix.width * 2; | 830 | f->fmt.pix.bytesperline = f->fmt.pix.width * 2; |
830 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; | 831 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; |
831 | f->fmt.pix.colorspace = 0; | 832 | f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; |
832 | f->fmt.pix.priv = 0; | 833 | f->fmt.pix.priv = 0; |
833 | DBG("%s: V4L2_PIX_FMT_%s (%d) ok!\n", __func__, | 834 | DBG("%s: V4L2_PIX_FMT_%s (%d) ok!\n", __func__, |
834 | decode_fourcc(f->fmt.pix.pixelformat, pixelformat_name), | 835 | decode_fourcc(f->fmt.pix.pixelformat, pixelformat_name), |
@@ -851,7 +852,7 @@ static int zr364xx_vidioc_g_fmt_vid_cap(struct file *file, void *priv, | |||
851 | f->fmt.pix.height = cam->height; | 852 | f->fmt.pix.height = cam->height; |
852 | f->fmt.pix.bytesperline = f->fmt.pix.width * 2; | 853 | f->fmt.pix.bytesperline = f->fmt.pix.width * 2; |
853 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; | 854 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; |
854 | f->fmt.pix.colorspace = 0; | 855 | f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; |
855 | f->fmt.pix.priv = 0; | 856 | f->fmt.pix.priv = 0; |
856 | return 0; | 857 | return 0; |
857 | } | 858 | } |
@@ -888,7 +889,7 @@ static int zr364xx_vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
888 | cam->width, cam->height); | 889 | cam->width, cam->height); |
889 | f->fmt.pix.bytesperline = f->fmt.pix.width * 2; | 890 | f->fmt.pix.bytesperline = f->fmt.pix.width * 2; |
890 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; | 891 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; |
891 | f->fmt.pix.colorspace = 0; | 892 | f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; |
892 | f->fmt.pix.priv = 0; | 893 | f->fmt.pix.priv = 0; |
893 | cam->vb_vidq.field = f->fmt.pix.field; | 894 | cam->vb_vidq.field = f->fmt.pix.field; |
894 | 895 | ||