m_bVendorIdSent(false)
{
/* TODO set to powered off until we fixed the connect on start loop issue */
- m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary]->m_powerStatus = CEC_POWER_STATUS_STANDBY;
+ m_processor->GetPrimaryDevice()->m_powerStatus = CEC_POWER_STATUS_STANDBY;
}
bool CSLCommandHandler::HandleVendorCommand(const cec_command &command)
void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command)
{
- CCECBusDevice *device = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
+ CCECBusDevice *device = m_processor->GetPrimaryDevice();
if (device)
{
m_bSLEnabled = true;
void CSLCommandHandler::HandleVendorCommandSLConnect(const cec_command &command)
{
m_bSLEnabled = true;
+ m_processor->m_busDevices[command.initiator]->SetActiveSource();
m_processor->m_busDevices[command.destination]->TransmitActiveSource();
- m_processor->SetStreamPath(m_processor->m_busDevices[command.destination]->GetPhysicalAddress(false));
TransmitVendorCommand05(command.destination, command.initiator);
TransmitDeckStatus(command.initiator);
}
void CSLCommandHandler::TransmitDeckStatus(const cec_logical_address iDestination)
{
/* set deck status for the playback device */
- CCECBusDevice *primary = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
+ CCECBusDevice *primary = m_processor->GetPrimaryDevice();
if (primary->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || primary->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE)
{
((CCECPlaybackDevice *)primary)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
bool CSLCommandHandler::InitHandler(void)
{
+ if (m_bHandlerInited)
+ return true;
+ m_bHandlerInited = true;
+
m_processor->SetStandardLineTimeout(3);
m_processor->SetRetryLineTimeout(3);
m_iTransmitRetries = 4;
m_iTransmitTimeout = 500;
- CCECBusDevice *primary = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
+ CCECBusDevice *primary = m_processor->GetPrimaryDevice();
if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
{
primary->SetVendorId(CEC_VENDOR_LG, false);
device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
{
((CCECPlaybackDevice *)device)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
+ ((CCECPlaybackDevice *)device)->TransmitDeckStatus(CECDEVICE_TV);
}
}
}