if (SetAckMask(m_logicalAddresses.AckMask()) &&
SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true))
{
+ m_controller->AddLog(CEC_LOG_ERROR, "processor thread started");
m_busScan = new CCECBusScan(this);
m_busScan->CreateThread(true);
return true;
}
+ else
+ {
+ m_controller->AddLog(CEC_LOG_ERROR, "failed to initialise the processor");
+ }
}
- else
- m_controller->AddLog(CEC_LOG_ERROR, "could not create a processor thread");
+ m_controller->AddLog(CEC_LOG_ERROR, "could not create a processor thread");
return false;
}
iPhysicalAddress += (uint16_t)(iPort * iPos);
strLog.Format("checking physical address %4x", iPhysicalAddress);
AddLog(CEC_LOG_DEBUG, strLog);
- if (CheckPhysicalAddress(iPhysicalAddress))
+ if (PhysicalAddressInUse(iPhysicalAddress))
{
strLog.Format("physical address %4x is in use", iPhysicalAddress);
AddLog(CEC_LOG_DEBUG, strLog);
}
else
{
+ strLog.Format("physical address %4x is free", iPhysicalAddress);
+ AddLog(CEC_LOG_DEBUG, strLog);
SetPhysicalAddress(iPhysicalAddress);
bReturn = true;
}
return bReturn;
}
-bool CCECProcessor::CheckPhysicalAddress(uint16_t iPhysicalAddress)
+bool CCECProcessor::PhysicalAddressInUse(uint16_t iPhysicalAddress)
{
for (unsigned int iPtr = 0; iPtr < 15; iPtr++)
{
private:
void ScanCECBus(void);
- bool CheckPhysicalAddress(uint16_t iPhysicalAddress);
+ bool PhysicalAddressInUse(uint16_t iPhysicalAddress);
bool TryLogicalAddress(cec_logical_address address);
bool FindLogicalAddressRecordingDevice(void);
bool FindLogicalAddressTuner(void);
else if (command.parameters.size == 1 &&
command.parameters[0] == SL_COMMAND_REQUEST_VENDOR_ID)
{
- TransmitLGVendorId(m_busDevice->GetProcessor()->GetLogicalAddresses().primary, CECDEVICE_BROADCAST);
+// if (command.destination != CECDEVICE_BROADCAST)
+// m_busDevice->GetProcessor()->m_busDevices[m_busDevice->GetProcessor()->GetLogicalAddresses().primary]->TransmitPowerState(command.initiator);
return true;
}
m_bSkipNextVendorId = true;
TransmitLGVendorId(m_busDevice->GetProcessor()->GetLogicalAddresses().primary, CECDEVICE_BROADCAST);
}
+ else
+ {
+ m_bSkipNextVendorId = false;
+ }
m_bSLEnabled = false;
}
bHandled = true;