if (SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true))
{
- /* init the default handler */
- if (m_busDevices[CECDEVICE_TV]->GetHandler()->GetVendorId() == CEC_VENDOR_UNKNOWN)
- m_busDevices[CECDEVICE_TV]->GetHandler()->InitHandler();
+ /* init the handler */
+ m_busDevices[CECDEVICE_TV]->GetHandler()->InitHandler();
m_controller->AddLog(CEC_LOG_DEBUG, "processor thread started");
return true;
m_processor(m_busDevice->GetProcessor()),
m_iTransmitTimeout(CEC_DEFAULT_TRANSMIT_TIMEOUT),
m_iTransmitWait(CEC_DEFAULT_TRANSMIT_WAIT),
- m_iTransmitRetries(CEC_DEFAULT_TRANSMIT_RETRIES)
+ m_iTransmitRetries(CEC_DEFAULT_TRANSMIT_RETRIES),
+ m_bHandlerInited(false)
{
}
primary->SetPowerStatus(CEC_POWER_STATUS_ON);
primary->SetMenuState(CEC_MENU_STATE_ACTIVATED);
- m_processor->SetActiveSource();
- primary->TransmitMenuState(m_busDevice->GetLogicalAddress());
+ if (m_processor->GetPrimaryDevice()->GetPhysicalAddress(false) != 0xffff)
+ {
+ m_processor->SetActiveSource();
+ primary->TransmitMenuState(m_busDevice->GetLogicalAddress());
+ m_bHandlerInited = true;
+ }
}
return true;
}
bool CSLCommandHandler::InitHandler(void)
{
+ if (m_bHandlerInited)
+ return true;
+ m_bHandlerInited = true;
+
m_processor->SetStandardLineTimeout(3);
m_processor->SetRetryLineTimeout(3);