diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-09-20 15:16:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 19:58:02 -0400 |
commit | acf92046a0a666051f9c6b4a53d874c618203173 (patch) | |
tree | 1dd78c5cc1d4bab9959492a7ebdfc9b2d1bb96f9 /Documentation/DocBook | |
parent | 58d75f4b1ce26324b4d809b18f94819843a98731 (diff) |
[media] DocBook media: fix the poll() 'no QBUF' documentation
Clarify what poll() returns if STREAMON was called but not QBUF.
Make explicit the different behavior for this scenario for
capture and output devices.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/media/v4l/func-poll.xml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/func-poll.xml b/Documentation/DocBook/media/v4l/func-poll.xml index 85cad8bff5ba..bd07104a35e9 100644 --- a/Documentation/DocBook/media/v4l/func-poll.xml +++ b/Documentation/DocBook/media/v4l/func-poll.xml | |||
@@ -44,10 +44,18 @@ Capture devices set the <constant>POLLIN</constant> and | |||
44 | flags. When the function timed out it returns a value of zero, on | 44 | flags. When the function timed out it returns a value of zero, on |
45 | failure it returns <returnvalue>-1</returnvalue> and the | 45 | failure it returns <returnvalue>-1</returnvalue> and the |
46 | <varname>errno</varname> variable is set appropriately. When the | 46 | <varname>errno</varname> variable is set appropriately. When the |
47 | application did not call &VIDIOC-QBUF; or &VIDIOC-STREAMON; yet the | 47 | application did not call &VIDIOC-STREAMON; the |
48 | <function>poll()</function> function succeeds, but sets the | 48 | <function>poll()</function> function succeeds, but sets the |
49 | <constant>POLLERR</constant> flag in the | 49 | <constant>POLLERR</constant> flag in the |
50 | <structfield>revents</structfield> field.</para> | 50 | <structfield>revents</structfield> field. When the |
51 | application has called &VIDIOC-STREAMON; for a capture device but hasn't | ||
52 | yet called &VIDIOC-QBUF;, the <function>poll()</function> function | ||
53 | succeeds and sets the <constant>POLLERR</constant> flag in the | ||
54 | <structfield>revents</structfield> field. For output devices this | ||
55 | same situation will cause <function>poll()</function> to succeed | ||
56 | as well, but it sets the <constant>POLLOUT</constant> and | ||
57 | <constant>POLLWRNORM</constant> flags in the <structfield>revents</structfield> | ||
58 | field.</para> | ||
51 | 59 | ||
52 | <para>When use of the <function>read()</function> function has | 60 | <para>When use of the <function>read()</function> function has |
53 | been negotiated and the driver does not capture yet, the | 61 | been negotiated and the driver does not capture yet, the |