diff options
-rw-r--r-- | ips/common/HdcpControl.cpp | 19 | ||||
-rw-r--r-- | ips/common/HdcpControl.h | 1 |
2 files changed, 17 insertions, 3 deletions
diff --git a/ips/common/HdcpControl.cpp b/ips/common/HdcpControl.cpp index b250ece..c574f03 100644 --- a/ips/common/HdcpControl.cpp +++ b/ips/common/HdcpControl.cpp @@ -36,7 +36,8 @@ HdcpControl::HdcpControl() mStopped(true), mAuthenticated(false), mActionDelay(0), - mAuthRetryCount(0) + mAuthRetryCount(0), + mEnableAuthenticationLog(true) { } @@ -173,9 +174,17 @@ bool HdcpControl::enableAuthentication() int fd = Hwcomposer::getInstance().getDrm()->getDrmFd(); int ret = drmCommandNone(fd, DRM_PSB_ENABLE_HDCP); if (ret != 0) { - ELOGTRACE("failed to enable HDCP authentication"); + if (mEnableAuthenticationLog) { + ELOGTRACE("failed to enable HDCP authentication"); + } else { + VLOGTRACE("failed to enable HDCP authentication"); + } + + mEnableAuthenticationLog = false; return false; } + + mEnableAuthenticationLog = true; return true; } @@ -275,7 +284,11 @@ bool HdcpControl::runHdcp() } if (!enableAuthentication()) { - ELOGTRACE("HDCP authentication failed. Retry"); + if (mAuthenticated) + ELOGTRACE("HDCP authentication failed. Retry"); + else + VLOGTRACE("HDCP authentication failed. Retry"); + mAuthenticated = false; ret = true; } else { diff --git a/ips/common/HdcpControl.h b/ips/common/HdcpControl.h index 301ee96..350260c 100644 --- a/ips/common/HdcpControl.h +++ b/ips/common/HdcpControl.h @@ -76,6 +76,7 @@ protected: bool mAuthenticated; int mActionDelay; // in milliseconds uint32_t mAuthRetryCount; + bool mEnableAuthenticationLog; private: DECLARE_THREAD(HdcpControlThread, HdcpControl); |