X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FUSBCECAdapterCommunication.cpp;h=b3f0f7da7ba3209806b402c2e6e839d4c0b2648f;hb=d78e4e6f492d94f613dd4577b9fedc53c5a53a0d;hp=1940e88aaba12fb5e34964efb5deb913347369b1;hpb=200322e51c698c791ede1fad098e11defc5f81e8;p=deb_libcec.git diff --git a/src/lib/adapter/USBCECAdapterCommunication.cpp b/src/lib/adapter/USBCECAdapterCommunication.cpp index 1940e88..b3f0f7d 100644 --- a/src/lib/adapter/USBCECAdapterCommunication.cpp +++ b/src/lib/adapter/USBCECAdapterCommunication.cpp @@ -38,6 +38,7 @@ #include "../platform/util/util.h" #include "../platform/util/edid.h" #include "../platform/adl/adl-edid.h" +#include "../platform/nvidia/nv-edid.h" #include "../LibCEC.h" #include "../CECProcessor.h" @@ -511,7 +512,7 @@ bool CUSBCECAdapterCommunication::SetAckMask(uint16_t iMask) return true; } - LIB_CEC->AddLog(CEC_LOG_ERROR, "couldn't change the ackmask: the connection is closed"); + LIB_CEC->AddLog(CEC_LOG_DEBUG, "couldn't change the ackmask: the connection is closed"); return false; } @@ -528,12 +529,12 @@ bool CUSBCECAdapterCommunication::PingAdapter(void) uint16_t CUSBCECAdapterCommunication::GetFirmwareVersion(void) { - return IsOpen() ? m_commands->GetFirmwareVersion() : CEC_FW_VERSION_UNKNOWN; + return m_commands ? m_commands->GetFirmwareVersion() : CEC_FW_VERSION_UNKNOWN; } uint32_t CUSBCECAdapterCommunication::GetFirmwareBuildDate(void) { - return IsOpen() ? m_commands->RequestBuildDate() : 0; + return IsOpen() ? m_commands->RequestBuildDate() : m_commands ? m_commands->GetPersistedBuildDate() : 0; } bool CUSBCECAdapterCommunication::IsRunningLatestFirmware(void) @@ -576,6 +577,17 @@ uint16_t CUSBCECAdapterCommunication::GetPhysicalAddress(void) } #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) {