Only respond to Give Physical Address with Report Physical Address.
authorMark Kendall <mark.kendall@gmail.com>
Tue, 24 Apr 2012 15:17:27 +0000 (16:17 +0100)
committerMark Kendall <mark.kendall@gmail.com>
Tue, 24 Apr 2012 15:17:27 +0000 (16:17 +0100)
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
src/lib/implementations/SLCommandHandler.cpp
src/lib/implementations/SLCommandHandler.h

index c3038710b181ed5ab1e18d30b5004e90d2f05dfe..37e3ddae785c366fcd4694538b90f152b7b3ea5f 100644 (file)
@@ -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;
index 957d296a8a8733dfbf6ec8bf3931ffab67a92ddb..5b8a7295949d7ba46affddeb4e12ca6285ce340f 100644 (file)
@@ -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))
index a0ea25a329cb3d49bc9716212ce0f8983b26908b..6d84ec7d1e0cd0cda5d490b8a498e77eff87d56b 100644 (file)
@@ -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);