From: Lars Op den Kamp Date: Mon, 13 Feb 2012 12:05:00 +0000 (+0100) Subject: cec: send the physical address before sending the vendor id in the SL handler X-Git-Tag: upstream/2.2.0~1^2~35^2~78 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=1c38352afd9a1a10de4fb4f751ef08b613f6f958 cec: send the physical address before sending the vendor id in the SL handler --- diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 7771b20..dbf9d09 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -51,7 +51,8 @@ CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) : CCECCommandHandler(busDevice), m_bSLEnabled(false), m_bPowerStateReset(false), - m_bActiveSourceSent(false) + m_bActiveSourceSent(false), + m_bVendorIdSent(false) { m_vendorId = CEC_VENDOR_LG; CCECBusDevice *primary = m_processor->GetPrimaryDevice(); @@ -83,9 +84,6 @@ bool CSLCommandHandler::InitHandler(void) /* start as 'in transition standby->on' */ primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON); primary->TransmitPowerState(CECDEVICE_TV); - - /* reply with LGs vendor id */ - primary->TransmitVendorID(CECDEVICE_BROADCAST, false); } return true; @@ -93,6 +91,13 @@ bool CSLCommandHandler::InitHandler(void) bool CSLCommandHandler::ActivateSource(void) { + /* reply with LGs vendor id */ + if (!m_bVendorIdSent) + { + m_bVendorIdSent = true; + m_processor->GetPrimaryDevice()->TransmitVendorID(CECDEVICE_BROADCAST, false); + } + if (!m_bSLEnabled) return true; diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index eaa21f1..fc4c5fd 100644 --- a/src/lib/implementations/SLCommandHandler.h +++ b/src/lib/implementations/SLCommandHandler.h @@ -71,5 +71,6 @@ namespace CEC bool m_bPowerStateReset; bool m_bActiveSourceSent; PLATFORM::CTimeout m_resetPowerState; + bool m_bVendorIdSent; }; };