fixed - always send image view on to the tv, don't check the power status
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 8 Oct 2012 15:37:58 +0000 (17:37 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 8 Oct 2012 15:51:28 +0000 (17:51 +0200)
src/lib/devices/CECBusDevice.cpp
src/lib/implementations/CECCommandHandler.cpp

index afc2228e5f67380358b0bade44250fdcc090e25f..e3d4cfdeea8876a2d2d36d87f1d85aadab57d717 100644 (file)
@@ -1110,16 +1110,13 @@ bool CCECBusDevice::PowerOn(const cec_logical_address initiator)
   GetVendorId(initiator); // ensure that we got the vendor id, because the implementations vary per vendor
 
   MarkBusy();
-  cec_power_status currentStatus = GetPowerStatus(initiator, false);
-  if (currentStatus != CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON &&
-    currentStatus != CEC_POWER_STATUS_ON)
+  cec_power_status currentStatus;
+  if (m_iLogicalAddress == CECDEVICE_TV ||
+      ((currentStatus = GetPowerStatus(initiator, false)) != CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON &&
+        currentStatus != CEC_POWER_STATUS_ON))
   {
     LIB_CEC->AddLog(CEC_LOG_NOTICE, "<< powering on '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
-    if (m_handler->PowerOn(initiator, m_iLogicalAddress))
-    {
-      SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
-      bReturn = true;
-    }
+    bReturn = m_handler->PowerOn(initiator, m_iLogicalAddress);
   }
   else
   {
index d23340fed66aa32e21b551d40f9914397ee712cf..269cbde0d183fbdef4411fa4cc1f975c05869337 100644 (file)
@@ -1121,9 +1121,7 @@ bool CCECCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = f
     VendorPreActivateSourceHook();
 
     // power on the TV
-    bool bActiveSourceFailed(false);
-    if (m_processor->GetDevice(CECDEVICE_TV)->GetPowerStatus(m_busDevice->GetLogicalAddress()) != CEC_POWER_STATUS_ON)
-      bActiveSourceFailed = !m_busDevice->TransmitImageViewOn();
+    bool bActiveSourceFailed = !m_busDevice->TransmitImageViewOn();
 
     // check if we're allowed to switch sources
     bool bSourceSwitchAllowed = SourceSwitchAllowed();