You are on page 1of 11

HDMI CEC & ARC Refresher

The Audio Return Channel in HDMI 1.4 enables a TV, via a single HDMI cable, to send audio data “upstream” to an A/V receiver or surround audio
controller, increasing user flexibility and eliminating the need for any separate S/PDIF audio connection.

TVs have always been able to receive multi-channel audio through an HDMI connection, and this is still a typical use-case, with the TV positioned
“downstream” from content sources and any connected audio equipment. However, if a user had a TV with a built-in tuner or DVD player, and
wanted to send content “upstream” from the TV back to the audio system, a separate connection had to be installed, typically an S/PDIF cable.

An Audio Return Channel-enabled TV can either send or receive audio via HDMI, upstream or downstream, depending on system set-up and user
preferences.
Both devices in this signal chain (Smart TV & Audio System) must have ARC capable HDMI ports.
These ARC capable ports will be labeled specifically for this function.

TV’s only SEND audio from an ARC port.


Audio devices like Beam or an audio receiver only RECEIVE audio from ARC.

Note: Some HDMI switches may have ARC ports. These are only for receiving audio from a TV and won’t work with Amp.
Manufacturer CEC Names
CEC or Consumer Electronic Control is a feature of HDMI that allows you to command and control other CEC enabled devices
that are connected through HDMI, without user intervention.

An example of the CEC power and Input feature would be allowing your DVD player to turn on your television and change its
input over the HDMI cable, or allows your PlayStation 4 to power and change inputs on your AV receiver.

Manufacturers may use different names for CEC with their products. Some common names for CEC include:
Physical and Logical HDMI/CEC Addresses

All CEC devices have both a physical and logical address, whereas non-CEC devices only have a physical address. The physical address is allocated
though an algorithm described in the HDMI specification. CEC is shared between all devices in the HDMI “tree” (so it’s a bus), and should be
interconnected between all inputs and one output of all devices, even those not implementing CEC.

The CEC bus is incredibly slow, and half duplex.

This causes collisions on the bus, requiring “back off logic” so there isn’t a constant fight for communication.
Whenever a new physical address is discovered, a CEC device shall allocate its logical address and report the association between its
logical and physical addresses by broadcasting the information on the bus. This process allows any node to create a map of physical
connections to logical addresses.

Sink and sources

Within HDMI-CEC, devices are of two kinds, TVs and switches inputs (named sinks) and playback device, recording device, switch outputs
...  (named sources). By definition of the HDMI specification, there is only one TV or display within a CEC bus.

Only one TV is supposed to be part of the bus (with the physical address 0.0.0.0).

But a TV at a physical address other than 0.0.0.0 shall try to allocate the ‘Specific Use’ (14) address. If address 14 is already allocated it
shall take the ‘Unregistered’ Logical Address (15).
Logical Address Topology
All HDMI devices have a physical address. However, if a device
wants to send and receive messages via CEC, it needs a CEC
Logical Address.

The Logical Address is independent of the physical address (for


the most part).

There are 15 logical addresses, represented by a hex digit from 0-


E. If a device wants to send or receive CEC messages, it must
claim a logical address.

A given logical address can only be used by one device (i.e. all
Logical Addresses must be distinct to a device).

Each logical address has its own functional usage. For example,
Logical Address 5 is meant for audio systems. Logical Address 0
is meant for the TV.

A device can claim more than one Logical Address if it serves


more than one function. Some AV receivers will claim 5 (ARC) for
audio functionality and another for playback functionality. This is
incompatible with Beam as we need address 5.

Note the Receiver in this diagram claims both Logical Addresses 5 and B (Audio System
and Playback Device #3 respectively).

From this, we can infer that the device both outputs audio and plays video to the TV. Note
the Xbox does not claim a Logical Address at all: Xboxes do not support CEC. HDMI
switches typically do not claim logical addresses either, but there are exceptions to this rule.
Amp’s Logical Address is 5.

This should theoretically never change since we do not send messages to ourselves.

The "LastUpdateSec" value for our entry is a good indicator of how long it's been since we acquired Logical Address 5.

The table is only cleared when the HDMI cable is unplugged. Therefore, if another CEC device is unplugged from the TV it will still remain in the table.
However, it will have a very large value in "LastUpdateSec" which is the last time in seconds that we've heard from that device. If the value is over
1800, it means it was probably not plugged in the last time we scanned. It could also mean CEC was entirely disabled on it the last time we scanned.

All entries should update if a Logical Address's info changes such as Physical Address, Vendor ID, or OSD name.

If two devices have the same Physical Address, it most likely means that a device was unplugged from the HDMI port then a different HDMI device
was plugged in. In this case, look at which device was heard from more recently in "LastUpdateSec".

Not all devices reply to all CEC commands so it is possible for the "VendorId" and "OsdName" fields to be empty. However, "PhysicalAddress" and
"LastUpdateSec" should be fairly reliable and accurate.

Logging

All outgoing messages from Beam are logged at 5 or 7 so it should not be flooding anacapa logs or perf logs.
Logical Address Issues

Claiming a Logical Address


In order to claim a logical address, a device must send a CEC message to the address it wants from the address it wants several times (usually 3-5
times). So if a device wanted to claim Logical Address 4, it would have to send a blank message to Logical Address 4 from Logical Address 4. If the
message is acknowledged, that means that a device has already claimed that logical address. If it is not acknowledged after several retries, then the
device is free to claim the address.

If a Logical Address Already is Claimed


NOTE: because some AV Receivers also claim Logical Address 5 - Audio System, Beam will sometimes encounter errors when connected to some
users' setups; it's unable to claim the address that it's designed to work with.

In these cases, the user needs to either:


Reconfigure the AV Receiver to not claim logical address 5 (usually hidden in some cryptically named setting)

Disable CEC entirely on the AV Receiver (not ideal as this will disallow the receiver from controlling the TV volume and power)

Use a CEC-less HDMI cable or adapter to strip out CEC from the AV Receiver entirely (brute solution for devices without disable CEC settings)
CEC Issues
Sometimes CEC is not implemented properly by manufacturers, or certain implementations clash with each other over the bus.

This can show itself in many different ways, not always as a show stopping issue. Generally speaking, if we’re able to narrow down an
offending device through process of elimination, it may be necessary to disable CEC on that device.

If a device does not provide the option to disable CEC, HDMI adapters and cables are available with the CEC pin (13) shorted, and
therefor not functional. All other HDMI functions will continue normally.

Example device:

https://www.amazon.com/Lindy-HDMI-Adapter-Female-41232/dp/B00DL48KVI
CEC Issues
General Problems with a Single Line
All messages are sent using a single line. There is no clock.

That means that no one (no device on the HDMI network) knows when another device is going to "talk" (send a message). 

Collisions
Because there is no way for any device to know when another device is going to send a message, collisions will commonly occur
on the CEC line, where a 2 or more devices begin trying to send a message at the same time. Because there is only one line, the
result is that all messages get corrupted and no one receives the message. There is no way to avoid this entirely. It's an inherent
defect in the CEC design. Typically, collisions tend to manifest themselves in Beam logs as NACKs (‘not acknowledged’), because
the result of a collision is no one receiving the message, and therefore no one being able to acknowledge the message.

Timeouts
Some CEC messages expect a response. If the device that sends the message does not receive a response within a specified
timeout (~1s), then the message times out. Beam will try to retransmit several times if it gets timeouts when sending messages to
other devices via CEC.

You might also like