dp
Xilinx SDK Drivers API Documentation
xdp_tx_audio_example.c File Reference

Overview

Contains a design example using the XDp driver (operating in TX mode) to train the main link and to display video.

In this example application, the sequence to enable audio is illustrated.

Note
This example requires an audio source such as an S/PDIF instance to be part of the hardware system. See XAPP1178 for reference.
This example requires that the audio enable configuration parameter for DisplayPort be turned on when creating the hardware design.
For this example to output audio, the user will need to implement initialization of the system (Dptx_PlatformInit), configuration of the audio source (Dptx_ConfigureAudioSrc) and, depending on the hardware system, will need to implement sending of an info frame (Dptx_AudioSendInfoFrame). See XAPP1178 and the IP documentation for reference.
For this example to display output, after training is complete, the user will need to implement configuration of the video stream source in order to provide the DisplayPort core with input (Dptx_StreamSrc* - called in xdp_tx_example_common.c). See XAPP1178 for reference.
The functions Dptx_PlatformInit and Dptx_StreamSrc* are declared extern in xdp_tx_example_common.h and are left up to the user to implement. The functions Dptx_ConfigureAudioSrc and Dptx_AudioSendInfoFrame are present in this file and are also left for the user to implement.
MODIFICATION HISTORY:
Ver   Who  Date     Changes

1.0 als 01/20/15 Initial creation. 5.1 ms 01/23/17 Added xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028.

Functions

u32 Dptx_AudioExample (XDp *InstancePtr, u16 DeviceId)
 The main entry point for the audio example using the XDp driver. More...
 
int main (void)
 This function is the main function of the XDp audio example. More...
 

Function Documentation

◆ Dptx_AudioExample()

u32 Dptx_AudioExample ( XDp InstancePtr,
u16  DeviceId 
)

The main entry point for the audio example using the XDp driver.

This function will set up audio, initiate link training, and a video stream will start being sent over the main link.

Parameters
InstancePtris a pointer to the XDp instance.
DeviceIdis the unique device ID of the DisplayPort TX core instance.
Returns
  • XST_SUCCESS if the system was set up correctly and link training was successful.
  • XST_FAILURE otherwise.
Note
None.

References XDp_TxMstCfgModeDisable().

Referenced by main().

◆ main()

int main ( void  )

This function is the main function of the XDp audio example.

Parameters
None.
Returns
  • XST_SUCCESS if the audio example finished successfully.
  • XST_FAILURE otherwise.
Note
None.

References Dptx_AudioExample().