Merge tag 'leds_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewsk...
[sfrench/cifs-2.6.git] / Documentation / DocBook / media / v4l / cec-api.xml
1 <partinfo>
2   <authorgroup>
3     <author>
4       <firstname>Hans</firstname>
5       <surname>Verkuil</surname>
6       <affiliation><address><email>hans.verkuil@cisco.com</email></address></affiliation>
7       <contrib>Initial version.</contrib>
8     </author>
9   </authorgroup>
10   <copyright>
11     <year>2016</year>
12     <holder>Hans Verkuil</holder>
13   </copyright>
14
15   <revhistory>
16     <!-- Put document revisions here, newest first. -->
17     <revision>
18       <revnumber>1.0.0</revnumber>
19       <date>2016-03-17</date>
20       <authorinitials>hv</authorinitials>
21       <revremark>Initial revision</revremark>
22     </revision>
23   </revhistory>
24 </partinfo>
25
26 <title>CEC API</title>
27
28 <chapter id="cec-api">
29   <title>CEC: Consumer Electronics Control</title>
30
31   <section id="cec-intro">
32     <title>Introduction</title>
33     <para>
34       Note: this documents the proposed CEC API. This API is not yet finalized and
35       is currently only available as a staging kernel module.
36     </para>
37     <para>HDMI connectors provide a single pin for use by the Consumer Electronics
38     Control protocol. This protocol allows different devices connected by an HDMI cable
39     to communicate. The protocol for CEC version 1.4 is defined in supplements 1 (CEC)
40     and 2 (HEAC or HDMI Ethernet and Audio Return Channel) of the HDMI 1.4a
41     (<xref linkend="hdmi" />) specification and the extensions added to CEC version 2.0
42     are defined in chapter 11 of the HDMI 2.0 (<xref linkend="hdmi2" />) specification.
43     </para>
44
45     <para>The bitrate is very slow (effectively no more than 36 bytes per second) and
46     is based on the ancient AV.link protocol used in old SCART connectors. The protocol
47     closely resembles a crazy Rube Goldberg contraption and is an unholy mix of low and
48     high level messages. Some messages, especially those part of the HEAC protocol layered
49     on top of CEC, need to be handled by the kernel, others can be handled either by the
50     kernel or by userspace.</para>
51
52     <para>In addition, CEC can be implemented in HDMI receivers, transmitters and in USB
53     devices that have an HDMI input and an HDMI output and that control just the CEC pin.</para>
54
55     <para>Drivers that support CEC will create a CEC device node (/dev/cecX)
56     to give userspace access to the CEC adapter. The &CEC-ADAP-G-CAPS; ioctl will tell userspace
57     what it is allowed to do.</para>
58   </section>
59 </chapter>
60
61 <appendix id="cec-user-func">
62   <title>Function Reference</title>
63   <!-- Keep this alphabetically sorted. -->
64   &sub-cec-func-open;
65   &sub-cec-func-close;
66   &sub-cec-func-ioctl;
67   &sub-cec-func-poll;
68   <!-- All ioctls go here. -->
69   &sub-cec-ioc-adap-g-caps;
70   &sub-cec-ioc-adap-g-log-addrs;
71   &sub-cec-ioc-adap-g-phys-addr;
72   &sub-cec-ioc-dqevent;
73   &sub-cec-ioc-g-mode;
74   &sub-cec-ioc-receive;
75 </appendix>