From: Lars Op den Kamp Date: Sat, 11 Feb 2012 20:57:26 +0000 (+0100) Subject: cec: send feature abort to LG devices when they send a vendor id. start with status... X-Git-Tag: upstream/2.2.0~1^2~35^2~95 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a463f9549c71ddd76661e6d23928385a3267d01d;p=deb_libcec.git cec: send feature abort to LG devices when they send a vendor id. start with status 'in transition standby to on' for LG --- diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index c9fd65d..125a23e 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -81,7 +81,7 @@ bool CSLCommandHandler::InitHandler(void) if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress()) primary->TransmitVendorID(CECDEVICE_TV, false); - primary->SetPowerStatus(CEC_POWER_STATUS_STANDBY); + primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON); return true; } @@ -106,13 +106,22 @@ bool CSLCommandHandler::HandleActiveSource(const cec_command &command) return true; } +bool CSLCommandHandler::HandleDeviceVendorId(const cec_command &command) +{ + SetVendorId(command); + + cec_command response; + cec_command::Format(response, m_processor->GetLogicalAddress(), command.initiator, CEC_OPCODE_FEATURE_ABORT); + return Transmit(response); +} + bool CSLCommandHandler::HandleFeatureAbort(const cec_command &command) { CCECBusDevice *primary = m_processor->GetPrimaryDevice(); if (primary->GetPowerStatus(false) == CEC_POWER_STATUS_ON && !m_bPowerStateReset && !m_bSLEnabled) { m_bPowerStateReset = true; - primary->SetPowerStatus(CEC_POWER_STATUS_STANDBY); + primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON); } return CCECCommandHandler::HandleFeatureAbort(command); diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index dae4266..8b00696 100644 --- a/src/lib/implementations/SLCommandHandler.h +++ b/src/lib/implementations/SLCommandHandler.h @@ -46,6 +46,7 @@ namespace CEC protected: virtual bool HandleActiveSource(const cec_command &command); + virtual bool HandleDeviceVendorId(const cec_command &command); virtual bool HandleFeatureAbort(const cec_command &command); virtual bool HandleGivePhysicalAddress(const cec_command &command); virtual bool HandleVendorCommand(const cec_command &command);