rpi: handle VC_CEC_LOGICAL_ADDR_LOST. re-register the client when this happens, so...
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 3 Sep 2012 15:26:04 +0000 (17:26 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 3 Sep 2012 15:26:04 +0000 (17:26 +0200)
src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp

index 5e1efd493f4a8117018816616870219974d5d3fe..9e7f604c4aa337b279613a88db321b2f9dfade06 100644 (file)
@@ -180,6 +180,14 @@ void CRPiCECAdapterCommunication::OnDataReceived(uint32_t header, uint32_t p0, u
       m_logicalAddressCondition.Signal();
     }
     break;
+  case VC_CEC_LOGICAL_ADDR_LOST:
+    {
+      // the logical address was taken by another device
+      cec_logical_address previousAddress = m_logicalAddress;
+      m_logicalAddress = CECDEVICE_UNKNOWN;
+      m_callback->HandleLogicalAddressLost(previousAddress);
+    }
+    break;
   case VC_CEC_TOPOLOGY:
   case VC_CEC_REMOTE_PRESSED:
   case VC_CEC_REMOTE_RELEASE: