[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>
This commit is contained in:
parent
1b952f17f3
commit
c5d8907faa
|
@ -142,17 +142,23 @@ static int get_audio_std(v4l2_std_id v4l2_std)
|
||||||
static int vidioc_querycap(struct file *file, void *fh,
|
static int vidioc_querycap(struct file *file, void *fh,
|
||||||
struct v4l2_capability *cap)
|
struct v4l2_capability *cap)
|
||||||
{
|
{
|
||||||
|
struct video_device *vdev = video_devdata(file);
|
||||||
|
struct poseidon *p = video_get_drvdata(vdev);
|
||||||
struct front_face *front = fh;
|
struct front_face *front = fh;
|
||||||
struct poseidon *p = front->pd;
|
|
||||||
|
|
||||||
logs(front);
|
logs(front);
|
||||||
|
|
||||||
strcpy(cap->driver, "tele-video");
|
strcpy(cap->driver, "tele-video");
|
||||||
strcpy(cap->card, "Telegent Poseidon");
|
strcpy(cap->card, "Telegent Poseidon");
|
||||||
usb_make_path(p->udev, cap->bus_info, sizeof(cap->bus_info));
|
usb_make_path(p->udev, cap->bus_info, sizeof(cap->bus_info));
|
||||||
cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
|
cap->device_caps = V4L2_CAP_TUNER | V4L2_CAP_AUDIO |
|
||||||
V4L2_CAP_AUDIO | V4L2_CAP_STREAMING |
|
V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
|
||||||
V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue