]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-ctrls: add v4l2_ctrl_auto_cluster to simplify autogain/gain scenarios
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 10 Jun 2011 08:44:36 +0000 (05:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:53:18 +0000 (17:53 -0300)
commitb0f11cc6a292c7895ff68dd742b176ea81016581
tree03b03db2d5c44c6cca946cb7f24d61a1c15cce24
parentfe05f59eb120c8bb141d3c06e11ef6fd769fa1a2
[media] v4l2-ctrls: add v4l2_ctrl_auto_cluster to simplify autogain/gain scenarios

It is a bit tricky to handle autogain/gain type scenerios correctly. Such
controls need to be clustered and the V4L2_CTRL_FLAG_UPDATE should be set on
the autofoo controls. In addition, the manual controls should be marked
inactive when the automatic mode is on, and active when the manual mode is on.
This also requires specialized volatile handling.

The chances of drivers doing all these things correctly are pretty remote.
So a new v4l2_ctrl_auto_cluster function was added that takes care of these
issues.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-ctrls.c
include/media/v4l2-ctrls.h