Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) .. c:namespace:: V4L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) .. _VIDIOC_G_AUDOUT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) **************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) **************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) ====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) VIDIOC_G_AUDOUT - VIDIOC_S_AUDOUT - Query or select the current audio output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) Synopsis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) .. c:macro:: VIDIOC_G_AUDOUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ``int ioctl(int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) .. c:macro:: VIDIOC_S_AUDOUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) ``int ioctl(int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)     File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)     Pointer to struct :c:type:`v4l2_audioout`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) To query the current audio output applications zero out the ``reserved``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) array of a struct :c:type:`v4l2_audioout` and call the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) ``VIDIOC_G_AUDOUT`` ioctl with a pointer to this structure. Drivers fill
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) the rest of the structure or return an ``EINVAL`` error code when the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) has no audio inputs, or none which combine with the current video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Audio outputs have no writable properties. Nevertheless, to select the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) current audio output applications can initialize the ``index`` field and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) ``reserved`` array (which in the future may contain writable properties)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) of a struct :c:type:`v4l2_audioout` structure and call the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) ``VIDIOC_S_AUDOUT`` ioctl. Drivers switch to the requested output or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) return the ``EINVAL`` error code when the index is out of bounds. This is a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) write-only ioctl, it does not return the current audio output attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) as ``VIDIOC_G_AUDOUT`` does.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) .. note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)    Connectors on a TV card to loop back the received audio signal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)    to a sound card are not audio outputs in this sense.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) .. c:type:: v4l2_audioout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) .. flat-table:: struct v4l2_audioout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)     :widths:       1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)       - ``index``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)       - Identifies the audio output, set by the driver or application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)       - ``name``\ [32]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)       - Name of the audio output, a NUL-terminated ASCII string, for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) 	example: "Line Out". This information is intended for the user,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) 	preferably the connector label on the device itself.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)       - ``capability``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)       - Audio capability flags, none defined yet. Drivers must set this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) 	field to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)       - ``mode``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)       - Audio mode, none defined yet. Drivers and applications (on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) 	``VIDIOC_S_AUDOUT``) must set this field to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)       - ``reserved``\ [2]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)       - Reserved for future extensions. Drivers and applications must set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) 	the array to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)     No audio outputs combine with the current video output, or the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)     number of the selected audio output is out of bounds or it does not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)     combine.