| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 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/media/uapi/fdl-appendix.rst. |
| 7 | .. |
| 8 | .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections |
| 9 | |
| 10 | .. _VIDIOC_ENUMAUDOUT: |
| 11 | |
| 12 | *********************** |
| 13 | ioctl VIDIOC_ENUMAUDOUT |
| 14 | *********************** |
| 15 | |
| 16 | Name |
| 17 | ==== |
| 18 | |
| 19 | VIDIOC_ENUMAUDOUT - Enumerate audio outputs |
| 20 | |
| 21 | |
| 22 | Synopsis |
| 23 | ======== |
| 24 | |
| 25 | .. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp ) |
| 26 | :name: VIDIOC_ENUMAUDOUT |
| 27 | |
| 28 | |
| 29 | Arguments |
| 30 | ========= |
| 31 | |
| 32 | ``fd`` |
| 33 | File descriptor returned by :ref:`open() <func-open>`. |
| 34 | |
| 35 | ``argp`` |
| 36 | Pointer to struct :c:type:`v4l2_audioout`. |
| 37 | |
| 38 | |
| 39 | Description |
| 40 | =========== |
| 41 | |
| 42 | To query the attributes of an audio output applications initialize the |
| 43 | ``index`` field and zero out the ``reserved`` array of a struct |
| 44 | :c:type:`v4l2_audioout` and call the ``VIDIOC_G_AUDOUT`` |
| 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 outputs applications shall begin at index |
| 48 | zero, incrementing by one until the driver returns ``EINVAL``. |
| 49 | |
| 50 | .. note:: |
| 51 | |
| 52 | Connectors on a TV card to loop back the received audio signal |
| 53 | to a sound card are not audio outputs in this sense. |
| 54 | |
| 55 | See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct |
| 56 | :c:type:`v4l2_audioout`. |
| 57 | |
| 58 | |
| 59 | Return Value |
| 60 | ============ |
| 61 | |
| 62 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 63 | appropriately. The generic error codes are described at the |
| 64 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 65 | |
| 66 | EINVAL |
| 67 | The number of the audio output is out of bounds. |