2 * This file is part of the libCEC(R) library.
4 * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved.
5 * libCEC(R) is an original work, containing original code.
7 * libCEC(R) is a trademark of Pulse-Eight Limited.
9 * This program is dual-licensed; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * Alternatively, you can license this library under a commercial license,
25 * please contact Pulse-Eight Licensing for more information.
27 * For more information contact:
28 * Pulse-Eight Licensing <license@pulse-eight.com>
29 * http://www.pulse-eight.com/
30 * http://www.pulse-eight.net/
33 #include "CECProcessor.h"
35 #include "adapter/USBCECAdapterCommunication.h"
36 #include "devices/CECBusDevice.h"
37 #include "devices/CECAudioSystem.h"
38 #include "devices/CECPlaybackDevice.h"
39 #include "devices/CECRecordingDevice.h"
40 #include "devices/CECTuner.h"
41 #include "devices/CECTV.h"
42 #include "implementations/CECCommandHandler.h"
44 #include "CECClient.h"
45 #include "platform/util/timeutils.h"
49 using namespace PLATFORM
;
51 #define CEC_PROCESSOR_SIGNAL_WAIT_TIME 1000
53 #define ToString(x) m_libcec->ToString(x)
55 CCECProcessor::CCECProcessor(CLibCEC
*libcec
) :
56 m_bInitialised(false),
57 m_communication(NULL
),
60 m_iPreviousAckMask(0),
61 m_iStandardLineTimeout(3),
62 m_iRetryLineTimeout(3),
63 m_iLastTransmission(0)
65 m_busDevices
= new CCECDeviceMap(this);
68 CCECProcessor::~CCECProcessor(void)
74 bool CCECProcessor::Start(const char *strPort
, uint16_t iBaudRate
/* = CEC_SERIAL_DEFAULT_BAUDRATE */, uint32_t iTimeoutMs
/* = CEC_DEFAULT_CONNECT_TIMEOUT */)
76 CLockObject
lock(m_mutex
);
77 if (!OpenConnection(strPort
, iBaudRate
, iTimeoutMs
))
80 /* create the processor thread */
84 m_libcec
->AddLog(CEC_LOG_DEBUG
, "processor thread started");
87 m_libcec
->AddLog(CEC_LOG_ERROR
, "could not create a processor thread");
92 SetCECInitialised(true);
97 void CCECProcessor::Close(void)
99 SetCECInitialised(false);
104 delete m_communication
;
105 m_communication
= NULL
;
109 m_iPreviousAckMask
= 0;
110 m_iStandardLineTimeout
= 3;
111 m_iRetryLineTimeout
= 3;
112 m_iLastTransmission
= 0;
113 m_busDevices
->ResetDeviceStatus();
116 bool CCECProcessor::OpenConnection(const char *strPort
, uint16_t iBaudRate
, uint32_t iTimeoutMs
, bool bStartListening
/* = true */)
122 CLockObject
lock(m_mutex
);
123 if (m_communication
&& m_communication
->IsOpen())
125 m_libcec
->AddLog(CEC_LOG_ERROR
, "connection already opened");
128 else if (!m_communication
)
129 m_communication
= new CUSBCECAdapterCommunication(this, strPort
, iBaudRate
);
132 CTimeout
timeout(iTimeoutMs
> 0 ? iTimeoutMs
: CEC_DEFAULT_TRANSMIT_WAIT
);
134 /* open a new connection */
135 unsigned iConnectTry(0);
136 while (timeout
.TimeLeft() > 0 && (bReturn
= m_communication
->Open((timeout
.TimeLeft() / CEC_CONNECT_TRIES
), false, bStartListening
)) == false)
138 m_libcec
->AddLog(CEC_LOG_ERROR
, "could not open a connection (try %d)", ++iConnectTry
);
139 m_communication
->Close();
140 CEvent::Sleep(CEC_DEFAULT_CONNECT_RETRY_WAIT
);
143 m_libcec
->AddLog(CEC_LOG_NOTICE
, "connection opened");
148 bool CCECProcessor::CECInitialised(void)
150 CLockObject
lock(m_threadMutex
);
151 return m_bInitialised
;
154 void CCECProcessor::SetCECInitialised(bool bSetTo
/* = true */)
156 CLockObject
lock(m_mutex
);
157 m_bInitialised
= bSetTo
;
162 bool CCECProcessor::TryLogicalAddress(cec_logical_address address
)
164 CCECBusDevice
*device
= m_busDevices
->At(address
);
167 if (device
->IsPresent() || device
->IsHandledByLibCEC())
171 return device
->TryLogicalAddress();
177 void CCECProcessor::ReplaceHandlers(void)
179 if (!CECInitialised())
182 for (CECDEVICEMAP::iterator it
= m_busDevices
->Begin(); it
!= m_busDevices
->End(); it
++)
183 it
->second
->ReplaceHandler(true);
186 bool CCECProcessor::OnCommandReceived(const cec_command
&command
)
188 return m_inBuffer
.Push(command
);
191 void *CCECProcessor::Process(void)
193 m_libcec
->AddLog(CEC_LOG_DEBUG
, "processor thread started");
198 while (!IsStopped() && m_communication
->IsOpen())
200 if (m_inBuffer
.Pop(command
, CEC_PROCESSOR_SIGNAL_WAIT_TIME
))
201 ParseCommand(command
);
203 if (CECInitialised())
207 m_libcec
->CheckKeypressTimeout();
214 bool CCECProcessor::SetActiveSource(uint16_t iStreamPath
)
218 CCECBusDevice
*device
= GetDeviceByPhysicalAddress(iStreamPath
);
220 bReturn
= device
->ActivateSource();
222 m_libcec
->AddLog(CEC_LOG_DEBUG
, "device with PA '%04x' not found", iStreamPath
);
227 void CCECProcessor::SetStandardLineTimeout(uint8_t iTimeout
)
229 CLockObject
lock(m_mutex
);
230 m_iStandardLineTimeout
= iTimeout
;
233 void CCECProcessor::SetRetryLineTimeout(uint8_t iTimeout
)
235 CLockObject
lock(m_mutex
);
236 m_iRetryLineTimeout
= iTimeout
;
239 bool CCECProcessor::PhysicalAddressInUse(uint16_t iPhysicalAddress
)
241 CCECBusDevice
*device
= GetDeviceByPhysicalAddress(iPhysicalAddress
);
242 return device
!= NULL
;
245 void CCECProcessor::LogOutput(const cec_command
&data
)
248 strTx
.Format("<< %02x", ((uint8_t)data
.initiator
<< 4) + (uint8_t)data
.destination
);
250 strTx
.AppendFormat(":%02x", (uint8_t)data
.opcode
);
252 for (uint8_t iPtr
= 0; iPtr
< data
.parameters
.size
; iPtr
++)
253 strTx
.AppendFormat(":%02x", data
.parameters
[iPtr
]);
254 m_libcec
->AddLog(CEC_LOG_TRAFFIC
, strTx
.c_str());
257 bool CCECProcessor::SwitchMonitoring(bool bEnable
)
259 m_libcec
->AddLog(CEC_LOG_NOTICE
, "== %s monitoring mode ==", bEnable
? "enabling" : "disabling");
262 CLockObject
lock(m_mutex
);
263 m_bMonitor
= bEnable
;
264 m_iPreviousAckMask
= m_communication
->GetAckMask();
268 return SetAckMask(0);
270 return SetAckMask(m_iPreviousAckMask
);
273 bool CCECProcessor::PollDevice(cec_logical_address iAddress
)
275 CCECBusDevice
*device
= m_busDevices
->At(iAddress
);
276 CCECBusDevice
*primary
= GetPrimaryDevice();
280 primary
->TransmitPoll(iAddress
) :
281 device
->TransmitPoll(iAddress
);
286 CCECBusDevice
*CCECProcessor::GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress
, bool bSuppressUpdate
/* = true */)
288 return m_busDevices
?
289 m_busDevices
->GetDeviceByPhysicalAddress(iPhysicalAddress
, bSuppressUpdate
) :
293 CCECBusDevice
*CCECProcessor::GetDevice(cec_logical_address address
) const
295 return m_busDevices
?
296 m_busDevices
->At(address
) :
300 cec_logical_address
CCECProcessor::GetActiveSource(bool bRequestActiveSource
/* = true */)
302 // get the device that is marked as active source from the device map
303 CCECBusDevice
*activeSource
= m_busDevices
->GetActiveSource();
305 return activeSource
->GetLogicalAddress();
307 if (bRequestActiveSource
)
309 // request the active source from the bus
310 CCECBusDevice
*primary
= GetPrimaryDevice();
313 primary
->RequestActiveSource();
314 return GetActiveSource(false);
319 return CECDEVICE_UNKNOWN
;
322 bool CCECProcessor::IsActiveSource(cec_logical_address iAddress
)
324 CCECBusDevice
*device
= m_busDevices
->At(iAddress
);
325 return device
&& device
->IsActiveSource();
328 bool CCECProcessor::Transmit(const cec_command
&data
)
330 CCECBusDevice
*initiator
= m_busDevices
->At(data
.initiator
);
333 m_libcec
->AddLog(CEC_LOG_WARNING
, "invalid initiator");
337 if (data
.destination
!= CECDEVICE_BROADCAST
)
339 CCECBusDevice
*destination
= m_busDevices
->At(data
.destination
);
340 if (destination
&& destination
->IsHandledByLibCEC())
342 m_libcec
->AddLog(CEC_LOG_WARNING
, "not sending data to myself!");
347 uint8_t iMaxTries(0);
349 CLockObject
lock(m_mutex
);
353 m_iLastTransmission
= GetTimeMs();
354 if (!m_communication
|| !m_communication
->IsOpen())
356 m_libcec
->AddLog(CEC_LOG_ERROR
, "cannot transmit command: connection closed");
359 iMaxTries
= initiator
->GetHandler()->GetTransmitRetries() + 1;
364 uint8_t iLineTimeout
= m_iStandardLineTimeout
;
365 cec_adapter_message_state adapterState
= ADAPTER_MESSAGE_STATE_UNKNOWN
;
367 while (bRetry
&& ++iTries
< iMaxTries
)
369 if (initiator
->IsUnsupportedFeature(data
.opcode
))
372 adapterState
= m_communication
->Write(data
, bRetry
, iLineTimeout
);
373 iLineTimeout
= m_iRetryLineTimeout
;
376 return adapterState
== ADAPTER_MESSAGE_STATE_SENT_ACKED
;
379 void CCECProcessor::TransmitAbort(cec_logical_address source
, cec_logical_address destination
, cec_opcode opcode
, cec_abort_reason reason
/* = CEC_ABORT_REASON_UNRECOGNIZED_OPCODE */)
381 m_libcec
->AddLog(CEC_LOG_DEBUG
, "<< transmitting abort message");
384 cec_command::Format(command
, source
, destination
, CEC_OPCODE_FEATURE_ABORT
);
385 command
.parameters
.PushBack((uint8_t)opcode
);
386 command
.parameters
.PushBack((uint8_t)reason
);
391 void CCECProcessor::ParseCommand(const cec_command
&command
)
394 dataStr
.Format(">> %1x%1x", command
.initiator
, command
.destination
);
395 if (command
.opcode_set
== 1)
396 dataStr
.AppendFormat(":%02x", command
.opcode
);
397 for (uint8_t iPtr
= 0; iPtr
< command
.parameters
.size
; iPtr
++)
398 dataStr
.AppendFormat(":%02x", (unsigned int)command
.parameters
[iPtr
]);
399 m_libcec
->AddLog(CEC_LOG_TRAFFIC
, dataStr
.c_str());
403 CCECBusDevice
*device
= m_busDevices
->At(command
.initiator
);
405 device
->HandleCommand(command
);
409 bool CCECProcessor::IsPresentDevice(cec_logical_address address
)
411 CCECBusDevice
*device
= m_busDevices
->At(address
);
412 return device
&& device
->GetStatus() == CEC_DEVICE_STATUS_PRESENT
;
415 bool CCECProcessor::IsPresentDeviceType(cec_device_type type
)
417 CECDEVICEVEC devices
;
418 m_busDevices
->GetByType(type
, devices
);
419 CCECDeviceMap::FilterActive(devices
);
420 return !devices
.empty();
423 uint16_t CCECProcessor::GetDetectedPhysicalAddress(void) const
425 return m_communication
? m_communication
->GetPhysicalAddress() : CEC_INVALID_PHYSICAL_ADDRESS
;
428 bool CCECProcessor::SetAckMask(uint16_t iMask
)
430 return m_communication
? m_communication
->SetAckMask(iMask
) : false;
433 bool CCECProcessor::StandbyDevices(const cec_logical_address initiator
, const CECDEVICEVEC
&devices
)
436 for (CECDEVICEVEC::const_iterator it
= devices
.begin(); it
!= devices
.end(); it
++)
437 bReturn
&= (*it
)->Standby(initiator
);
441 bool CCECProcessor::StandbyDevice(const cec_logical_address initiator
, cec_logical_address address
)
443 CCECBusDevice
*device
= m_busDevices
->At(address
);
444 return device
? device
->Standby(initiator
) : false;
447 bool CCECProcessor::PowerOnDevices(const cec_logical_address initiator
, const CECDEVICEVEC
&devices
)
450 for (CECDEVICEVEC::const_iterator it
= devices
.begin(); it
!= devices
.end(); it
++)
451 bReturn
&= (*it
)->PowerOn(initiator
);
455 bool CCECProcessor::PowerOnDevice(const cec_logical_address initiator
, cec_logical_address address
)
457 CCECBusDevice
*device
= m_busDevices
->At(address
);
458 return device
? device
->PowerOn(initiator
) : false;
461 bool CCECProcessor::StartBootloader(const char *strPort
/* = NULL */)
464 if (!m_communication
&& strPort
)
466 IAdapterCommunication
*comm
= new CUSBCECAdapterCommunication(this, strPort
);
467 CTimeout
timeout(CEC_DEFAULT_CONNECT_TIMEOUT
);
469 while (timeout
.TimeLeft() > 0 && (bReturn
= comm
->Open(timeout
.TimeLeft() / CEC_CONNECT_TRIES
, true)) == false)
471 m_libcec
->AddLog(CEC_LOG_ERROR
, "could not open a connection (try %d)", ++iConnectTry
);
473 Sleep(CEC_DEFAULT_TRANSMIT_RETRY_WAIT
);
477 bReturn
= comm
->StartBootloader();
484 m_communication
->StartBootloader();
492 bool CCECProcessor::PingAdapter(void)
494 return m_communication
->PingAdapter();
497 void CCECProcessor::HandlePoll(cec_logical_address initiator
, cec_logical_address destination
)
499 CCECBusDevice
*device
= m_busDevices
->At(destination
);
501 device
->HandlePollFrom(initiator
);
504 bool CCECProcessor::HandleReceiveFailed(cec_logical_address initiator
)
506 CCECBusDevice
*device
= m_busDevices
->At(initiator
);
507 return !device
|| !device
->HandleReceiveFailed();
510 bool CCECProcessor::SetStreamPath(uint16_t iPhysicalAddress
)
512 // stream path changes are sent by the TV
513 return GetTV()->GetHandler()->TransmitSetStreamPath(iPhysicalAddress
);
516 bool CCECProcessor::CanPersistConfiguration(void)
518 return m_communication
? m_communication
->GetFirmwareVersion() >= 2 : false;
521 bool CCECProcessor::PersistConfiguration(libcec_configuration
*configuration
)
523 return m_communication
? m_communication
->PersistConfiguration(configuration
) : false;
526 void CCECProcessor::RescanActiveDevices(void)
528 for (CECDEVICEMAP::iterator it
= m_busDevices
->Begin(); it
!= m_busDevices
->End(); it
++)
529 it
->second
->GetStatus(true);
532 bool CCECProcessor::GetDeviceInformation(const char *strPort
, libcec_configuration
*config
, uint32_t iTimeoutMs
/* = CEC_DEFAULT_CONNECT_TIMEOUT */)
534 if (!OpenConnection(strPort
, CEC_SERIAL_DEFAULT_BAUDRATE
, iTimeoutMs
, false))
537 config
->iFirmwareVersion
= m_communication
->GetFirmwareVersion();
538 config
->iPhysicalAddress
= m_communication
->GetPhysicalAddress();
539 config
->iFirmwareBuildDate
= m_communication
->GetFirmwareBuildDate();
544 bool CCECProcessor::TransmitPendingActiveSourceCommands(void)
547 for (CECDEVICEMAP::iterator it
= m_busDevices
->Begin(); it
!= m_busDevices
->End(); it
++)
548 bReturn
&= it
->second
->TransmitPendingActiveSourceCommands();
552 CCECTV
*CCECProcessor::GetTV(void) const
554 return CCECBusDevice::AsTV(m_busDevices
->At(CECDEVICE_TV
));
557 CCECAudioSystem
*CCECProcessor::GetAudioSystem(void) const
559 return CCECBusDevice::AsAudioSystem(m_busDevices
->At(CECDEVICE_AUDIOSYSTEM
));
562 CCECPlaybackDevice
*CCECProcessor::GetPlaybackDevice(cec_logical_address address
) const
564 return CCECBusDevice::AsPlaybackDevice(m_busDevices
->At(address
));
567 CCECRecordingDevice
*CCECProcessor::GetRecordingDevice(cec_logical_address address
) const
569 return CCECBusDevice::AsRecordingDevice(m_busDevices
->At(address
));
572 CCECTuner
*CCECProcessor::GetTuner(cec_logical_address address
) const
574 return CCECBusDevice::AsTuner(m_busDevices
->At(address
));
577 bool CCECProcessor::RegisterClient(CCECClient
*client
)
582 libcec_configuration
&configuration
= *client
->GetConfiguration();
583 m_libcec
->AddLog(CEC_LOG_NOTICE
, "registering new CEC client - v%s", ToString((cec_client_version
)configuration
.clientVersion
));
585 client
->SetRegistered(false);
586 client
->SetInitialised(false);
588 uint16_t iPreviousMask(m_communication
->GetAckMask());
590 // find logical addresses for this client
591 if (!client
->FindLogicalAddresses())
593 SetAckMask(iPreviousMask
);
597 // register this client on the new addresses
598 CECDEVICEVEC devices
;
599 m_busDevices
->GetByLogicalAddresses(devices
, configuration
.logicalAddresses
);
600 for (CECDEVICEVEC::const_iterator it
= devices
.begin(); it
!= devices
.end(); it
++)
602 CLockObject
lock(m_mutex
);
603 m_clients
.erase((*it
)->GetLogicalAddress());
604 m_clients
.insert(make_pair
<cec_logical_address
, CCECClient
*>((*it
)->GetLogicalAddress(), client
));
605 client
->SetRegistered(true);
608 // get the settings from the rom
609 if (configuration
.bGetSettingsFromROM
== 1)
611 libcec_configuration config
;
612 m_communication
->GetConfiguration(&config
);
614 CLockObject
lock(m_mutex
);
615 if (!config
.deviceTypes
.IsEmpty())
616 configuration
.deviceTypes
= config
.deviceTypes
;
617 if (CLibCEC::IsValidPhysicalAddress(config
.iPhysicalAddress
))
618 configuration
.iPhysicalAddress
= config
.iPhysicalAddress
;
619 snprintf(configuration
.strDeviceName
, 13, "%s", config
.strDeviceName
);
622 // set the new ack mask
623 bool bReturn
= SetAckMask(GetLogicalAddresses().AckMask()) &&
624 client
->Initialise();
626 // set the firmware version and build date
627 configuration
.serverVersion
= LIBCEC_VERSION_CURRENT
;
628 configuration
.iFirmwareVersion
= m_communication
->GetFirmwareVersion();
629 configuration
.iFirmwareBuildDate
= m_communication
->GetFirmwareBuildDate();
633 strLog
= "CEC client registered.";
635 strLog
= "failed to register the CEC client.";
636 strLog
.AppendFormat(" libCEC version = %s, client version = %s, firmware version = %d", ToString((cec_server_version
)configuration
.serverVersion
), ToString((cec_client_version
)configuration
.clientVersion
), configuration
.iFirmwareVersion
);
637 if (configuration
.iFirmwareBuildDate
!= CEC_FW_BUILD_UNKNOWN
)
639 time_t buildTime
= (time_t)configuration
.iFirmwareBuildDate
;
640 strLog
.AppendFormat(", firmware build date: %s", asctime(gmtime(&buildTime
)));
641 strLog
= strLog
.Left((int)strLog
.length() - 1); // strip \n added by asctime
642 strLog
.append(" +0000");
645 m_libcec
->AddLog(bReturn
? CEC_LOG_NOTICE
: CEC_LOG_ERROR
, strLog
);
649 strLog
= "Using logical address(es): ";
650 CECDEVICEVEC devices
;
651 m_busDevices
->GetByLogicalAddresses(devices
, configuration
.logicalAddresses
);
652 for (CECDEVICEVEC::iterator it
= devices
.begin(); it
!= devices
.end(); it
++)
653 strLog
.AppendFormat("%s (%X) ", (*it
)->GetLogicalAddressName(), (*it
)->GetLogicalAddress());
654 m_libcec
->AddLog(CEC_LOG_NOTICE
, strLog
);
657 // display a warning if the firmware can be upgraded
658 if (!m_communication
->IsRunningLatestFirmware())
660 const char *strUpgradeMessage
= "The firmware of this adapter can be upgraded. Please visit http://blog.pulse-eight.com/ for more information.";
661 m_libcec
->AddLog(CEC_LOG_WARNING
, strUpgradeMessage
);
662 libcec_parameter param
;
663 param
.paramData
= (void*)strUpgradeMessage
; param
.paramType
= CEC_PARAMETER_TYPE_STRING
;
664 client
->Alert(CEC_ALERT_SERVICE_DEVICE
, param
);
668 m_libcec
->AddLog(CEC_LOG_DEBUG
, "the adapter is using the latest (known) firmware version");
673 /* get the vendor id from the TV, so we are using the correct handler */
674 GetTV()->GetVendorId(configuration
.logicalAddresses
.primary
);
680 void CCECProcessor::UnregisterClient(CCECClient
*client
)
682 CLockObject
lock(m_mutex
);
683 CECDEVICEVEC devices
;
684 m_busDevices
->GetByLogicalAddresses(devices
, client
->GetConfiguration()->logicalAddresses
);
685 for (CECDEVICEVEC::const_iterator it
= devices
.begin(); it
!= devices
.end(); it
++)
687 map
<cec_logical_address
, CCECClient
*>::iterator entry
= m_clients
.find((*it
)->GetLogicalAddress());
688 if (entry
!= m_clients
.end())
689 m_clients
.erase(entry
);
693 void CCECProcessor::UnregisterClients(void)
695 CLockObject
lock(m_mutex
);
696 for (map
<cec_logical_address
, CCECClient
*>::iterator client
= m_clients
.begin(); client
!= m_clients
.end(); client
++)
697 client
->second
->OnUnregister();
701 CCECClient
*CCECProcessor::GetClient(const cec_logical_address address
)
703 CLockObject
lock(m_mutex
);
704 map
<cec_logical_address
, CCECClient
*>::const_iterator client
= m_clients
.find(address
);
705 if (client
!= m_clients
.end())
706 return client
->second
;
710 CCECClient
*CCECProcessor::GetPrimaryClient(void)
712 CLockObject
lock(m_mutex
);
713 map
<cec_logical_address
, CCECClient
*>::const_iterator client
= m_clients
.begin();
714 if (client
!= m_clients
.end())
715 return client
->second
;
719 CCECBusDevice
*CCECProcessor::GetPrimaryDevice(void) const
721 return m_busDevices
->At(GetLogicalAddress());
724 cec_logical_address
CCECProcessor::GetLogicalAddress(void) const
726 cec_logical_addresses addresses
= GetLogicalAddresses();
727 return addresses
.primary
;
730 cec_logical_addresses
CCECProcessor::GetLogicalAddresses(void) const
732 cec_logical_addresses addresses
;
734 for (map
<cec_logical_address
, CCECClient
*>::const_iterator client
= m_clients
.begin(); client
!= m_clients
.end(); client
++)
735 addresses
.Set(client
->first
);
740 bool CCECProcessor::IsHandledByLibCEC(const cec_logical_address address
) const
742 CCECBusDevice
*device
= GetDevice(address
);
743 return device
&& device
->IsHandledByLibCEC();