From: Lars Op den Kamp Date: Mon, 8 Oct 2012 15:37:58 +0000 (+0200) Subject: fixed - always send image view on to the tv, don't check the power status X-Git-Tag: upstream/2.2.0~1^2~17^2^2~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f81fdbfa342d531485731c2102d18e7ae6941abf;p=deb_libcec.git fixed - always send image view on to the tv, don't check the power status --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index afc2228..e3d4cfd 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -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 { diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index d23340f..269cbde 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -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();