1 .. SPDX-License-Identifier: GFDL-1.1-no-invari 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 .. c:namespace:: CEC 2 .. c:namespace:: CEC 3 3 4 .. _CEC_ADAP_G_CAPS: 4 .. _CEC_ADAP_G_CAPS: 5 5 6 ********************* 6 ********************* 7 ioctl CEC_ADAP_G_CAPS 7 ioctl CEC_ADAP_G_CAPS 8 ********************* 8 ********************* 9 9 10 Name 10 Name 11 ==== 11 ==== 12 12 13 CEC_ADAP_G_CAPS - Query device capabilities 13 CEC_ADAP_G_CAPS - Query device capabilities 14 14 15 Synopsis 15 Synopsis 16 ======== 16 ======== 17 17 18 .. c:macro:: CEC_ADAP_G_CAPS 18 .. c:macro:: CEC_ADAP_G_CAPS 19 19 20 ``int ioctl(int fd, CEC_ADAP_G_CAPS, struct ce 20 ``int ioctl(int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp)`` 21 21 22 Arguments 22 Arguments 23 ========= 23 ========= 24 24 25 ``fd`` 25 ``fd`` 26 File descriptor returned by :c:func:`open( 26 File descriptor returned by :c:func:`open()`. 27 27 28 ``argp`` 28 ``argp`` 29 29 30 Description 30 Description 31 =========== 31 =========== 32 32 33 All cec devices must support :ref:`ioctl CEC_A 33 All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query 34 device information, applications call the ioct 34 device information, applications call the ioctl with a pointer to a 35 struct :c:type:`cec_caps`. The driver fills th 35 struct :c:type:`cec_caps`. The driver fills the structure and 36 returns the information to the application. Th 36 returns the information to the application. The ioctl never fails. 37 37 38 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.6c 38 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.6cm}| 39 39 40 .. c:type:: cec_caps 40 .. c:type:: cec_caps 41 41 42 .. flat-table:: struct cec_caps 42 .. flat-table:: struct cec_caps 43 :header-rows: 0 43 :header-rows: 0 44 :stub-columns: 0 44 :stub-columns: 0 45 :widths: 1 1 16 45 :widths: 1 1 16 46 46 47 * - char 47 * - char 48 - ``driver[32]`` 48 - ``driver[32]`` 49 - The name of the cec adapter driver. 49 - The name of the cec adapter driver. 50 * - char 50 * - char 51 - ``name[32]`` 51 - ``name[32]`` 52 - The name of this CEC adapter. The comb 52 - The name of this CEC adapter. The combination ``driver`` and 53 ``name`` must be unique. 53 ``name`` must be unique. 54 * - __u32 54 * - __u32 55 - ``available_log_addrs`` 55 - ``available_log_addrs`` 56 - The maximum number of logical addresse 56 - The maximum number of logical addresses that can be configured. 57 * - __u32 57 * - __u32 58 - ``capabilities`` 58 - ``capabilities`` 59 - The capabilities of the CEC adapter, s 59 - The capabilities of the CEC adapter, see 60 :ref:`cec-capabilities`. 60 :ref:`cec-capabilities`. 61 * - __u32 61 * - __u32 62 - ``version`` 62 - ``version`` 63 - CEC Framework API version, formatted w 63 - CEC Framework API version, formatted with the ``KERNEL_VERSION()`` 64 macro. 64 macro. 65 65 66 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.4c 66 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.4cm}| 67 67 68 .. _cec-capabilities: 68 .. _cec-capabilities: 69 69 70 .. flat-table:: CEC Capabilities Flags 70 .. flat-table:: CEC Capabilities Flags 71 :header-rows: 0 71 :header-rows: 0 72 :stub-columns: 0 72 :stub-columns: 0 73 :widths: 3 1 8 73 :widths: 3 1 8 74 74 75 * .. _`CEC-CAP-PHYS-ADDR`: 75 * .. _`CEC-CAP-PHYS-ADDR`: 76 76 77 - ``CEC_CAP_PHYS_ADDR`` 77 - ``CEC_CAP_PHYS_ADDR`` 78 - 0x00000001 78 - 0x00000001 79 - Userspace has to configure the physica 79 - Userspace has to configure the physical address by calling 80 :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ 80 :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If 81 this capability isn't set, then settin 81 this capability isn't set, then setting the physical address is 82 handled by the kernel whenever the EDI 82 handled by the kernel whenever the EDID is set (for an HDMI 83 receiver) or read (for an HDMI transmi 83 receiver) or read (for an HDMI transmitter). 84 * .. _`CEC-CAP-LOG-ADDRS`: 84 * .. _`CEC-CAP-LOG-ADDRS`: 85 85 86 - ``CEC_CAP_LOG_ADDRS`` 86 - ``CEC_CAP_LOG_ADDRS`` 87 - 0x00000002 87 - 0x00000002 88 - Userspace has to configure the logical 88 - Userspace has to configure the logical addresses by calling 89 :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ 89 :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If 90 this capability isn't set, then the ke 90 this capability isn't set, then the kernel will have configured 91 this. 91 this. 92 * .. _`CEC-CAP-TRANSMIT`: 92 * .. _`CEC-CAP-TRANSMIT`: 93 93 94 - ``CEC_CAP_TRANSMIT`` 94 - ``CEC_CAP_TRANSMIT`` 95 - 0x00000004 95 - 0x00000004 96 - Userspace can transmit CEC messages by 96 - Userspace can transmit CEC messages by calling 97 :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT 97 :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that 98 userspace can be a follower as well, s 98 userspace can be a follower as well, since being able to transmit 99 messages is a prerequisite of becoming 99 messages is a prerequisite of becoming a follower. If this 100 capability isn't set, then the kernel 100 capability isn't set, then the kernel will handle all CEC 101 transmits and process all CEC messages 101 transmits and process all CEC messages it receives. 102 * .. _`CEC-CAP-PASSTHROUGH`: 102 * .. _`CEC-CAP-PASSTHROUGH`: 103 103 104 - ``CEC_CAP_PASSTHROUGH`` 104 - ``CEC_CAP_PASSTHROUGH`` 105 - 0x00000008 105 - 0x00000008 106 - Userspace can use the passthrough mode 106 - Userspace can use the passthrough mode by calling 107 :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`. 107 :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`. 108 * .. _`CEC-CAP-RC`: 108 * .. _`CEC-CAP-RC`: 109 109 110 - ``CEC_CAP_RC`` 110 - ``CEC_CAP_RC`` 111 - 0x00000010 111 - 0x00000010 112 - This adapter supports the remote contr 112 - This adapter supports the remote control protocol. 113 * .. _`CEC-CAP-MONITOR-ALL`: 113 * .. _`CEC-CAP-MONITOR-ALL`: 114 114 115 - ``CEC_CAP_MONITOR_ALL`` 115 - ``CEC_CAP_MONITOR_ALL`` 116 - 0x00000020 116 - 0x00000020 117 - The CEC hardware can monitor all messa 117 - The CEC hardware can monitor all messages, not just directed and 118 broadcast messages. 118 broadcast messages. 119 * .. _`CEC-CAP-NEEDS-HPD`: 119 * .. _`CEC-CAP-NEEDS-HPD`: 120 120 121 - ``CEC_CAP_NEEDS_HPD`` 121 - ``CEC_CAP_NEEDS_HPD`` 122 - 0x00000040 122 - 0x00000040 123 - The CEC hardware is only active if the 123 - The CEC hardware is only active if the HDMI Hotplug Detect pin is 124 high. This makes it impossible to use 124 high. This makes it impossible to use CEC to wake up displays that 125 set the HPD pin low when in standby mo 125 set the HPD pin low when in standby mode, but keep the CEC bus 126 alive. 126 alive. 127 * .. _`CEC-CAP-MONITOR-PIN`: 127 * .. _`CEC-CAP-MONITOR-PIN`: 128 128 129 - ``CEC_CAP_MONITOR_PIN`` 129 - ``CEC_CAP_MONITOR_PIN`` 130 - 0x00000080 130 - 0x00000080 131 - The CEC hardware can monitor CEC pin c 131 - The CEC hardware can monitor CEC pin changes from low to high voltage 132 and vice versa. When in pin monitoring 132 and vice versa. When in pin monitoring mode the application will 133 receive ``CEC_EVENT_PIN_CEC_LOW`` and 133 receive ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events. 134 * .. _`CEC-CAP-CONNECTOR-INFO`: 134 * .. _`CEC-CAP-CONNECTOR-INFO`: 135 135 136 - ``CEC_CAP_CONNECTOR_INFO`` 136 - ``CEC_CAP_CONNECTOR_INFO`` 137 - 0x00000100 137 - 0x00000100 138 - If this capability is set, then :ref:` 138 - If this capability is set, then :ref:`CEC_ADAP_G_CONNECTOR_INFO` can 139 be used. 139 be used. 140 * .. _`CEC-CAP-REPLY-VENDOR-ID`: 140 * .. _`CEC-CAP-REPLY-VENDOR-ID`: 141 141 142 - ``CEC_CAP_REPLY_VENDOR_ID`` 142 - ``CEC_CAP_REPLY_VENDOR_ID`` 143 - 0x00000200 143 - 0x00000200 144 - If this capability is set, then 144 - If this capability is set, then 145 :ref:`CEC_MSG_FL_REPLY_VENDOR_ID <cec- 145 :ref:`CEC_MSG_FL_REPLY_VENDOR_ID <cec-msg-flags>` can be used. 146 146 147 Return Value 147 Return Value 148 ============ 148 ============ 149 149 150 On success 0 is returned, on error -1 and the 150 On success 0 is returned, on error -1 and the ``errno`` variable is set 151 appropriately. The generic error codes are des 151 appropriately. The generic error codes are described at the 152 :ref:`Generic Error Codes <gen-errors>` chapte 152 :ref:`Generic Error Codes <gen-errors>` chapter.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.