1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/userspace-api/media/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
12 **********************
13 ioctl VIDIOC_ENUMAUDIO
14 **********************
19 VIDIOC_ENUMAUDIO - Enumerate audio inputs
25 .. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp )
26 :name: VIDIOC_ENUMAUDIO
33 File descriptor returned by :ref:`open() <func-open>`.
36 Pointer to struct :c:type:`v4l2_audio`.
42 To query the attributes of an audio input applications initialize the
43 ``index`` field and zero out the ``reserved`` array of a struct
44 :c:type:`v4l2_audio` and call the :ref:`VIDIOC_ENUMAUDIO`
45 ioctl with a pointer to this structure. Drivers fill the rest of the
46 structure or return an ``EINVAL`` error code when the index is out of
47 bounds. To enumerate all audio inputs applications shall begin at index
48 zero, incrementing by one until the driver returns ``EINVAL``.
50 See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct
57 On success 0 is returned, on error -1 and the ``errno`` variable is set
58 appropriately. The generic error codes are described at the
59 :ref:`Generic Error Codes <gen-errors>` chapter.
62 The number of the audio input is out of bounds.