hdcp1x: Added an API to check the traffic's encryption status.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
Acked by: Rohit Consul <rohitco@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-08-11 18:43:07 -07:00 committed by Nava kishore Manne
parent 71c5daf609
commit ea3f5c9215
4 changed files with 24 additions and 0 deletions

View file

@ -552,6 +552,25 @@ u64 XHdcp1x_GetEncryption(const XHdcp1x *InstancePtr)
return (StreamMap);
}
/*****************************************************************************/
/**
* This function determines if the video stream is encrypted.
* The traffic is encrypted if the encryption bit map is non-zero and the
* interface is authenticated.
*
* @param InstancePtr is a pointer to the HDCP instance.
*
* @return Truth value indicating encrypted (TRUE) or not (FALSE).
*
* @note None.
*
******************************************************************************/
int XHdcp1x_IsEncrypted(const XHdcp1x *InstancePtr)
{
return (XHdcp1x_GetEncryption(InstancePtr) &&
XHdcp1x_IsAuthenticated(InstancePtr));
}
/*****************************************************************************/
/**
* This function enables encryption on a series of streams within an HDCP

View file

@ -252,6 +252,7 @@ int XHdcp1x_IsInProgress(const XHdcp1x *InstancePtr);
int XHdcp1x_IsAuthenticated(const XHdcp1x *InstancePtr);
u64 XHdcp1x_GetEncryption(const XHdcp1x *InstancePtr);
int XHdcp1x_IsEncrypted(const XHdcp1x *InstancePtr);
int XHdcp1x_EnableEncryption(XHdcp1x *InstancePtr, u64 StreamMap);
int XHdcp1x_DisableEncryption(XHdcp1x *InstancePtr, u64 StreamMap);

View file

@ -421,6 +421,8 @@ int XHdcp1x_RxInfo(const XHdcp1x *InstancePtr)
XHdcp1x_RxStateToString(InstancePtr->Rx.CurrentState));
XHDCP1X_DEBUG_PRINTF("Previous State: %s\r\n",
XHdcp1x_RxStateToString(InstancePtr->Rx.PreviousState));
XHDCP1X_DEBUG_PRINTF("Encrypted?: %s\r\n",
XHdcp1x_IsEncrypted(InstancePtr) ? "Yes" : "No");
XHDCP1X_DEBUG_PRINTF("Flags: %04X\r\n",
InstancePtr->Rx.Flags);
Version = XHdcp1x_GetDriverVersion();

View file

@ -590,6 +590,8 @@ int XHdcp1x_TxInfo(const XHdcp1x *InstancePtr)
XHdcp1x_TxStateToString(InstancePtr->Tx.CurrentState));
XHDCP1X_DEBUG_PRINTF("Previous State: %s\r\n",
XHdcp1x_TxStateToString(InstancePtr->Tx.PreviousState));
XHDCP1X_DEBUG_PRINTF("Encrypted?: %s\r\n",
XHdcp1x_IsEncrypted(InstancePtr) ? "Yes" : "No");
XHDCP1X_DEBUG_PRINTF("State Helper: %016llX\r\n",
InstancePtr->Tx.StateHelper);
XHDCP1X_DEBUG_PRINTF("Flags: %04X\r\n",