+ if (m_bHandlerInited)
+ return true;
+ m_bHandlerInited = true;
+
+ /* reply with LGs vendor id */
+ CCECBusDevice *primary = m_processor->GetPrimaryDevice();
+ if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
+ primary->TransmitVendorID(CECDEVICE_BROADCAST, false);
+
+ primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
+ return true;
+}
+
+bool CSLCommandHandler::ActivateSource(void)
+{
+ if (m_bActiveSourceSent)
+ return false;
+ m_bActiveSourceSent = true;
+
+ CCECBusDevice *primary = m_processor->GetPrimaryDevice();
+ primary->SetActiveSource();
+ primary->TransmitActiveSource();
+ return true;
+}
+
+bool CSLCommandHandler::HandleActiveSource(const cec_command &command)
+{
+ if (command.parameters.size == 2)
+ {
+ uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
+ if (iAddress != m_busDevice->GetPhysicalAddress(false))
+ m_bSLEnabled = false;
+ return m_processor->SetActiveSource(iAddress);
+ }
+
+ return true;
+}
+
+bool CSLCommandHandler::HandleDeviceVendorId(const cec_command &command)
+{
+ SetVendorId(command);
+
+ if (!m_bSLEnabled)