brintos

brintos / linux-shallow public Read only

0
0
Text · 4.3 KiB · 1d52489 Raw
153 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2.. c:namespace:: CEC3 4.. _CEC_ADAP_G_CAPS:5 6*********************7ioctl CEC_ADAP_G_CAPS8*********************9 10Name11====12 13CEC_ADAP_G_CAPS - Query device capabilities14 15Synopsis16========17 18.. c:macro:: CEC_ADAP_G_CAPS19 20``int ioctl(int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp)``21 22Arguments23=========24 25``fd``26    File descriptor returned by :c:func:`open()`.27 28``argp``29 30Description31===========32 33All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query34device information, applications call the ioctl with a pointer to a35struct :c:type:`cec_caps`. The driver fills the structure and36returns the information to the application. The ioctl never fails.37 38.. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.6cm}|39 40.. c:type:: cec_caps41 42.. flat-table:: struct cec_caps43    :header-rows:  044    :stub-columns: 045    :widths:       1 1 1646 47    * - char48      - ``driver[32]``49      - The name of the cec adapter driver.50    * - char51      - ``name[32]``52      - The name of this CEC adapter. The combination ``driver`` and53	``name`` must be unique.54    * - __u3255      - ``available_log_addrs``56      - The maximum number of logical addresses that can be configured.57    * - __u3258      - ``capabilities``59      - The capabilities of the CEC adapter, see60	:ref:`cec-capabilities`.61    * - __u3262      - ``version``63      - CEC Framework API version, formatted with the ``KERNEL_VERSION()``64	macro.65 66.. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.4cm}|67 68.. _cec-capabilities:69 70.. flat-table:: CEC Capabilities Flags71    :header-rows:  072    :stub-columns: 073    :widths:       3 1 874 75    * .. _`CEC-CAP-PHYS-ADDR`:76 77      - ``CEC_CAP_PHYS_ADDR``78      - 0x0000000179      - Userspace has to configure the physical address by calling80	:ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If81	this capability isn't set, then setting the physical address is82	handled by the kernel whenever the EDID is set (for an HDMI83	receiver) or read (for an HDMI transmitter).84    * .. _`CEC-CAP-LOG-ADDRS`:85 86      - ``CEC_CAP_LOG_ADDRS``87      - 0x0000000288      - Userspace has to configure the logical addresses by calling89	:ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If90	this capability isn't set, then the kernel will have configured91	this.92    * .. _`CEC-CAP-TRANSMIT`:93 94      - ``CEC_CAP_TRANSMIT``95      - 0x0000000496      - Userspace can transmit CEC messages by calling97	:ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that98	userspace can be a follower as well, since being able to transmit99	messages is a prerequisite of becoming a follower. If this100	capability isn't set, then the kernel will handle all CEC101	transmits and process all CEC messages it receives.102    * .. _`CEC-CAP-PASSTHROUGH`:103 104      - ``CEC_CAP_PASSTHROUGH``105      - 0x00000008106      - Userspace can use the passthrough mode by calling107	:ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.108    * .. _`CEC-CAP-RC`:109 110      - ``CEC_CAP_RC``111      - 0x00000010112      - This adapter supports the remote control protocol.113    * .. _`CEC-CAP-MONITOR-ALL`:114 115      - ``CEC_CAP_MONITOR_ALL``116      - 0x00000020117      - The CEC hardware can monitor all messages, not just directed and118	broadcast messages.119    * .. _`CEC-CAP-NEEDS-HPD`:120 121      - ``CEC_CAP_NEEDS_HPD``122      - 0x00000040123      - The CEC hardware is only active if the HDMI Hotplug Detect pin is124        high. This makes it impossible to use CEC to wake up displays that125	set the HPD pin low when in standby mode, but keep the CEC bus126	alive.127    * .. _`CEC-CAP-MONITOR-PIN`:128 129      - ``CEC_CAP_MONITOR_PIN``130      - 0x00000080131      - The CEC hardware can monitor CEC pin changes from low to high voltage132        and vice versa. When in pin monitoring mode the application will133	receive ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events.134    * .. _`CEC-CAP-CONNECTOR-INFO`:135 136      - ``CEC_CAP_CONNECTOR_INFO``137      - 0x00000100138      - If this capability is set, then :ref:`CEC_ADAP_G_CONNECTOR_INFO` can139        be used.140    * .. _`CEC-CAP-REPLY-VENDOR-ID`:141 142      - ``CEC_CAP_REPLY_VENDOR_ID``143      - 0x00000200144      - If this capability is set, then145        :ref:`CEC_MSG_FL_REPLY_VENDOR_ID <cec-msg-flags>` can be used.146 147Return Value148============149 150On success 0 is returned, on error -1 and the ``errno`` variable is set151appropriately. The generic error codes are described at the152:ref:`Generic Error Codes <gen-errors>` chapter.153