aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-05-05 09:16:49 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-17 10:57:23 -0400
commit680a513968b691d4ae013b7d6e2df0da3632b51f (patch)
tree57e62f31bbf32208923c31660da61a6ecbd36e80 /Documentation/DocBook
parent48e393a263d3a20b27f4db9a169f4f1874777e6b (diff)
[media] DocBook media: update control section
Document the support for compound types in controls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml27
1 files changed, 20 insertions, 7 deletions
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 73bae134a3a1..e7b8b72651bf 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -660,16 +660,29 @@ supported.</para>
660&v4l2-control;, except for the fact that it also allows for 64-bit 660&v4l2-control;, except for the fact that it also allows for 64-bit
661values and pointers to be passed.</para> 661values and pointers to be passed.</para>
662 662
663 <para>Since the &v4l2-ext-control; supports pointers it is now
664also possible to have controls with compound types such as N-dimensional arrays
665and/or structures. You need to specify the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant>
666when enumerating controls to actually be able to see such compound controls.
667In other words, these controls with compound types should only be used
668programmatically.</para>
669
670 <para>Since such compound controls need to expose more information
671about themselves than is possible with &VIDIOC-QUERYCTRL; the
672&VIDIOC-QUERY-EXT-CTRL; ioctl was added. In particular, this ioctl gives
673the dimensions of the N-dimensional array if this control consists of more than
674one element.</para>
675
663 <para>It is important to realize that due to the flexibility of 676 <para>It is important to realize that due to the flexibility of
664controls it is necessary to check whether the control you want to set 677controls it is necessary to check whether the control you want to set
665actually is supported in the driver and what the valid range of values 678actually is supported in the driver and what the valid range of values
666is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to 679is. So use the &VIDIOC-QUERYCTRL; (or &VIDIOC-QUERY-EXT-CTRL;) and
667check this. Also note that it is possible that some of the menu 680&VIDIOC-QUERYMENU; ioctls to check this. Also note that it is possible
668indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant> 681that some of the menu indices in a control of type
669may not be supported (<constant>VIDIOC_QUERYMENU</constant> will 682<constant>V4L2_CTRL_TYPE_MENU</constant> may not be supported
670return an error). A good example is the list of supported MPEG audio 683(<constant>VIDIOC_QUERYMENU</constant> will return an error). A good
671bitrates. Some drivers only support one or two bitrates, others 684example is the list of supported MPEG audio bitrates. Some drivers only
672support a wider range.</para> 685support one or two bitrates, others support a wider range.</para>
673 686
674 <para> 687 <para>
675 All controls use machine endianness. 688 All controls use machine endianness.