Skip to content

Commit

Permalink
[media] DocBook: Use the generic ioctl error codes for all V4L ioctl's
Browse files Browse the repository at this point in the history
Be sure that all VIDIOC_* ioctl are using the return error macro, and
aren't specifying generic error codes internally.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 6d17249 commit 43c1daa
Show file tree
Hide file tree
Showing 35 changed files with 53 additions and 453 deletions.
19 changes: 18 additions & 1 deletion Documentation/DocBook/media/v4l/gen-errors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,24 @@
<entry>The ioctl can't be handled because the device is busy. This is
typically return while device is streaming, and an ioctl tried to
change something that would affect the stream, or would require the
usage of a hardware resource that was already allocated.</entry>
usage of a hardware resource that was already allocated. The ioctl
must not be retried without performing another action to fix the
problem first (typically: stop the stream before retrying).</entry>
</row>
<row>
<entry>EINVAL</entry>
<entry>The ioctl is not supported by the driver, actually meaning that
the required functionality is not available.</entry>
</row>
<row>
<entry>ENOMEM</entry>
<entry>There's not enough memory to handle the desired operation.</entry>
</row>
<row>
<entry>ENOSPC</entry>
<entry>On USB devices, the stream ioctl's can return this error meaning
that this request would overcommit the usb bandwidth reserved
for periodic transfers (up to 80% of the USB bandwidth).</entry>
</row>
</tbody>
</tgroup>
Expand Down
13 changes: 2 additions & 11 deletions Documentation/DocBook/media/v4l/vidioc-cropcap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,10 @@ on 22 Oct 2002 subject "Re:[V4L][patches!] Re:v4l2/kernel-2.5" -->
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The &v4l2-cropcap; <structfield>type</structfield> is
invalid or the ioctl is not supported. This is not permitted for
video capture, output and overlay devices, which must support
<constant>VIDIOC_CROPCAP</constant>.</para>
invalid. This is not permitted for video capture, output and overlay devices,
which must support <constant>VIDIOC_CROPCAP</constant>.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
11 changes: 1 addition & 10 deletions Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-ident.xml
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,9 @@ could not identify it.</entry>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The driver does not support this ioctl, or the
<structfield>match_type</structfield> is invalid.</para>
<para>The <structfield>match_type</structfield> is invalid.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
17 changes: 0 additions & 17 deletions Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,6 @@ register.</entry>
&return-value;

<variablelist>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The driver does not support this ioctl, or the kernel
was not compiled with the <constant>CONFIG_VIDEO_ADV_DEBUG</constant>
option, or the <structfield>match_type</structfield> is invalid, or the
selected chip or register does not exist.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EPERM</errorcode></term>
<listitem>
Expand All @@ -265,11 +256,3 @@ to execute these ioctls.</para>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
10 changes: 3 additions & 7 deletions Documentation/DocBook/media/v4l/vidioc-dqevent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@
</table>

</refsect1>
<refsect1>
&return-value;
</refsect1>
</refentry>
<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
11 changes: 1 addition & 10 deletions Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ Pictures</wordasword>, rather than immediately.</entry>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The driver does not support this ioctl, or the
<structfield>cmd</structfield> field is invalid.</para>
<para>The <structfield>cmd</structfield> field is invalid.</para>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -194,11 +193,3 @@ the encoder was not running.</para>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
11 changes: 0 additions & 11 deletions Documentation/DocBook/media/v4l/vidioc-enum-frameintervals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,6 @@ enumerated.</entry>

<refsect1>
&return-value;

<para>See the description section above for a list of return
values that <varname>errno</varname> can have.</para>
</refsect1>

</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
11 changes: 0 additions & 11 deletions Documentation/DocBook/media/v4l/vidioc-enum-framesizes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,5 @@ application should zero out all members except for the

<refsect1>
&return-value;

<para>See the description section above for a list of return
values that <varname>errno</varname> can have.</para>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
12 changes: 1 addition & 11 deletions Documentation/DocBook/media/v4l/vidioc-enumaudio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,9 @@ until the driver returns <errorcode>EINVAL</errorcode>.</para>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The number of the audio input is out of bounds, or
there are no audio inputs at all and this ioctl is not
supported.</para>
<para>The number of the audio input is out of bounds.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
12 changes: 1 addition & 11 deletions Documentation/DocBook/media/v4l/vidioc-enumaudioout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,9 @@ signal to a sound card are not audio outputs in this sense.</para>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The number of the audio output is out of bounds, or
there are no audio outputs at all and this ioctl is not
supported.</para>
<para>The number of the audio output is out of bounds.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
18 changes: 1 addition & 17 deletions Documentation/DocBook/media/v4l/vidioc-g-audio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,25 +164,9 @@ tuner.</entry>
<listitem>
<para>No audio inputs combine with the current video input,
or the number of the selected audio input is out of bounds or it does
not combine, or there are no audio inputs at all and the ioctl is not
supported.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EBUSY</errorcode></term>
<listitem>
<para>I/O is in progress, the input cannot be
switched.</para>
not combine.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
18 changes: 1 addition & 17 deletions Documentation/DocBook/media/v4l/vidioc-g-audioout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,25 +130,9 @@ applications must set the array to zero.</entry>
<listitem>
<para>No audio outputs combine with the current video
output, or the number of the selected audio output is out of bounds or
it does not combine, or there are no audio outputs at all and the
ioctl is not supported.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EBUSY</errorcode></term>
<listitem>
<para>I/O is in progress, the output cannot be
switched.</para>
it does not combine.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
17 changes: 0 additions & 17 deletions Documentation/DocBook/media/v4l/vidioc-g-crop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,5 @@ for &v4l2-cropcap; <structfield>bounds</structfield> is used.</entry>

<refsect1>
&return-value;

<variablelist>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>Cropping is not supported.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
12 changes: 3 additions & 9 deletions Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,8 @@ If the preset is not supported, it returns an &EINVAL; </para>
</tbody>
</tgroup>
</table>

</refsect1>
<refsect1>
&return-value;
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
11 changes: 3 additions & 8 deletions Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,7 @@ bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_H
</tgroup>
</table>
</refsect1>
<refsect1>
&return-value;
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
17 changes: 0 additions & 17 deletions Documentation/DocBook/media/v4l/vidioc-g-enc-index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,5 @@ this mask to obtain the picture coding type.</entry>

<refsect1>
&return-value;

<variablelist>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The driver does not support this ioctl.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
19 changes: 1 addition & 18 deletions Documentation/DocBook/media/v4l/vidioc-g-fbuf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -445,29 +445,12 @@ by a privileged user to negotiate the parameters for a destructive
overlay.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EBUSY</errorcode></term>
<listitem>
<para>The framebuffer parameters cannot be changed at this
time because overlay is already enabled, or capturing is enabled
and the hardware cannot capture and overlay simultaneously.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EINVAL</errorcode></term>
<listitem>
<para>The ioctl is not supported or the
<constant>VIDIOC_S_FBUF</constant> parameters are unsuitable.</para>
<para>The <constant>VIDIOC_S_FBUF</constant> parameters are unsuitable.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil
End:
-->
Loading

0 comments on commit 43c1daa

Please sign in to comment.