aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-08-26 06:35:14 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-21 08:52:21 -0400
commit88365105d683187e02a4f75220eaf51fd0c0b6e0 (patch)
treeacbc18b9e8eb7f74630fb7fd709cb35eafd30f54 /Documentation/video4linux
parent74a45790861f659058e8f8b565d98e5a1fdd8440 (diff)
[media] v4l2-ctrls: replace is_volatile with V4L2_CTRL_FLAG_VOLATILE
With the new flag there is no need anymore to have a separate is_volatile field. Modify all users to use the new flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r--Documentation/video4linux/v4l2-controls.txt13
1 files changed, 6 insertions, 7 deletions
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
index 9346fc8cbf2b..f92ee3053940 100644
--- a/Documentation/video4linux/v4l2-controls.txt
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -285,11 +285,11 @@ implement g_volatile_ctrl like this:
285Note that you use the 'new value' union as well in g_volatile_ctrl. In general 285Note that you use the 'new value' union as well in g_volatile_ctrl. In general
286controls that need to implement g_volatile_ctrl are read-only controls. 286controls that need to implement g_volatile_ctrl are read-only controls.
287 287
288To mark a control as volatile you have to set the is_volatile flag: 288To mark a control as volatile you have to set V4L2_CTRL_FLAG_VOLATILE:
289 289
290 ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); 290 ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...);
291 if (ctrl) 291 if (ctrl)
292 ctrl->is_volatile = 1; 292 ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
293 293
294For try/s_ctrl the new values (i.e. as passed by the user) are filled in and 294For try/s_ctrl the new values (i.e. as passed by the user) are filled in and
295you can modify them in try_ctrl or set them in s_ctrl. The 'cur' union 295you can modify them in try_ctrl or set them in s_ctrl. The 'cur' union
@@ -367,8 +367,7 @@ Driver specific controls can be created using v4l2_ctrl_new_custom():
367The last argument is the priv pointer which can be set to driver-specific 367The last argument is the priv pointer which can be set to driver-specific
368private data. 368private data.
369 369
370The v4l2_ctrl_config struct also has fields to set the is_private and is_volatile 370The v4l2_ctrl_config struct also has a field to set the is_private flag.
371flags.
372 371
373If the name field is not set, then the framework will assume this is a standard 372If the name field is not set, then the framework will assume this is a standard
374control and will fill in the name, type and flags fields accordingly. 373control and will fill in the name, type and flags fields accordingly.
@@ -506,8 +505,8 @@ operation should return the value that the hardware's automatic mode set up
506automatically. 505automatically.
507 506
508If the cluster is put in manual mode, then the manual controls should become 507If the cluster is put in manual mode, then the manual controls should become
509active again and the is_volatile flag should be ignored (so g_volatile_ctrl is 508active again and V4L2_CTRL_FLAG_VOLATILE should be ignored (so g_volatile_ctrl
510no longer called while in manual mode). 509is no longer called while in manual mode).
511 510
512Finally the V4L2_CTRL_FLAG_UPDATE should be set for the auto control since 511Finally the V4L2_CTRL_FLAG_UPDATE should be set for the auto control since
513changing that control affects the control flags of the manual controls. 512changing that control affects the control flags of the manual controls.
@@ -520,7 +519,7 @@ void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls,
520 519
521The first two arguments are identical to v4l2_ctrl_cluster. The third argument 520The first two arguments are identical to v4l2_ctrl_cluster. The third argument
522tells the framework which value switches the cluster into manual mode. The 521tells the framework which value switches the cluster into manual mode. The
523last argument will optionally set the is_volatile flag for the non-auto controls. 522last argument will optionally set V4L2_CTRL_FLAG_VOLATILE for the non-auto controls.
524 523
525The first control of the cluster is assumed to be the 'auto' control. 524The first control of the cluster is assumed to be the 'auto' control.
526 525