XilinxProcessorIPLib/drivers/v_hdmirxss/src/xv_hdmirxss.c
static void XV_HdmiRxSs_AuxCallback(void *CallbackRef)
{
  XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;
  XHdmiC_Aux *AuxPtr;
  XHdmiC_AVI_InfoFrame *AviInfoFramePtr;
  XHdmiC_GeneralControlPacket *GeneralControlPacketPtr;
  XHdmiC_AudioInfoFrame *AudioInfoFramePtr;
  XHdmiC_DRMInfoFrame *DrmInfoFramePtr;

  AviInfoFramePtr = XV_HdmiRxSs_GetAviInfoframe(HdmiRxSsPtr);
  GeneralControlPacketPtr = XV_HdmiRxSs_GetGCP(HdmiRxSsPtr);
  AudioInfoFramePtr = XV_HdmiRxSs_GetAudioInfoframe(HdmiRxSsPtr);
  DrmInfoFramePtr = XV_HdmiRxSs_GetDrmInfoframe(HdmiRxSsPtr);
  AuxPtr = XV_HdmiRxSs_GetAuxiliary(HdmiRxSsPtr);

  if(AuxPtr->Header.Byte[0] == AUX_VSIF_TYPE){
	  // Retrieve Vendor Specific Info Frame
	  XV_HdmiRxSs_RetrieveVSInfoframe(HdmiRxSsPtr);
  } 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);
	  HdmiRxSsPtr->HdmiRxPtr->Stream.Video.ColorFormatId =
	  			XV_HdmiRx_GetAviColorSpace(HdmiRxSsPtr->HdmiRxPtr);
	  HdmiRxSsPtr->HdmiRxPtr->Stream.Vic =
				XV_HdmiRx_GetAviVic(HdmiRxSsPtr->HdmiRxPtr);
	  HdmiRxSsPtr->HdmiRxPtr->Stream.Video.AspectRatio =
				XV_HdmiC_IFAspectRatio_To_XVidC(HdmiRxSsPtr->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) {
	  // Reset HDR InfoFrame
	  (void)memset((void *)DrmInfoFramePtr, 0, sizeof(XHdmiC_DRMInfoFrame));
	  // Parse Aux to retrieve HDR InfoFrame
	  XV_HdmiC_ParseDRMIF(AuxPtr, DrmInfoFramePtr);
  }

  // Check if user callback has been registered
  if (HdmiRxSsPtr->AuxCallback) {
      HdmiRxSsPtr->AuxCallback(HdmiRxSsPtr->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_HdmiRxSs_AuxCallback(void *CallbackRef)
{
  XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;
  XHdmiC_Aux *AuxPtr;
  XHdmiC_AVI_InfoFrame *AviInfoFramePtr;
  XHdmiC_GeneralControlPacket *GeneralControlPacketPtr;
  XHdmiC_AudioInfoFrame *AudioInfoFramePtr;
  XHdmiC_DRMInfoFrame *DrmInfoFramePtr;
  AviInfoFramePtr = XV_HdmiRxSs_GetAviInfoframe(HdmiRxSsPtr);
  GeneralControlPacketPtr = XV_HdmiRxSs_GetGCP(HdmiRxSsPtr);
  AudioInfoFramePtr = XV_HdmiRxSs_GetAudioInfoframe(HdmiRxSsPtr);
  DrmInfoFramePtr = XV_HdmiRxSs_GetDrmInfoframe(HdmiRxSsPtr);
  AuxPtr = XV_HdmiRxSs_GetAuxiliary(HdmiRxSsPtr);
  if(AuxPtr->Header.Byte[0] == AUX_VSIF_TYPE){
	  XV_HdmiRxSs_RetrieveVSInfoframe(HdmiRxSsPtr);
  } else if(AuxPtr->Header.Byte[0] == AUX_AVI_INFOFRAME_TYPE){
	  (void)memset((void *)AviInfoFramePtr, 0, sizeof(XHdmiC_AVI_InfoFrame));
	  XV_HdmiC_ParseAVIInfoFrame(AuxPtr, AviInfoFramePtr);
	  HdmiRxSsPtr->HdmiRxPtr->Stream.Video.ColorFormatId =
	  			XV_HdmiRx_GetAviColorSpace(HdmiRxSsPtr->HdmiRxPtr);
	  HdmiRxSsPtr->HdmiRxPtr->Stream.Vic =
				XV_HdmiRx_GetAviVic(HdmiRxSsPtr->HdmiRxPtr);
	  HdmiRxSsPtr->HdmiRxPtr->Stream.Video.AspectRatio =
				XV_HdmiC_IFAspectRatio_To_XVidC(HdmiRxSsPtr->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 (HdmiRxSsPtr->AuxCallback) {
      HdmiRxSsPtr->AuxCallback(HdmiRxSsPtr->AuxRef);
  }
}
static void XV_HdmiRxSs_AuxCallback ( void * CallbackRef ) { XV_HdmiRxSs * HdmiRxSsPtr = ( XV_HdmiRxSs * ) CallbackRef ; XHdmiC_Aux * AuxPtr ; XHdmiC_AVI_InfoFrame * AviInfoFramePtr ; XHdmiC_GeneralControlPacket * GeneralControlPacketPtr ; XHdmiC_AudioInfoFrame * AudioInfoFramePtr ; XHdmiC_DRMInfoFrame * DrmInfoFramePtr ; AviInfoFramePtr = XV_HdmiRxSs_GetAviInfoframe ( HdmiRxSsPtr ) ; GeneralControlPacketPtr = XV_HdmiRxSs_GetGCP ( HdmiRxSsPtr ) ; AudioInfoFramePtr = XV_HdmiRxSs_GetAudioInfoframe ( HdmiRxSsPtr ) ; DrmInfoFramePtr = XV_HdmiRxSs_GetDrmInfoframe ( HdmiRxSsPtr ) ; AuxPtr = XV_HdmiRxSs_GetAuxiliary ( HdmiRxSsPtr ) ; if ( AuxPtr -> Header . Byte [ 0 ] == AUX_VSIF_TYPE ) { XV_HdmiRxSs_RetrieveVSInfoframe ( HdmiRxSsPtr ) ; } else if ( AuxPtr -> Header . Byte [ 0 ] == AUX_AVI_INFOFRAME_TYPE ) { ( void ) memset ( ( void * ) AviInfoFramePtr , 0 , sizeof ( XHdmiC_AVI_InfoFrame ) ) ; XV_HdmiC_ParseAVIInfoFrame ( AuxPtr , AviInfoFramePtr ) ; HdmiRxSsPtr -> HdmiRxPtr -> Stream . Video . ColorFormatId = XV_HdmiRx_GetAviColorSpace ( HdmiRxSsPtr -> HdmiRxPtr ) ; HdmiRxSsPtr -> HdmiRxPtr -> Stream . Vic = XV_HdmiRx_GetAviVic ( HdmiRxSsPtr -> HdmiRxPtr ) ; HdmiRxSsPtr -> HdmiRxPtr -> Stream . Video . AspectRatio = XV_HdmiC_IFAspectRatio_To_XVidC ( HdmiRxSsPtr -> 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 ( HdmiRxSsPtr -> AuxCallback ) { HdmiRxSsPtr -> AuxCallback ( HdmiRxSsPtr -> 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 // Reset HDR InfoFrame // Parse Aux to retrieve HDR InfoFrame // Check if user callback has been registered