else
{
LIB_CEC->AddLog(CEC_LOG_DEBUG, "<< %s (%X) -> %s (%X): vendor id %s (%x)", GetLogicalAddressName(), m_iLogicalAddress, ToString(destination), destination, ToString((cec_vendor_id)iVendorId), iVendorId);
- bReturn = m_handler->TransmitVendorID(m_iLogicalAddress, iVendorId, bIsReply);
+ bReturn = m_handler->TransmitVendorID(m_iLogicalAddress, destination, iVendorId, bIsReply);
}
MarkReady();
return bReturn;
if (!map)
return;
- CCECBusDevice* previouslyActive = map->GetActiveSource();
- if (!previouslyActive)
+ CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true);
+ if (newRoute && newRoute->IsHandledByLibCEC())
+ {
+ newRoute->ActivateSource();
return;
+ }
CECDEVICEVEC devices;
m_processor->GetDevices()->GetChildrenOf(devices, this);
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 */)
{
- SetPowerStatus(CEC_POWER_STATUS_ON);
+ if (iNewAddress != CEC_INVALID_PHYSICAL_ADDRESS)
+ SetPowerStatus(CEC_POWER_STATUS_ON);
CLockObject lock(m_mutex);
if (iNewAddress != m_iStreamPath)