XilinxProcessorIPLib/drivers/v_sdirxss/examples/xuhdsdi_example/xuhdsdi_example.c
void XSdiAud_AESStChangeHandler(void *CallBackRef)
{
	XSdiAud *InstancePtr = (XSdiAud *)CallBackRef;
	u32 Fs;

	/* Check the sampling frequency & take the appropriate action */
	Fs = XSpdif_GetFs(&SpdifRx, 200000000);

	if (Fs > 47000 && Fs < 53000) {
		XSdiAud_Emb_SetSmpRate(&SdiEmbed, XSDIAUD_SMPLRATE_48);
		xil_printf("\nDetected 48 KHz Audio on AES3/SPDIF RX. Embedding on to Group 1 \n\r");
	} else if (Fs > 43000 && Fs < 47000) {
		XSdiAud_Emb_SetSmpRate(&SdiEmbed, XSDIAUD_SMPLRATE_44);
		xil_printf("\nDetected 44.1 KHz Audio on AES3/SPDIF RX. Embedding on to Group 1 \n\r");
	} else if (Fs > 31000 && Fs < 35000) {
		XSdiAud_Emb_SetSmpRate(&SdiEmbed, XSDIAUD_SMPLRATE_32);
		xil_printf("\nDetected 32 KHz Audio on AES3/SPDIF RX. Embedding on to Group 1 \n\r");
	} else if (Fs > 87000 && Fs < 91000) {
		xil_printf("\nDetected 88.2 KHz Audio on AES3/SPDIF RX. Not supported by SDI Embed\n\r");
	} else if (Fs > 95000 && Fs < 99000) {
		xil_printf("\nDetected 96 KHz Audio on AES3/SPDIF RX. Not supported by SDI Embed\n\r");
	} else if (Fs > 191000 && Fs < 195000) {
		xil_printf("\nDetected 192 KHz Audio on AES3/SPDIF RX. Not supported by SDI Embed\n\r");
	} else {
		XSdiDisableAESAudioCapture();
		XSdiEnableAESAudioCapture();
	}
}
/*****************************************************************************/
/**
* This function is the callback function for the AES status change interrupt.
*
* @param  CallBackRef is a pointer to the callback function.
*
* @return None.
*
******************************************************************************/
This function is the callback function for the AES status change interrupt.
This function is the callback function for the AES status change interrupt .
void XSdiAud_AESStChangeHandler(void *CallBackRef)
{
	XSdiAud *InstancePtr = (XSdiAud *)CallBackRef;
	u32 Fs;
	Fs = XSpdif_GetFs(&SpdifRx, 200000000);
	if (Fs > 47000 && Fs < 53000) {
		XSdiAud_Emb_SetSmpRate(&SdiEmbed, XSDIAUD_SMPLRATE_48);
		xil_printf("\nDetected 48 KHz Audio on AES3/SPDIF RX. Embedding on to Group 1 \n\r");
	} else if (Fs > 43000 && Fs < 47000) {
		XSdiAud_Emb_SetSmpRate(&SdiEmbed, XSDIAUD_SMPLRATE_44);
		xil_printf("\nDetected 44.1 KHz Audio on AES3/SPDIF RX. Embedding on to Group 1 \n\r");
	} else if (Fs > 31000 && Fs < 35000) {
		XSdiAud_Emb_SetSmpRate(&SdiEmbed, XSDIAUD_SMPLRATE_32);
		xil_printf("\nDetected 32 KHz Audio on AES3/SPDIF RX. Embedding on to Group 1 \n\r");
	} else if (Fs > 87000 && Fs < 91000) {
		xil_printf("\nDetected 88.2 KHz Audio on AES3/SPDIF RX. Not supported by SDI Embed\n\r");
	} else if (Fs > 95000 && Fs < 99000) {
		xil_printf("\nDetected 96 KHz Audio on AES3/SPDIF RX. Not supported by SDI Embed\n\r");
	} else if (Fs > 191000 && Fs < 195000) {
		xil_printf("\nDetected 192 KHz Audio on AES3/SPDIF RX. Not supported by SDI Embed\n\r");
	} else {
		XSdiDisableAESAudioCapture();
		XSdiEnableAESAudioCapture();
	}
}
void XSdiAud_AESStChangeHandler ( void * CallBackRef ) { XSdiAud * InstancePtr = ( XSdiAud * ) CallBackRef ; u32 Fs ; Fs = XSpdif_GetFs ( & SpdifRx , 200000000 ) ; if ( Fs > 47000 && Fs < 53000 ) { XSdiAud_Emb_SetSmpRate ( & SdiEmbed , XSDIAUD_SMPLRATE_48 ) ; xil_printf ( " \n \n \r " ) ; } else if ( Fs > 43000 && Fs < 47000 ) { XSdiAud_Emb_SetSmpRate ( & SdiEmbed , XSDIAUD_SMPLRATE_44 ) ; xil_printf ( " \n \n \r " ) ; } else if ( Fs > 31000 && Fs < 35000 ) { XSdiAud_Emb_SetSmpRate ( & SdiEmbed , XSDIAUD_SMPLRATE_32 ) ; xil_printf ( " \n \n \r " ) ; } else if ( Fs > 87000 && Fs < 91000 ) { xil_printf ( " \n \n \r " ) ; } else if ( Fs > 95000 && Fs < 99000 ) { xil_printf ( " \n \n \r " ) ; } else if ( Fs > 191000 && Fs < 195000 ) { xil_printf ( " \n \n \r " ) ; } else { XSdiDisableAESAudioCapture ( ) ; XSdiEnableAESAudioCapture ( ) ; } }
This function is the callback function for the AES status change interrupt.
This function is the callback function for the AES status change interrupt .
/* Check the sampling frequency & take the appropriate action */