+ if (!m_processor->IsHandledByLibCEC(command.destination))
+ return true;
+
+ if (command.parameters.size == 1 &&
+ command.parameters[0] == SL_COMMAND_UNKNOWN_01)
+ {
+ HandleVendorCommand01(command);
+ return COMMAND_HANDLED;
+ }
+ else if (command.parameters.size == 2 &&
+ command.parameters[0] == SL_COMMAND_POWER_ON)
+ {
+ HandleVendorCommandPowerOn(command);
+ return COMMAND_HANDLED;
+ }
+ else if (command.parameters.size == 2 &&
+ command.parameters[0] == SL_COMMAND_CONNECT_REQUEST)
+ {
+ HandleVendorCommandSLConnect(command);
+ return COMMAND_HANDLED;
+ }
+ else if (command.parameters.size == 1 &&
+ command.parameters[0] == SL_COMMAND_REQUEST_POWER_STATUS)
+ {
+ HandleVendorCommandPowerOnStatus(command);
+ return COMMAND_HANDLED;
+ }
+
+ return CCECCommandHandler::HandleVendorCommand(command);
+}
+
+void CSLCommandHandler::HandleVendorCommand01(const cec_command &command)
+{
+ m_processor->GetPrimaryDevice()->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
+ TransmitVendorCommand0205(command.destination, command.initiator);
+
+ CCECBusDevice* dev = m_processor->GetDevice(command.destination);
+ if (dev && dev->IsHandledByLibCEC() && dev->IsActiveSource())
+ dev->TransmitActiveSource(false);
+}
+
+void CSLCommandHandler::TransmitVendorCommand0205(const cec_logical_address iSource, const cec_logical_address iDestination)
+{
+ cec_command response;
+ cec_command::Format(response, iSource, iDestination, CEC_OPCODE_VENDOR_COMMAND);
+ response.PushBack(SL_COMMAND_UNKNOWN_02);
+ response.PushBack(SL_COMMAND_TYPE_HDDRECORDER);
+
+ Transmit(response, false, true);
+ SetSLInitialised();
+}
+
+void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command)
+{
+ if (command.initiator != CECDEVICE_TV)
+ return;
+
+ CCECBusDevice *device = m_processor->GetPrimaryDevice();