XilinxProcessorIPLib/drivers/v_hdmirxss/src/xv_hdmirxss_hdcp.c
int XV_HdmiRxSs_SetUserHdcpProtocol(XV_HdmiRxSs *InstancePtr,
		XV_HdmiRxSs_HdcpProtocol protocol)
{
	int Status = XST_SUCCESS;

	Xil_AssertNonvoid((protocol == XV_HDMIRXSS_HDCP_NONE) ||
		(protocol == XV_HDMIRXSS_HDCP_NOUSERPREF) ||
		(protocol == XV_HDMIRXSS_HDCP_14) ||
		(protocol == XV_HDMIRXSS_HDCP_22));

	XV_HdmiRx_DdcHdcpDisable(InstancePtr->HdmiRxPtr);

	InstancePtr->UserHdcpProt = protocol;

#ifdef XPAR_XHDCP22_RX_NUM_INSTANCES
	if (protocol == XV_HDMIRXSS_HDCP_14)
		XHdcp22Rx_SetBroadcast(InstancePtr->Hdcp22Ptr, FALSE);
	else
		XHdcp22Rx_SetBroadcast(InstancePtr->Hdcp22Ptr, TRUE);
#endif

	if (protocol != XV_HDMIRXSS_HDCP_NOUSERPREF)
		Status =  XV_HdmiRxSs_HdcpSetProtocol(InstancePtr, protocol);

	if (InstancePtr->UserHdcpProt == XV_HDMIRXSS_HDCP_NONE) {
		XV_HdmiRx_DdcHdcpDisable(InstancePtr->HdmiRxPtr);
	} else {
		XV_HdmiRx_DdcHdcpEnable(InstancePtr->HdmiRxPtr);
	}

	/* Toggle HPD to get attention of upstream transmitter */
	XV_HdmiRxSs_ToggleHpd(InstancePtr);

	return Status;
}
/*****************************************************************************/
/**
*
* This function sets the active HDCP protocol and enables it.
* XV_HdmiRxSs_HdcpSetProtocol is intended to be used internally.
* Applications should API XV_HdmiRxSs_SetUserHdcpProtocol
* instead of directly using XV_HdmiRxSs_HdcpSetProtocol.
*
* The protocol can be set to either HDCP 1.4, 2.2, or None.
* XV_HDMIRXSS_HDCP_NOUSERPREF is the default state and should
* be reset back to this state when application wants the HDCP
* configuration based on source connected.
*
* @param InstancePtr is a pointer to the XV_HdmiRxSs instance.
* @param Protocol is the requested content protection scheme of type
*        XV_HdmiRxSs_HdcpProtocol.
*
* @return
*  - XST_SUCCESS if action was successful
*  - XST_FAILURE if action was not successful
*
* @note   None.
*
******************************************************************************/
This function sets the active HDCP protocol and enables it.
XV_HdmiRxSs_HdcpSetProtocol is intended to be used internally.
Applications should API XV_HdmiRxSs_SetUserHdcpProtocol
instead of directly using XV_HdmiRxSs_HdcpSetProtocol.

The protocol can be set to either HDCP 1.4, 2.2, or None.
XV_HDMIRXSS_HDCP_NOUSERPREF is the default state and should
be reset back to this state when application wants the HDCP
configuration based on source connected.
This function sets the active HDCP protocol and enables it . XV_HdmiRxSs_HdcpSetProtocol is intended to be used internally . Applications should API XV_HdmiRxSs_SetUserHdcpProtocol instead of directly using XV_HdmiRxSs_HdcpSetProtocol . The protocol can be set to either HDCP 1 . 4 2 . 2 or None . XV_HDMIRXSS_HDCP_NOUSERPREF is the default state and should be reset back to this state when application wants the HDCP configuration based on source connected .
int XV_HdmiRxSs_SetUserHdcpProtocol(XV_HdmiRxSs *InstancePtr,
		XV_HdmiRxSs_HdcpProtocol protocol)
{
	int Status = XST_SUCCESS;
	Xil_AssertNonvoid((protocol == XV_HDMIRXSS_HDCP_NONE) ||
		(protocol == XV_HDMIRXSS_HDCP_NOUSERPREF) ||
		(protocol == XV_HDMIRXSS_HDCP_14) ||
		(protocol == XV_HDMIRXSS_HDCP_22));
	XV_HdmiRx_DdcHdcpDisable(InstancePtr->HdmiRxPtr);
	InstancePtr->UserHdcpProt = protocol;
#ifdef XPAR_XHDCP22_RX_NUM_INSTANCES
	if (protocol == XV_HDMIRXSS_HDCP_14)
		XHdcp22Rx_SetBroadcast(InstancePtr->Hdcp22Ptr, FALSE);
	else
		XHdcp22Rx_SetBroadcast(InstancePtr->Hdcp22Ptr, TRUE);
#endif
	if (protocol != XV_HDMIRXSS_HDCP_NOUSERPREF)
		Status =  XV_HdmiRxSs_HdcpSetProtocol(InstancePtr, protocol);
	if (InstancePtr->UserHdcpProt == XV_HDMIRXSS_HDCP_NONE) {
		XV_HdmiRx_DdcHdcpDisable(InstancePtr->HdmiRxPtr);
	} else {
		XV_HdmiRx_DdcHdcpEnable(InstancePtr->HdmiRxPtr);
	}
	XV_HdmiRxSs_ToggleHpd(InstancePtr);
	return Status;
}
int XV_HdmiRxSs_SetUserHdcpProtocol ( XV_HdmiRxSs * InstancePtr , XV_HdmiRxSs_HdcpProtocol protocol ) { int Status = XST_SUCCESS ; Xil_AssertNonvoid ( ( protocol == XV_HDMIRXSS_HDCP_NONE ) || ( protocol == XV_HDMIRXSS_HDCP_NOUSERPREF ) || ( protocol == XV_HDMIRXSS_HDCP_14 ) || ( protocol == XV_HDMIRXSS_HDCP_22 ) ) ; XV_HdmiRx_DdcHdcpDisable ( InstancePtr -> HdmiRxPtr ) ; InstancePtr -> UserHdcpProt = protocol ; #ifdef XPAR_XHDCP22_RX_NUM_INSTANCES if ( protocol == XV_HDMIRXSS_HDCP_14 ) XHdcp22Rx_SetBroadcast ( InstancePtr -> Hdcp22Ptr , FALSE ) ; else XHdcp22Rx_SetBroadcast ( InstancePtr -> Hdcp22Ptr , TRUE ) ; #endif if ( protocol != XV_HDMIRXSS_HDCP_NOUSERPREF ) Status = XV_HdmiRxSs_HdcpSetProtocol ( InstancePtr , protocol ) ; if ( InstancePtr -> UserHdcpProt == XV_HDMIRXSS_HDCP_NONE ) { XV_HdmiRx_DdcHdcpDisable ( InstancePtr -> HdmiRxPtr ) ; } else { XV_HdmiRx_DdcHdcpEnable ( InstancePtr -> HdmiRxPtr ) ; } XV_HdmiRxSs_ToggleHpd ( InstancePtr ) ; return Status ; }
This function sets the active HDCP protocol and enables it.
This function sets the active HDCP protocol and enables it .
/* Toggle HPD to get attention of upstream transmitter */