summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/tlg2300/pd-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-01-31 10:42:03 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-05 14:45:12 +0100
commitc5d8907faa93757aa440fd2e584e4db4b8edc14a (patch)
tree1d199a424a19901829482cf9482e4e1140ad925b /drivers/media/usb/tlg2300/pd-video.c
parent[media] tlg2300: embed video_device (diff)
downloadlinux-c5d8907faa93757aa440fd2e584e4db4b8edc14a.tar.xz
linux-c5d8907faa93757aa440fd2e584e4db4b8edc14a.zip
[media] tlg2300: fix querycap
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/media/usb/tlg2300/pd-video.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c
index 312809a68b23..8ab28945a347 100644
--- a/drivers/media/usb/tlg2300/pd-video.c
+++ b/drivers/media/usb/tlg2300/pd-video.c
@@ -142,17 +142,23 @@ static int get_audio_std(v4l2_std_id v4l2_std)
static int vidioc_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{
+ struct video_device *vdev = video_devdata(file);
+ struct poseidon *p = video_get_drvdata(vdev);
struct front_face *front = fh;
- struct poseidon *p = front->pd;
logs(front);
strcpy(cap->driver, "tele-video");
strcpy(cap->card, "Telegent Poseidon");
usb_make_path(p->udev, cap->bus_info, sizeof(cap->bus_info));
- cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
- V4L2_CAP_AUDIO | V4L2_CAP_STREAMING |
- V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;
+ cap->device_caps = V4L2_CAP_TUNER | V4L2_CAP_AUDIO |
+ V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
+ if (vdev->vfl_type == VFL_TYPE_VBI)
+ cap->device_caps |= V4L2_CAP_VBI_CAPTURE;
+ else
+ cap->device_caps |= V4L2_CAP_VIDEO_CAPTURE;
+ cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS |
+ V4L2_CAP_RADIO | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_VIDEO_CAPTURE;
return 0;
}