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:: CEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) .. _CEC_ADAP_G_CAPS:
^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 CEC_ADAP_G_CAPS
^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) CEC_ADAP_G_CAPS - Query device capabilities
^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:: CEC_ADAP_G_CAPS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) ``int ioctl(int fd, CEC_ADAP_G_CAPS, struct cec_caps *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) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) device information, applications call the ioctl with a pointer to a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) struct :c:type:`cec_caps`. The driver fills the structure and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) returns the information to the application. The ioctl never fails.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) .. c:type:: cec_caps
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) .. flat-table:: struct cec_caps
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)     :widths:       1 1 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)     * - char
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)       - ``driver[32]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)       - The name of the cec adapter driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)     * - char
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)       - ``name[32]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)       - The name of this CEC adapter. The combination ``driver`` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	``name`` must be unique.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)       - ``available_log_addrs``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)       - The maximum number of logical addresses that can be configured.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)       - ``capabilities``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59)       - The capabilities of the CEC adapter, see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	:ref:`cec-capabilities`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)       - ``version``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)       - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	macro.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) .. _cec-capabilities:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) .. flat-table:: CEC Capabilities Flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)     :widths:       3 1 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)     * .. _`CEC-CAP-PHYS-ADDR`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)       - ``CEC_CAP_PHYS_ADDR``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78)       - 0x00000001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)       - Userspace has to configure the physical address by calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	:ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	this capability isn't set, then setting the physical address is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	handled by the kernel whenever the EDID is set (for an HDMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	receiver) or read (for an HDMI transmitter).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)     * .. _`CEC-CAP-LOG-ADDRS`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)       - ``CEC_CAP_LOG_ADDRS``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)       - 0x00000002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)       - Userspace has to configure the logical addresses by calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	:ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	this capability isn't set, then the kernel will have configured
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)     * .. _`CEC-CAP-TRANSMIT`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)       - ``CEC_CAP_TRANSMIT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)       - 0x00000004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)       - Userspace can transmit CEC messages by calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	:ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	userspace can be a follower as well, since being able to transmit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	messages is a prerequisite of becoming a follower. If this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	capability isn't set, then the kernel will handle all CEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	transmits and process all CEC messages it receives.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)     * .. _`CEC-CAP-PASSTHROUGH`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)       - ``CEC_CAP_PASSTHROUGH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)       - 0x00000008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)       - Userspace can use the passthrough mode by calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	:ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)     * .. _`CEC-CAP-RC`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)       - ``CEC_CAP_RC``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)       - 0x00000010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)       - This adapter supports the remote control protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)     * .. _`CEC-CAP-MONITOR-ALL`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)       - ``CEC_CAP_MONITOR_ALL``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)       - 0x00000020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)       - The CEC hardware can monitor all messages, not just directed and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	broadcast messages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)     * .. _`CEC-CAP-NEEDS-HPD`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)       - ``CEC_CAP_NEEDS_HPD``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)       - 0x00000040
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)       - The CEC hardware is only active if the HDMI Hotplug Detect pin is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)         high. This makes it impossible to use CEC to wake up displays that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	set the HPD pin low when in standby mode, but keep the CEC bus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	alive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)     * .. _`CEC-CAP-MONITOR-PIN`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)       - ``CEC_CAP_MONITOR_PIN``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)       - 0x00000080
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)       - The CEC hardware can monitor CEC pin changes from low to high voltage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)         and vice versa. When in pin monitoring mode the application will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	receive ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)     * .. _`CEC-CAP-CONNECTOR-INFO`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)       - ``CEC_CAP_CONNECTOR_INFO``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)       - 0x00000100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)       - If this capability is set, then :ref:`CEC_ADAP_G_CONNECTOR_INFO` can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)         be used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) :ref:`Generic Error Codes <gen-errors>` chapter.