Skip to content

Commit

Permalink
[media] v4l2-ioctl: Fill the default value for VIDIOC_QUERYSTD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 8, 2011
1 parent 7383a47 commit 8715e6c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/media/video/v4l2-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8715e6c

Please sign in to comment.