From 7656096e8198e19fd4f7b41cf9df54d811cf6fe3 Mon Sep 17 00:00:00 2001 From: Mark Kendall Date: Tue, 24 Apr 2012 16:17:27 +0100 Subject: [PATCH] Only respond to Give Physical Address with Report Physical Address. bugzid: 592 This fixes several reports of the TV improperly switching to the libcec device after it has previously switched to another source. Fix confirmed with Panasonic and also reported to be an issue with Samsung and Philips. The previous extra processing (SetActiveSource and ImageViewOn) was put in place for Samsung and may need revisiting. --- src/lib/implementations/CECCommandHandler.cpp | 7 +------ src/lib/implementations/SLCommandHandler.cpp | 12 ------------ src/lib/implementations/SLCommandHandler.h | 1 - 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index c303871..37e3dda 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -334,12 +334,7 @@ bool CCECCommandHandler::HandleGivePhysicalAddress(const cec_command &command) { CCECBusDevice *device = GetDevice(command.destination); if (device) - { - device->SetActiveSource(); - return device->TransmitPhysicalAddress() && - device->TransmitImageViewOn() && - device->TransmitActiveSource(); - } + return device->TransmitPhysicalAddress(); } return false; diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 957d296..5b8a729 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -157,18 +157,6 @@ bool CSLCommandHandler::HandleDeviceVendorId(const cec_command &command) return true; } -bool CSLCommandHandler::HandleGivePhysicalAddress(const cec_command &command) -{ - if (m_processor->IsRunning() && m_busDevice->MyLogicalAddressContains(command.destination)) - { - CCECBusDevice *device = GetDevice(command.destination); - if (device) - return device->TransmitPhysicalAddress(); // only the physical address, don't send image view on - } - - return false; -} - bool CSLCommandHandler::HandleVendorCommand(const cec_command &command) { if (!m_busDevice->MyLogicalAddressContains(command.destination)) diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index a0ea25a..6d84ec7 100644 --- a/src/lib/implementations/SLCommandHandler.h +++ b/src/lib/implementations/SLCommandHandler.h @@ -48,7 +48,6 @@ namespace CEC protected: virtual bool HandleActiveSource(const cec_command &command); virtual bool HandleDeviceVendorId(const cec_command &command); - virtual bool HandleGivePhysicalAddress(const cec_command &command); virtual bool HandleVendorCommand(const cec_command &command); virtual void HandleVendorCommand01(const cec_command &command); -- 2.34.1