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_LOG_ADDRS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) .. _CEC_ADAP_G_LOG_ADDRS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) .. _CEC_ADAP_S_LOG_ADDRS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) ****************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) ioctls CEC_ADAP_G_LOG_ADDRS and CEC_ADAP_S_LOG_ADDRS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) ****************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) ====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) Synopsis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) .. c:macro:: CEC_ADAP_G_LOG_ADDRS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) ``int ioctl(int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) .. c:macro:: CEC_ADAP_S_LOG_ADDRS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) ``int ioctl(int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32)     File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)     Pointer to struct :c:type:`cec_log_addrs`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) To query the current CEC logical addresses, applications call
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) :ref:`ioctl CEC_ADAP_G_LOG_ADDRS <CEC_ADAP_G_LOG_ADDRS>` with a pointer to a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) struct :c:type:`cec_log_addrs` where the driver stores the logical addresses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) To set new logical addresses, applications fill in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) struct :c:type:`cec_log_addrs` and call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) with a pointer to this struct. The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) is only available if ``CEC_CAP_LOG_ADDRS`` is set (the ``ENOTTY`` error code is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) returned otherwise). The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) can only be called by a file descriptor in initiator mode (see :ref:`CEC_S_MODE`), if not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) the ``EBUSY`` error code will be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) To clear existing logical addresses set ``num_log_addrs`` to 0. All other fields
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) will be ignored in that case. The adapter will go to the unconfigured state and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) ``cec_version``, ``vendor_id`` and ``osd_name`` fields are all reset to their default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) values (CEC version 2.0, no vendor ID and an empty OSD name).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) If the physical address is valid (see :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) then this ioctl will block until all requested logical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) addresses have been claimed. If the file descriptor is in non-blocking mode then it will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) not wait for the logical addresses to be claimed, instead it just returns 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) A :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>` event is sent when the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) logical addresses are claimed or cleared.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) Attempting to call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) logical address types are already defined will return with error ``EBUSY``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) .. c:type:: cec_log_addrs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) .. tabularcolumns:: |p{1.0cm}|p{8.0cm}|p{7.5cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) .. cssclass:: longtable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) .. flat-table:: struct cec_log_addrs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)     :widths:       1 1 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)       - ``log_addr[CEC_MAX_LOG_ADDRS]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)       - The actual logical addresses that were claimed. This is set by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	driver. If no logical address could be claimed, then it is set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	``CEC_LOG_ADDR_INVALID``. If this adapter is Unregistered, then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	``log_addr[0]`` is set to 0xf and all others to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	``CEC_LOG_ADDR_INVALID``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)     * - __u16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)       - ``log_addr_mask``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)       - The bitmask of all logical addresses this adapter has claimed. If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	this adapter is Unregistered then ``log_addr_mask`` sets bit 15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	and clears all other bits. If this adapter is not configured at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	all, then ``log_addr_mask`` is set to 0. Set by the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)       - ``cec_version``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)       - The CEC version that this adapter shall use. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	:ref:`cec-versions`. Used to implement the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	``CEC_MSG_CEC_VERSION`` and ``CEC_MSG_REPORT_FEATURES`` messages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	Note that :ref:`CEC_OP_CEC_VERSION_1_3A <CEC-OP-CEC-VERSION-1-3A>` is not allowed by the CEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	framework.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)       - ``num_log_addrs``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)       - Number of logical addresses to set up. Must be ≤
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	``available_log_addrs`` as returned by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	:ref:`CEC_ADAP_G_CAPS`. All arrays in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	this structure are only filled up to index
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	``available_log_addrs``-1. The remaining array elements will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	ignored. Note that the CEC 2.0 standard allows for a maximum of 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	logical addresses, although some hardware has support for more.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	``CEC_MAX_LOG_ADDRS`` is 4. The driver will return the actual
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	number of logical addresses it could claim, which may be less than
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	what was requested. If this field is set to 0, then the CEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	adapter shall clear all claimed logical addresses and all other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	fields will be ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)       - ``vendor_id``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)       - The vendor ID is a 24-bit number that identifies the specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	vendor or entity. Based on this ID vendor specific commands may be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	defined. If you do not want a vendor ID then set it to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	``CEC_VENDOR_ID_NONE``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)       - ``flags``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)       - Flags. See :ref:`cec-log-addrs-flags` for a list of available flags.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)     * - char
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)       - ``osd_name[15]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)       - The On-Screen Display name as is returned by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	``CEC_MSG_SET_OSD_NAME`` message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)       - ``primary_device_type[CEC_MAX_LOG_ADDRS]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)       - Primary device type for each logical address. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	:ref:`cec-prim-dev-types` for possible types.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)       - ``log_addr_type[CEC_MAX_LOG_ADDRS]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)       - Logical address types. See :ref:`cec-log-addr-types` for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	possible types. The driver will update this with the actual
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	logical address type that it claimed (e.g. it may have to fallback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	to :ref:`CEC_LOG_ADDR_TYPE_UNREGISTERED <CEC-LOG-ADDR-TYPE-UNREGISTERED>`).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)       - ``all_device_types[CEC_MAX_LOG_ADDRS]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)       - CEC 2.0 specific: the bit mask of all device types. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	:ref:`cec-all-dev-types-flags`. It is used in the CEC 2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	``CEC_MSG_REPORT_FEATURES`` message. For CEC 1.4 you can either leave
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	this field to 0, or fill it in according to the CEC 2.0 guidelines to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	give the CEC framework more information about the device type, even
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	though the framework won't use it directly in the CEC message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)       - ``features[CEC_MAX_LOG_ADDRS][12]``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)       - Features for each logical address. It is used in the CEC 2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	``CEC_MSG_REPORT_FEATURES`` message. The 12 bytes include both the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	RC Profile and the Device Features. For CEC 1.4 you can either leave
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)         this field to all 0, or fill it in according to the CEC 2.0 guidelines to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)         give the CEC framework more information about the device type, even
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)         though the framework won't use it directly in the CEC message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) .. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) .. _cec-log-addrs-flags:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) .. flat-table:: Flags for struct cec_log_addrs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)     :widths:       3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)     * .. _`CEC-LOG-ADDRS-FL-ALLOW-UNREG-FALLBACK`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)       - ``CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)       - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)       - By default if no logical address of the requested type can be claimed, then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	it will go back to the unconfigured state. If this flag is set, then it will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	fallback to the Unregistered logical address. Note that if the Unregistered
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	logical address was explicitly requested, then this flag has no effect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)     * .. _`CEC-LOG-ADDRS-FL-ALLOW-RC-PASSTHRU`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)       - ``CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)       - 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)       - By default the ``CEC_MSG_USER_CONTROL_PRESSED`` and ``CEC_MSG_USER_CONTROL_RELEASED``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)         messages are only passed on to the follower(s), if any. If this flag is set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	then these messages are also passed on to the remote control input subsystem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	and will appear as keystrokes. This features needs to be enabled explicitly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	If CEC is used to enter e.g. passwords, then you may not want to enable this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	to avoid trivial snooping of the keystrokes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)     * .. _`CEC-LOG-ADDRS-FL-CDC-ONLY`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)       - ``CEC_LOG_ADDRS_FL_CDC_ONLY``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)       - 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)       - If this flag is set, then the device is CDC-Only. CDC-Only CEC devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	are CEC devices that can only handle CDC messages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	All other messages are ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) .. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) .. _cec-versions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) .. flat-table:: CEC Versions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)     :widths:       3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)     * .. _`CEC-OP-CEC-VERSION-1-3A`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)       - ``CEC_OP_CEC_VERSION_1_3A``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)       - 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)       - CEC version according to the HDMI 1.3a standard.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)     * .. _`CEC-OP-CEC-VERSION-1-4B`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)       - ``CEC_OP_CEC_VERSION_1_4B``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)       - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)       - CEC version according to the HDMI 1.4b standard.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)     * .. _`CEC-OP-CEC-VERSION-2-0`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)       - ``CEC_OP_CEC_VERSION_2_0``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)       - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)       - CEC version according to the HDMI 2.0 standard.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) .. _cec-prim-dev-types:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) .. flat-table:: CEC Primary Device Types
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)     :widths:       3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)     * .. _`CEC-OP-PRIM-DEVTYPE-TV`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)       - ``CEC_OP_PRIM_DEVTYPE_TV``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)       - 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)       - Use for a TV.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)     * .. _`CEC-OP-PRIM-DEVTYPE-RECORD`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)       - ``CEC_OP_PRIM_DEVTYPE_RECORD``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)       - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)       - Use for a recording device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)     * .. _`CEC-OP-PRIM-DEVTYPE-TUNER`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)       - ``CEC_OP_PRIM_DEVTYPE_TUNER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)       - 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)       - Use for a device with a tuner.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)     * .. _`CEC-OP-PRIM-DEVTYPE-PLAYBACK`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)       - ``CEC_OP_PRIM_DEVTYPE_PLAYBACK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)       - 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)       - Use for a playback device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)     * .. _`CEC-OP-PRIM-DEVTYPE-AUDIOSYSTEM`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)       - ``CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)       - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)       - Use for an audio system (e.g. an audio/video receiver).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)     * .. _`CEC-OP-PRIM-DEVTYPE-SWITCH`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)       - ``CEC_OP_PRIM_DEVTYPE_SWITCH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)       - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)       - Use for a CEC switch.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)     * .. _`CEC-OP-PRIM-DEVTYPE-VIDEOPROC`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)       - ``CEC_OP_PRIM_DEVTYPE_VIDEOPROC``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)       - 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257)       - Use for a video processor device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) .. _cec-log-addr-types:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) .. flat-table:: CEC Logical Address Types
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)     :widths:       3 1 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)     * .. _`CEC-LOG-ADDR-TYPE-TV`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)       - ``CEC_LOG_ADDR_TYPE_TV``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)       - 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)       - Use for a TV.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)     * .. _`CEC-LOG-ADDR-TYPE-RECORD`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)       - ``CEC_LOG_ADDR_TYPE_RECORD``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)       - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)       - Use for a recording device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)     * .. _`CEC-LOG-ADDR-TYPE-TUNER`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280)       - ``CEC_LOG_ADDR_TYPE_TUNER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)       - 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)       - Use for a tuner device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)     * .. _`CEC-LOG-ADDR-TYPE-PLAYBACK`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285)       - ``CEC_LOG_ADDR_TYPE_PLAYBACK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)       - 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287)       - Use for a playback device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)     * .. _`CEC-LOG-ADDR-TYPE-AUDIOSYSTEM`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)       - ``CEC_LOG_ADDR_TYPE_AUDIOSYSTEM``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)       - 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)       - Use for an audio system device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293)     * .. _`CEC-LOG-ADDR-TYPE-SPECIFIC`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)       - ``CEC_LOG_ADDR_TYPE_SPECIFIC``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)       - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)       - Use for a second TV or for a video processor device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298)     * .. _`CEC-LOG-ADDR-TYPE-UNREGISTERED`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)       - ``CEC_LOG_ADDR_TYPE_UNREGISTERED``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301)       - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302)       - Use this if you just want to remain unregistered. Used for pure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	CEC switches or CDC-only devices (CDC: Capability Discovery and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	Control).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) .. _cec-all-dev-types-flags:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) .. flat-table:: CEC All Device Types Flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314)     :widths:       3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)     * .. _`CEC-OP-ALL-DEVTYPE-TV`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318)       - ``CEC_OP_ALL_DEVTYPE_TV``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)       - 0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320)       - This supports the TV type.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321)     * .. _`CEC-OP-ALL-DEVTYPE-RECORD`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)       - ``CEC_OP_ALL_DEVTYPE_RECORD``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324)       - 0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)       - This supports the Recording type.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326)     * .. _`CEC-OP-ALL-DEVTYPE-TUNER`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)       - ``CEC_OP_ALL_DEVTYPE_TUNER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329)       - 0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330)       - This supports the Tuner type.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)     * .. _`CEC-OP-ALL-DEVTYPE-PLAYBACK`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333)       - ``CEC_OP_ALL_DEVTYPE_PLAYBACK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334)       - 0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)       - This supports the Playback type.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336)     * .. _`CEC-OP-ALL-DEVTYPE-AUDIOSYSTEM`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)       - ``CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)       - 0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340)       - This supports the Audio System type.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)     * .. _`CEC-OP-ALL-DEVTYPE-SWITCH`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)       - ``CEC_OP_ALL_DEVTYPE_SWITCH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)       - 0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)       - This supports the CEC Switch or Video Processing type.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` can return the following
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) error codes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) ENOTTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359)     The ``CEC_CAP_LOG_ADDRS`` capability wasn't set, so this ioctl is not supported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) EBUSY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362)     The CEC adapter is currently configuring itself, or it is already configured and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)     ``num_log_addrs`` is non-zero, or another filehandle is in exclusive follower or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364)     initiator mode, or the filehandle is in mode ``CEC_MODE_NO_INITIATOR``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367)     The contents of struct :c:type:`cec_log_addrs` is invalid.