XilinxProcessorIPLib/drivers/v_hdmitxss/examples/xhdmi_example/I2S/xhdmi_example.c
void RxAudCallback(void *CallbackRef) {
#ifdef XPAR_XV_HDMITXSS_NUM_INSTANCES
#ifndef XPAR_XI2SRX_NUM_INSTANCES
	XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;
#endif

#ifdef XPAR_XI2SRX_NUM_INSTANCES

	/* With I2S, it is always a PCM data
	 * The TX audio is handled separately after the I2S IP are setup
     */

#else
	if (IsPassThrough) {
		/* Set TX Audio params:
		 * Audio Channels:
		 */
		XV_HdmiTxSs_SetAudioChannels(&HdmiTxSs,
				XV_HdmiRxSs_GetAudioChannels(HdmiRxSsPtr));

		/* HBR audio */
		if (XV_HdmiRxSs_GetAudioFormat(HdmiRxSsPtr) ==
						XV_HDMIRX_AUDFMT_HBR) {
			XV_HdmiTxSs_SetAudioFormat(&HdmiTxSs,
						   XV_HDMITX_AUDFMT_HBR);
		}
		/* L-PCM */
		else {
			XV_HdmiTxSs_SetAudioFormat(&HdmiTxSs,
						   XV_HDMITX_AUDFMT_LPCM);
		}

	}
#endif
#endif
}
/*****************************************************************************/
/**
*
* This function is called when a RX audio irq has occurred.
*
* @param  None.
*
* @return None.
*
* @note   None.
*
******************************************************************************/
This function is called when a RX audio irq has occurred.
This function is called when a RX audio irq has occurred .
void RxAudCallback(void *CallbackRef) {
#ifdef XPAR_XV_HDMITXSS_NUM_INSTANCES
#ifndef XPAR_XI2SRX_NUM_INSTANCES
	XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;
#endif
#ifdef XPAR_XI2SRX_NUM_INSTANCES
#else
	if (IsPassThrough) {
		XV_HdmiTxSs_SetAudioChannels(&HdmiTxSs,
				XV_HdmiRxSs_GetAudioChannels(HdmiRxSsPtr));
		if (XV_HdmiRxSs_GetAudioFormat(HdmiRxSsPtr) ==
						XV_HDMIRX_AUDFMT_HBR) {
			XV_HdmiTxSs_SetAudioFormat(&HdmiTxSs,
						   XV_HDMITX_AUDFMT_HBR);
		}
		else {
			XV_HdmiTxSs_SetAudioFormat(&HdmiTxSs,
						   XV_HDMITX_AUDFMT_LPCM);
		}
	}
#endif
#endif
}
void RxAudCallback ( void * CallbackRef ) { #ifdef XPAR_XV_HDMITXSS_NUM_INSTANCES #ifndef XPAR_XI2SRX_NUM_INSTANCES XV_HdmiRxSs * HdmiRxSsPtr = ( XV_HdmiRxSs * ) CallbackRef ; #endif #ifdef XPAR_XI2SRX_NUM_INSTANCES #else if ( IsPassThrough ) { XV_HdmiTxSs_SetAudioChannels ( & HdmiTxSs , XV_HdmiRxSs_GetAudioChannels ( HdmiRxSsPtr ) ) ; if ( XV_HdmiRxSs_GetAudioFormat ( HdmiRxSsPtr ) == XV_HDMIRX_AUDFMT_HBR ) { XV_HdmiTxSs_SetAudioFormat ( & HdmiTxSs , XV_HDMITX_AUDFMT_HBR ) ; } else { XV_HdmiTxSs_SetAudioFormat ( & HdmiTxSs , XV_HDMITX_AUDFMT_LPCM ) ; } } #endif #endif }
This function is called when a RX audio irq has occurred.
This function is called when a RX audio irq has occurred .
/* With I2S, it is always a PCM data
	 * The TX audio is handled separately after the I2S IP are setup
     */ /* Set TX Audio params:
		 * Audio Channels:
		 */ /* HBR audio */ /* L-PCM */