cec: send feature abort to LG devices when they send a vendor id. start with status...
authorLars Op den Kamp <lars@opdenkamp.eu>
Sat, 11 Feb 2012 20:57:26 +0000 (21:57 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sat, 11 Feb 2012 20:57:26 +0000 (21:57 +0100)
src/lib/implementations/SLCommandHandler.cpp
src/lib/implementations/SLCommandHandler.h

index c9fd65d3a544a762ed0060ff2db1c810f77f82d9..125a23ee01f7bfa1c30c01db990d39bd7e841807 100644 (file)
@@ -81,7 +81,7 @@ bool CSLCommandHandler::InitHandler(void)
   if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
     primary->TransmitVendorID(CECDEVICE_TV, false);
 
-  primary->SetPowerStatus(CEC_POWER_STATUS_STANDBY);
+  primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
   return true;
 }
 
@@ -106,13 +106,22 @@ bool CSLCommandHandler::HandleActiveSource(const cec_command &command)
   return true;
 }
 
+bool CSLCommandHandler::HandleDeviceVendorId(const cec_command &command)
+{
+  SetVendorId(command);
+
+  cec_command response;
+  cec_command::Format(response, m_processor->GetLogicalAddress(), command.initiator, CEC_OPCODE_FEATURE_ABORT);
+  return Transmit(response);
+}
+
 bool CSLCommandHandler::HandleFeatureAbort(const cec_command &command)
 {
   CCECBusDevice *primary = m_processor->GetPrimaryDevice();
   if (primary->GetPowerStatus(false) == CEC_POWER_STATUS_ON && !m_bPowerStateReset && !m_bSLEnabled)
   {
     m_bPowerStateReset = true;
-    primary->SetPowerStatus(CEC_POWER_STATUS_STANDBY);
+    primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
   }
 
   return CCECCommandHandler::HandleFeatureAbort(command);
index dae426605758b1e03b7f42535db9be55b588dae9..8b006962ef82acfb7ee6c9ee582bad5f4bbc8d70 100644 (file)
@@ -46,6 +46,7 @@ namespace CEC
 
   protected:
     virtual bool HandleActiveSource(const cec_command &command);
+    virtual bool HandleDeviceVendorId(const cec_command &command);
     virtual bool HandleFeatureAbort(const cec_command &command);
     virtual bool HandleGivePhysicalAddress(const cec_command &command);
     virtual bool HandleVendorCommand(const cec_command &command);