From a463f9549c71ddd76661e6d23928385a3267d01d Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Sat, 11 Feb 2012 21:57:26 +0100 Subject: [PATCH] cec: send feature abort to LG devices when they send a vendor id. start with status 'in transition standby to on' for LG --- src/lib/implementations/SLCommandHandler.cpp | 13 +++++++++++-- src/lib/implementations/SLCommandHandler.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) 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); -- 2.34.1