Commit b3ba8fa6 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab

[media] media: stk1160: Ignore unchanged standard set

This commit adds an early check to vidioc_s_std() to detect if the
new and current standards are equal, and exit with success in that
case.
This is needed to prevent userspace applications that might attempt
to re-set the same standard from failing if that's done when streaming
has started.
Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 9928ac7c
...@@ -379,6 +379,9 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm) ...@@ -379,6 +379,9 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
struct stk1160 *dev = video_drvdata(file); struct stk1160 *dev = video_drvdata(file);
struct vb2_queue *q = &dev->vb_vidq; struct vb2_queue *q = &dev->vb_vidq;
if (dev->norm == norm)
return 0;
if (vb2_is_busy(q)) if (vb2_is_busy(q))
return -EBUSY; return -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment