[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>
This commit is contained in:
parent
1fc21a1979
commit
df462902ea
@ -731,9 +731,10 @@ static int zr364xx_vidioc_querycap(struct file *file, void *priv,
|
||||
strlcpy(cap->card, cam->udev->product, sizeof(cap->card));
|
||||
strlcpy(cap->bus_info, dev_name(&cam->udev->dev),
|
||||
sizeof(cap->bus_info));
|
||||
cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
|
||||
V4L2_CAP_READWRITE |
|
||||
V4L2_CAP_STREAMING;
|
||||
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -828,7 +829,7 @@ static int zr364xx_vidioc_try_fmt_vid_cap(struct file *file, void *priv,
|
||||
f->fmt.pix.field = V4L2_FIELD_NONE;
|
||||
f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
|
||||
f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
|
||||
f->fmt.pix.colorspace = 0;
|
||||
f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
|
||||
f->fmt.pix.priv = 0;
|
||||
DBG("%s: V4L2_PIX_FMT_%s (%d) ok!\n", __func__,
|
||||
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,
|
||||
f->fmt.pix.height = cam->height;
|
||||
f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
|
||||
f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
|
||||
f->fmt.pix.colorspace = 0;
|
||||
f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
|
||||
f->fmt.pix.priv = 0;
|
||||
return 0;
|
||||
}
|
||||
@ -888,7 +889,7 @@ static int zr364xx_vidioc_s_fmt_vid_cap(struct file *file, void *priv,
|
||||
cam->width, cam->height);
|
||||
f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
|
||||
f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
|
||||
f->fmt.pix.colorspace = 0;
|
||||
f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
|
||||
f->fmt.pix.priv = 0;
|
||||
cam->vb_vidq.field = f->fmt.pix.field;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user