From b89523424cf50668fec376235b06924b2a0ddaf6 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 13 Feb 2012 17:19:06 +0100 Subject: [PATCH] cec: just send the vendor id in InitHandler() --- src/lib/implementations/SLCommandHandler.cpp | 16 ++++------------ src/lib/implementations/SLCommandHandler.h | 1 - 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 290a487..2ed05af 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -51,8 +51,7 @@ using namespace PLATFORM; CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) : CCECCommandHandler(busDevice), m_bSLEnabled(false), - m_bActiveSourceSent(false), - m_bVendorIdSent(false) + m_bActiveSourceSent(false) { m_vendorId = CEC_VENDOR_LG; CCECBusDevice *primary = m_processor->GetPrimaryDevice(); @@ -87,6 +86,9 @@ bool CSLCommandHandler::InitHandler(void) /* start as 'in transition standby->on' */ primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON); primary->TransmitPowerState(CECDEVICE_TV); + + /* send the vendor id */ + primary->TransmitVendorID(CECDEVICE_BROADCAST); } return true; @@ -94,16 +96,6 @@ bool CSLCommandHandler::InitHandler(void) bool CSLCommandHandler::ActivateSource(void) { - /* reply with LGs vendor id */ - bool bSendVendorId(false); - { - CLockObject lock(m_SLMutex); - bSendVendorId = !m_bVendorIdSent; - m_bVendorIdSent = true; - } - if (bSendVendorId) - m_processor->GetPrimaryDevice()->TransmitVendorID(CECDEVICE_BROADCAST, false); - if (!SLInitialised()) { CLibCEC::AddLog(CEC_LOG_NOTICE, "not activating the source until SL has been initialised"); diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index fd53266..4ea6a05 100644 --- a/src/lib/implementations/SLCommandHandler.h +++ b/src/lib/implementations/SLCommandHandler.h @@ -75,7 +75,6 @@ namespace CEC bool m_bSLEnabled; bool m_bActiveSourceSent; PLATFORM::CTimeout m_resetPowerState; - bool m_bVendorIdSent; PLATFORM::CMutex m_SLMutex; }; }; -- 2.34.1