[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)
commit72d877cac07c8d996918977c3162dd78b8097ca8
tree03b03db2d5c44c6cca946cb7f24d61a1c15cce24
parent78866efe8ae2862fef7ff37af36c6972651c2d0b
[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