mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 10:44:23 +08:00
[media] usbvision: the radio device node has wrong caps
The radio device node had the same caps as the video node. Fix this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
601ecab34b
commit
cbe12cc66e
@ -487,17 +487,24 @@ static int vidioc_querycap(struct file *file, void *priv,
|
|||||||
struct v4l2_capability *vc)
|
struct v4l2_capability *vc)
|
||||||
{
|
{
|
||||||
struct usb_usbvision *usbvision = video_drvdata(file);
|
struct usb_usbvision *usbvision = video_drvdata(file);
|
||||||
|
struct video_device *vdev = video_devdata(file);
|
||||||
|
|
||||||
strlcpy(vc->driver, "USBVision", sizeof(vc->driver));
|
strlcpy(vc->driver, "USBVision", sizeof(vc->driver));
|
||||||
strlcpy(vc->card,
|
strlcpy(vc->card,
|
||||||
usbvision_device_data[usbvision->dev_model].model_string,
|
usbvision_device_data[usbvision->dev_model].model_string,
|
||||||
sizeof(vc->card));
|
sizeof(vc->card));
|
||||||
usb_make_path(usbvision->dev, vc->bus_info, sizeof(vc->bus_info));
|
usb_make_path(usbvision->dev, vc->bus_info, sizeof(vc->bus_info));
|
||||||
vc->device_caps = V4L2_CAP_VIDEO_CAPTURE |
|
vc->device_caps = usbvision->have_tuner ? V4L2_CAP_TUNER : 0;
|
||||||
V4L2_CAP_READWRITE |
|
if (vdev->vfl_type == VFL_TYPE_GRABBER)
|
||||||
V4L2_CAP_STREAMING |
|
vc->device_caps |= V4L2_CAP_VIDEO_CAPTURE |
|
||||||
(usbvision->have_tuner ? V4L2_CAP_TUNER : 0);
|
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
|
||||||
vc->capabilities = vc->device_caps | V4L2_CAP_DEVICE_CAPS;
|
else
|
||||||
|
vc->device_caps |= V4L2_CAP_RADIO;
|
||||||
|
|
||||||
|
vc->capabilities = vc->device_caps | V4L2_CAP_VIDEO_CAPTURE |
|
||||||
|
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | V4L2_CAP_DEVICE_CAPS;
|
||||||
|
if (usbvision_device_data[usbvision->dev_model].radio)
|
||||||
|
vc->capabilities |= V4L2_CAP_RADIO;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user