Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: V4L
0003 
0004 .. _VIDIOC_ENUMAUDIO:
0005 
0006 **********************
0007 ioctl VIDIOC_ENUMAUDIO
0008 **********************
0009 
0010 Name
0011 ====
0012 
0013 VIDIOC_ENUMAUDIO - Enumerate audio inputs
0014 
0015 Synopsis
0016 ========
0017 
0018 .. c:macro:: VIDIOC_ENUMAUDIO
0019 
0020 ``int ioctl(int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp)``
0021 
0022 Arguments
0023 =========
0024 
0025 ``fd``
0026     File descriptor returned by :c:func:`open()`.
0027 
0028 ``argp``
0029     Pointer to struct :c:type:`v4l2_audio`.
0030 
0031 Description
0032 ===========
0033 
0034 To query the attributes of an audio input applications initialize the
0035 ``index`` field and zero out the ``reserved`` array of a struct
0036 :c:type:`v4l2_audio` and call the :ref:`VIDIOC_ENUMAUDIO`
0037 ioctl with a pointer to this structure. Drivers fill the rest of the
0038 structure or return an ``EINVAL`` error code when the index is out of
0039 bounds. To enumerate all audio inputs applications shall begin at index
0040 zero, incrementing by one until the driver returns ``EINVAL``.
0041 
0042 See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct
0043 :c:type:`v4l2_audio`.
0044 
0045 Return Value
0046 ============
0047 
0048 On success 0 is returned, on error -1 and the ``errno`` variable is set
0049 appropriately. The generic error codes are described at the
0050 :ref:`Generic Error Codes <gen-errors>` chapter.
0051 
0052 EINVAL
0053     The number of the audio input is out of bounds.