public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/5] media/v4l2-ctrls: volatiles should not generate CH_VALUE
@ 2015-03-20 13:30 Ricardo Ribalda Delgado
  2015-03-20 13:30 ` [PATCH v2 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls Ricardo Ribalda Delgado
  2015-04-21 17:44 ` [PATCH v2 1/5] media/v4l2-ctrls: volatiles should not generate CH_VALUE Laurent Pinchart
  0 siblings, 2 replies; 4+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-03-20 13:30 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado, Hans Verkuil, Mauro Carvalho Chehab,
	Arun Kumar K, Sylwester Nawrocki, Antti Palosaari, linux-media,
	linux-kernel, Laurent Pinchart, Sakari Ailus

Volatile controls should not generate CH_VALUE events.

Set has_changed to false to prevent this happening.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
v2: By Sakari Ailus <sakari.ailus@linux.intel.com>

Fix CodeStyle (sorry :S)
 drivers/media/v4l2-core/v4l2-ctrls.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 45c5b47..2ebc33e 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1609,6 +1609,15 @@ static int cluster_changed(struct v4l2_ctrl *master)
 
 		if (ctrl == NULL)
 			continue;
+		/*
+		 * Set has_changed to false to avoid generating
+		 * the event V4L2_EVENT_CTRL_CH_VALUE
+		 */
+		if (ctrl->flags & V4L2_CTRL_FLAG_VOLATILE) {
+			ctrl->has_changed = false;
+			continue;
+		}
+
 		for (idx = 0; !ctrl_changed && idx < ctrl->elems; idx++)
 			ctrl_changed = !ctrl->type_ops->equal(ctrl, idx,
 				ctrl->p_cur, ctrl->p_new);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-21 21:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 13:30 [PATCH v2 1/5] media/v4l2-ctrls: volatiles should not generate CH_VALUE Ricardo Ribalda Delgado
2015-03-20 13:30 ` [PATCH v2 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls Ricardo Ribalda Delgado
2015-04-21 17:44 ` [PATCH v2 1/5] media/v4l2-ctrls: volatiles should not generate CH_VALUE Laurent Pinchart
2015-04-21 21:32   ` Ricardo Ribalda Delgado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox