diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-05-05 09:16:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-17 10:57:23 -0400 |
commit | 680a513968b691d4ae013b7d6e2df0da3632b51f (patch) | |
tree | 57e62f31bbf32208923c31660da61a6ecbd36e80 /Documentation/DocBook | |
parent | 48e393a263d3a20b27f4db9a169f4f1874777e6b (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.xml | 27 |
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 |
661 | values and pointers to be passed.</para> | 661 | values and pointers to be passed.</para> |
662 | 662 | ||
663 | <para>Since the &v4l2-ext-control; supports pointers it is now | ||
664 | also possible to have controls with compound types such as N-dimensional arrays | ||
665 | and/or structures. You need to specify the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> | ||
666 | when enumerating controls to actually be able to see such compound controls. | ||
667 | In other words, these controls with compound types should only be used | ||
668 | programmatically.</para> | ||
669 | |||
670 | <para>Since such compound controls need to expose more information | ||
671 | about themselves than is possible with &VIDIOC-QUERYCTRL; the | ||
672 | &VIDIOC-QUERY-EXT-CTRL; ioctl was added. In particular, this ioctl gives | ||
673 | the dimensions of the N-dimensional array if this control consists of more than | ||
674 | one 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 |
664 | controls it is necessary to check whether the control you want to set | 677 | controls it is necessary to check whether the control you want to set |
665 | actually is supported in the driver and what the valid range of values | 678 | actually is supported in the driver and what the valid range of values |
666 | is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to | 679 | is. So use the &VIDIOC-QUERYCTRL; (or &VIDIOC-QUERY-EXT-CTRL;) and |
667 | check 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 |
668 | indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant> | 681 | that some of the menu indices in a control of type |
669 | may not be supported (<constant>VIDIOC_QUERYMENU</constant> will | 682 | <constant>V4L2_CTRL_TYPE_MENU</constant> may not be supported |
670 | return an error). A good example is the list of supported MPEG audio | 683 | (<constant>VIDIOC_QUERYMENU</constant> will return an error). A good |
671 | bitrates. Some drivers only support one or two bitrates, others | 684 | example is the list of supported MPEG audio bitrates. Some drivers only |
672 | support a wider range.</para> | 685 | support 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. |