XilinxProcessorIPLib/drivers/v_hdmitxss1/src/xv_hdmitxss1_hdcp.c
static int XV_HdmiTxSs1_HdcpProcessEvents(XV_HdmiTxSs1 *InstancePtr)
{
  XV_HdmiTxSs1_HdcpEvent Event;
  int Status = XST_SUCCESS;

  /* Verify argument. */
  Xil_AssertNonvoid(InstancePtr != NULL);

  Event = XV_HdmiTxSs1_HdcpGetEvent(InstancePtr);
  switch (Event) {

    /* Stream up*/
    /* Attempt authentication with downstream device*/
    case XV_HDMITXSS1_HDCP_STREAMUP_EVT :
#ifdef XPAR_XHDCP_NUM_INSTANCES
      if (InstancePtr->Hdcp14Ptr) {
        /* Set physical state*/
        XHdcp1x_SetPhysicalState(InstancePtr->Hdcp14Ptr, TRUE);
        /* This is needed to ensure that the previous command is executed.*/
        XHdcp1x_Poll(InstancePtr->Hdcp14Ptr);
      }
#endif
      break;

    /* Stream down*/
    case XV_HDMITXSS1_HDCP_STREAMDOWN_EVT :
#ifdef XPAR_XHDCP_NUM_INSTANCES
      if (InstancePtr->Hdcp14Ptr) {
        /* Set physical state*/
        XHdcp1x_SetPhysicalState(InstancePtr->Hdcp14Ptr, FALSE);
        /* This is needed to ensure that the previous command is executed.*/
        XHdcp1x_Poll(InstancePtr->Hdcp14Ptr);
      }
#endif
      XV_HdmiTxSs1_HdcpReset(InstancePtr);
      break;

    /* Connect*/
    case XV_HDMITXSS1_HDCP_CONNECT_EVT :
      break;

    /* Disconnect*/
    /* Reset both HDCP protocols*/
    case XV_HDMITXSS1_HDCP_DISCONNECT_EVT :
      XV_HdmiTxSs1_HdcpReset(InstancePtr);
      break;

    /* Authenticate*/
    case XV_HDMITXSS1_HDCP_AUTHENTICATE_EVT :
      XV_HdmiTxSs1_HdcpAuthRequest(InstancePtr);
      break;

    default :
      break;
  }

  return Status;
}
/*****************************************************************************/
/**
*
* This function processes pending events from the HDCP event queue.
*
* @param InstancePtr is a pointer to the XV_HdmiTxSs1 instance.
*
* @return
*  - XST_SUCCESS if action was successful
*  - XST_FAILURE if action was not successful
*
* @note   None.
*
******************************************************************************/
This function processes pending events from the HDCP event queue.
This function processes pending events from the HDCP event queue .
static int XV_HdmiTxSs1_HdcpProcessEvents(XV_HdmiTxSs1 *InstancePtr)
{
  XV_HdmiTxSs1_HdcpEvent Event;
  int Status = XST_SUCCESS;
  Xil_AssertNonvoid(InstancePtr != NULL);
  Event = XV_HdmiTxSs1_HdcpGetEvent(InstancePtr);
  switch (Event) {
    case XV_HDMITXSS1_HDCP_STREAMUP_EVT :
#ifdef XPAR_XHDCP_NUM_INSTANCES
      if (InstancePtr->Hdcp14Ptr) {
        XHdcp1x_SetPhysicalState(InstancePtr->Hdcp14Ptr, TRUE);
        XHdcp1x_Poll(InstancePtr->Hdcp14Ptr);
      }
#endif
      break;
    case XV_HDMITXSS1_HDCP_STREAMDOWN_EVT :
#ifdef XPAR_XHDCP_NUM_INSTANCES
      if (InstancePtr->Hdcp14Ptr) {
        XHdcp1x_SetPhysicalState(InstancePtr->Hdcp14Ptr, FALSE);
        XHdcp1x_Poll(InstancePtr->Hdcp14Ptr);
      }
#endif
      XV_HdmiTxSs1_HdcpReset(InstancePtr);
      break;
    case XV_HDMITXSS1_HDCP_CONNECT_EVT :
      break;
    case XV_HDMITXSS1_HDCP_DISCONNECT_EVT :
      XV_HdmiTxSs1_HdcpReset(InstancePtr);
      break;
    case XV_HDMITXSS1_HDCP_AUTHENTICATE_EVT :
      XV_HdmiTxSs1_HdcpAuthRequest(InstancePtr);
      break;
    default :
      break;
  }
  return Status;
}
static int XV_HdmiTxSs1_HdcpProcessEvents ( XV_HdmiTxSs1 * InstancePtr ) { XV_HdmiTxSs1_HdcpEvent Event ; int Status = XST_SUCCESS ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Event = XV_HdmiTxSs1_HdcpGetEvent ( InstancePtr ) ; switch ( Event ) { case XV_HDMITXSS1_HDCP_STREAMUP_EVT : #ifdef XPAR_XHDCP_NUM_INSTANCES if ( InstancePtr -> Hdcp14Ptr ) { XHdcp1x_SetPhysicalState ( InstancePtr -> Hdcp14Ptr , TRUE ) ; XHdcp1x_Poll ( InstancePtr -> Hdcp14Ptr ) ; } #endif break ; case XV_HDMITXSS1_HDCP_STREAMDOWN_EVT : #ifdef XPAR_XHDCP_NUM_INSTANCES if ( InstancePtr -> Hdcp14Ptr ) { XHdcp1x_SetPhysicalState ( InstancePtr -> Hdcp14Ptr , FALSE ) ; XHdcp1x_Poll ( InstancePtr -> Hdcp14Ptr ) ; } #endif XV_HdmiTxSs1_HdcpReset ( InstancePtr ) ; break ; case XV_HDMITXSS1_HDCP_CONNECT_EVT : break ; case XV_HDMITXSS1_HDCP_DISCONNECT_EVT : XV_HdmiTxSs1_HdcpReset ( InstancePtr ) ; break ; case XV_HDMITXSS1_HDCP_AUTHENTICATE_EVT : XV_HdmiTxSs1_HdcpAuthRequest ( InstancePtr ) ; break ; default : break ; } return Status ; }
This function processes pending events from the HDCP event queue.
This function processes pending events from the HDCP event queue .
/* Verify argument. */ /* Stream up*/ /* Attempt authentication with downstream device*/ /* Set physical state*/ /* This is needed to ensure that the previous command is executed.*/ /* Stream down*/ /* Set physical state*/ /* This is needed to ensure that the previous command is executed.*/ /* Connect*/ /* Disconnect*/ /* Reset both HDCP protocols*/ /* Authenticate*/