avbuf
Xilinx SDK Drivers API Documentation
xavbuf.c File Reference

Overview

This file implements all the functions related to the Video Pipeline of the DisplayPort Subsystem.

This header file contains PLL configuring functions.

See xavbuf.h for the detailed description of the driver.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes

1.0 aad 06/24/17 Initial release.

These Functions calculates and configures the PLL depending on desired frequency.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes

1.0 mh 06/24/17 Initial release.

Functions

void XAVBuf_CfgInitialize (XAVBuf *InstancePtr, u32 BaseAddr, u16 DeviceId)
 This function intializes the configuration for the AVBuf Instance. More...
 
void XAVBuf_Initialize (XAVBuf *InstancePtr)
 This function initializes all the data structures of the XAVBuf Instance. More...
 
void XAVBuf_InputVideoSelect (XAVBuf *InstancePtr, u8 VideoStream1, u8 VideoStream2)
 This function selects the source for the Video and Graphics streams that are passed on to the blender block. More...
 
int XAVBuf_SetInputNonLiveVideoFormat (XAVBuf *InstancePtr, XAVBuf_VideoFormat Format)
 This function sets the video format for the non-live video. More...
 
int XAVBuf_SetInputNonLiveGraphicsFormat (XAVBuf *InstancePtr, XAVBuf_VideoFormat Format)
 This function sets the graphics format for the non-live video. More...
 
int XAVBuf_SetInputLiveVideoFormat (XAVBuf *InstancePtr, XAVBuf_VideoFormat Format)
 This function sets the video format for the live video. More...
 
int XAVBuf_SetInputLiveGraphicsFormat (XAVBuf *InstancePtr, XAVBuf_VideoFormat Format)
 This function sets the graphics format for the live video. More...
 
int XAVBuf_SetOutputVideoFormat (XAVBuf *InstancePtr, XAVBuf_VideoFormat Format)
 This function sets the Output Video Format. More...
 
void XAVBuf_SetAudioVideoClkSrc (XAVBuf *InstancePtr, u8 VideoClk, u8 AudioClk)
 This function sets the Audio and Video Clock Source and the video timing source. More...
 
void XAVBuf_SoftReset (XAVBuf *InstancePtr)
 This function applies a soft reset to the Audio Video pipeline. More...
 
XAVBuf_VideoAttributeXAVBuf_GetLiveVideoAttribute (XAVBuf_VideoFormat Format)
 This function looks up if the video format is valid or not for the non-live video datapath and returns a pointer to the attributes of the video. More...
 
XAVBuf_VideoAttributeXAVBuf_GetNLiveVideoAttribute (XAVBuf_VideoFormat Format)
 This function looks up if the video format is valid or not and returns a pointer to the attributes of the video. More...
 
XAVBuf_VideoAttributeXAVBuf_GetNLGraphicsAttribute (XAVBuf_VideoFormat Format)
 This function looks up if the video format is valid or not and returns a pointer to the attributes of the video. More...
 
void XAVBuf_ConfigureVideoPipeline (XAVBuf *InstancePtr)
 This function configures the Video Pipeline. More...
 
void XAVBuf_ConfigureGraphicsPipeline (XAVBuf *InstancePtr)
 This function configures the Graphics Pipeline. More...
 
void XAVBuf_BlendSetBgColor (XAVBuf *InstancePtr, XAVBuf_BlenderBgClr *Color)
 This function sets the blender background color. More...
 
void XAVBuf_SetBlenderAlpha (XAVBuf *InstancePtr, u8 Alpha, u8 Enable)
 This function enables or disables global alpha. More...
 
void XAVBuf_ConfigureOutputVideo (XAVBuf *InstancePtr)
 This function configures the Output of the Video Pipeline. More...
 
void XAVBuf_InputAudioSelect (XAVBuf *InstancePtr, u32 AudioStream1, u32 AudioStream2)
 This function selects the source for audio streams corresponding to the Video and Graphics streams that are passed on to the blender. More...
 
