Skip to content

Commit a085bea

Browse files
committed
vendor command 06:05 was commented out for panasonic because it was reported to be sent on power off too. i don't see that in the field, and it prevented resume from standby from working correctly. issue #192
1 parent 5d71f08 commit a085bea

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/lib/implementations/VLCommandHandler.cpp

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,23 @@ int CVLCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &comman
109109
if (command.initiator == CECDEVICE_TV &&
110110
command.parameters.At(3) == VL_UNKNOWN1)
111111
{
112-
// XXX this is also sent when the TV is powered off
113-
// TODO power up sends 06:05. check whether this is also sent on power off
114-
#if 0
115-
// set the power up event time
112+
if (command.parameters.size >= 5 && command.parameters.At(4) == 0x05)
116113
{
117-
CLockObject lock(m_mutex);
118-
if (m_iPowerUpEventReceived == 0)
119-
m_iPowerUpEventReceived = GetTimeMs();
114+
// set the power up event time
115+
{
116+
CLockObject lock(m_mutex);
117+
if (m_iPowerUpEventReceived == 0)
118+
m_iPowerUpEventReceived = GetTimeMs();
119+
}
120+
// mark the TV as powered on
121+
m_processor->GetTV()->SetPowerStatus(CEC_POWER_STATUS_ON);
122+
123+
CCECBusDevice* dev = m_processor->GetPrimaryDevice();
124+
if (dev && dev->IsActiveSource())
125+
dev->TransmitActiveSource(false);
126+
127+
return COMMAND_HANDLED;
120128
}
121-
// mark the TV as powered on
122-
m_processor->GetTV()->SetPowerStatus(CEC_POWER_STATUS_ON);
123-
#endif
124-
return COMMAND_HANDLED;
125129
}
126130
else if (command.initiator == CECDEVICE_TV &&
127131
command.destination == CECDEVICE_BROADCAST &&

0 commit comments

Comments
 (0)