diff options
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-streamon.xml | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-streamon.xml b/Documentation/DocBook/media/v4l/vidioc-streamon.xml index 65dff55079d7..df2c63d07bac 100644 --- a/Documentation/DocBook/media/v4l/vidioc-streamon.xml +++ b/Documentation/DocBook/media/v4l/vidioc-streamon.xml | |||
@@ -52,16 +52,24 @@ | |||
52 | <para>The <constant>VIDIOC_STREAMON</constant> and | 52 | <para>The <constant>VIDIOC_STREAMON</constant> and |
53 | <constant>VIDIOC_STREAMOFF</constant> ioctl start and stop the capture | 53 | <constant>VIDIOC_STREAMOFF</constant> ioctl start and stop the capture |
54 | or output process during streaming (<link linkend="mmap">memory | 54 | or output process during streaming (<link linkend="mmap">memory |
55 | mapping</link> or <link linkend="userp">user pointer</link>) I/O.</para> | 55 | mapping</link>, <link linkend="userp">user pointer</link> or |
56 | <link linkend="dmabuf">DMABUF</link>) I/O.</para> | ||
56 | 57 | ||
57 | <para>Specifically the capture hardware is disabled and no input | 58 | <para>Capture hardware is disabled and no input |
58 | buffers are filled (if there are any empty buffers in the incoming | 59 | buffers are filled (if there are any empty buffers in the incoming |
59 | queue) until <constant>VIDIOC_STREAMON</constant> has been called. | 60 | queue) until <constant>VIDIOC_STREAMON</constant> has been called. |
60 | Accordingly the output hardware is disabled, no video signal is | 61 | Output hardware is disabled and no video signal is |
61 | produced until <constant>VIDIOC_STREAMON</constant> has been called. | 62 | produced until <constant>VIDIOC_STREAMON</constant> has been called. |
62 | The ioctl will succeed when at least one output buffer is in the | 63 | The ioctl will succeed when at least one output buffer is in the |
63 | incoming queue.</para> | 64 | incoming queue.</para> |
64 | 65 | ||
66 | <para>Memory-to-memory devices will not start until | ||
67 | <constant>VIDIOC_STREAMON</constant> has been called for both the capture | ||
68 | and output stream types.</para> | ||
69 | |||
70 | <para>If <constant>VIDIOC_STREAMON</constant> fails then any already | ||
71 | queued buffers will remain queued.</para> | ||
72 | |||
65 | <para>The <constant>VIDIOC_STREAMOFF</constant> ioctl, apart of | 73 | <para>The <constant>VIDIOC_STREAMOFF</constant> ioctl, apart of |
66 | aborting or finishing any DMA in progress, unlocks any user pointer | 74 | aborting or finishing any DMA in progress, unlocks any user pointer |
67 | buffers locked in physical memory, and it removes all buffers from the | 75 | buffers locked in physical memory, and it removes all buffers from the |
@@ -70,14 +78,22 @@ dequeued yet will be lost, likewise all images enqueued for output but | |||
70 | not transmitted yet. I/O returns to the same state as after calling | 78 | not transmitted yet. I/O returns to the same state as after calling |
71 | &VIDIOC-REQBUFS; and can be restarted accordingly.</para> | 79 | &VIDIOC-REQBUFS; and can be restarted accordingly.</para> |
72 | 80 | ||
81 | <para>If buffers have been queued with &VIDIOC-QBUF; and | ||
82 | <constant>VIDIOC_STREAMOFF</constant> is called without ever having | ||
83 | called <constant>VIDIOC_STREAMON</constant>, then those queued buffers | ||
84 | will also be removed from the incoming queue and all are returned to the | ||
85 | same state as after calling &VIDIOC-REQBUFS; and can be restarted | ||
86 | accordingly.</para> | ||
87 | |||
73 | <para>Both ioctls take a pointer to an integer, the desired buffer or | 88 | <para>Both ioctls take a pointer to an integer, the desired buffer or |
74 | stream type. This is the same as &v4l2-requestbuffers; | 89 | stream type. This is the same as &v4l2-requestbuffers; |
75 | <structfield>type</structfield>.</para> | 90 | <structfield>type</structfield>.</para> |
76 | 91 | ||
77 | <para>If <constant>VIDIOC_STREAMON</constant> is called when streaming | 92 | <para>If <constant>VIDIOC_STREAMON</constant> is called when streaming |
78 | is already in progress, or if <constant>VIDIOC_STREAMOFF</constant> is called | 93 | is already in progress, or if <constant>VIDIOC_STREAMOFF</constant> is called |
79 | when streaming is already stopped, then the ioctl does nothing and 0 is | 94 | when streaming is already stopped, then 0 is returned. Nothing happens in the |
80 | returned.</para> | 95 | case of <constant>VIDIOC_STREAMON</constant>, but <constant>VIDIOC_STREAMOFF</constant> |
96 | will return queued buffers to their starting state as mentioned above.</para> | ||
81 | 97 | ||
82 | <para>Note that applications can be preempted for unknown periods right | 98 | <para>Note that applications can be preempted for unknown periods right |
83 | before or after the <constant>VIDIOC_STREAMON</constant> or | 99 | before or after the <constant>VIDIOC_STREAMON</constant> or |
@@ -93,7 +109,7 @@ synchronize with other events.</para> | |||
93 | <varlistentry> | 109 | <varlistentry> |
94 | <term><errorcode>EINVAL</errorcode></term> | 110 | <term><errorcode>EINVAL</errorcode></term> |
95 | <listitem> | 111 | <listitem> |
96 | <para>The buffer<structfield>type</structfield> is not supported, | 112 | <para>The buffer <structfield>type</structfield> is not supported, |
97 | or no buffers have been allocated (memory mapping) or enqueued | 113 | or no buffers have been allocated (memory mapping) or enqueued |
98 | (output) yet.</para> | 114 | (output) yet.</para> |
99 | </listitem> | 115 | </listitem> |