]> git.karo-electronics.de Git - karo-tx-linux.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>
Fri, 1 Jul 2011 22:14:25 +0000 (19:14 -0300)
commit1b4bbc86e683fcf8897fcfb566d079d7e6af2d72
tree214e4a44eb1e390b3714fbee0ed8fea90fe51568
parent0e98c8f1f47f0ddc7e78a2a25a78c51f85b68832
[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