cec: send power state 'standby->on' to the tv when initing the SL handler
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 13 Feb 2012 12:01:14 +0000 (13:01 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 13 Feb 2012 12:01:14 +0000 (13:01 +0100)
src/lib/implementations/SLCommandHandler.cpp

index f1e3d7e229539980e1b34e9c71e74f32661c25ec..7771b20b662b7d4a42552831f38a5983cc26071b 100644 (file)
@@ -77,12 +77,17 @@ bool CSLCommandHandler::InitHandler(void)
     return true;
   m_bHandlerInited = true;
 
-  /* reply with LGs vendor id */
   CCECBusDevice *primary = m_processor->GetPrimaryDevice();
   if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
+  {
+    /* start as 'in transition standby->on' */
+    primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
+    primary->TransmitPowerState(CECDEVICE_TV);
+
+    /* reply with LGs vendor id */
     primary->TransmitVendorID(CECDEVICE_BROADCAST, false);
+  }
 
-  primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
   return true;
 }