diff options
-rw-r--r-- | Documentation/DocBook/media/v4l/compat.xml | 11 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/controls.xml | 25 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml | 7 | ||||
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 1 | ||||
-rw-r--r-- | include/linux/videodev2.h | 6 |
5 files changed, 39 insertions, 11 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 8b44a43f4542..12ba26262d32 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2379,6 +2379,17 @@ that used it. It was originally scheduled for removal in 2.6.35. | |||
2379 | </orderedlist> | 2379 | </orderedlist> |
2380 | </section> | 2380 | </section> |
2381 | 2381 | ||
2382 | <section> | ||
2383 | <title>V4L2 in Linux 3.3</title> | ||
2384 | <orderedlist> | ||
2385 | <listitem> | ||
2386 | <para>Added <constant>V4L2_CID_ALPHA_COMPONENT</constant> control | ||
2387 | to the <link linkend="control">User controls class</link>. | ||
2388 | </para> | ||
2389 | </listitem> | ||
2390 | </orderedlist> | ||
2391 | </section> | ||
2392 | |||
2382 | <section id="other"> | 2393 | <section id="other"> |
2383 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2394 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2384 | 2395 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index c0422c622337..a1be37897ad7 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -324,12 +324,6 @@ minimum value disables backlight compensation.</entry> | |||
324 | (usually a microscope).</entry> | 324 | (usually a microscope).</entry> |
325 | </row> | 325 | </row> |
326 | <row> | 326 | <row> |
327 | <entry><constant>V4L2_CID_LASTP1</constant></entry> | ||
328 | <entry></entry> | ||
329 | <entry>End of the predefined control IDs (currently | ||
330 | <constant>V4L2_CID_ILLUMINATORS_2</constant> + 1).</entry> | ||
331 | </row> | ||
332 | <row> | ||
333 | <entry><constant>V4L2_CID_MIN_BUFFERS_FOR_CAPTURE</constant></entry> | 327 | <entry><constant>V4L2_CID_MIN_BUFFERS_FOR_CAPTURE</constant></entry> |
334 | <entry>integer</entry> | 328 | <entry>integer</entry> |
335 | <entry>This is a read-only control that can be read by the application | 329 | <entry>This is a read-only control that can be read by the application |
@@ -345,6 +339,25 @@ and used as a hint to determine the number of OUTPUT buffers to pass to REQBUFS. | |||
345 | The value is the minimum number of OUTPUT buffers that is necessary for hardware | 339 | The value is the minimum number of OUTPUT buffers that is necessary for hardware |
346 | to work.</entry> | 340 | to work.</entry> |
347 | </row> | 341 | </row> |
342 | <row id="v4l2-alpha-component"> | ||
343 | <entry><constant>V4L2_CID_ALPHA_COMPONENT</constant></entry> | ||
344 | <entry>integer</entry> | ||
345 | <entry> Sets the alpha color component on the capture device or on | ||
346 | the capture buffer queue of a mem-to-mem device. When a mem-to-mem | ||
347 | device produces frame format that includes an alpha component | ||
348 | (e.g. <link linkend="rgb-formats">packed RGB image formats</link>) | ||
349 | and the alpha value is not defined by the mem-to-mem input data | ||
350 | this control lets you select the alpha component value of all | ||
351 | pixels. It is applicable to any pixel format that contains an alpha | ||
352 | component. | ||
353 | </entry> | ||
354 | </row> | ||
355 | <row> | ||
356 | <entry><constant>V4L2_CID_LASTP1</constant></entry> | ||
357 | <entry></entry> | ||
358 | <entry>End of the predefined control IDs (currently | ||
359 | <constant>V4L2_CID_ALPHA_COMPONENT</constant> + 1).</entry> | ||
360 | </row> | ||
348 | <row> | 361 | <row> |
349 | <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> | 362 | <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> |
350 | <entry></entry> | 363 | <entry></entry> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index ba56536622f2..166c8d65e4f7 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml | |||
@@ -428,8 +428,11 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> | |||
428 | <para>Bit 7 is the most significant bit. The value of a = alpha | 428 | <para>Bit 7 is the most significant bit. The value of a = alpha |
429 | bits is undefined when reading from the driver, ignored when writing | 429 | bits is undefined when reading from the driver, ignored when writing |
430 | to the driver, except when alpha blending has been negotiated for a | 430 | to the driver, except when alpha blending has been negotiated for a |
431 | <link linkend="overlay">Video Overlay</link> or <link | 431 | <link linkend="overlay">Video Overlay</link> or <link linkend="osd"> |
432 | linkend="osd">Video Output Overlay</link>.</para> | 432 | Video Output Overlay</link> or when alpha component has been configured |
433 | for a <link linkend="capture">Video Capture</link> by means of <link | ||
434 | linkend="v4l2-alpha-component"> <constant>V4L2_CID_ALPHA_COMPONENT | ||
435 | </constant> </link> control.</para> | ||
433 | 436 | ||
434 | <example> | 437 | <example> |
435 | <title><constant>V4L2_PIX_FMT_BGR24</constant> 4 × 4 pixel | 438 | <title><constant>V4L2_PIX_FMT_BGR24</constant> 4 × 4 pixel |
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index 0f415dade05a..39266153499f 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c | |||
@@ -467,6 +467,7 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
467 | case V4L2_CID_ILLUMINATORS_2: return "Illuminator 2"; | 467 | case V4L2_CID_ILLUMINATORS_2: return "Illuminator 2"; |
468 | case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: return "Minimum Number of Capture Buffers"; | 468 | case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: return "Minimum Number of Capture Buffers"; |
469 | case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Minimum Number of Output Buffers"; | 469 | case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Minimum Number of Output Buffers"; |
470 | case V4L2_CID_ALPHA_COMPONENT: return "Alpha Component"; | ||
470 | 471 | ||
471 | /* MPEG controls */ | 472 | /* MPEG controls */ |
472 | /* Keep the order of the 'case's the same as in videodev2.h! */ | 473 | /* Keep the order of the 'case's the same as in videodev2.h! */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 3d62631839bc..2965906a02c9 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1204,10 +1204,10 @@ enum v4l2_colorfx { | |||
1204 | #define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) | 1204 | #define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) |
1205 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) | 1205 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) |
1206 | 1206 | ||
1207 | /* last CID + 1 */ | 1207 | #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) |
1208 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+41) | ||
1209 | 1208 | ||
1210 | /* Minimum number of buffer neede by the device */ | 1209 | /* last CID + 1 */ |
1210 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+42) | ||
1211 | 1211 | ||
1212 | /* MPEG-class control IDs defined by V4L2 */ | 1212 | /* MPEG-class control IDs defined by V4L2 */ |
1213 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1213 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |