#include "lib/implementations/CECCommandHandler.h"
#include "lib/implementations/SLCommandHandler.h"
#include "lib/implementations/VLCommandHandler.h"
+#include "lib/implementations/PHCommandHandler.h"
#include "lib/LibCEC.h"
#include "lib/CECTypeUtils.h"
#include "lib/platform/util/timeutils.h"
case CEC_VENDOR_PANASONIC:
m_handler = new CVLCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
+ case CEC_VENDOR_PHILIPS:
+ m_handler = new CPHCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
+ break;
default:
m_handler = new CCECCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
{
LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X): physical address changed from %04x to %04x", GetLogicalAddressName(), m_iLogicalAddress, m_iPhysicalAddress, iNewAddress);
m_iPhysicalAddress = iNewAddress;
-
- if (m_processor->GetDevices()->GetActiveSourceAddress() == iNewAddress)
- MarkAsActiveSource();
}
return true;
}
{
MarkBusy();
bReturn = m_handler->TransmitRequestPowerStatus(initiator, m_iLogicalAddress, bWaitForResponse);
+ if (!bReturn)
+ SetPowerStatus(CEC_POWER_STATUS_UNKNOWN);
MarkReady();
}
return bReturn;
void CCECBusDevice::SetActiveRoute(uint16_t iRoute)
{
+ SetPowerStatus(CEC_POWER_STATUS_ON);
+
CCECDeviceMap* map = m_processor->GetDevices();
if (!map)
return;
for (CECDEVICEVEC::iterator it = devices.begin(); it != devices.end(); it++)
{
- if (!CCECTypeUtils::PhysicalAddressIsIncluded(iRoute, (*it)->GetCurrentPhysicalAddress()))
+ if ((*it)->GetCurrentPhysicalAddress() == iRoute && (*it)->IsHandledByLibCEC())
+ (*it)->ActivateSource();
+ else if (!CCECTypeUtils::PhysicalAddressIsIncluded(iRoute, (*it)->GetCurrentPhysicalAddress()))
(*it)->MarkAsInactiveSource();
}
}
void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* = CEC_INVALID_PHYSICAL_ADDRESS */)
{
+ if (iNewAddress != CEC_INVALID_PHYSICAL_ADDRESS)
+ SetPowerStatus(CEC_POWER_STATUS_ON);
+
CLockObject lock(m_mutex);
if (iNewAddress != m_iStreamPath)
{