#[repr(u8)]pub enum CecOpcode {
Show 75 variants
ActiveSource = 130,
ImageViewOn = 4,
TextViewOn = 13,
InactiveSource = 157,
RequestActiveSource = 133,
RoutingChange = 128,
RoutingInformation = 129,
SetStreamPath = 134,
Standby = 54,
CecVersion = 158,
GetCecVersion = 159,
GivePhysicalAddr = 131,
GetMenuLanguage = 145,
ReportPhysicalAddr = 132,
SetMenuLanguage = 50,
ReportFeatures = 166,
GiveFeatures = 165,
DeckControl = 66,
DeckStatus = 27,
GiveDeckStatus = 26,
Play = 65,
DeviceVendorId = 135,
GiveDeviceVendorId = 140,
VendorCommand = 137,
VendorCommandWithId = 160,
VendorRemoteButtonDown = 138,
VendorRemoteButtonUp = 139,
SetOsdString = 100,
GiveOsdName = 70,
SetOsdName = 71,
MenuRequest = 141,
MenuStatus = 142,
UserControlPressed = 68,
UserControlReleased = 69,
GiveDevicePowerStatus = 143,
ReportPowerStatus = 144,
FeatureAbort = 0,
Abort = 255,
GiveAudioStatus = 113,
GiveSystemAudioModeStatus = 125,
ReportAudioStatus = 122,
ReportShortAudioDescriptor = 163,
RequestShortAudioDescriptor = 164,
SetSystemAudioMode = 114,
SystemAudioModeRequest = 112,
SystemAudioModeStatus = 126,
SetAudioRate = 154,
RecordOff = 11,
RecordOn = 9,
RecordStatus = 10,
RecordTvScreen = 15,
ClearAnalogueTimer = 51,
ClearDigitalTimer = 153,
ClearExtTimer = 161,
SetAnalogueTimer = 52,
SetDigitalTimer = 151,
SetExtTimer = 162,
SetTimerProgramTitle = 103,
TimerClearedStatus = 67,
TimerStatus = 53,
GiveTunerDeviceStatus = 8,
SelectAnalogueService = 146,
SelectDigitalService = 147,
TunerDeviceStatus = 7,
TunerStepDecrement = 6,
TunerStepIncrement = 5,
InitiateArc = 192,
ReportArcInitiated = 193,
ReportArcTerminated = 194,
RequestArcInitiation = 195,
RequestArcTermination = 196,
TerminateArc = 197,
RequestCurrentLatency = 167,
ReportCurrentLatency = 168,
CdcMessage = 248,
}
Expand description
The opcode of a CecMsg
Variants§
ActiveSource = 130
Used by a new source to indicate that it has started to transmit a stream OR used in response to a CecOpcode::RequestActiveSource
Parameters: CecPhysicalAddress
ImageViewOn = 4
Sent by a source device to the TV whenever it enters the active state (alternatively it may send CecOpcode::TextViewOn). The TV should then turn on (if not on). If in ‘Text Display’ state then the TV enters ‘Image Display’ state.
TextViewOn = 13
As CecOpcode::ImageViewOn, but should also remove any text, menus and PIP windows from the TV’s display.
InactiveSource = 157
Used by the currently active source to inform the TV that it has no video to be presented to the user, or is going into standby as the result of a local user command on the device.
Parameters: CecPhysicalAddress of active source
RequestActiveSource = 133
Used by a new device to discover the status of the system.
RoutingChange = 128
Sent by a CEC Switch when it is manually switched to inform all other devices on the network that the active route below the switch has changed.
Parameters:
- old CecPhysicalAddress
- new CecPhysicalAddress
RoutingInformation = 129
Sent by a CEC Switch to indicate the active route below the switch.
Parameters: CecPhysicalAddress
SetStreamPath = 134
Used by the TV to request a streaming path from the specified physical address.
Parameters: CecPhysicalAddress
Standby = 54
Turn off remote device. Can be used as a broadcast. No Payload
CecVersion = 158
Used to indicate the supported CEC version, in response to a CecOpcode::GetCecVersion
Parameters: Version
GetCecVersion = 159
core message
When in passthrough mode this message has to be handled by userspace, otherwise the core will return the CEC version that was set with CecDevice::set_log.
GivePhysicalAddr = 131
core message
When in passthrough mode this message has to be handled by userspace, otherwise the core will report the current physical address.
GetMenuLanguage = 145
ReportPhysicalAddr = 132
Used to inform all other devices of the mapping between physical and logical address of the initiator.
Parameters:
SetMenuLanguage = 50
Used by a TV or another device to indicate the menu language.
Parameters: [Language]
ReportFeatures = 166
HDMI 2.0
GiveFeatures = 165
HDMI 2.0
core message
When in passthrough mode this message has to be handled by userspace, otherwise the core will report the current features as was set with CecDevice::set_log or the message is ignored if the CEC version was older than 2.0.
DeckControl = 66
Used to control a device’s media functions.
Parameters: DeckControlMode
DeckStatus = 27
Used to provide a deck’s status to the initiator of the CecOpcode::GiveDeckStatus message.
Parameters: DeckInfo
GiveDeckStatus = 26
Used to request the status of a device, regardless of whether or not it is the current active source.
Parameters: StatusRequest
Play = 65
Used to control the playback behaviour of a source device.
Parameters: PlayMode
DeviceVendorId = 135
Reports the vendor ID of this device.
Parameters: VendorID
GiveDeviceVendorId = 140
core message When in passthrough mode this message has to be handled by userspace, otherwise the core will return the vendor ID that was set with CecDevice::set_log.
VendorCommand = 137
Allows vendor specific commands to be sent between two devices.
Parameters: vendor specific
VendorCommandWithId = 160
Allows vendor specific commands to be sent between two devices.
Parameters:
- VendorID
- vendor specific
VendorRemoteButtonDown = 138
Indicates that a remote control button has been depressed. Parameters: Vendor Specific RC Code
VendorRemoteButtonUp = 139
The last button pressed indicated by the CecOpcode::VendorRemoteButtonDown message has been released.
SetOsdString = 100
Used to send a text message to output on a TV.
Parameters:
- DisplayControl
- OSDStr<13> String not terminated or prefixed by anything
GiveOsdName = 70
core message When in passthrough mode this message has to be handled by userspace, otherwise the core will report the current OSD name as was set with CecDevice::set_log. No payload. Requests a CecOpcode::SetOsdName
SetOsdName = 71
answer to CecOpcode::GiveOsdName.
Parameters:
OSDStr<14> the name of the device (used in menus). not terminated or prefixed by anything
MenuRequest = 141
A request from the TV for a device to show/remove a menu or to query if a device is currently showing a menu.
Parameters: MenuRequestType
MenuStatus = 142
Used to indicate to the TV that the device is showing/has removed a menu and requests the remote control keys to be passed though.
Parameters: 1 byte Activated(0)/Deactivated(1)
UserControlPressed = 68
Used to indicate that the user pressed a remote control button or switched from one remote control button to another.
Parameters: 1 byte CecUserControlCode
UserControlReleased = 69
The last button pressed indicated by the CecOpcode::UserControlPressed message has been released.
GiveDevicePowerStatus = 143
request CecOpcode::ReportPowerStatus
ReportPowerStatus = 144
Answer to CecOpcode::GiveDevicePowerStatus
Parameters: 1 byte CecPowerStatus
FeatureAbort = 0
It is used to allow devices to indicate if they do not support an opcode that has been directly sent to them, if it is unable to deal with the message at present, or if there was something wrong with the transmitted frame at the high-level protocol layer.
Parameters:
Abort = 255
A device shall always respond with a CecOpcode::FeatureAbort message containing any valid value for CecAbortReason.
CEC switches shall not respond to this message.
When in CecModeFollower::ExclusivePassthru this message has to be handled by userspace, otherwise the core will return a feature refused message as per the specification.
GiveAudioStatus = 113
Requests an amplifier to send its volume and mute status via CecOpcode::ReportAudioStatus
GiveSystemAudioModeStatus = 125
Requests the status of the System Audio Mode
ReportAudioStatus = 122
Used to indicate the current audio volume status of a device.
Parameters: 1 byte
Payload indicates audio playback volume, expressed as a percentage (0% - 100%). N=0 is no sound; N=100 is maximum volume sound level. The linearity of the sound level is device dependent. This value is mainly used for displaying a volume status bar on a TV screen.
The payload’s highest bit (&0x80
) indicates mute
ReportShortAudioDescriptor = 163
RequestShortAudioDescriptor = 164
SetSystemAudioMode = 114
Turns the System Audio Mode On or Off.
Parameters: 1 byte On(1)/Off(0)
If set to On, the TV mutes its speakers. The TV or STB sends relevant CecOpcode::UserControlPressed or CecOpcode::UserControlReleased as necessary.
SystemAudioModeRequest = 112
Requests to use System Audio Mode to the amplifier
Parameters:
CecPhysicalAddress of device to be used as source of the audio stream.
OR:
no payload
The amplifier comes out of standby (if necessary) and switches to the relevant connector for device specified by Physical Address.
It then sends a CecOpcode::SetSystemAudioMode On
message.
… the device requesting this information can send the volume-related CecOpcode::UserControlPressed or CecOpcode::UserControlReleased messages.
CecOpcode::SystemAudioModeRequest sent without a Physical Address parameter requests termination of the feature.
In this case, the amplifier sends a CecOpcode::SetSystemAudioMode Off
message.
SystemAudioModeStatus = 126
Reports the current status of the System Audio Mode
Parameters: 1 byte On(1)/Off(0)
The feature can be initiated from a device (eg TV or STB) or the amplifier. In the case of initiation by a device other than the amplifier, that device sends an CecOpcode::SystemAudioModeRequest to the amplifier, with the physical address of the device that it wants to use as a source as an operand. Note that the Physical Address may be the TV or STB itself.
SetAudioRate = 154
Used to control audio rate from Source Device.
Parameters: [Audio Rate]
RecordOff = 11
Requests a device to stop a recording.
RecordOn = 9
Attempt to record the specified source.
Parameters: [RecordSource]
RecordStatus = 10
Used by a Recording Device to inform the initiator of the message CecOpcode::RecordOn about its status.
Parameters: [RecordStatusInfo]
RecordTvScreen = 15
Request by the Recording Device to record the presently displayed source.
ClearAnalogueTimer = 51
Used to clear an Analogue timer block of a device.
Parameters: See CecOpcode::SetAnalogueTimer
ClearDigitalTimer = 153
Used to clear an Digital timer block of a device.
Parameters: See CecOpcode::SetDigitalTimer
ClearExtTimer = 161
Used to clear an External timer block of a device.
Parameters: See CecOpcode::SetExtTimer
SetAnalogueTimer = 52
Used to set a single timer block on an Analogue Recording Device.
Parameters:
- CecTimer
- RecordingSequence
- [Analogue Broadcast Type]
- [Analogue Frequency]
- [Broadcast System]
SetDigitalTimer = 151
Used to set a single timer block on a Digital Recording Device.
Parameters:
- CecTimer
- RecordingSequence
- [Digital Service Identification]
SetExtTimer = 162
Used to set a single timer block to record from an external device.
Parameters:
- CecTimer
- RecordingSequence
- [External Source Specifier]
- [External Plug] | [External Physical Address]
SetTimerProgramTitle = 103
Used to set the name of a program associated with a timer block.
Sent directly after sending a CecOpcode::SetAnalogueTimer or CecOpcode::SetDigitalTimer message.
The name is then associated with that timer block.
Parameters: [Program Title String]
TimerClearedStatus = 67
Used to give the status of a CecOpcode::ClearAnalogueTimer, CecOpcode::ClearDigitalTimer or CecOpcode::ClearExtTimer message.
Parameters: [TimerClearedStatusData]
TimerStatus = 53
Used to send timer status to the initiator of a CecOpcode::SetAnalogueTimer, CecOpcode::SetDigitalTimer or CecOpcode::SetExtTimer message.
Parameters: [TimerStatusData]
GiveTunerDeviceStatus = 8
Used to request the status of a tuner device.
Parameters: StatusRequest