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: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
struct stk1160 *dev = video_drvdata(file);
struct vb2_queue *q = &dev->vb_vidq;
+ if (dev->norm == norm)
+ return 0;
+
if (vb2_is_busy(q))
return -EBUSY;