rpi: register callback for HPD. re-read the physical address when we received VC_HDMI...
[deb_libcec.git] / src / lib / CECProcessor.cpp
index 3be1c36cdb52c3996ce092302dd157797b6772dc..d9ef22c349285c58aa93247f605227625416dc2e 100644 (file)
@@ -988,6 +988,14 @@ void CCECProcessor::HandleLogicalAddressLost(cec_logical_address oldAddress)
   }
 }
 
+void CCECProcessor::HandlePhysicalAddressChanged(uint16_t iNewAddress)
+{
+  m_libcec->AddLog(CEC_LOG_NOTICE, "physical address changed to %04x", iNewAddress);
+  CCECClient* client = GetPrimaryClient();
+  if (client)
+    client->SetPhysicalAddress(iNewAddress);
+}
+
 uint16_t CCECProcessor::GetAdapterVendorId(void) const
 {
   return m_communication ? m_communication->GetAdapterVendorId() : 0;