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: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) .. c:namespace:: MC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) .. _media_ioc_request_alloc:
^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 MEDIA_IOC_REQUEST_ALLOC
^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) MEDIA_IOC_REQUEST_ALLOC - Allocate a request
^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:: MEDIA_IOC_REQUEST_ALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ``int ioctl(int fd, MEDIA_IOC_REQUEST_ALLOC, int *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)     File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)     Pointer to an integer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) If the media device supports :ref:`requests <media-request-api>`, then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) this ioctl can be used to allocate a request. If it is not supported, then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) ``errno`` is set to ``ENOTTY``. A request is accessed through a file descriptor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) that is returned in ``*argp``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) If the request was successfully allocated, then the request file descriptor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) can be passed to the :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) In addition, the request can be queued by calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) :ref:`MEDIA_REQUEST_IOC_QUEUE` and re-initialized by calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) :ref:`MEDIA_REQUEST_IOC_REINIT`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Finally, the file descriptor can be :ref:`polled <request-func-poll>` to wait
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) for the request to complete.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) The request will remain allocated until all the file descriptors associated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) with it are closed by :c:func:`close()` and the driver no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) longer uses the request internally. See also
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) :ref:`here <media-request-life-time>` for more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) ENOTTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)     The driver has no support for requests.