diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-13 04:29:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-05 12:25:57 -0500 |
commit | 4bc837d414c36676499220065143743d720bf40f (patch) | |
tree | 5c52a1ddbe779a264437d2cc2160b82229cfab74 /drivers/media/usb/cx231xx/cx231xx-video.c | |
parent | e74d7e6d349099574107869463a940d987152215 (diff) |
[media] cx231xx: add device_caps support to QUERYCAP
This fixes a v4l2_compliance failure.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-video.c')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-video.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 06376d904c9f..ffeedcd2448b 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c | |||
@@ -1854,6 +1854,7 @@ static int vidioc_streamoff(struct file *file, void *priv, | |||
1854 | static int vidioc_querycap(struct file *file, void *priv, | 1854 | static int vidioc_querycap(struct file *file, void *priv, |
1855 | struct v4l2_capability *cap) | 1855 | struct v4l2_capability *cap) |
1856 | { | 1856 | { |
1857 | struct video_device *vdev = video_devdata(file); | ||
1857 | struct cx231xx_fh *fh = priv; | 1858 | struct cx231xx_fh *fh = priv; |
1858 | struct cx231xx *dev = fh->dev; | 1859 | struct cx231xx *dev = fh->dev; |
1859 | 1860 | ||
@@ -1861,17 +1862,20 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
1861 | strlcpy(cap->card, cx231xx_boards[dev->model].name, sizeof(cap->card)); | 1862 | strlcpy(cap->card, cx231xx_boards[dev->model].name, sizeof(cap->card)); |
1862 | usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info)); | 1863 | usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info)); |
1863 | 1864 | ||
1864 | cap->capabilities = V4L2_CAP_VBI_CAPTURE | | 1865 | cap->device_caps = |
1865 | #if 0 | ||
1866 | V4L2_CAP_SLICED_VBI_CAPTURE | | ||
1867 | #endif | ||
1868 | V4L2_CAP_VIDEO_CAPTURE | | ||
1869 | V4L2_CAP_AUDIO | | 1866 | V4L2_CAP_AUDIO | |
1870 | V4L2_CAP_READWRITE | | 1867 | V4L2_CAP_READWRITE | |
1871 | V4L2_CAP_STREAMING; | 1868 | V4L2_CAP_STREAMING; |
1872 | 1869 | ||
1870 | if (vdev->vfl_type == VFL_TYPE_VBI) | ||
1871 | cap->device_caps |= V4L2_CAP_VBI_CAPTURE; | ||
1872 | else | ||
1873 | cap->device_caps |= V4L2_CAP_VIDEO_CAPTURE; | ||
1873 | if (dev->tuner_type != TUNER_ABSENT) | 1874 | if (dev->tuner_type != TUNER_ABSENT) |
1874 | cap->capabilities |= V4L2_CAP_TUNER; | 1875 | cap->device_caps |= V4L2_CAP_TUNER; |
1876 | cap->capabilities = cap->device_caps | | ||
1877 | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_VIDEO_CAPTURE | | ||
1878 | V4L2_CAP_DEVICE_CAPS; | ||
1875 | 1879 | ||
1876 | return 0; | 1880 | return 0; |
1877 | } | 1881 | } |