XilinxProcessorIPLib/drivers/v_hdmirxss1/src/xv_hdmirxss1.c
static void XV_HdmiRxSs1_AuxCallback(void *CallbackRef)
{
  XV_HdmiRxSs1 *HdmiRxSs1Ptr = (XV_HdmiRxSs1 *)CallbackRef;
  XHdmiC_Aux *AuxPtr;
  XHdmiC_AVI_InfoFrame *AviInfoFramePtr;
  XHdmiC_GeneralControlPacket *GeneralControlPacketPtr;
  XHdmiC_AudioInfoFrame *AudioInfoFramePtr;
  XHdmiC_DRMInfoFrame *DrmInfoFramePtr;

  AviInfoFramePtr = XV_HdmiRxSs1_GetAviInfoframe(HdmiRxSs1Ptr);
  GeneralControlPacketPtr = XV_HdmiRxSs1_GetGCP(HdmiRxSs1Ptr);
  AudioInfoFramePtr = XV_HdmiRxSs1_GetAudioInfoframe(HdmiRxSs1Ptr);
  DrmInfoFramePtr = XV_HdmiRxSs1_GetDrmInfoframe(HdmiRxSs1Ptr);

  AuxPtr = XV_HdmiRxSs1_GetAuxiliary(HdmiRxSs1Ptr);

  if (AuxPtr->Header.Byte[0] == AUX_VSIF_TYPE){
	  /* Retrieve Vendor Specific Info Frame*/
	  XV_HdmiRxSs1_RetrieveVSInfoframe(HdmiRxSs1Ptr);
  } else if (AuxPtr->Header.Byte[0] == AUX_AVI_INFOFRAME_TYPE){
	  /* Reset Avi InfoFrame*/
	  (void)memset((void *)AviInfoFramePtr, 0, sizeof(XHdmiC_AVI_InfoFrame));
	  /* Parse Aux to retrieve Avi InfoFrame*/
	  XV_HdmiC_ParseAVIInfoFrame(AuxPtr, AviInfoFramePtr);
	  HdmiRxSs1Ptr->HdmiRx1Ptr->Stream.Video.ColorFormatId =
				XV_HdmiRx1_GetAviColorSpace(HdmiRxSs1Ptr->HdmiRx1Ptr);
	  HdmiRxSs1Ptr->HdmiRx1Ptr->Stream.Vic =
				XV_HdmiRx1_GetAviVic(HdmiRxSs1Ptr->HdmiRx1Ptr);
	  HdmiRxSs1Ptr->HdmiRx1Ptr->Stream.Video.AspectRatio =
				XV_HdmiC_IFAspectRatio_To_XVidC(HdmiRxSs1Ptr->AVIInfoframe.PicAspectRatio);
  } else if (AuxPtr->Header.Byte[0] == AUX_GENERAL_CONTROL_PACKET_TYPE) {
	  /* Reset General Control Packet*/
	  (void)memset((void *)GeneralControlPacketPtr, 0, sizeof(XHdmiC_GeneralControlPacket));
	  /* Parse Aux to retrieve General Control Packet*/
	  XV_HdmiC_ParseGCP(AuxPtr, GeneralControlPacketPtr);
	  /* Stream.Video.ColorDepth is updated from the core during AUX INTR*/
  } else if (AuxPtr->Header.Byte[0] == AUX_AUDIO_INFOFRAME_TYPE) {
	  /* Reset Audio InfoFrame*/
	  (void)memset((void *)AudioInfoFramePtr, 0, sizeof(XHdmiC_AudioInfoFrame));
	  /* Parse Aux to retrieve Audio InfoFrame*/
	  XV_HdmiC_ParseAudioInfoFrame(AuxPtr, AudioInfoFramePtr);
  } else if (AuxPtr->Header.Byte[0] == AUX_DRM_INFOFRAME_TYPE) {
	  (void)memset((void *)DrmInfoFramePtr, 0, sizeof(XHdmiC_DRMInfoFrame));
	  XV_HdmiC_ParseDRMIF(AuxPtr, DrmInfoFramePtr);
  }

  /* Check if user callback has been registered*/
  if (HdmiRxSs1Ptr->AuxCallback) {
      HdmiRxSs1Ptr->AuxCallback(HdmiRxSs1Ptr->AuxRef);
  }
}
/*****************************************************************************/
/**
*
* This function is called when a RX AUX IRQ has occurred.
*
* @param  None.
*
* @return None.
*
* @note   None.
*
******************************************************************************/
This function is called when a RX AUX IRQ has occurred.
This function is called when a RX AUX IRQ has occurred .
static void XV_HdmiRxSs1_AuxCallback(void *CallbackRef)
{
  XV_HdmiRxSs1 *HdmiRxSs1Ptr = (XV_HdmiRxSs1 *)CallbackRef;
  XHdmiC_Aux *AuxPtr;
  XHdmiC_AVI_InfoFrame *AviInfoFramePtr;
  XHdmiC_GeneralControlPacket *GeneralControlPacketPtr;
  XHdmiC_AudioInfoFrame *AudioInfoFramePtr;
  XHdmiC_DRMInfoFrame *DrmInfoFramePtr;
  AviInfoFramePtr = XV_HdmiRxSs1_GetAviInfoframe(HdmiRxSs1Ptr);
  GeneralControlPacketPtr = XV_HdmiRxSs1_GetGCP(HdmiRxSs1Ptr);
  AudioInfoFramePtr = XV_HdmiRxSs1_GetAudioInfoframe(HdmiRxSs1Ptr);
  DrmInfoFramePtr = XV_HdmiRxSs1_GetDrmInfoframe(HdmiRxSs1Ptr);
  AuxPtr = XV_HdmiRxSs1_GetAuxiliary(HdmiRxSs1Ptr);
  if (AuxPtr->Header.Byte[0] == AUX_VSIF_TYPE){
	  XV_HdmiRxSs1_RetrieveVSInfoframe(HdmiRxSs1Ptr);
  } else if (AuxPtr->Header.Byte[0] == AUX_AVI_INFOFRAME_TYPE){
	  (void)memset((void *)AviInfoFramePtr, 0, sizeof(XHdmiC_AVI_InfoFrame));
	  XV_HdmiC_ParseAVIInfoFrame(AuxPtr, AviInfoFramePtr);
	  HdmiRxSs1Ptr->HdmiRx1Ptr->Stream.Video.ColorFormatId =
				XV_HdmiRx1_GetAviColorSpace(HdmiRxSs1Ptr->HdmiRx1Ptr);
	  HdmiRxSs1Ptr->HdmiRx1Ptr->Stream.Vic =
				XV_HdmiRx1_GetAviVic(HdmiRxSs1Ptr->HdmiRx1Ptr);
	  HdmiRxSs1Ptr->HdmiRx1Ptr->Stream.Video.AspectRatio =
				XV_HdmiC_IFAspectRatio_To_XVidC(HdmiRxSs1Ptr->AVIInfoframe.PicAspectRatio);
  } else if (AuxPtr->Header.Byte[0] == AUX_GENERAL_CONTROL_PACKET_TYPE) {
	  (void)memset((void *)GeneralControlPacketPtr, 0, sizeof(XHdmiC_GeneralControlPacket));
	  XV_HdmiC_ParseGCP(AuxPtr, GeneralControlPacketPtr);
  } else if (AuxPtr->Header.Byte[0] == AUX_AUDIO_INFOFRAME_TYPE) {
	  (void)memset((void *)AudioInfoFramePtr, 0, sizeof(XHdmiC_AudioInfoFrame));
	  XV_HdmiC_ParseAudioInfoFrame(AuxPtr, AudioInfoFramePtr);
  } else if (AuxPtr->Header.Byte[0] == AUX_DRM_INFOFRAME_TYPE) {
	  (void)memset((void *)DrmInfoFramePtr, 0, sizeof(XHdmiC_DRMInfoFrame));
	  XV_HdmiC_ParseDRMIF(AuxPtr, DrmInfoFramePtr);
  }
  if (HdmiRxSs1Ptr->AuxCallback) {
      HdmiRxSs1Ptr->AuxCallback(HdmiRxSs1Ptr->AuxRef);
  }
}
static void XV_HdmiRxSs1_AuxCallback ( void * CallbackRef ) { XV_HdmiRxSs1 * HdmiRxSs1Ptr = ( XV_HdmiRxSs1 * ) CallbackRef ; XHdmiC_Aux * AuxPtr ; XHdmiC_AVI_InfoFrame * AviInfoFramePtr ; XHdmiC_GeneralControlPacket * GeneralControlPacketPtr ; XHdmiC_AudioInfoFrame * AudioInfoFramePtr ; XHdmiC_DRMInfoFrame * DrmInfoFramePtr ; AviInfoFramePtr = XV_HdmiRxSs1_GetAviInfoframe ( HdmiRxSs1Ptr ) ; GeneralControlPacketPtr = XV_HdmiRxSs1_GetGCP ( HdmiRxSs1Ptr ) ; AudioInfoFramePtr = XV_HdmiRxSs1_GetAudioInfoframe ( HdmiRxSs1Ptr ) ; DrmInfoFramePtr = XV_HdmiRxSs1_GetDrmInfoframe ( HdmiRxSs1Ptr ) ; AuxPtr = XV_HdmiRxSs1_GetAuxiliary ( HdmiRxSs1Ptr ) ; if ( AuxPtr -> Header . Byte [ 0 ] == AUX_VSIF_TYPE ) { XV_HdmiRxSs1_RetrieveVSInfoframe ( HdmiRxSs1Ptr ) ; } else if ( AuxPtr -> Header . Byte [ 0 ] == AUX_AVI_INFOFRAME_TYPE ) { ( void ) memset ( ( void * ) AviInfoFramePtr , 0 , sizeof ( XHdmiC_AVI_InfoFrame ) ) ; XV_HdmiC_ParseAVIInfoFrame ( AuxPtr , AviInfoFramePtr ) ; HdmiRxSs1Ptr -> HdmiRx1Ptr -> Stream . Video . ColorFormatId = XV_HdmiRx1_GetAviColorSpace ( HdmiRxSs1Ptr -> HdmiRx1Ptr ) ; HdmiRxSs1Ptr -> HdmiRx1Ptr -> Stream . Vic = XV_HdmiRx1_GetAviVic ( HdmiRxSs1Ptr -> HdmiRx1Ptr ) ; HdmiRxSs1Ptr -> HdmiRx1Ptr -> Stream . Video . AspectRatio = XV_HdmiC_IFAspectRatio_To_XVidC ( HdmiRxSs1Ptr -> AVIInfoframe . PicAspectRatio ) ; } else if ( AuxPtr -> Header . Byte [ 0 ] == AUX_GENERAL_CONTROL_PACKET_TYPE ) { ( void ) memset ( ( void * ) GeneralControlPacketPtr , 0 , sizeof ( XHdmiC_GeneralControlPacket ) ) ; XV_HdmiC_ParseGCP ( AuxPtr , GeneralControlPacketPtr ) ; } else if ( AuxPtr -> Header . Byte [ 0 ] == AUX_AUDIO_INFOFRAME_TYPE ) { ( void ) memset ( ( void * ) AudioInfoFramePtr , 0 , sizeof ( XHdmiC_AudioInfoFrame ) ) ; XV_HdmiC_ParseAudioInfoFrame ( AuxPtr , AudioInfoFramePtr ) ; } else if ( AuxPtr -> Header . Byte [ 0 ] == AUX_DRM_INFOFRAME_TYPE ) { ( void ) memset ( ( void * ) DrmInfoFramePtr , 0 , sizeof ( XHdmiC_DRMInfoFrame ) ) ; XV_HdmiC_ParseDRMIF ( AuxPtr , DrmInfoFramePtr ) ; } if ( HdmiRxSs1Ptr -> AuxCallback ) { HdmiRxSs1Ptr -> AuxCallback ( HdmiRxSs1Ptr -> AuxRef ) ; } }
This function is called when a RX AUX IRQ has occurred.
This function is called when a RX AUX IRQ has occurred .
/* Retrieve Vendor Specific Info Frame*/ /* Reset Avi InfoFrame*/ /* Parse Aux to retrieve Avi InfoFrame*/ /* Reset General Control Packet*/ /* Parse Aux to retrieve General Control Packet*/ /* Stream.Video.ColorDepth is updated from the core during AUX INTR*/ /* Reset Audio InfoFrame*/ /* Parse Aux to retrieve Audio InfoFrame*/ /* Check if user callback has been registered*/