void XAVBuf_AudioMixerVolumeControl (XAVBuf *InstancePtr, u8 Channel0Volume, u8 Channel1Volume)
 This function sets up the scaling factor for Audio Mixer Volume Control. More...
 
void XAVBuf_AudioSoftReset (XAVBuf *InstancePtr)
 This function resets the Audio Pipe. More...
 
void XABuf_LineResetDisable (XAVBuf *InstancePtr, u8 Disable)
 This function enables End of Line Reset for reduced blanking resolutions. More...
 
void XAVBuf_EnableVideoBuffers (XAVBuf *InstancePtr, u8 Enable)
 This function enables the video channel interface between the DPDMA and the AVBuf. More...
 
void XAVBuf_EnableGraphicsBuffers (XAVBuf *InstancePtr, u8 Enable)
 This function enables the graphics interface between the DPDMA and the AVBuf. More...
 
void XAVBuf_EnableAudio0Buffers (XAVBuf *InstancePtr, u8 Enable)
 This function enables the audio interface between the DPDMA and the AVBuf. More...
 
void XAVBuf_EnableAudio1Buffers (XAVBuf *InstancePtr, u8 Enable)
 This function enables the audio interface between the DPDMA and the AVBuf. More...
 

Function Documentation

◆ XABuf_LineResetDisable()

void XABuf_LineResetDisable ( XAVBuf InstancePtr,
u8  Disable 
)

This function enables End of Line Reset for reduced blanking resolutions.

Parameters
InstancePtris a pointer to the XAVBuf Instance.
Disableis to be set while using Reduced Blanking Resolutions.
Returns
None.
Note
None.

References XAVBUF_AUD_SOFT_RST, and XAVBuf_ReadReg.

◆ XAVBuf_AudioMixerVolumeControl()

void XAVBuf_AudioMixerVolumeControl ( XAVBuf InstancePtr,
u8  Channel0Volume,
u8  Channel1Volume 
)

This function sets up the scaling factor for Audio Mixer Volume Control.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Channel0Volumeis the volume to be set for Audio from Channel0
Channel1Volumeis the volume to be set for Audio from Channel1
Returns
None.
Note
None.

◆ XAVBuf_AudioSoftReset()

void XAVBuf_AudioSoftReset ( XAVBuf InstancePtr)

This function resets the Audio Pipe.

Parameters
InstancePtris a pointer to the XAVBuf Instance.
Returns
None.
Note
Needed when non-live audio is disabled.

References XAVBUF_AUD_SOFT_RST, and XAVBuf_ReadReg.

◆ XAVBuf_BlendSetBgColor()

void XAVBuf_BlendSetBgColor ( XAVBuf InstancePtr,
XAVBuf_BlenderBgClr Color 
)

This function sets the blender background color.

Parameters
InstancePtris an pointer to the XAVBuf Instance.
Coloris a pointer to the structure XAVBuf_BlenderBgClr
Returns
None.
Note
None.

References XAVBUF_V_BLEND_BG_CLR_0, XAVBUF_V_BLEND_BG_CLR_1, XAVBUF_V_BLEND_BG_CLR_2, and XAVBuf_WriteReg.

◆ XAVBuf_CfgInitialize()

void XAVBuf_CfgInitialize ( XAVBuf InstancePtr,
u32  BaseAddr,
u16  DeviceId 
)

This function intializes the configuration for the AVBuf Instance.

Parameters
InstancePtris a pointer to the XAVBuf instance.
BaseAddrsets the base address of the AVBuf instance
Deviceidis the id of the device from the design.
Returns
None.
Note
Base address and DeviceId is same as the DP Core driver.

◆ XAVBuf_ConfigureGraphicsPipeline()

void XAVBuf_ConfigureGraphicsPipeline ( XAVBuf InstancePtr)

This function configures the Graphics Pipeline.

Parameters
InstancePtris an pointer to the XAVBuf Instance.
Returns
None.
Note
None.

◆ XAVBuf_ConfigureOutputVideo()

void XAVBuf_ConfigureOutputVideo ( XAVBuf InstancePtr)

