XilinxProcessorIPLib/drivers/v_hdmitxss/examples/xhdmi_example/I2S/xhdmi_example.c
void RxStreamInitCallback(void *CallbackRef) {
	XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;
	XVidC_VideoStream *HdmiRxSsVidStreamPtr;
	u32 Status;

	/* Calculate RX MMCM parameters
	 * In the application the YUV422 colordepth is 12 bits
	 * However the HDMI transports YUV422 in 8 bits.
	 * Therefore force the colordepth to 8 bits when the
	 * colorspace is YUV422
	 */

	HdmiRxSsVidStreamPtr = XV_HdmiRxSs_GetVideoStream(HdmiRxSsPtr);

	if (HdmiRxSsVidStreamPtr->ColorFormatId == XVIDC_CSF_YCRCB_422) {
		Status =
			XVphy_HdmiCfgCalcMmcmParam(&Vphy,
					       0,
					       XVPHY_CHANNEL_ID_CH1,
					       XVPHY_DIR_RX,
					       HdmiRxSsVidStreamPtr->PixPerClk,
					       XVIDC_BPC_8);
	}

	/* Other colorspaces */
	else {
		Status = XVphy_HdmiCfgCalcMmcmParam(&Vphy,
					     0,
					     XVPHY_CHANNEL_ID_CH1,
					     XVPHY_DIR_RX,
					     HdmiRxSsVidStreamPtr->PixPerClk,
					     HdmiRxSsVidStreamPtr->ColorDepth);
	}

	if (Status == XST_FAILURE) {
		return;
	}

	/* Enable and configure RX MMCM */
	XVphy_MmcmStart(&Vphy, 0, XVPHY_DIR_RX);

	usleep(10000);
}
/*****************************************************************************/
/**
*
* This function is called when the RX stream init
*
* @param  None.
*
* @return None.
*
* @note   None.
*
******************************************************************************/
This function is called when the RX stream init
This function is called when the RX stream init
void RxStreamInitCallback(void *CallbackRef) {
	XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;
	XVidC_VideoStream *HdmiRxSsVidStreamPtr;
	u32 Status;
	HdmiRxSsVidStreamPtr = XV_HdmiRxSs_GetVideoStream(HdmiRxSsPtr);
	if (HdmiRxSsVidStreamPtr->ColorFormatId == XVIDC_CSF_YCRCB_422) {
		Status =
			XVphy_HdmiCfgCalcMmcmParam(&Vphy,
					       0,
					       XVPHY_CHANNEL_ID_CH1,
					       XVPHY_DIR_RX,
					       HdmiRxSsVidStreamPtr->PixPerClk,
					       XVIDC_BPC_8);
	}
	else {
		Status = XVphy_HdmiCfgCalcMmcmParam(&Vphy,
					     0,
					     XVPHY_CHANNEL_ID_CH1,
					     XVPHY_DIR_RX,
					     HdmiRxSsVidStreamPtr->PixPerClk,
					     HdmiRxSsVidStreamPtr->ColorDepth);
	}
	if (Status == XST_FAILURE) {
		return;
	}
	XVphy_MmcmStart(&Vphy, 0, XVPHY_DIR_RX);
	usleep(10000);
}
void RxStreamInitCallback ( void * CallbackRef ) { XV_HdmiRxSs * HdmiRxSsPtr = ( XV_HdmiRxSs * ) CallbackRef ; XVidC_VideoStream * HdmiRxSsVidStreamPtr ; u32 Status ; HdmiRxSsVidStreamPtr = XV_HdmiRxSs_GetVideoStream ( HdmiRxSsPtr ) ; if ( HdmiRxSsVidStreamPtr -> ColorFormatId == XVIDC_CSF_YCRCB_422 ) { Status = XVphy_HdmiCfgCalcMmcmParam ( & Vphy , 0 , XVPHY_CHANNEL_ID_CH1 , XVPHY_DIR_RX , HdmiRxSsVidStreamPtr -> PixPerClk , XVIDC_BPC_8 ) ; } else { Status = XVphy_HdmiCfgCalcMmcmParam ( & Vphy , 0 , XVPHY_CHANNEL_ID_CH1 , XVPHY_DIR_RX , HdmiRxSsVidStreamPtr -> PixPerClk , HdmiRxSsVidStreamPtr -> ColorDepth ) ; } if ( Status == XST_FAILURE ) { return ; } XVphy_MmcmStart ( & Vphy , 0 , XVPHY_DIR_RX ) ; usleep ( 10000 ) ; }
This function is called when the RX stream init
This function is called when the RX stream init
/* Calculate RX MMCM parameters
	 * In the application the YUV422 colordepth is 12 bits
	 * However the HDMI transports YUV422 in 8 bits.
	 * Therefore force the colordepth to 8 bits when the
	 * colorspace is YUV422
	 */ /* Other colorspaces */ /* Enable and configure RX MMCM */