提交 8715e6cb 编写于 作者: M Mauro Carvalho Chehab

[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: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 7383a473
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册