diff options
-rw-r--r-- | Documentation/DocBook/media/v4l/controls.xml | 86 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 6 | ||||
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 7 | ||||
-rw-r--r-- | include/linux/videodev2.h | 9 |
4 files changed, 108 insertions, 0 deletions
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 5e12257dfcef..43cd4958c9e8 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -3599,4 +3599,90 @@ interface and may change in the future.</para> | |||
3599 | to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>, | 3599 | to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>, |
3600 | <xref linkend="w3c-jpeg-jfif"/>.</para> | 3600 | <xref linkend="w3c-jpeg-jfif"/>.</para> |
3601 | </section> | 3601 | </section> |
3602 | |||
3603 | <section id="image-source-controls"> | ||
3604 | <title>Image Source Control Reference</title> | ||
3605 | |||
3606 | <note> | ||
3607 | <title>Experimental</title> | ||
3608 | |||
3609 | <para>This is an <link | ||
3610 | linkend="experimental">experimental</link> interface and may | ||
3611 | change in the future.</para> | ||
3612 | </note> | ||
3613 | |||
3614 | <para> | ||
3615 | The Image Source control class is intended for low-level | ||
3616 | control of image source devices such as image sensors. The | ||
3617 | devices feature an analogue to digital converter and a bus | ||
3618 | transmitter to transmit the image data out of the device. | ||
3619 | </para> | ||
3620 | |||
3621 | <table pgwide="1" frame="none" id="image-source-control-id"> | ||
3622 | <title>Image Source Control IDs</title> | ||
3623 | |||
3624 | <tgroup cols="4"> | ||
3625 | <colspec colname="c1" colwidth="1*" /> | ||
3626 | <colspec colname="c2" colwidth="6*" /> | ||
3627 | <colspec colname="c3" colwidth="2*" /> | ||
3628 | <colspec colname="c4" colwidth="6*" /> | ||
3629 | <spanspec namest="c1" nameend="c2" spanname="id" /> | ||
3630 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | ||
3631 | <thead> | ||
3632 | <row> | ||
3633 | <entry spanname="id" align="left">ID</entry> | ||
3634 | <entry align="left">Type</entry> | ||
3635 | </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry> | ||
3636 | </row> | ||
3637 | </thead> | ||
3638 | <tbody valign="top"> | ||
3639 | <row><entry></entry></row> | ||
3640 | <row> | ||
3641 | <entry spanname="id"><constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant></entry> | ||
3642 | <entry>class</entry> | ||
3643 | </row> | ||
3644 | <row> | ||
3645 | <entry spanname="descr">The IMAGE_SOURCE class descriptor.</entry> | ||
3646 | </row> | ||
3647 | <row> | ||
3648 | <entry spanname="id"><constant>V4L2_CID_VBLANK</constant></entry> | ||
3649 | <entry>integer</entry> | ||
3650 | </row> | ||
3651 | <row> | ||
3652 | <entry spanname="descr">Vertical blanking. The idle period | ||
3653 | after every frame during which no image data is produced. | ||
3654 | The unit of vertical blanking is a line. Every line has | ||
3655 | length of the image width plus horizontal blanking at the | ||
3656 | pixel rate defined by | ||
3657 | <constant>V4L2_CID_PIXEL_RATE</constant> control in the | ||
3658 | same sub-device.</entry> | ||
3659 | </row> | ||
3660 | <row> | ||
3661 | <entry spanname="id"><constant>V4L2_CID_HBLANK</constant></entry> | ||
3662 | <entry>integer</entry> | ||
3663 | </row> | ||
3664 | <row> | ||
3665 | <entry spanname="descr">Horizontal blanking. The idle | ||
3666 | period after every line of image data during which no | ||
3667 | image data is produced. The unit of horizontal blanking is | ||
3668 | pixels.</entry> | ||
3669 | </row> | ||
3670 | <row> | ||
3671 | <entry spanname="id"><constant>V4L2_CID_ANALOGUE_GAIN</constant></entry> | ||
3672 | <entry>integer</entry> | ||
3673 | </row> | ||
3674 | <row> | ||
3675 | <entry spanname="descr">Analogue gain is gain affecting | ||
3676 | all colour components in the pixel matrix. The gain | ||
3677 | operation is performed in the analogue domain before A/D | ||
3678 | conversion. | ||
3679 | </entry> | ||
3680 | </row> | ||
3681 | <row><entry></entry></row> | ||
3682 | </tbody> | ||
3683 | </tgroup> | ||
3684 | </table> | ||
3685 | |||
3686 | </section> | ||
3687 | |||
3602 | </section> | 3688 | </section> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml index 27e20bcbdf42..f2d2ec3f0e31 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml | |||
@@ -272,6 +272,12 @@ These controls are described in <xref | |||
272 | These controls are described in <xref | 272 | These controls are described in <xref |
273 | linkend="jpeg-controls" />.</entry> | 273 | linkend="jpeg-controls" />.</entry> |
274 | </row> | 274 | </row> |
275 | <row> | ||
276 | <entry><constant>V4L2_CTRL_CLASS_IMAGE_SOURCE</constant></entry> | ||
277 | <entry>0x9e0000</entry> <entry>The class containing image | ||
278 | source controls. These controls are described in <xref | ||
279 | linkend="image-source-controls" />.</entry> | ||
280 | </row> | ||
275 | </tbody> | 281 | </tbody> |
276 | </tgroup> | 282 | </tgroup> |
277 | </table> | 283 | </table> |
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index ae544d870d7d..7a2f855d4e21 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c | |||
@@ -644,6 +644,12 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
644 | case V4L2_CID_JPEG_COMPRESSION_QUALITY: return "Compression Quality"; | 644 | case V4L2_CID_JPEG_COMPRESSION_QUALITY: return "Compression Quality"; |
645 | case V4L2_CID_JPEG_ACTIVE_MARKER: return "Active Markers"; | 645 | case V4L2_CID_JPEG_ACTIVE_MARKER: return "Active Markers"; |
646 | 646 | ||
647 | /* Image source controls */ | ||
648 | case V4L2_CID_IMAGE_SOURCE_CLASS: return "Image Source Controls"; | ||
649 | case V4L2_CID_VBLANK: return "Vertical Blanking"; | ||
650 | case V4L2_CID_HBLANK: return "Horizontal Blanking"; | ||
651 | case V4L2_CID_ANALOGUE_GAIN: return "Analogue Gain"; | ||
652 | |||
647 | default: | 653 | default: |
648 | return NULL; | 654 | return NULL; |
649 | } | 655 | } |
@@ -745,6 +751,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, | |||
745 | case V4L2_CID_FM_TX_CLASS: | 751 | case V4L2_CID_FM_TX_CLASS: |
746 | case V4L2_CID_FLASH_CLASS: | 752 | case V4L2_CID_FLASH_CLASS: |
747 | case V4L2_CID_JPEG_CLASS: | 753 | case V4L2_CID_JPEG_CLASS: |
754 | case V4L2_CID_IMAGE_SOURCE_CLASS: | ||
748 | *type = V4L2_CTRL_TYPE_CTRL_CLASS; | 755 | *type = V4L2_CTRL_TYPE_CTRL_CLASS; |
749 | /* You can neither read not write these */ | 756 | /* You can neither read not write these */ |
750 | *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY; | 757 | *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ace8ac000b9b..3cd13b2faab5 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1139,6 +1139,7 @@ struct v4l2_ext_controls { | |||
1139 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ | 1139 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ |
1140 | #define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ | 1140 | #define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ |
1141 | #define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */ | 1141 | #define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */ |
1142 | #define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */ | ||
1142 | 1143 | ||
1143 | #define V4L2_CTRL_ID_MASK (0x0fffffff) | 1144 | #define V4L2_CTRL_ID_MASK (0x0fffffff) |
1144 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | 1145 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
@@ -1788,6 +1789,14 @@ enum v4l2_jpeg_chroma_subsampling { | |||
1788 | #define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) | 1789 | #define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) |
1789 | #define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) | 1790 | #define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) |
1790 | 1791 | ||
1792 | /* Image source controls */ | ||
1793 | #define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900) | ||
1794 | #define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1) | ||
1795 | |||
1796 | #define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) | ||
1797 | #define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) | ||
1798 | #define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) | ||
1799 | |||
1791 | /* | 1800 | /* |
1792 | * T U N I N G | 1801 | * T U N I N G |
1793 | */ | 1802 | */ |