vidioc-enumaudioout.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: V4L
  3. .. _VIDIOC_ENUMAUDOUT:
  4. ***********************
  5. ioctl VIDIOC_ENUMAUDOUT
  6. ***********************
  7. Name
  8. ====
  9. VIDIOC_ENUMAUDOUT - Enumerate audio outputs
  10. Synopsis
  11. ========
  12. .. c:macro:: VIDIOC_ENUMAUDOUT
  13. ``int ioctl(int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp)``
  14. Arguments
  15. =========
  16. ``fd``
  17. File descriptor returned by :c:func:`open()`.
  18. ``argp``
  19. Pointer to struct :c:type:`v4l2_audioout`.
  20. Description
  21. ===========
  22. To query the attributes of an audio output applications initialize the
  23. ``index`` field and zero out the ``reserved`` array of a struct
  24. :c:type:`v4l2_audioout` and call the ``VIDIOC_G_AUDOUT``
  25. ioctl with a pointer to this structure. Drivers fill the rest of the
  26. structure or return an ``EINVAL`` error code when the index is out of
  27. bounds. To enumerate all audio outputs applications shall begin at index
  28. zero, incrementing by one until the driver returns ``EINVAL``.
  29. .. note::
  30. Connectors on a TV card to loop back the received audio signal
  31. to a sound card are not audio outputs in this sense.
  32. See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct
  33. :c:type:`v4l2_audioout`.
  34. Return Value
  35. ============
  36. On success 0 is returned, on error -1 and the ``errno`` variable is set
  37. appropriately. The generic error codes are described at the
  38. :ref:`Generic Error Codes <gen-errors>` chapter.
  39. EINVAL
  40. The number of the audio output is out of bounds.