Package: android.hardware.tv.cec@1.0

IHdmiCec

interface IHdmiCec

HDMI-CEC HAL interface definition.

Methods

addLogicalAddress

addLogicalAddress (CecLogicalAddress addr)
generates (Result result)

Passes the logical address that must be used in this system.

HAL must use it to configure the hardware so that the CEC commands addressed the given logical address can be filtered in.This method must be able to be called as many times as necessary in order to support multiple logical devices.

Details
Parameters
addr
Logical address that must be used in this system.It must be in the range of valid logical addresses for the call to succeed.
Generates
result
Result status of the operation.SUCCESS if successful, FAILURE_INVALID_ARGS if the given logical address is invalid, FAILURE_BUSY if device or resource is busy
Annotations
callflow
next= { "*" }

clearLogicalAddress

clearLogicalAddress ()

Clears all the logical addresses.

It is used when the system doesn't need to process CEC command any more, hence to tell HAL to stop receiving commands from the CEC bus, and change the state back to the beginning.

Details
Annotations
callflow
next="addLogicalAddress"
exit

getPhysicalAddress

getPhysicalAddress ()
generates (Result result, uint16_t addr)

Gets the CEC physical address.

The physical address depends on the topology of the network formed by connected HDMI devices.It is therefore likely to change if the cable is plugged off and on again.It is advised to call getPhysicalAddress to get the updated address when hot plug event takes place.

Details
Generates
result
Result status of the operation.SUCCESS if successful, FAILURE_INVALID_STATE if HAL cannot retrieve the physical address.
addr
Physical address of this device.
Annotations
callflow
next="*"

sendMessage

sendMessage (CecMessage message)
generates (SendMessageResult result)

Transmits HDMI-CEC message to other HDMI device.

The method must be designed to return in a certain amount of time and not hanging forever which may happen if CEC signal line is pulled low for some reason.

It must try retransmission at least once as specified in the section '7.1 Frame Re-transmissions' of the CEC Spec 1.4b.

Details
Parameters
message
CEC message to be sent to other HDMI device.
Generates
result
Result status of the operation.SUCCESS if successful, NACK if the sent message is not acknowledged, BUSY if the CEC bus is busy.
Annotations
callflow
next="*"

setCallback

setCallback (IHdmiCecCallback callback)

Sets a callback that HDMI-CEC HAL must later use for incoming CEC messages or internal HDMI events.

Details
Parameters
callback
Callback object to pass hdmi events to the system.The previously registered callback must be replaced with this one.
Annotations
callflow
next= { "addLogicalAddress" }
entry

getCecVersion

getCecVersion ()
generates (int32_t version)

Returns the CEC version supported by underlying hardware.

Details
Generates
version
the CEC version supported by underlying hardware.
Annotations
callflow
next= { "*" }

getVendorId

getVendorId ()
generates (uint32_t vendorId)

Gets the identifier of the vendor.

Details
Generates
vendorId
Identifier of the vendor that is the 24-bit unique company ID obtained from the IEEE Registration Authority Committee(RAC). The upper 8 bits must be 0.
Annotations
callflow
next= { "*" }

getPortInfo

getPortInfo ()
generates (vec<HdmiPortInfo> infos)

Gets the hdmi port information of underlying hardware.

Details
Generates
infos
The list of HDMI port information
Annotations
callflow
next= { "*" }

setOption

setOption (OptionKey key, bool value)

Sets flags controlling the way HDMI-CEC service works down to HAL implementation.Those flags must be used in case the feature needs update in HAL itself, firmware or microcontroller.

Details
Parameters
key
The key of the option to be updated with a new value.
value
Value to be set.
Annotations
callflow
next="*"

setLanguage

setLanguage (string language)

Passes the updated language information of Android system.Contains three-letter code as defined in ISO/FDIS 639-2.Must be used for HAL to respond to<Get Menu Language>while in standby mode.

Details
Parameters
language
Three-letter code defined in ISO/FDIS 639-2.Must be lowercase letters .(e.g ., eng for English )
Annotations
callflow
next="*"

enableAudioReturnChannel

enableAudioReturnChannel (int32_t portId, bool enable)

Configures ARC circuit in the hardware logic to start or stop the feature.

Details
Parameters
portId
Port id to be configured.
enable
Flag must be either true to start the feature or false to stop it.
Annotations
callflow
next="*"

isConnected

isConnected (int32_t portId)
generates (bool status)

Gets the connection status of the specified port.

Details
Parameters
portId
Port id to be inspected for the connection status.
Generates
status
True if a device is connected, otherwise false.The HAL must watch for +5V power signal to determine the status.
Annotations
callflow
next="*"