transmit our physical address when the TV sends it's physical address
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 12 Dec 2013 01:48:04 +0000 (02:48 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 12 Dec 2013 01:48:04 +0000 (02:48 +0100)
src/lib/implementations/CECCommandHandler.cpp

index cee3c85add8ad84c5c265653d02afebea90108af..ee602f1e6dfa90ecc7242f003fdbba374aeda5a4 100644 (file)
@@ -455,6 +455,13 @@ int CCECCommandHandler::HandleReportPhysicalAddress(const cec_command &command)
   {
     uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
     SetPhysicalAddress(command.initiator, iNewAddress);
+
+    if (command.initiator == CECDEVICE_TV)
+    {
+      CCECBusDevice* primary = m_processor->GetPrimaryDevice();
+      if (primary)
+        primary->TransmitPhysicalAddress(false);
+    }
     return COMMAND_HANDLED;
   }
   return CEC_ABORT_REASON_INVALID_OPERAND;