+uint16_t CUSBCECAdapterCommunication::GetPhysicalAddress(void)
+{
+ uint16_t iPA(0);
+
+ // try to get the PA from ADL
+#if defined(HAS_ADL_EDID_PARSER)
+ {
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - trying to get the physical address via ADL", __FUNCTION__);
+ CADLEdidParser adl;
+ iPA = adl.GetPhysicalAddress();
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - ADL returned physical address %04x", __FUNCTION__, iPA);
+ }
+#endif
+
+ // try to get the PA from the nvidia driver
+#if defined(HAS_NVIDIA_EDID_PARSER)
+ if (iPA == 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - trying to get the physical address via nvidia driver", __FUNCTION__);
+ CNVEdidParser nv;
+ iPA = nv.GetPhysicalAddress();
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - nvidia driver returned physical address %04x", __FUNCTION__, iPA);
+ }
+#endif
+
+ // try to get the PA from the OS
+ if (iPA == 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - trying to get the physical address from the OS", __FUNCTION__);
+ iPA = CEDIDParser::GetPhysicalAddress();
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - OS returned physical address %04x", __FUNCTION__, iPA);
+ }
+
+ return iPA;
+}
+