bool CCECClient::SetDevicePhysicalAddress(const uint16_t iPhysicalAddress)
{
if (!CLibCEC::IsValidPhysicalAddress(iPhysicalAddress))
+ {
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - not setting invalid physical address %04x", iPhysicalAddress);
return false;
+ }
// reconfigure all devices
cec_logical_address reactivateSource(CECDEVICE_UNKNOWN);
m_busDevices->GetByLogicalAddresses(devices, configuration.logicalAddresses);
for (CECDEVICEVEC::const_iterator it = devices.begin(); it != devices.end(); it++)
{
+ // set the physical address of the device at this LA
+ if (CLibCEC::IsValidPhysicalAddress(configuration.iPhysicalAddress))
+ (*it)->SetPhysicalAddress(configuration.iPhysicalAddress);
+
// replace a previous client
CLockObject lock(m_mutex);
m_clients.erase((*it)->GetLogicalAddress());
CLockObject lock(m_mutex);
if (!HasValidPhysicalAddress())
{
- LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X) has an invalid physical address, not sending active source commands", GetLogicalAddressName(), m_iLogicalAddress);
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X) has an invalid physical address (%04x), not sending active source commands", GetLogicalAddressName(), m_iLogicalAddress, m_iPhysicalAddress);
return false;
}