162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci.. _cec-intro: 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciIntroduction 662306a36Sopenharmony_ci============ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciHDMI connectors provide a single pin for use by the Consumer Electronics 962306a36Sopenharmony_ciControl protocol. This protocol allows different devices connected by an 1062306a36Sopenharmony_ciHDMI cable to communicate. The protocol for CEC version 1.4 is defined 1162306a36Sopenharmony_ciin supplements 1 (CEC) and 2 (HEAC or HDMI Ethernet and Audio Return 1262306a36Sopenharmony_ciChannel) of the HDMI 1.4a (:ref:`hdmi`) specification and the 1362306a36Sopenharmony_ciextensions added to CEC version 2.0 are defined in chapter 11 of the 1462306a36Sopenharmony_ciHDMI 2.0 (:ref:`hdmi2`) specification. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ciThe bitrate is very slow (effectively no more than 36 bytes per second) 1762306a36Sopenharmony_ciand is based on the ancient AV.link protocol used in old SCART 1862306a36Sopenharmony_ciconnectors. The protocol closely resembles a crazy Rube Goldberg 1962306a36Sopenharmony_cicontraption and is an unholy mix of low and high level messages. Some 2062306a36Sopenharmony_cimessages, especially those part of the HEAC protocol layered on top of 2162306a36Sopenharmony_ciCEC, need to be handled by the kernel, others can be handled either by 2262306a36Sopenharmony_cithe kernel or by userspace. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciIn addition, CEC can be implemented in HDMI receivers, transmitters and 2562306a36Sopenharmony_ciin USB devices that have an HDMI input and an HDMI output and that 2662306a36Sopenharmony_cicontrol just the CEC pin. 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ciDrivers that support CEC will create a CEC device node (/dev/cecX) to 2962306a36Sopenharmony_cigive userspace access to the CEC adapter. The 3062306a36Sopenharmony_ci:ref:`CEC_ADAP_G_CAPS` ioctl will tell userspace what it is allowed to do. 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciIn order to check the support and test it, it is suggested to download 3362306a36Sopenharmony_cithe `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ package. It 3462306a36Sopenharmony_ciprovides three tools to handle CEC: 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci- cec-ctl: the Swiss army knife of CEC. Allows you to configure, transmit 3762306a36Sopenharmony_ci and monitor CEC messages. 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci- cec-compliance: does a CEC compliance test of a remote CEC device to 4062306a36Sopenharmony_ci determine how compliant the CEC implementation is. 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci- cec-follower: emulates a CEC follower. 43