This function configures the Output of the Video Pipeline.

Parameters
InstancePtris an pointer to the XAVBuf Instance.
OutputVideois a pointer to the XAVBuf_VideoAttribute.
Returns
None.
Note
None.

◆ XAVBuf_ConfigureVideoPipeline()

void XAVBuf_ConfigureVideoPipeline ( XAVBuf InstancePtr)

This function configures the Video Pipeline.

Parameters
InstancePtris an pointer to the XAVBuf Instance.
Returns
None.
Note
None.

◆ XAVBuf_EnableAudio0Buffers()

void XAVBuf_EnableAudio0Buffers ( XAVBuf InstancePtr,
u8  Enable 
)

This function enables the audio interface between the DPDMA and the AVBuf.

Parameters
InstancePtris a pointer to the XAVBuf Instance.
Enablesets the corresponding buffers.
Returns
None.
Note
None.

◆ XAVBuf_EnableAudio1Buffers()

void XAVBuf_EnableAudio1Buffers ( XAVBuf InstancePtr,
u8  Enable 
)

This function enables the audio interface between the DPDMA and the AVBuf.

Parameters
InstancePtris a pointer to the XAVBuf Instance.
Enablesets the corresponding buffers.
Returns
None.
Note
None.

◆ XAVBuf_EnableGraphicsBuffers()

void XAVBuf_EnableGraphicsBuffers ( XAVBuf InstancePtr,
u8  Enable 
)

This function enables the graphics interface between the DPDMA and the AVBuf.

Parameters
InstancePtris a pointer to the XAVBuf Instance.
Enablesets the corresponding buffers.
Returns
None.
Note
None.

◆ XAVBuf_EnableVideoBuffers()

void XAVBuf_EnableVideoBuffers ( XAVBuf InstancePtr,
u8  Enable 
)

This function enables the video channel interface between the DPDMA and the AVBuf.

Parameters
InstancePtris a pointer to the XAVBuf Instance.
Enablesets the corresponding buffers.
Returns
None.
Note
None.

◆ XAVBuf_GetLiveVideoAttribute()

XAVBuf_VideoAttribute* XAVBuf_GetLiveVideoAttribute ( XAVBuf_VideoFormat  Format)

This function looks up if the video format is valid or not for the non-live video datapath and returns a pointer to the attributes of the video.

Parameters
Formattakes in the video format for which attributes are being requested.
Returns
A pointer to the structure XAVBuf_VideoAttribute if the video format is valid, else returns NULL.
Note
None.

◆ XAVBuf_GetNLGraphicsAttribute()

XAVBuf_VideoAttribute* XAVBuf_GetNLGraphicsAttribute ( XAVBuf_VideoFormat  Format)

This function looks up if the video format is valid or not and returns a pointer to the attributes of the video.

Parameters
Formattakes in the video format for which attributes are being requested.
Returns
A pointer to the structure XAVBuf_VideoAttribute if the video format is valid, else returns NULL.
Note
None.

◆ XAVBuf_GetNLiveVideoAttribute()

XAVBuf_VideoAttribute* XAVBuf_GetNLiveVideoAttribute ( XAVBuf_VideoFormat  Format)

This function looks up if the video format is valid or not and returns a pointer to the attributes of the video.

Parameters
Formattakes in the video format for which attributes are being requested.
Returns
A pointer to the structure XAVBuf_VideoAttribute if the video format is valid, else returns NULL.
Note
None.

◆ XAVBuf_Initialize()

void XAVBuf_Initialize ( XAVBuf InstancePtr)

This function initializes all the data structures of the XAVBuf Instance.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Returns
None.
Note
None.

◆ XAVBuf_InputAudioSelect()

void XAVBuf_InputAudioSelect ( XAVBuf InstancePtr,
u32  AudioStream1,
u32  AudioStream2 
)

This function selects the source for audio streams corresponding to the Video and Graphics streams that are passed on to the blender.

