https://etwiki.sys.comcast.net/display/CE/%5bShared%5d+HDMI-CEC

https://rdkwiki.com/rdk/display/RDK/HDMI+Input

https://www.teamccp.com/confluence/display/CPE/RDK+HDMI+Input+Architecture

The HDMI_CEC API defines the ability to get connected HDMI devices, send messages to those devices, and to be notified when messages are received from HDMI devices

HDMI-CEC is a protocol that provides high-level control functions between audio-visual devices connected over HDMI. CEC is a one-wire bidirectional serial bus based on industry-standard AV.Link protocol to perform control functions. All audio-visual sources are connected directly or indirectly to a display device as the ‘root’ in a tree-like structure.

Feature Summary

Device Applicability

This feature applies to the following devices:

Architecture Overview


Component Impacts

CEC Protocol Library

HDMI-CEC HAL

SoC CEC Driver

Service Manager

Device Settings HAL

SoC Video Pipeline

Design Details


Methods

NameParametersDescription
setEnabledenabled : booleanEnables or disables CEC
getEnablednoneReturns true if CEC is enabled
setNamename : stringSets the name of the STB device.  The default name is "STB".  It is recommended that the name of the device is set prior to enabling CEC.
getNamenoneReturns the name of the STB device
sendMessage

message : String

The message is a base64 encoded byte array of the raw CEC bytes.  The CEC message includes the device ID for the intended destination.

getCECAddressesnone

return the JSON object <CECAddresses> that is assigned to the local device. It does not contain the <CECAddresses> of other devices on the connected CEC network.

"CECAddresses" : {
"physicalAddress": Array of 4 bytes [byte0, byte1, byte2, byte3],
"logicalAddresses" : Array of <CECLogicalAddress>
}
"CECLogicalAddress" : {
"deviceType" : <string>
"logicalAddress": <integer>
}

The deviceType returned is part or all of devices types optionally set by XRE.

A CEC device can have multiple deviceTypes, if so an array of <CECLogicalAddress> with size more than one is returned.

Default deviceType is Tuner, and its logical Address is either 3, 6, 7, or 10.

In messages sent by XRE, XRE can only use the logicalAddress returned from CECAddresses.

Accepted deviceType are: "Tuner", "Record", "Playback", "AudioSystem", "VideoProcessor", "Switch"

Events

Name

Content

Description

onMessage

message : String

Fired when a message is sent from an HDMI device.  Message is a base64 encoded byte array of the raw CEC bytes.

cecAddressesChangedJSON object <CECAddresses>Notify that address of the host CEC device has changed