cec: don't reset the power state to powered off when not the active source, or the...
[deb_libcec.git] / src / lib / devices / CECBusDevice.cpp
index 8f02ac7e28bf9ad725cf5179a4ef43ec447e271e..7e63a67ff8808d6da91a3835a4a590cccd68d65b 100644 (file)
@@ -44,7 +44,7 @@ using namespace PLATFORM;
 
 #define ToString(p) m_processor->ToString(p)
 
-CCECBusDevice::CCECBusDevice(CCECProcessor *processor, cec_logical_address iLogicalAddress, uint16_t iPhysicalAddress) :
+CCECBusDevice::CCECBusDevice(CCECProcessor *processor, cec_logical_address iLogicalAddress, uint16_t iPhysicalAddress /* = CEC_INVALID_PHYSICAL_ADDRESS */) :
   m_type                  (CEC_DEVICE_TYPE_RESERVED),
   m_iPhysicalAddress      (iPhysicalAddress),
   m_iStreamPath           (CEC_INVALID_PHYSICAL_ADDRESS),
@@ -975,12 +975,6 @@ bool CCECBusDevice::TransmitPowerState(cec_logical_address dest)
   cec_power_status state;
   {
     CLockObject lock(m_mutex);
-    if (!IsActiveSource())
-    {
-      CLibCEC::AddLog(CEC_LOG_NOTICE, "power state requested of %s (%X), but we are not the active source. setting power state to standby", GetLogicalAddressName(), m_iLogicalAddress);
-      SetPowerStatus(CEC_POWER_STATUS_STANDBY);
-    }
-
     CLibCEC::AddLog(CEC_LOG_NOTICE, "<< %s (%X) -> %s (%X): %s", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest, ToString(m_powerStatus));
     state = m_powerStatus;
   }