diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 12:37:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 12:37:45 -0400 |
commit | fb091be08d1acf184e8801dfdcace6e0cb19b1fe (patch) | |
tree | cbd0c4200fd8628d592167589ca790e36fc4ae26 /Documentation/DocBook | |
parent | bd7fc2f2d807fdb254f7efc542f8eec3f23e289e (diff) | |
parent | e8d0416796d43a950ec7b65629e53419b2e22453 (diff) |
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (534 commits)
V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers
V4L/DVB: vivi and mem2mem_testdev need slab.h to build
V4L/DVB: tm6000: bugfix image position
V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSET
V4L/DVB: tm6000: README - add vbi
V4L/DVB: Fix unlock logic at medusa_video_init
V4L/DVB: fix dvb frontend lockup
V4L/DVB: s2255drv: remove dead code
V4L/DVB: s2255drv: return if vdev not found
V4L/DVB: ov511: cleanup: remove unneeded null check
V4L/DVB: media/mem2mem: dereferencing free memory
V4L/DVB: media/IR: Add missing include file to rc-map.c
V4L/DVB: dvb/stv6110x: cleanup error handling
V4L/DVB: ngene: Add lgdt3303 and mt2131 deps to Kconfig
V4L/DVB: ngene: start separating out DVB functions into separate file
V4L/DVB: ngene: split out card specific code into a separate file
V4L/DVB: ngene: split out i2c code into a separate file
V4L/DVB: ngene: add initial support for digital side of Avermedia m780
V4L/DVB: ngene: properly support boards where channel 0 isn't a TS input
V4L-DVB: ngene: make sure that tuner headers are included
...
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/media-entities.tmpl | 11 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/compat.xml | 126 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/controls.xml | 36 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/dev-event.xml | 31 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/io.xml | 18 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/pixfmt.xml | 12 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/v4l2.xml | 3 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/videodev2.h.xml | 10 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-dqevent.xml | 131 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-enuminput.xml | 2 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-qbuf.xml | 14 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-queryctrl.xml | 2 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-reqbufs.xml | 2 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-subscribe-event.xml | 133 |
14 files changed, 463 insertions, 68 deletions
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index c725cb852c54..5d4d40f429a5 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl | |||
@@ -17,6 +17,7 @@ | |||
17 | <!ENTITY VIDIOC-DBG-G-REGISTER "<link linkend='vidioc-dbg-g-register'><constant>VIDIOC_DBG_G_REGISTER</constant></link>"> | 17 | <!ENTITY VIDIOC-DBG-G-REGISTER "<link linkend='vidioc-dbg-g-register'><constant>VIDIOC_DBG_G_REGISTER</constant></link>"> |
18 | <!ENTITY VIDIOC-DBG-S-REGISTER "<link linkend='vidioc-dbg-g-register'><constant>VIDIOC_DBG_S_REGISTER</constant></link>"> | 18 | <!ENTITY VIDIOC-DBG-S-REGISTER "<link linkend='vidioc-dbg-g-register'><constant>VIDIOC_DBG_S_REGISTER</constant></link>"> |
19 | <!ENTITY VIDIOC-DQBUF "<link linkend='vidioc-qbuf'><constant>VIDIOC_DQBUF</constant></link>"> | 19 | <!ENTITY VIDIOC-DQBUF "<link linkend='vidioc-qbuf'><constant>VIDIOC_DQBUF</constant></link>"> |
20 | <!ENTITY VIDIOC-DQEVENT "<link linkend='vidioc-dqevent'><constant>VIDIOC_DQEVENT</constant></link>"> | ||
20 | <!ENTITY VIDIOC-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_ENCODER_CMD</constant></link>"> | 21 | <!ENTITY VIDIOC-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_ENCODER_CMD</constant></link>"> |
21 | <!ENTITY VIDIOC-ENUMAUDIO "<link linkend='vidioc-enumaudio'><constant>VIDIOC_ENUMAUDIO</constant></link>"> | 22 | <!ENTITY VIDIOC-ENUMAUDIO "<link linkend='vidioc-enumaudio'><constant>VIDIOC_ENUMAUDIO</constant></link>"> |
22 | <!ENTITY VIDIOC-ENUMAUDOUT "<link linkend='vidioc-enumaudioout'><constant>VIDIOC_ENUMAUDOUT</constant></link>"> | 23 | <!ENTITY VIDIOC-ENUMAUDOUT "<link linkend='vidioc-enumaudioout'><constant>VIDIOC_ENUMAUDOUT</constant></link>"> |
@@ -60,6 +61,7 @@ | |||
60 | <!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>"> | 61 | <!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>"> |
61 | <!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>"> | 62 | <!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>"> |
62 | <!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>"> | 63 | <!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>"> |
64 | <!ENTITY VIDIOC-SUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_SUBSCRIBE_EVENT</constant></link>"> | ||
63 | <!ENTITY VIDIOC-S-AUDIO "<link linkend='vidioc-g-audio'><constant>VIDIOC_S_AUDIO</constant></link>"> | 65 | <!ENTITY VIDIOC-S-AUDIO "<link linkend='vidioc-g-audio'><constant>VIDIOC_S_AUDIO</constant></link>"> |
64 | <!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>"> | 66 | <!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>"> |
65 | <!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>"> | 67 | <!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>"> |
@@ -83,6 +85,7 @@ | |||
83 | <!ENTITY VIDIOC-TRY-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_TRY_ENCODER_CMD</constant></link>"> | 85 | <!ENTITY VIDIOC-TRY-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_TRY_ENCODER_CMD</constant></link>"> |
84 | <!ENTITY VIDIOC-TRY-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_TRY_EXT_CTRLS</constant></link>"> | 86 | <!ENTITY VIDIOC-TRY-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_TRY_EXT_CTRLS</constant></link>"> |
85 | <!ENTITY VIDIOC-TRY-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_TRY_FMT</constant></link>"> | 87 | <!ENTITY VIDIOC-TRY-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_TRY_FMT</constant></link>"> |
88 | <!ENTITY VIDIOC-UNSUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_UNSUBSCRIBE_EVENT</constant></link>"> | ||
86 | 89 | ||
87 | <!-- Types --> | 90 | <!-- Types --> |
88 | <!ENTITY v4l2-std-id "<link linkend='v4l2-std-id'>v4l2_std_id</link>"> | 91 | <!ENTITY v4l2-std-id "<link linkend='v4l2-std-id'>v4l2_std_id</link>"> |
@@ -141,6 +144,9 @@ | |||
141 | <!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> | 144 | <!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> |
142 | <!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> | 145 | <!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> |
143 | <!ENTITY v4l2-encoder-cmd "struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> | 146 | <!ENTITY v4l2-encoder-cmd "struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> |
147 | <!ENTITY v4l2-event "struct <link linkend='v4l2-event'>v4l2_event</link>"> | ||
148 | <!ENTITY v4l2-event-subscription "struct <link linkend='v4l2-event-subscription'>v4l2_event_subscription</link>"> | ||
149 | <!ENTITY v4l2-event-vsync "struct <link linkend='v4l2-event-vsync'>v4l2_event_vsync</link>"> | ||
144 | <!ENTITY v4l2-ext-control "struct <link linkend='v4l2-ext-control'>v4l2_ext_control</link>"> | 150 | <!ENTITY v4l2-ext-control "struct <link linkend='v4l2-ext-control'>v4l2_ext_control</link>"> |
145 | <!ENTITY v4l2-ext-controls "struct <link linkend='v4l2-ext-controls'>v4l2_ext_controls</link>"> | 151 | <!ENTITY v4l2-ext-controls "struct <link linkend='v4l2-ext-controls'>v4l2_ext_controls</link>"> |
146 | <!ENTITY v4l2-fmtdesc "struct <link linkend='v4l2-fmtdesc'>v4l2_fmtdesc</link>"> | 152 | <!ENTITY v4l2-fmtdesc "struct <link linkend='v4l2-fmtdesc'>v4l2_fmtdesc</link>"> |
@@ -200,6 +206,7 @@ | |||
200 | <!ENTITY sub-controls SYSTEM "v4l/controls.xml"> | 206 | <!ENTITY sub-controls SYSTEM "v4l/controls.xml"> |
201 | <!ENTITY sub-dev-capture SYSTEM "v4l/dev-capture.xml"> | 207 | <!ENTITY sub-dev-capture SYSTEM "v4l/dev-capture.xml"> |
202 | <!ENTITY sub-dev-codec SYSTEM "v4l/dev-codec.xml"> | 208 | <!ENTITY sub-dev-codec SYSTEM "v4l/dev-codec.xml"> |
209 | <!ENTITY sub-dev-event SYSTEM "v4l/dev-event.xml"> | ||
203 | <!ENTITY sub-dev-effect SYSTEM "v4l/dev-effect.xml"> | 210 | <!ENTITY sub-dev-effect SYSTEM "v4l/dev-effect.xml"> |
204 | <!ENTITY sub-dev-osd SYSTEM "v4l/dev-osd.xml"> | 211 | <!ENTITY sub-dev-osd SYSTEM "v4l/dev-osd.xml"> |
205 | <!ENTITY sub-dev-output SYSTEM "v4l/dev-output.xml"> | 212 | <!ENTITY sub-dev-output SYSTEM "v4l/dev-output.xml"> |
@@ -292,6 +299,8 @@ | |||
292 | <!ENTITY sub-v4l2grab-c SYSTEM "v4l/v4l2grab.c.xml"> | 299 | <!ENTITY sub-v4l2grab-c SYSTEM "v4l/v4l2grab.c.xml"> |
293 | <!ENTITY sub-videodev2-h SYSTEM "v4l/videodev2.h.xml"> | 300 | <!ENTITY sub-videodev2-h SYSTEM "v4l/videodev2.h.xml"> |
294 | <!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml"> | 301 | <!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml"> |
302 | <!ENTITY sub-dqevent SYSTEM "v4l/vidioc-dqevent.xml"> | ||
303 | <!ENTITY sub-subscribe-event SYSTEM "v4l/vidioc-subscribe-event.xml"> | ||
295 | <!ENTITY sub-intro SYSTEM "dvb/intro.xml"> | 304 | <!ENTITY sub-intro SYSTEM "dvb/intro.xml"> |
296 | <!ENTITY sub-frontend SYSTEM "dvb/frontend.xml"> | 305 | <!ENTITY sub-frontend SYSTEM "dvb/frontend.xml"> |
297 | <!ENTITY sub-dvbproperty SYSTEM "dvb/dvbproperty.xml"> | 306 | <!ENTITY sub-dvbproperty SYSTEM "dvb/dvbproperty.xml"> |
@@ -381,3 +390,5 @@ | |||
381 | <!ENTITY reqbufs SYSTEM "v4l/vidioc-reqbufs.xml"> | 390 | <!ENTITY reqbufs SYSTEM "v4l/vidioc-reqbufs.xml"> |
382 | <!ENTITY s-hw-freq-seek SYSTEM "v4l/vidioc-s-hw-freq-seek.xml"> | 391 | <!ENTITY s-hw-freq-seek SYSTEM "v4l/vidioc-s-hw-freq-seek.xml"> |
383 | <!ENTITY streamon SYSTEM "v4l/vidioc-streamon.xml"> | 392 | <!ENTITY streamon SYSTEM "v4l/vidioc-streamon.xml"> |
393 | <!ENTITY dqevent SYSTEM "v4l/vidioc-dqevent.xml"> | ||
394 | <!ENTITY subscribe_event SYSTEM "v4l/vidioc-subscribe-event.xml"> | ||
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml index b9dbdf9e6d29..b42b935913cd 100644 --- a/Documentation/DocBook/v4l/compat.xml +++ b/Documentation/DocBook/v4l/compat.xml | |||
@@ -2332,15 +2332,26 @@ more information.</para> | |||
2332 | </listitem> | 2332 | </listitem> |
2333 | </orderedlist> | 2333 | </orderedlist> |
2334 | </section> | 2334 | </section> |
2335 | </section> | 2335 | <section> |
2336 | <title>V4L2 in Linux 2.6.34</title> | ||
2337 | <orderedlist> | ||
2338 | <listitem> | ||
2339 | <para>Added | ||
2340 | <constant>V4L2_CID_IRIS_ABSOLUTE</constant> and | ||
2341 | <constant>V4L2_CID_IRIS_RELATIVE</constant> controls to the | ||
2342 | <link linkend="camera-controls">Camera controls class</link>. | ||
2343 | </para> | ||
2344 | </listitem> | ||
2345 | </orderedlist> | ||
2346 | </section> | ||
2336 | 2347 | ||
2337 | <section id="other"> | 2348 | <section id="other"> |
2338 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2349 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2339 | 2350 | ||
2340 | <section id="xvideo"> | 2351 | <section id="xvideo"> |
2341 | <title>X Video Extension</title> | 2352 | <title>X Video Extension</title> |
2342 | 2353 | ||
2343 | <para>The X Video Extension (abbreviated XVideo or just Xv) is | 2354 | <para>The X Video Extension (abbreviated XVideo or just Xv) is |
2344 | an extension of the X Window system, implemented for example by the | 2355 | an extension of the X Window system, implemented for example by the |
2345 | XFree86 project. Its scope is similar to V4L2, an API to video capture | 2356 | XFree86 project. Its scope is similar to V4L2, an API to video capture |
2346 | and output devices for X clients. Xv allows applications to display | 2357 | and output devices for X clients. Xv allows applications to display |
@@ -2351,7 +2362,7 @@ capture or output still images in XPixmaps<footnote> | |||
2351 | extension available across many operating systems and | 2362 | extension available across many operating systems and |
2352 | architectures.</para> | 2363 | architectures.</para> |
2353 | 2364 | ||
2354 | <para>Because the driver is embedded into the X server Xv has a | 2365 | <para>Because the driver is embedded into the X server Xv has a |
2355 | number of advantages over the V4L2 <link linkend="overlay">video | 2366 | number of advantages over the V4L2 <link linkend="overlay">video |
2356 | overlay interface</link>. The driver can easily determine the overlay | 2367 | overlay interface</link>. The driver can easily determine the overlay |
2357 | target, &ie; visible graphics memory or off-screen buffers for a | 2368 | target, &ie; visible graphics memory or off-screen buffers for a |
@@ -2360,16 +2371,16 @@ overlay, scaling or color-keying, or the clipping functions of the | |||
2360 | video capture hardware, always in sync with drawing operations or | 2371 | video capture hardware, always in sync with drawing operations or |
2361 | windows moving or changing their stacking order.</para> | 2372 | windows moving or changing their stacking order.</para> |
2362 | 2373 | ||
2363 | <para>To combine the advantages of Xv and V4L a special Xv | 2374 | <para>To combine the advantages of Xv and V4L a special Xv |
2364 | driver exists in XFree86 and XOrg, just programming any overlay capable | 2375 | driver exists in XFree86 and XOrg, just programming any overlay capable |
2365 | Video4Linux device it finds. To enable it | 2376 | Video4Linux device it finds. To enable it |
2366 | <filename>/etc/X11/XF86Config</filename> must contain these lines:</para> | 2377 | <filename>/etc/X11/XF86Config</filename> must contain these lines:</para> |
2367 | <para><screen> | 2378 | <para><screen> |
2368 | Section "Module" | 2379 | Section "Module" |
2369 | Load "v4l" | 2380 | Load "v4l" |
2370 | EndSection</screen></para> | 2381 | EndSection</screen></para> |
2371 | 2382 | ||
2372 | <para>As of XFree86 4.2 this driver still supports only V4L | 2383 | <para>As of XFree86 4.2 this driver still supports only V4L |
2373 | ioctls, however it should work just fine with all V4L2 devices through | 2384 | ioctls, however it should work just fine with all V4L2 devices through |
2374 | the V4L2 backward-compatibility layer. Since V4L2 permits multiple | 2385 | the V4L2 backward-compatibility layer. Since V4L2 permits multiple |
2375 | opens it is possible (if supported by the V4L2 driver) to capture | 2386 | opens it is possible (if supported by the V4L2 driver) to capture |
@@ -2377,83 +2388,84 @@ video while an X client requested video overlay. Restrictions of | |||
2377 | simultaneous capturing and overlay are discussed in <xref | 2388 | simultaneous capturing and overlay are discussed in <xref |
2378 | linkend="overlay" /> apply.</para> | 2389 | linkend="overlay" /> apply.</para> |
2379 | 2390 | ||
2380 | <para>Only marginally related to V4L2, XFree86 extended Xv to | 2391 | <para>Only marginally related to V4L2, XFree86 extended Xv to |
2381 | support hardware YUV to RGB conversion and scaling for faster video | 2392 | support hardware YUV to RGB conversion and scaling for faster video |
2382 | playback, and added an interface to MPEG-2 decoding hardware. This API | 2393 | playback, and added an interface to MPEG-2 decoding hardware. This API |
2383 | is useful to display images captured with V4L2 devices.</para> | 2394 | is useful to display images captured with V4L2 devices.</para> |
2384 | </section> | 2395 | </section> |
2385 | 2396 | ||
2386 | <section> | 2397 | <section> |
2387 | <title>Digital Video</title> | 2398 | <title>Digital Video</title> |
2388 | 2399 | ||
2389 | <para>V4L2 does not support digital terrestrial, cable or | 2400 | <para>V4L2 does not support digital terrestrial, cable or |
2390 | satellite broadcast. A separate project aiming at digital receivers | 2401 | satellite broadcast. A separate project aiming at digital receivers |
2391 | exists. You can find its homepage at <ulink | 2402 | exists. You can find its homepage at <ulink |
2392 | url="http://linuxtv.org">http://linuxtv.org</ulink>. The Linux DVB API | 2403 | url="http://linuxtv.org">http://linuxtv.org</ulink>. The Linux DVB API |
2393 | has no connection to the V4L2 API except that drivers for hybrid | 2404 | has no connection to the V4L2 API except that drivers for hybrid |
2394 | hardware may support both.</para> | 2405 | hardware may support both.</para> |
2395 | </section> | 2406 | </section> |
2396 | 2407 | ||
2397 | <section> | 2408 | <section> |
2398 | <title>Audio Interfaces</title> | 2409 | <title>Audio Interfaces</title> |
2399 | 2410 | ||
2400 | <para>[to do - OSS/ALSA]</para> | 2411 | <para>[to do - OSS/ALSA]</para> |
2412 | </section> | ||
2401 | </section> | 2413 | </section> |
2402 | </section> | ||
2403 | 2414 | ||
2404 | <section id="experimental"> | 2415 | <section id="experimental"> |
2405 | <title>Experimental API Elements</title> | 2416 | <title>Experimental API Elements</title> |
2406 | 2417 | ||
2407 | <para>The following V4L2 API elements are currently experimental | 2418 | <para>The following V4L2 API elements are currently experimental |
2408 | and may change in the future.</para> | 2419 | and may change in the future.</para> |
2409 | 2420 | ||
2410 | <itemizedlist> | 2421 | <itemizedlist> |
2411 | <listitem> | 2422 | <listitem> |
2412 | <para>Video Output Overlay (OSD) Interface, <xref | 2423 | <para>Video Output Overlay (OSD) Interface, <xref |
2413 | linkend="osd" />.</para> | 2424 | linkend="osd" />.</para> |
2414 | </listitem> | 2425 | </listitem> |
2415 | <listitem> | 2426 | <listitem> |
2416 | <para><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY</constant>, | 2427 | <para><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY</constant>, |
2417 | &v4l2-buf-type;, <xref linkend="v4l2-buf-type" />.</para> | 2428 | &v4l2-buf-type;, <xref linkend="v4l2-buf-type" />.</para> |
2418 | </listitem> | 2429 | </listitem> |
2419 | <listitem> | 2430 | <listitem> |
2420 | <para><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant>, | 2431 | <para><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant>, |
2421 | &VIDIOC-QUERYCAP; ioctl, <xref linkend="device-capabilities" />.</para> | 2432 | &VIDIOC-QUERYCAP; ioctl, <xref linkend="device-capabilities" />.</para> |
2422 | </listitem> | 2433 | </listitem> |
2423 | <listitem> | 2434 | <listitem> |
2424 | <para>&VIDIOC-ENUM-FRAMESIZES; and | 2435 | <para>&VIDIOC-ENUM-FRAMESIZES; and |
2425 | &VIDIOC-ENUM-FRAMEINTERVALS; ioctls.</para> | 2436 | &VIDIOC-ENUM-FRAMEINTERVALS; ioctls.</para> |
2426 | </listitem> | 2437 | </listitem> |
2427 | <listitem> | 2438 | <listitem> |
2428 | <para>&VIDIOC-G-ENC-INDEX; ioctl.</para> | 2439 | <para>&VIDIOC-G-ENC-INDEX; ioctl.</para> |
2429 | </listitem> | 2440 | </listitem> |
2430 | <listitem> | 2441 | <listitem> |
2431 | <para>&VIDIOC-ENCODER-CMD; and &VIDIOC-TRY-ENCODER-CMD; | 2442 | <para>&VIDIOC-ENCODER-CMD; and &VIDIOC-TRY-ENCODER-CMD; |
2432 | ioctls.</para> | 2443 | ioctls.</para> |
2433 | </listitem> | 2444 | </listitem> |
2434 | <listitem> | 2445 | <listitem> |
2435 | <para>&VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER; | 2446 | <para>&VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER; |
2436 | ioctls.</para> | 2447 | ioctls.</para> |
2437 | </listitem> | 2448 | </listitem> |
2438 | <listitem> | 2449 | <listitem> |
2439 | <para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para> | 2450 | <para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para> |
2440 | </listitem> | 2451 | </listitem> |
2441 | </itemizedlist> | 2452 | </itemizedlist> |
2442 | </section> | 2453 | </section> |
2443 | 2454 | ||
2444 | <section id="obsolete"> | 2455 | <section id="obsolete"> |
2445 | <title>Obsolete API Elements</title> | 2456 | <title>Obsolete API Elements</title> |
2446 | 2457 | ||
2447 | <para>The following V4L2 API elements were superseded by new | 2458 | <para>The following V4L2 API elements were superseded by new |
2448 | interfaces and should not be implemented in new drivers.</para> | 2459 | interfaces and should not be implemented in new drivers.</para> |
2449 | 2460 | ||
2450 | <itemizedlist> | 2461 | <itemizedlist> |
2451 | <listitem> | 2462 | <listitem> |
2452 | <para><constant>VIDIOC_G_MPEGCOMP</constant> and | 2463 | <para><constant>VIDIOC_G_MPEGCOMP</constant> and |
2453 | <constant>VIDIOC_S_MPEGCOMP</constant> ioctls. Use Extended Controls, | 2464 | <constant>VIDIOC_S_MPEGCOMP</constant> ioctls. Use Extended Controls, |
2454 | <xref linkend="extended-controls" />.</para> | 2465 | <xref linkend="extended-controls" />.</para> |
2455 | </listitem> | 2466 | </listitem> |
2456 | </itemizedlist> | 2467 | </itemizedlist> |
2468 | </section> | ||
2457 | </section> | 2469 | </section> |
2458 | 2470 | ||
2459 | <!-- | 2471 | <!-- |
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index f46450610412..8408caaee276 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml | |||
@@ -267,6 +267,12 @@ minimum value disables backlight compensation.</entry> | |||
267 | <entry>Chroma automatic gain control.</entry> | 267 | <entry>Chroma automatic gain control.</entry> |
268 | </row> | 268 | </row> |
269 | <row> | 269 | <row> |
270 | <entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry> | ||
271 | <entry>integer</entry> | ||
272 | <entry>Adjusts the Chroma gain control (for use when chroma AGC | ||
273 | is disabled).</entry> | ||
274 | </row> | ||
275 | <row> | ||
270 | <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry> | 276 | <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry> |
271 | <entry>boolean</entry> | 277 | <entry>boolean</entry> |
272 | <entry>Enable the color killer (&ie; force a black & white image in case of a weak video signal).</entry> | 278 | <entry>Enable the color killer (&ie; force a black & white image in case of a weak video signal).</entry> |
@@ -277,8 +283,15 @@ minimum value disables backlight compensation.</entry> | |||
277 | <entry>Selects a color effect. Possible values for | 283 | <entry>Selects a color effect. Possible values for |
278 | <constant>enum v4l2_colorfx</constant> are: | 284 | <constant>enum v4l2_colorfx</constant> are: |
279 | <constant>V4L2_COLORFX_NONE</constant> (0), | 285 | <constant>V4L2_COLORFX_NONE</constant> (0), |
280 | <constant>V4L2_COLORFX_BW</constant> (1) and | 286 | <constant>V4L2_COLORFX_BW</constant> (1), |
281 | <constant>V4L2_COLORFX_SEPIA</constant> (2).</entry> | 287 | <constant>V4L2_COLORFX_SEPIA</constant> (2), |
288 | <constant>V4L2_COLORFX_NEGATIVE</constant> (3), | ||
289 | <constant>V4L2_COLORFX_EMBOSS</constant> (4), | ||
290 | <constant>V4L2_COLORFX_SKETCH</constant> (5), | ||
291 | <constant>V4L2_COLORFX_SKY_BLUE</constant> (6), | ||
292 | <constant>V4L2_COLORFX_GRASS_GREEN</constant> (7), | ||
293 | <constant>V4L2_COLORFX_SKIN_WHITEN</constant> (8) and | ||
294 | <constant>V4L2_COLORFX_VIVID</constant> (9).</entry> | ||
282 | </row> | 295 | </row> |
283 | <row> | 296 | <row> |
284 | <entry><constant>V4L2_CID_ROTATE</constant></entry> | 297 | <entry><constant>V4L2_CID_ROTATE</constant></entry> |
@@ -1825,6 +1838,25 @@ wide-angle direction. The zoom speed unit is driver-specific.</entry> | |||
1825 | <row><entry></entry></row> | 1838 | <row><entry></entry></row> |
1826 | 1839 | ||
1827 | <row> | 1840 | <row> |
1841 | <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant> </entry> | ||
1842 | <entry>integer</entry> | ||
1843 | </row><row><entry spanname="descr">This control sets the | ||
1844 | camera's aperture to the specified value. The unit is undefined. | ||
1845 | Larger values open the iris wider, smaller values close it.</entry> | ||
1846 | </row> | ||
1847 | <row><entry></entry></row> | ||
1848 | |||
1849 | <row> | ||
1850 | <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant> </entry> | ||
1851 | <entry>integer</entry> | ||
1852 | </row><row><entry spanname="descr">This control modifies the | ||
1853 | camera's aperture by the specified amount. The unit is undefined. | ||
1854 | Positive values open the iris one step further, negative values close | ||
1855 | it one step further. This is a write-only control.</entry> | ||
1856 | </row> | ||
1857 | <row><entry></entry></row> | ||
1858 | |||
1859 | <row> | ||
1828 | <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant> </entry> | 1860 | <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant> </entry> |
1829 | <entry>boolean</entry> | 1861 | <entry>boolean</entry> |
1830 | </row><row><entry spanname="descr">Prevent video from being acquired | 1862 | </row><row><entry spanname="descr">Prevent video from being acquired |
diff --git a/Documentation/DocBook/v4l/dev-event.xml b/Documentation/DocBook/v4l/dev-event.xml new file mode 100644 index 000000000000..be5a98fb4fab --- /dev/null +++ b/Documentation/DocBook/v4l/dev-event.xml | |||
@@ -0,0 +1,31 @@ | |||
1 | <title>Event Interface</title> | ||
2 | |||
3 | <para>The V4L2 event interface provides means for user to get | ||
4 | immediately notified on certain conditions taking place on a device. | ||
5 | This might include start of frame or loss of signal events, for | ||
6 | example. | ||
7 | </para> | ||
8 | |||
9 | <para>To receive events, the events the user is interested in first must | ||
10 | be subscribed using the &VIDIOC-SUBSCRIBE-EVENT; ioctl. Once an event is | ||
11 | subscribed, the events of subscribed types are dequeueable using the | ||
12 | &VIDIOC-DQEVENT; ioctl. Events may be unsubscribed using | ||
13 | VIDIOC_UNSUBSCRIBE_EVENT ioctl. The special event type V4L2_EVENT_ALL may | ||
14 | be used to unsubscribe all the events the driver supports.</para> | ||
15 | |||
16 | <para>The event subscriptions and event queues are specific to file | ||
17 | handles. Subscribing an event on one file handle does not affect | ||
18 | other file handles. | ||
19 | </para> | ||
20 | |||
21 | <para>The information on dequeueable events is obtained by using select or | ||
22 | poll system calls on video devices. The V4L2 events use POLLPRI events on | ||
23 | poll system call and exceptions on select system call. </para> | ||
24 | |||
25 | <!-- | ||
26 | Local Variables: | ||
27 | mode: sgml | ||
28 | sgml-parent-document: "v4l2.sgml" | ||
29 | indent-tabs-mode: nil | ||
30 | End: | ||
31 | --> | ||
diff --git a/Documentation/DocBook/v4l/io.xml b/Documentation/DocBook/v4l/io.xml index e870330cbf77..d424886beda0 100644 --- a/Documentation/DocBook/v4l/io.xml +++ b/Documentation/DocBook/v4l/io.xml | |||
@@ -702,6 +702,16 @@ They can be both cleared however, then the buffer is in "dequeued" | |||
702 | state, in the application domain to say so.</entry> | 702 | state, in the application domain to say so.</entry> |
703 | </row> | 703 | </row> |
704 | <row> | 704 | <row> |
705 | <entry><constant>V4L2_BUF_FLAG_ERROR</constant></entry> | ||
706 | <entry>0x0040</entry> | ||
707 | <entry>When this flag is set, the buffer has been dequeued | ||
708 | successfully, although the data might have been corrupted. | ||
709 | This is recoverable, streaming may continue as normal and | ||
710 | the buffer may be reused normally. | ||
711 | Drivers set this flag when the <constant>VIDIOC_DQBUF</constant> | ||
712 | ioctl is called.</entry> | ||
713 | </row> | ||
714 | <row> | ||
705 | <entry><constant>V4L2_BUF_FLAG_KEYFRAME</constant></entry> | 715 | <entry><constant>V4L2_BUF_FLAG_KEYFRAME</constant></entry> |
706 | <entry>0x0008</entry> | 716 | <entry>0x0008</entry> |
707 | <entry>Drivers set or clear this flag when calling the | 717 | <entry>Drivers set or clear this flag when calling the |
@@ -918,8 +928,8 @@ order</emphasis>.</para> | |||
918 | 928 | ||
919 | <para>When the driver provides or accepts images field by field | 929 | <para>When the driver provides or accepts images field by field |
920 | rather than interleaved, it is also important applications understand | 930 | rather than interleaved, it is also important applications understand |
921 | how the fields combine to frames. We distinguish between top and | 931 | how the fields combine to frames. We distinguish between top (aka odd) and |
922 | bottom fields, the <emphasis>spatial order</emphasis>: The first line | 932 | bottom (aka even) fields, the <emphasis>spatial order</emphasis>: The first line |
923 | of the top field is the first line of an interlaced frame, the first | 933 | of the top field is the first line of an interlaced frame, the first |
924 | line of the bottom field is the second line of that frame.</para> | 934 | line of the bottom field is the second line of that frame.</para> |
925 | 935 | ||
@@ -972,12 +982,12 @@ between <constant>V4L2_FIELD_TOP</constant> and | |||
972 | <row> | 982 | <row> |
973 | <entry><constant>V4L2_FIELD_TOP</constant></entry> | 983 | <entry><constant>V4L2_FIELD_TOP</constant></entry> |
974 | <entry>2</entry> | 984 | <entry>2</entry> |
975 | <entry>Images consist of the top field only.</entry> | 985 | <entry>Images consist of the top (aka odd) field only.</entry> |
976 | </row> | 986 | </row> |
977 | <row> | 987 | <row> |
978 | <entry><constant>V4L2_FIELD_BOTTOM</constant></entry> | 988 | <entry><constant>V4L2_FIELD_BOTTOM</constant></entry> |
979 | <entry>3</entry> | 989 | <entry>3</entry> |
980 | <entry>Images consist of the bottom field only. | 990 | <entry>Images consist of the bottom (aka even) field only. |
981 | Applications may wish to prevent a device from capturing interlaced | 991 | Applications may wish to prevent a device from capturing interlaced |
982 | images because they will have "comb" or "feathering" artefacts around | 992 | images because they will have "comb" or "feathering" artefacts around |
983 | moving objects.</entry> | 993 | moving objects.</entry> |
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index 885968d6a2fc..c4ad0a8e42dc 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml | |||
@@ -792,6 +792,18 @@ http://www.thedirks.org/winnov/</ulink></para></entry> | |||
792 | <entry>'YYUV'</entry> | 792 | <entry>'YYUV'</entry> |
793 | <entry>unknown</entry> | 793 | <entry>unknown</entry> |
794 | </row> | 794 | </row> |
795 | <row id="V4L2-PIX-FMT-Y4"> | ||
796 | <entry><constant>V4L2_PIX_FMT_Y4</constant></entry> | ||
797 | <entry>'Y04 '</entry> | ||
798 | <entry>Old 4-bit greyscale format. Only the least significant 4 bits of each byte are used, | ||
799 | the other bits are set to 0.</entry> | ||
800 | </row> | ||
801 | <row id="V4L2-PIX-FMT-Y6"> | ||
802 | <entry><constant>V4L2_PIX_FMT_Y6</constant></entry> | ||
803 | <entry>'Y06 '</entry> | ||
804 | <entry>Old 6-bit greyscale format. Only the least significant 6 bits of each byte are used, | ||
805 | the other bits are set to 0.</entry> | ||
806 | </row> | ||
795 | </tbody> | 807 | </tbody> |
796 | </tgroup> | 808 | </tgroup> |
797 | </table> | 809 | </table> |
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml index 060105af49e5..9737243377a3 100644 --- a/Documentation/DocBook/v4l/v4l2.xml +++ b/Documentation/DocBook/v4l/v4l2.xml | |||
@@ -401,6 +401,7 @@ and discussions on the V4L mailing list.</revremark> | |||
401 | <section id="ttx"> &sub-dev-teletext; </section> | 401 | <section id="ttx"> &sub-dev-teletext; </section> |
402 | <section id="radio"> &sub-dev-radio; </section> | 402 | <section id="radio"> &sub-dev-radio; </section> |
403 | <section id="rds"> &sub-dev-rds; </section> | 403 | <section id="rds"> &sub-dev-rds; </section> |
404 | <section id="event"> &sub-dev-event; </section> | ||
404 | </chapter> | 405 | </chapter> |
405 | 406 | ||
406 | <chapter id="driver"> | 407 | <chapter id="driver"> |
@@ -426,6 +427,7 @@ and discussions on the V4L mailing list.</revremark> | |||
426 | &sub-cropcap; | 427 | &sub-cropcap; |
427 | &sub-dbg-g-chip-ident; | 428 | &sub-dbg-g-chip-ident; |
428 | &sub-dbg-g-register; | 429 | &sub-dbg-g-register; |
430 | &sub-dqevent; | ||
429 | &sub-encoder-cmd; | 431 | &sub-encoder-cmd; |
430 | &sub-enumaudio; | 432 | &sub-enumaudio; |
431 | &sub-enumaudioout; | 433 | &sub-enumaudioout; |
@@ -467,6 +469,7 @@ and discussions on the V4L mailing list.</revremark> | |||
467 | &sub-reqbufs; | 469 | &sub-reqbufs; |
468 | &sub-s-hw-freq-seek; | 470 | &sub-s-hw-freq-seek; |
469 | &sub-streamon; | 471 | &sub-streamon; |
472 | &sub-subscribe-event; | ||
470 | <!-- End of ioctls. --> | 473 | <!-- End of ioctls. --> |
471 | &sub-mmap; | 474 | &sub-mmap; |
472 | &sub-munmap; | 475 | &sub-munmap; |
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml index 068325940658..865b06d9e679 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml | |||
@@ -1018,6 +1018,13 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> { | |||
1018 | V4L2_COLORFX_NONE = 0, | 1018 | V4L2_COLORFX_NONE = 0, |
1019 | V4L2_COLORFX_BW = 1, | 1019 | V4L2_COLORFX_BW = 1, |
1020 | V4L2_COLORFX_SEPIA = 2, | 1020 | V4L2_COLORFX_SEPIA = 2, |
1021 | V4L2_COLORFX_NEGATIVE = 3, | ||
1022 | V4L2_COLORFX_EMBOSS = 4, | ||
1023 | V4L2_COLORFX_SKETCH = 5, | ||
1024 | V4L2_COLORFX_SKY_BLUE = 6, | ||
1025 | V4L2_COLORFX_GRASS_GREEN = 7, | ||
1026 | V4L2_COLORFX_SKIN_WHITEN = 8, | ||
1027 | V4L2_COLORFX_VIVID = 9. | ||
1021 | }; | 1028 | }; |
1022 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | 1029 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) |
1023 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | 1030 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) |
@@ -1271,6 +1278,9 @@ enum <link linkend="v4l2-exposure-auto-type">v4l2_exposure_auto_type</link> { | |||
1271 | 1278 | ||
1272 | #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) | 1279 | #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) |
1273 | 1280 | ||
1281 | #define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) | ||
1282 | #define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) | ||
1283 | |||
1274 | /* FM Modulator class control IDs */ | 1284 | /* FM Modulator class control IDs */ |
1275 | #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) | 1285 | #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) |
1276 | #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) | 1286 | #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) |
diff --git a/Documentation/DocBook/v4l/vidioc-dqevent.xml b/Documentation/DocBook/v4l/vidioc-dqevent.xml new file mode 100644 index 000000000000..4e0a7cc30812 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-dqevent.xml | |||
@@ -0,0 +1,131 @@ | |||
1 | <refentry id="vidioc-dqevent"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_DQEVENT</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_DQEVENT</refname> | ||
9 | <refpurpose>Dequeue event</refpurpose> | ||
10 | </refnamediv> | ||
11 | |||
12 | <refsynopsisdiv> | ||
13 | <funcsynopsis> | ||
14 | <funcprototype> | ||
15 | <funcdef>int <function>ioctl</function></funcdef> | ||
16 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
17 | <paramdef>int <parameter>request</parameter></paramdef> | ||
18 | <paramdef>struct v4l2_event | ||
19 | *<parameter>argp</parameter></paramdef> | ||
20 | </funcprototype> | ||
21 | </funcsynopsis> | ||
22 | </refsynopsisdiv> | ||
23 | |||
24 | <refsect1> | ||
25 | <title>Arguments</title> | ||
26 | |||
27 | <variablelist> | ||
28 | <varlistentry> | ||
29 | <term><parameter>fd</parameter></term> | ||
30 | <listitem> | ||
31 | <para>&fd;</para> | ||
32 | </listitem> | ||
33 | </varlistentry> | ||
34 | <varlistentry> | ||
35 | <term><parameter>request</parameter></term> | ||
36 | <listitem> | ||
37 | <para>VIDIOC_DQEVENT</para> | ||
38 | </listitem> | ||
39 | </varlistentry> | ||
40 | <varlistentry> | ||
41 | <term><parameter>argp</parameter></term> | ||
42 | <listitem> | ||
43 | <para></para> | ||
44 | </listitem> | ||
45 | </varlistentry> | ||
46 | </variablelist> | ||
47 | </refsect1> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | |||
52 | <para>Dequeue an event from a video device. No input is required | ||
53 | for this ioctl. All the fields of the &v4l2-event; structure are | ||
54 | filled by the driver. The file handle will also receive exceptions | ||
55 | which the application may get by e.g. using the select system | ||
56 | call.</para> | ||
57 | |||
58 | <table frame="none" pgwide="1" id="v4l2-event"> | ||
59 | <title>struct <structname>v4l2_event</structname></title> | ||
60 | <tgroup cols="4"> | ||
61 | &cs-str; | ||
62 | <tbody valign="top"> | ||
63 | <row> | ||
64 | <entry>__u32</entry> | ||
65 | <entry><structfield>type</structfield></entry> | ||
66 | <entry></entry> | ||
67 | <entry>Type of the event.</entry> | ||
68 | </row> | ||
69 | <row> | ||
70 | <entry>union</entry> | ||
71 | <entry><structfield>u</structfield></entry> | ||
72 | <entry></entry> | ||
73 | <entry></entry> | ||
74 | </row> | ||
75 | <row> | ||
76 | <entry></entry> | ||
77 | <entry>&v4l2-event-vsync;</entry> | ||
78 | <entry><structfield>vsync</structfield></entry> | ||
79 | <entry>Event data for event V4L2_EVENT_VSYNC. | ||
80 | </entry> | ||
81 | </row> | ||
82 | <row> | ||
83 | <entry></entry> | ||
84 | <entry>__u8</entry> | ||
85 | <entry><structfield>data</structfield>[64]</entry> | ||
86 | <entry>Event data. Defined by the event type. The union | ||
87 | should be used to define easily accessible type for | ||
88 | events.</entry> | ||
89 | </row> | ||
90 | <row> | ||
91 | <entry>__u32</entry> | ||
92 | <entry><structfield>pending</structfield></entry> | ||
93 | <entry></entry> | ||
94 | <entry>Number of pending events excluding this one.</entry> | ||
95 | </row> | ||
96 | <row> | ||
97 | <entry>__u32</entry> | ||
98 | <entry><structfield>sequence</structfield></entry> | ||
99 | <entry></entry> | ||
100 | <entry>Event sequence number. The sequence number is | ||
101 | incremented for every subscribed event that takes place. | ||
102 | If sequence numbers are not contiguous it means that | ||
103 | events have been lost. | ||
104 | </entry> | ||
105 | </row> | ||
106 | <row> | ||
107 | <entry>struct timespec</entry> | ||
108 | <entry><structfield>timestamp</structfield></entry> | ||
109 | <entry></entry> | ||
110 | <entry>Event timestamp.</entry> | ||
111 | </row> | ||
112 | <row> | ||
113 | <entry>__u32</entry> | ||
114 | <entry><structfield>reserved</structfield>[9]</entry> | ||
115 | <entry></entry> | ||
116 | <entry>Reserved for future extensions. Drivers must set | ||
117 | the array to zero.</entry> | ||
118 | </row> | ||
119 | </tbody> | ||
120 | </tgroup> | ||
121 | </table> | ||
122 | |||
123 | </refsect1> | ||
124 | </refentry> | ||
125 | <!-- | ||
126 | Local Variables: | ||
127 | mode: sgml | ||
128 | sgml-parent-document: "v4l2.sgml" | ||
129 | indent-tabs-mode: nil | ||
130 | End: | ||
131 | --> | ||
diff --git a/Documentation/DocBook/v4l/vidioc-enuminput.xml b/Documentation/DocBook/v4l/vidioc-enuminput.xml index 71b868e2fb8f..476fe1d2bba0 100644 --- a/Documentation/DocBook/v4l/vidioc-enuminput.xml +++ b/Documentation/DocBook/v4l/vidioc-enuminput.xml | |||
@@ -283,7 +283,7 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. | |||
283 | <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> | 283 | <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> |
284 | </row> | 284 | </row> |
285 | <row> | 285 | <row> |
286 | <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry> | 286 | <entry><constant>V4L2_IN_CAP_CUSTOM_TIMINGS</constant></entry> |
287 | <entry>0x00000002</entry> | 287 | <entry>0x00000002</entry> |
288 | <entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> | 288 | <entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> |
289 | </row> | 289 | </row> |
diff --git a/Documentation/DocBook/v4l/vidioc-qbuf.xml b/Documentation/DocBook/v4l/vidioc-qbuf.xml index b843bd7b3897..ab691ebf3b93 100644 --- a/Documentation/DocBook/v4l/vidioc-qbuf.xml +++ b/Documentation/DocBook/v4l/vidioc-qbuf.xml | |||
@@ -111,7 +111,11 @@ from the driver's outgoing queue. They just set the | |||
111 | and <structfield>reserved</structfield> | 111 | and <structfield>reserved</structfield> |
112 | fields of a &v4l2-buffer; as above, when <constant>VIDIOC_DQBUF</constant> | 112 | fields of a &v4l2-buffer; as above, when <constant>VIDIOC_DQBUF</constant> |
113 | is called with a pointer to this structure the driver fills the | 113 | is called with a pointer to this structure the driver fills the |
114 | remaining fields or returns an error code.</para> | 114 | remaining fields or returns an error code. The driver may also set |
115 | <constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield> | ||
116 | field. It indicates a non-critical (recoverable) streaming error. In such case | ||
117 | the application may continue as normal, but should be aware that data in the | ||
118 | dequeued buffer might be corrupted.</para> | ||
115 | 119 | ||
116 | <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no | 120 | <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no |
117 | buffer is in the outgoing queue. When the | 121 | buffer is in the outgoing queue. When the |
@@ -158,7 +162,13 @@ enqueue a user pointer buffer.</para> | |||
158 | <para><constant>VIDIOC_DQBUF</constant> failed due to an | 162 | <para><constant>VIDIOC_DQBUF</constant> failed due to an |
159 | internal error. Can also indicate temporary problems like signal | 163 | internal error. Can also indicate temporary problems like signal |
160 | loss. Note the driver might dequeue an (empty) buffer despite | 164 | loss. Note the driver might dequeue an (empty) buffer despite |
161 | returning an error, or even stop capturing.</para> | 165 | returning an error, or even stop capturing. Reusing such buffer may be unsafe |
166 | though and its details (e.g. <structfield>index</structfield>) may not be | ||
167 | returned either. It is recommended that drivers indicate recoverable errors | ||
168 | by setting the <constant>V4L2_BUF_FLAG_ERROR</constant> and returning 0 instead. | ||
169 | In that case the application should be able to safely reuse the buffer and | ||
170 | continue streaming. | ||
171 | </para> | ||
162 | </listitem> | 172 | </listitem> |
163 | </varlistentry> | 173 | </varlistentry> |
164 | </variablelist> | 174 | </variablelist> |
diff --git a/Documentation/DocBook/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/v4l/vidioc-queryctrl.xml index 4876ff1a1a04..8e0e055ac934 100644 --- a/Documentation/DocBook/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/v4l/vidioc-queryctrl.xml | |||
@@ -325,7 +325,7 @@ should be part of the control documentation.</entry> | |||
325 | <entry>n/a</entry> | 325 | <entry>n/a</entry> |
326 | <entry>This is not a control. When | 326 | <entry>This is not a control. When |
327 | <constant>VIDIOC_QUERYCTRL</constant> is called with a control ID | 327 | <constant>VIDIOC_QUERYCTRL</constant> is called with a control ID |
328 | equal to a control class code (see <xref linkend="ctrl-class" />), the | 328 | equal to a control class code (see <xref linkend="ctrl-class" />) + 1, the |
329 | ioctl returns the name of the control class and this control type. | 329 | ioctl returns the name of the control class and this control type. |
330 | Older drivers which do not support this feature return an | 330 | Older drivers which do not support this feature return an |
331 | &EINVAL;.</entry> | 331 | &EINVAL;.</entry> |
diff --git a/Documentation/DocBook/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/v4l/vidioc-reqbufs.xml index 1c0816372074..69800ae23348 100644 --- a/Documentation/DocBook/v4l/vidioc-reqbufs.xml +++ b/Documentation/DocBook/v4l/vidioc-reqbufs.xml | |||
@@ -61,7 +61,7 @@ fields of the <structname>v4l2_requestbuffers</structname> structure. | |||
61 | They set the <structfield>type</structfield> field to the respective | 61 | They set the <structfield>type</structfield> field to the respective |
62 | stream or buffer type, the <structfield>count</structfield> field to | 62 | stream or buffer type, the <structfield>count</structfield> field to |
63 | the desired number of buffers, <structfield>memory</structfield> | 63 | the desired number of buffers, <structfield>memory</structfield> |
64 | must be set to the requested I/O method and the reserved array | 64 | must be set to the requested I/O method and the <structfield>reserved</structfield> array |
65 | must be zeroed. When the ioctl | 65 | must be zeroed. When the ioctl |
66 | is called with a pointer to this structure the driver will attempt to allocate | 66 | is called with a pointer to this structure the driver will attempt to allocate |
67 | the requested number of buffers and it stores the actual number | 67 | the requested number of buffers and it stores the actual number |
diff --git a/Documentation/DocBook/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/v4l/vidioc-subscribe-event.xml new file mode 100644 index 000000000000..8b501791aa68 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-subscribe-event.xml | |||
@@ -0,0 +1,133 @@ | |||
1 | <refentry id="vidioc-subscribe-event"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</refname> | ||
9 | <refpurpose>Subscribe or unsubscribe event</refpurpose> | ||
10 | </refnamediv> | ||
11 | |||
12 | <refsynopsisdiv> | ||
13 | <funcsynopsis> | ||
14 | <funcprototype> | ||
15 | <funcdef>int <function>ioctl</function></funcdef> | ||
16 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
17 | <paramdef>int <parameter>request</parameter></paramdef> | ||
18 | <paramdef>struct v4l2_event_subscription | ||
19 | *<parameter>argp</parameter></paramdef> | ||
20 | </funcprototype> | ||
21 | </funcsynopsis> | ||
22 | </refsynopsisdiv> | ||
23 | |||
24 | <refsect1> | ||
25 | <title>Arguments</title> | ||
26 | |||
27 | <variablelist> | ||
28 | <varlistentry> | ||
29 | <term><parameter>fd</parameter></term> | ||
30 | <listitem> | ||
31 | <para>&fd;</para> | ||
32 | </listitem> | ||
33 | </varlistentry> | ||
34 | <varlistentry> | ||
35 | <term><parameter>request</parameter></term> | ||
36 | <listitem> | ||
37 | <para>VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</para> | ||
38 | </listitem> | ||
39 | </varlistentry> | ||
40 | <varlistentry> | ||
41 | <term><parameter>argp</parameter></term> | ||
42 | <listitem> | ||
43 | <para></para> | ||
44 | </listitem> | ||
45 | </varlistentry> | ||
46 | </variablelist> | ||
47 | </refsect1> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | |||
52 | <para>Subscribe or unsubscribe V4L2 event. Subscribed events are | ||
53 | dequeued by using the &VIDIOC-DQEVENT; ioctl.</para> | ||
54 | |||
55 | <table frame="none" pgwide="1" id="v4l2-event-subscription"> | ||
56 | <title>struct <structname>v4l2_event_subscription</structname></title> | ||
57 | <tgroup cols="3"> | ||
58 | &cs-str; | ||
59 | <tbody valign="top"> | ||
60 | <row> | ||
61 | <entry>__u32</entry> | ||
62 | <entry><structfield>type</structfield></entry> | ||
63 | <entry>Type of the event.</entry> | ||
64 | </row> | ||
65 | <row> | ||
66 | <entry>__u32</entry> | ||
67 | <entry><structfield>reserved</structfield>[7]</entry> | ||
68 | <entry>Reserved for future extensions. Drivers and applications | ||
69 | must set the array to zero.</entry> | ||
70 | </row> | ||
71 | </tbody> | ||
72 | </tgroup> | ||
73 | </table> | ||
74 | |||
75 | <table frame="none" pgwide="1" id="event-type"> | ||
76 | <title>Event Types</title> | ||
77 | <tgroup cols="3"> | ||
78 | &cs-def; | ||
79 | <tbody valign="top"> | ||
80 | <row> | ||
81 | <entry><constant>V4L2_EVENT_ALL</constant></entry> | ||
82 | <entry>0</entry> | ||
83 | <entry>All events. V4L2_EVENT_ALL is valid only for | ||
84 | VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. | ||
85 | </entry> | ||
86 | </row> | ||
87 | <row> | ||
88 | <entry><constant>V4L2_EVENT_VSYNC</constant></entry> | ||
89 | <entry>1</entry> | ||
90 | <entry>This event is triggered on the vertical sync. | ||
91 | This event has &v4l2-event-vsync; associated with it. | ||
92 | </entry> | ||
93 | </row> | ||
94 | <row> | ||
95 | <entry><constant>V4L2_EVENT_EOS</constant></entry> | ||
96 | <entry>2</entry> | ||
97 | <entry>This event is triggered when the end of a stream is reached. | ||
98 | This is typically used with MPEG decoders to report to the application | ||
99 | when the last of the MPEG stream has been decoded. | ||
100 | </entry> | ||
101 | </row> | ||
102 | <row> | ||
103 | <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> | ||
104 | <entry>0x08000000</entry> | ||
105 | <entry>Base event number for driver-private events.</entry> | ||
106 | </row> | ||
107 | </tbody> | ||
108 | </tgroup> | ||
109 | </table> | ||
110 | |||
111 | <table frame="none" pgwide="1" id="v4l2-event-vsync"> | ||
112 | <title>struct <structname>v4l2_event_vsync</structname></title> | ||
113 | <tgroup cols="3"> | ||
114 | &cs-str; | ||
115 | <tbody valign="top"> | ||
116 | <row> | ||
117 | <entry>__u8</entry> | ||
118 | <entry><structfield>field</structfield></entry> | ||
119 | <entry>The upcoming field. See &v4l2-field;.</entry> | ||
120 | </row> | ||
121 | </tbody> | ||
122 | </tgroup> | ||
123 | </table> | ||
124 | |||
125 | </refsect1> | ||
126 | </refentry> | ||
127 | <!-- | ||
128 | Local Variables: | ||
129 | mode: sgml | ||
130 | sgml-parent-document: "v4l2.sgml" | ||
131 | indent-tabs-mode: nil | ||
132 | End: | ||
133 | --> | ||