m_strDeviceName(strDeviceName),
m_controller(controller),
m_bMonitor(false),
- m_busScan(NULL)
+ m_busScan(NULL),
+ m_iStandardLineTimeout(3),
+ m_iRetryLineTimeout(3)
{
m_communication = new CAdapterCommunication(this);
m_logicalAddresses.Clear();
m_strDeviceName(strDeviceName),
m_types(types),
m_controller(controller),
- m_bMonitor(false)
+ m_bMonitor(false),
+ m_iStandardLineTimeout(3),
+ m_iRetryLineTimeout(3)
{
m_communication = new CAdapterCommunication(this);
m_logicalAddresses.Clear();
return bReturn;
}
+void CCECProcessor::SetStandardLineTimeout(uint8_t iTimeout)
+{
+ CLockObject lock(&m_mutex);
+ m_iStandardLineTimeout = iTimeout;
+}
+
+void CCECProcessor::SetRetryLineTimeout(uint8_t iTimeout)
+{
+ CLockObject lock(&m_mutex);
+ m_iRetryLineTimeout = iTimeout;
+}
+
bool CCECProcessor::SetActiveSource(cec_logical_address iAddress)
{
return SetStreamPath(m_busDevices[iAddress]->GetPhysicalAddress(false));
bool bReturn(false);
CLockObject lock(&m_mutex);
{
- m_communication->SetLineTimeout(3);
+ m_communication->SetLineTimeout(m_iStandardLineTimeout);
do
{
if (output->tries > 0)
- m_communication->SetLineTimeout(5);
+ m_communication->SetLineTimeout(m_iRetryLineTimeout);
CLockObject msgLock(&output->mutex);
if (!m_communication || !m_communication->Write(output))
}while (output->transmit_timeout > 0 && output->needs_retry() && ++output->tries <= output->maxTries);
}
- m_communication->SetLineTimeout(3);
+ m_communication->SetLineTimeout(m_iStandardLineTimeout);
return bReturn;
}
virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = false);
virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait = false);
virtual bool EnablePhysicalAddressDetection(void) { return false; };
+ void SetStandardLineTimeout(uint8_t iTimeout);
+ void SetRetryLineTimeout(uint8_t iTimeout);
bool SetLineTimeout(uint8_t iTimeout);
cec_keypress m_previousKey;
CThread * m_busScan;
uint8_t m_iLineTimeout;
+ uint8_t m_iStandardLineTimeout;
+ uint8_t m_iRetryLineTimeout;
};
class CCECBusScan : public CThread
return true;
m_bSLEnabled = true;
+ m_busDevice->GetProcessor()->SetStandardLineTimeout(3);
+ m_busDevice->GetProcessor()->SetRetryLineTimeout(3);
+
CCECBusDevice *primary = m_busDevice->GetProcessor()->m_busDevices[m_busDevice->GetProcessor()->GetLogicalAddresses().primary];
if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
primary->SetVendorId(CEC_VENDOR_LG, false);