Parameters
InstancePtris a pointer to the XAVBuf instance.
AudioStream1selects the audio stream source corresponding to the video source selected
AudioStream2selects the audio stream source corresponding to the graphics source selected.
Returns
None.
Note
None.

◆ XAVBuf_InputVideoSelect()

void XAVBuf_InputVideoSelect ( XAVBuf InstancePtr,
u8  VideoStream1,
u8  VideoStream2 
)

This function selects the source for the Video and Graphics streams that are passed on to the blender block.

Parameters
InstancePtris a pointer to the XAVBuf instance.
VideoStream1selects the stream coming from the video sources
VideoStream2selects the stream coming from the graphics sources
Returns
None.
Note
None.

◆ XAVBuf_SetAudioVideoClkSrc()

void XAVBuf_SetAudioVideoClkSrc ( XAVBuf InstancePtr,
u8  VideoClk,
u8  AudioClk 
)

This function sets the Audio and Video Clock Source and the video timing source.

Parameters
InstancePtris a pointer to the XAVBuf instance.
VideoClkselects the Video Clock Source
AudioClkselects the Audio Clock Source
Returns
None.
Note
System uses PL Clock for Video when Live source is in use.

◆ XAVBuf_SetBlenderAlpha()

void XAVBuf_SetBlenderAlpha ( XAVBuf InstancePtr,
u8  Alpha,
u8  Enable 
)

This function enables or disables global alpha.

Parameters
InstancePtris an pointer to the XAVBuf Instance.
Enablesets a software flag for global alpha
Alphasets the value for the global alpha blending
Returns
None.
Note
GlobalAlphaEn = 1, enables the global alpha. GlobalAlphaEn = 0, disables the global alpha. Alpha = 0, passes stream2 Alpha = 255, passes stream1

◆ XAVBuf_SetInputLiveGraphicsFormat()

int XAVBuf_SetInputLiveGraphicsFormat ( XAVBuf InstancePtr,
XAVBuf_VideoFormat  Format 
)

This function sets the graphics format for the live video.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Formatis the enum for the non-live video format
Returns
XST_SUCCESS if the correct format has been set. XST_FAILURE if the format is invalid.
Note
None.

◆ XAVBuf_SetInputLiveVideoFormat()

int XAVBuf_SetInputLiveVideoFormat ( XAVBuf InstancePtr,
XAVBuf_VideoFormat  Format 
)

This function sets the video format for the live video.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Formatis the enum for the non-live video format
Returns
XST_SUCCESS if the correct format has been set. XST_FAILURE if the format is invalid.
Note
None.

◆ XAVBuf_SetInputNonLiveGraphicsFormat()

int XAVBuf_SetInputNonLiveGraphicsFormat ( XAVBuf InstancePtr,
XAVBuf_VideoFormat  Format 
)

This function sets the graphics format for the non-live video.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Formatis the enum for the non-live video format
Returns
XST_SUCCESS if the correct format has been set. XST_FAILURE if the format is invalid.
Note
None.

◆ XAVBuf_SetInputNonLiveVideoFormat()

int XAVBuf_SetInputNonLiveVideoFormat ( XAVBuf InstancePtr,
XAVBuf_VideoFormat  Format 
)

This function sets the video format for the non-live video.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Formatis the enum for the non-live video format
Returns
XST_SUCCESS if the correct format has been set. XST_FAILURE if the format is invalid.
Note
None.

◆ XAVBuf_SetOutputVideoFormat()

int XAVBuf_SetOutputVideoFormat ( XAVBuf InstancePtr,
XAVBuf_VideoFormat  Format 
)

This function sets the Output Video Format.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Formatis the enum for the non-live video format
Returns
XST_SUCCESS if the correct format has been set. XST_FAILURE if the format is invalid.
Note
None.

◆ XAVBuf_SoftReset()

void XAVBuf_SoftReset ( XAVBuf InstancePtr)

This function applies a soft reset to the Audio Video pipeline.

Parameters
InstancePtris a pointer to the XAVBuf instance.
Returns
None.
Note
None.

References XAVBUF_BUF_SRST_REG, and XAVBuf_WriteReg.