|
41 | 41 | #define VL_POWER_CHANGE 0x20
|
42 | 42 | #define VL_POWERED_UP 0x00
|
43 | 43 | #define VL_POWERED_DOWN 0x01
|
| 44 | +#define VL_UNKNOWN1 0x06 |
44 | 45 |
|
45 | 46 | using namespace CEC;
|
46 | 47 | using namespace PLATFORM;
|
@@ -90,6 +91,18 @@ int CVLCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &comman
|
90 | 91 | return CEC_ABORT_REASON_INVALID_OPERAND;
|
91 | 92 |
|
92 | 93 | if (command.initiator == CECDEVICE_TV &&
|
| 94 | + command.parameters.At(3) == VL_UNKNOWN1) |
| 95 | + { |
| 96 | + // set the power up event time |
| 97 | + { |
| 98 | + CLockObject lock(m_mutex); |
| 99 | + if (m_iPowerUpEventReceived == 0) |
| 100 | + m_iPowerUpEventReceived = GetTimeMs(); |
| 101 | + } |
| 102 | + // mark the TV as powered on |
| 103 | + m_processor->GetTV()->SetPowerStatus(CEC_POWER_STATUS_ON); |
| 104 | + } |
| 105 | + else if (command.initiator == CECDEVICE_TV && |
93 | 106 | command.destination == CECDEVICE_BROADCAST &&
|
94 | 107 | command.parameters.At(3) == VL_POWER_CHANGE)
|
95 | 108 | {
|
@@ -195,3 +208,20 @@ bool CVLCommandHandler::SourceSwitchAllowed(void)
|
195 | 208 | {
|
196 | 209 | return PowerUpEventReceived();
|
197 | 210 | }
|
| 211 | + |
| 212 | +int CVLCommandHandler::HandleSystemAudioModeRequest(const cec_command &command) |
| 213 | +{ |
| 214 | + if (command.initiator == CECDEVICE_TV) |
| 215 | + { |
| 216 | + // set the power up event time |
| 217 | + { |
| 218 | + CLockObject lock(m_mutex); |
| 219 | + if (m_iPowerUpEventReceived == 0) |
| 220 | + m_iPowerUpEventReceived = GetTimeMs(); |
| 221 | + } |
| 222 | + // mark the TV as powered on |
| 223 | + m_processor->GetTV()->SetPowerStatus(CEC_POWER_STATUS_ON); |
| 224 | + } |
| 225 | + |
| 226 | + return CCECCommandHandler::HandleSystemAudioModeRequest(command); |
| 227 | +} |
0 commit comments