HDMI CEC (Consumer Electronics Control)
Allwinner A10 / A13 SoC has integrated hardware support for CEC (Consumer Electronics Control) over the HDMI port via its HDMI transmitter.
CEC (Consumer Electronics Control) is the control protocol found in HDMI. If you have not heard of CEC, you might instead have heard of it under a different name in another form from television manufacturers; Sony call it Bravialink, LG call it Simplink, Sharp call it Aquos Link, Pioneer call it Kuro Link, Philips call it EasyLink, and Samsung call it Anynet+
There is not yet any open source CEC software library that support the Allwinner A10 / A13 CEC hardware. However media center software like XBMC and MythTV already have support for some other hardware manufacturers HDMI CEC controllers/adapters via libCEC because it features support for more than one hardware device.
Having Allwinner A10 / A13 CEC hardware support in libCEC would mean that you could control XBMC or MythTV front-end GUI via a television remote control without having a dedicated HTPC / MCE remote for your Allwinner A10 / A13 device.
Once connected your Allwinner A10 / A13 device to your TV and receiver with HDMI you could enjoy seamless connectivity, XBMC will automatically turn on and off your TV, receivers, and other home theater equipment. Volume control from XBMC can be sent to your amplifier, manage your DVD or Blu-Ray player from inside XBMC, and redirect the active source on your TV to whichever equipment needs it, all from one remote control. No line of sight is required and cables can be hidden neatly out of sight!
What is HDMI CEC?
Consumer Electronics Control (CEC) is an HDMI feature designed to allow the user to command and control up-to ten CEC-enabled devices, that are connected through HDMI, by using only one of their remote controls (for example by controlling a television set, set-top box, PVR/DVR, and DVD player using only the remote control of the TV). CEC also allows for individual CEC-enabled devices to command and control each other without user intervention.
It is a one-wire bidirectional serial bus that uses the industry-standard AV.link protocol to perform remote control functions. CEC wiring is mandatory, although implementation of CEC in a product is optional. It was defined in HDMI Specification 1.0 and updated in HDMI 1.2, HDMI 1.2a and HDMI 1.3a (which added timer and audio commands to the bus). USB to CEC Adapters exist that allow a computer to control CEC enabled devices.
Trade names for CEC are Anynet+ (Samsung); Aquos Link (Sharp); BRAVIA Link and BRAVIA Sync (Sony); HDMI-CEC (Hitachi); E-link (AOC); Kuro Link (Pioneer); CE-Link and Regza Link (Toshiba); RIHD (Remote Interactive over HDMI) (Onkyo); RuncoLink (Runco International); SimpLink (LG); HDAVI Control, EZ-Sync, VIERA Link (Panasonic); EasyLink (Philips); and NetCommand for HDMI (Mitsubishi).
Some of the available HDMI-CEC commands
- One Touch Play: the device will become active source when playback starts
- System Standby: switches all connected devices to standby
- Preset Transfer: transfers the tuner channel setup to another TV set
- One Touch Record: start recording immediately
- Timer Programming: allow one device (e.g. a TV set or HTPC) to set the timer programming of another (e.g. a PVR,/DVR or DVD-recorder)
- System Information: checks all components for bus addresses and configuration
- Deck Control: playback control
- Tuner Control: control the tuner of another device
- OSD Display: use the OSD of the TV set to display text
- Device Menu Control: use the menus of another device
- Routing Control: control the switching of signal sources
- Remote Control Pass Through: pass through remote control commands
- Device OSD Name Transfer: transfer the preferred device names to the TV set
CEC stands for Consumer Electronics Control. It is implemented as a single wire bus in the HDMI connector (HDMI connector pin 13). It allows various HDMI-enabled products to connect and communicate with each other. It allows various HDMI-enabled products to connect and communicate with each other. The intent is to enable one remote control to interface with all the A/V components. Various message opcodes can be exchanged between the connected systems in order to do device specific actions (like recording on a STB/DVR) or get general information across (like transferring remote control key press details).
In any HDMI setup, the display is considered to be the root, and gets allocated two special tags, a physical address of 0.0.0.0 and a logical address of 0. In any given system, all CEC enabled devices have both physical and logical addresses, while the non-CEC devices have only physical addresses. Physical addresses are taken up based on the position of the device with respect to the root. For example, if an A/V receiver's output is connected to HDMI1 of the TV, it gets the physical address 126.96.36.199. A device connected to the first HDMI input port of the A/V receiver would get the address 188.8.131.52, while one connected to the second HDMI port would get 184.108.40.206. Logical addresses are taken on by the devices depending on their functionality (as mandated by the CEC specifications document). When the HDMI device menu is brought up on the display (On a Sony KDL46EX720, this is achieved by pressing the Sync Menu button), the display sends a broadcast over the CEC wire to all the downstream devices. It then collects the responses arriving over the CEC wire and presents the user with a list of CEC enabled devices. Choosing one of them ensures that future remote key presses are transferred by the TV to that particular address.
If you are interested in learning about the bus protocol and a bit more in-depth overview, I suggest taking a look at QuantumData's excellent CEC whitepaper (PDF). For more details on the various messages which can be exchanged between the devices, the full CEC specifications from the official HDMI documentation may be perused (PDF).
CEC with XBMC Media Center software
CEC allows XBMC to turn your TV, receivers, and other attached equipment on and off (if they support HDMI CEC) adjust the volume or eject the disk from a drive. Start playback, etc. and much more.
Likewise these same devices can tell XBMC what to do, for example, your TV remote can also control XBMC, or vice versa. With this device you can move that step closer to a clutter free living space while maintaining simple remote control for friends and family who may not be familiar with all of the features of a professional remote control.
See CEC in action and read about what it can do with XBMC:
Where to begin developing CEC support for Allwinner A10 and A13?
Best would be for someone to add support for the Allwinner A10 / A13 CEC hardware to the libCEC library by Pulse-Eight available on GitHub.com as that it looking to in future becoming the default open source library for CEC over HDMI support:
Allwinner A10 / A13 HDMI transmitter
Allwinner A10 / A13 SoC has integrated support for CEC (Consumer Electronics Control) over its HDMI transmitter on ball P23 (pin name: "CEC_HDMI").
libCEC is an open-source dual licensed library originally designed for communicating with the Pulse-Eight USB - HDMI CEC Adaptor.
libCEC needs the following dependencies in order to work correctly:
- udev v151 or later
- cdc-acm support compiled into the kernel or available as module
- Support for Pulse-Eight own USB - CEC Adapter
- Support for Broadcom BCM2835 SoC integrated CEC, used in devices like for example Raspberry Pi
- Support for NXP TDA998x (TDA19988 or TDA19989) HDMI transmitter by NXP Semiconductors Caen.
- NXP chip integrated in Marvell Armada 510 (88AP510) SoC, used in devices like for example SolidRun CuBox
- Support for Windows, Mac OS X, Android, and Linux
- Turns on/off TV and receivers (e.g. when the screensaver becomes active, to save power)
- Switch the TV and receivers to the correct HDMI port when starting your media center software
- Send and receive key presses from your TV's remote
- Control the volume of a CEC capable A/V receiver from your media center software
- Sniff active traffic on CEC bus
- Interfaces for C, C++ and .NET/CLR
- No binary-only or obfuscated code; everything is open and can be modified
- Example implementations in C++ and C#
- And much more...
libCEC supported software
- XBMC v11.0 "Eden" or higher
- MythTV v0.25 or higher
Alternative open source libraries and code for CEC
Alternative, a cross-platform CEC library designed for Realtek SoC, also libraries exists for Arduino board (tmega series chip) and the TI msp430 chip the TI MSP430 chip, that could probably also be modified to work with Allwinner A10 / A13 SoC.
MacCEC (formerly LibcCEC) is a LibCEC reverse-engineered as pure C code, with an early implementation of Mac OS X but designed to be portable and cross-platform
Realtek 1283 SoC ('MARS') platforms with CEC, a cross CEC library and a CEC daemon/service
cec-arduino - Arduino library for communicating with HDMI CEC equipment
TI msp430 linux changes and CEC library repository
- XBMC - instructions on compiling and developing XBMC on and for Allwinner A10 SoC, a developers guide.
- LibCEC by Pulse-Eight
- You can browse LibCEC source code at https://github.com/Pulse-Eight/libcec
- CEC-O-Matic website, helps developers in decoding and creating CEC frames for communication - For the general user, the cec-o-matic.com website also gives an idea as to what can be achieved in a home automation system using CEC with HDMI equipment
- Quantum Data white paper - Designing CEC into your next HDMI Product (PDF)
- HDMI.org - Designing CEC into your next HDMI Product (PDF)
- The Promise of HDMI-CEC (PDF)
- HDMI-CEC Specifications v1.3a
- RainShadow Tech LLC - HDMI-CEC to USB Bridge and HDMI-CEC to RS-232 Bridge (PDF)
- Kwikwai's HDMI CEC-Ethernet-USB-Serial bridge