aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Ribalda <ricardo.ribalda@gmail.com>2015-03-20 10:13:14 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-08 05:35:16 -0400
commitacd2b672b45e557829c1f080e46457586aab9d74 (patch)
tree9dc5ba94ea6425877edd6f94e254010f938b7ba7
parent45f014c5264f5e68ef0e51b36f4ef5ede3d18397 (diff)
[media] media/Documentation: New flag EXECUTE_ON_WRITE
Document new flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE, and the new behavior of CH_VALUE event on VOLATILE controls. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dqevent.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-queryctrl.xml12
-rw-r--r--Documentation/video4linux/v4l2-controls.txt4
3 files changed, 17 insertions, 5 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
index a31eea07d455..50ccd33948c1 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
@@ -425,9 +425,9 @@
425 <entry><constant>V4L2_EVENT_CTRL_CH_VALUE</constant></entry> 425 <entry><constant>V4L2_EVENT_CTRL_CH_VALUE</constant></entry>
426 <entry>0x0001</entry> 426 <entry>0x0001</entry>
427 <entry>This control event was triggered because the value of the control 427 <entry>This control event was triggered because the value of the control
428 changed. Special case: if a button control is pressed, then this 428 changed. Special cases: Volatile controls do no generate this event;
429 event is sent as well, even though there is not explicit value 429 If a control has the <constant>V4L2_CTRL_FLAG_EXECUTE_ON_WRITE</constant>
430 associated with a button control.</entry> 430 flag set, then this event is sent as well, regardless its value.</entry>
431 </row> 431 </row>
432 <row> 432 <row>
433 <entry><constant>V4L2_EVENT_CTRL_CH_FLAGS</constant></entry> 433 <entry><constant>V4L2_EVENT_CTRL_CH_FLAGS</constant></entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
index 2bd98fd7a4e5..dc83ad70f8dc 100644
--- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
@@ -600,7 +600,9 @@ writing a value will cause the device to carry out a given action
600changes continuously. A typical example would be the current gain value if the device 600changes continuously. A typical example would be the current gain value if the device
601is in auto-gain mode. In such a case the hardware calculates the gain value based on 601is in auto-gain mode. In such a case the hardware calculates the gain value based on
602the lighting conditions which can change over time. Note that setting a new value for 602the lighting conditions which can change over time. Note that setting a new value for
603a volatile control will have no effect. The new value will just be ignored.</entry> 603a volatile control will have no effect and no <constant>V4L2_EVENT_CTRL_CH_VALUE</constant>
604will be sent, unless the <constant>V4L2_CTRL_FLAG_EXECUTE_ON_WRITE</constant> flag
605(see below) is also set. Otherwise the new value will just be ignored.</entry>
604 </row> 606 </row>
605 <row> 607 <row>
606 <entry><constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant></entry> 608 <entry><constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant></entry>
@@ -610,6 +612,14 @@ using one of the pointer fields of &v4l2-ext-control;. This flag is set for cont
610that are an array, string, or have a compound type. In all cases you have to set a 612that are an array, string, or have a compound type. In all cases you have to set a
611pointer to memory containing the payload of the control.</entry> 613pointer to memory containing the payload of the control.</entry>
612 </row> 614 </row>
615 <row>
616 <entry><constant>V4L2_CTRL_FLAG_EXECUTE_ON_WRITE</constant></entry>
617 <entry>0x0200</entry>
618 <entry>The value provided to the control will be propagated to the driver
619even if remains constant. This is required when the control represents an action
620on the hardware. For example: clearing an error flag or triggering the flash. All the
621controls of the type <constant>V4L2_CTRL_TYPE_BUTTON</constant> have this flag set.</entry>
622 </row>
613 </tbody> 623 </tbody>
614 </tgroup> 624 </tgroup>
615 </table> 625 </table>
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
index 0f84ce8c9a7b..5517db602f37 100644
--- a/Documentation/video4linux/v4l2-controls.txt
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -344,7 +344,9 @@ implement g_volatile_ctrl like this:
344 } 344 }
345 345
346Note that you use the 'new value' union as well in g_volatile_ctrl. In general 346Note that you use the 'new value' union as well in g_volatile_ctrl. In general
347controls that need to implement g_volatile_ctrl are read-only controls. 347controls that need to implement g_volatile_ctrl are read-only controls. If they
348are not, a V4L2_EVENT_CTRL_CH_VALUE will not be generated when the control
349changes.
348 350
349To mark a control as volatile you have to set V4L2_CTRL_FLAG_VOLATILE: 351To mark a control as volatile you have to set V4L2_CTRL_FLAG_VOLATILE:
350 352