0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002
0003 .. _cec-intro:
0004
0005 Introduction
0006 ============
0007
0008 HDMI connectors provide a single pin for use by the Consumer Electronics
0009 Control protocol. This protocol allows different devices connected by an
0010 HDMI cable to communicate. The protocol for CEC version 1.4 is defined
0011 in supplements 1 (CEC) and 2 (HEAC or HDMI Ethernet and Audio Return
0012 Channel) of the HDMI 1.4a (:ref:`hdmi`) specification and the
0013 extensions added to CEC version 2.0 are defined in chapter 11 of the
0014 HDMI 2.0 (:ref:`hdmi2`) specification.
0015
0016 The bitrate is very slow (effectively no more than 36 bytes per second)
0017 and is based on the ancient AV.link protocol used in old SCART
0018 connectors. The protocol closely resembles a crazy Rube Goldberg
0019 contraption and is an unholy mix of low and high level messages. Some
0020 messages, especially those part of the HEAC protocol layered on top of
0021 CEC, need to be handled by the kernel, others can be handled either by
0022 the kernel or by userspace.
0023
0024 In addition, CEC can be implemented in HDMI receivers, transmitters and
0025 in USB devices that have an HDMI input and an HDMI output and that
0026 control just the CEC pin.
0027
0028 Drivers that support CEC will create a CEC device node (/dev/cecX) to
0029 give userspace access to the CEC adapter. The
0030 :ref:`CEC_ADAP_G_CAPS` ioctl will tell userspace what it is allowed to do.
0031
0032 In order to check the support and test it, it is suggested to download
0033 the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ package. It
0034 provides three tools to handle CEC:
0035
0036 - cec-ctl: the Swiss army knife of CEC. Allows you to configure, transmit
0037 and monitor CEC messages.
0038
0039 - cec-compliance: does a CEC compliance test of a remote CEC device to
0040 determine how compliant the CEC implementation is.
0041
0042 - cec-follower: emulates a CEC follower.