summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-ioctl.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab2011-10-04 14:32:23 +0200
committerMauro Carvalho Chehab2011-10-08 13:00:35 +0200
commit8715e6cbae2ec8b451920496a73786402a5d879d (patch)
treee38ca245b3b1bdff952bd7a0b916d50ca633e25e /drivers/media/video/v4l2-ioctl.c
parent[media] pvrusb2: implement VIDIOC_QUERYSTD (diff)
downloadkernel-qcow2-linux-8715e6cbae2ec8b451920496a73786402a5d879d.tar.gz
kernel-qcow2-linux-8715e6cbae2ec8b451920496a73786402a5d879d.tar.xz
kernel-qcow2-linux-8715e6cbae2ec8b451920496a73786402a5d879d.zip
[media] v4l2-ioctl: Fill the default value for VIDIOC_QUERYSTD
According with the V4L2 API spec: "When detection is not possible or fails, the set must contain all standards supported by the current video input or output." The V4L2 core has the mask with all supported standards already. So, apply it. Driver and subdevs can then just remove standards from the mask, as they're able of detecting audio, video and frames frequency. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r--drivers/media/video/v4l2-ioctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 21c49dc064e2..24fd43322150 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -1109,6 +1109,14 @@ static long __video_do_ioctl(struct file *file,
if (!ops->vidioc_querystd)
break;
+ /*
+ * If nothing detected, it should return all supported
+ * Drivers just need to mask the std argument, in order
+ * to remove the standards that don't apply from the mask.
+ * This means that tuners, audio and video decoders can join
+ * their efforts to improve the standards detection
+ */
+ *p = vfd->tvnorms;
ret = ops->vidioc_querystd(file, fh, arg);
if (!ret)
dbgarg(cmd, "detected std=%08Lx\n",