| dcsub Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Functions
Overview

## Functions
void | XDc_CfgInitialize (XDc *InstancePtr, u32 BaseAddr)
| This function intializes the configuration for the DC Instance. More...
void | XDc_Initialize (XDc *InstancePtr)
| This function initializes all the data structures of the XDc Instance. More...
void | XDc_WriteProtEnable (XDc *InstancePtr)
| This function disables writes to DC. More...
void | XDc_WriteProtDisable (XDc *InstancePtr)
| This function enables writes to DC. More...
void | XDc_SetVidInterfaceMode (XDc *InstancePtr)
| This function sets the mode for DC Instance. More...
void | XDc_SetBlenderBgColor (XDc *InstancePtr)
| This function sets the blender background color. More...
void | XDc_SetGlobalAlpha (XDc *InstancePtr)
| This function enables or disables global alpha. More...
void | XDc_SetInputVideoSelect (XDc *InstancePtr)
| This function selects the source type for the Video and Graphics input streams that are passed on to the blender block. More...
void | XDc_SetInputAudioSelect (XDc *InstancePtr)
| This function selects the source type for audio stream. More...
XDc_VideoAttribute * | XDc_GetNonLiveVideoAttribute (XDc_VideoFormat Format)
| This function looks up if the video format is valid NonLiveVideo format or not and returns a pointer to the attributes of the video. More...
void | XDc_SetNonLiveInputFormat (XDc *InstancePtr, u8 VideoSrc, XDc_VideoAttribute *Video)
| This function applies Attributes for Non - Live source(Stream1/Stream2). More...
XDc_VideoAttribute * | XDc_GetLiveVideoAttribute (XDc_VideoFormat Format)
| This function looks up if the video format is valid LiveVideo format or not and returns a pointer to the attributes of the video. More...
XDc_VideoAttribute * | XDc_GetOutputVideoAttribute (XDc_VideoFormat Format, XDc_VidInterface Mode)
| This function looks up if the output video format is valid or not and returns a pointer to the attributes of the video. More...
void | XDc_SetOutputVideoFormat (XDc *InstancePtr)
| This function configures the Output of the Video Pipeline. More...
void | XDc_EnablePartialBlend (XDc *InstancePtr)
| This function enables Partial Blend for corresponding video stream. More...
u32 | XDc_ConfigureStream (XDc *InstancePtr, u8 StreamSrc)
| This function configures DC Blender. More...
void | XDc_SetOutputCSC (XDc *InstancePtr)
| This function converts the Blender output to the desired output format. More...
void | XDc_SetChromaKey (XDc *InstancePtr)
| This function enables Chroma Keying. More...
void | XDc_SetCursorBlend (XDc *InstancePtr)
| This function enables Cursor blending. More...
void | XDc_SetAudioVideoClkSrc (XDc *InstancePtr)
| This function sets the Audio and Video Clock Source and the video timing source. More...
void | XDc_VideoSoftReset (XDc *InstancePtr)
| This function applies a soft reset to the Video pipeline. More...
void | XDc_VidClkSelect (XDc *InstancePtr)
| This function configures DC Video Clock Select. More...
void | XDc_EnableStream1Buffers (XDc *InstancePtr)
| This function enables the video channel interface between the DCDMA and the DC. More...
void | XDc_EnableStream2Buffers (XDc *InstancePtr)
| This function enables the video channel interface between the DCDMA and the DC. More...
void | XDc_AudioSoftReset (XDc *InstancePtr)
| This function applies a soft reset to the Audio pipeline. More...
void | XDc_AudLineResetDisable (XDc *InstancePtr)
| This function enables End of Line Reset for reduced blanking resolutions. More...
void | XDc_AudExtraBSControl (XDc *InstancePtr)
| This function enables Extra BS Control for AUDIO_SOFT_RESET. More...
void | XDc_SetSdpSource (XDc *InstancePtr)
| This function enables SDP from DMA or PL. More...
void | XDc_SetSdpEmptyThreshold (XDc *InstancePtr)
| This function sets SDP Empty Threshold value. More...
void | XDc_SetSdpCursorBuffers (XDc *InstancePtr)
| This function enables SDP & Cursor buffers. More...
void | XDc_SetVidFrameSwitch (XDc *InstancePtr)
| This function configures the register to gate input video on/off at video frame boundary. More...
void | XDc_SetNonLiveLatency (XDc *InstancePtr)
| This function configures the memory fetch latency. More...
void | XDc_SetStcCtrl (XDc *InstancePtr)
| This function enables STC Control. More...
void | XDc_SetStcLoad (XDc *InstancePtr)
| This function loads STC Init value. More...
void | XDc_SetStcAdjust (XDc *InstancePtr)
| This function Adjusts STC Control value. More...
u64 | XDc_GetStcVSyncTs (XDc *InstancePtr)
| This function reads VSync STC value and returns it. More...
u64 | XDc_GetStcExtVSyncTs (XDc *InstancePtr)
| This function reads External VSync STC value and returns it. More...
u64 | XDc_GetStcCustomEventTs (XDc *InstancePtr)
| This function reads Custom Event STC value and returns it. More...
u64 | XDc_GetStcCustomEvent2Ts (XDc *InstancePtr)
| This function reads Custom Event2 STC value and returns it. More...
u64 | XDc_GetStcSnapshot (XDc *InstancePtr)
| This function reads STC Snapshot value and returns it. More...
void | XDc_EnableAudioBuffer (XDc *InstancePtr)
| This function Enable Audio Buffer channel and sets the burst length. More...
void | XDc_AudioChannelSelect (XDc *InstancePtr)
| This function enables audio channel select and programs sample rate. More...
void | XDc_AudClkSelect (XDc *InstancePtr)
| This function configures DC Audio Clock Select. More...
void | XDc_SetAudInterface (XDc *InstancePtr)
| This function sets the audio mode for DC Instance. More...
void | XDc_EnableAudio (XDc *InstancePtr)
| This function enables audio to DC. More...
void | XDc_DisableAudio (XDc *InstancePtr)
| This function disables audio to DC. More...
void | XDc_SetVideoTiming (XDc *InstancePtr)
| This function configures DC Timings register. More...

## Function Documentation

void XDc_AudClkSelect | ( | XDc * | InstancePtr | ) |

This function configures DC Audio Clock Select.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AUD_CLK, and XDc_WriteReg.

void XDc_AudExtraBSControl | ( | XDc * | InstancePtr | ) |

This function enables Extra BS Control for AUDIO_SOFT_RESET.

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_AUD_SOFT_RST, XDc_ReadReg, and XDc_WriteReg.

void XDc_AudioChannelSelect | ( | XDc * | InstancePtr | ) |

This function enables audio channel select and programs sample rate.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_NL_AUD, and XDc_WriteReg.

void XDc_AudioSoftReset | ( | XDc * | InstancePtr | ) |

This function applies a soft reset to the Audio pipeline.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

Note
  None.

References XDC_AUD_SOFT_RST, XDc_ReadReg, and XDc_WriteReg.

Referenced by XDcSub_Initialize().

void XDc_AudLineResetDisable | ( | XDc * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_AUD_SOFT_RST, XDc_ReadReg, and XDc_WriteReg.

void XDc_CfgInitialize | ( | XDc * | InstancePtr,
|  | u32 | BaseAddr
| ) |  |

This function intializes the configuration for the DC Instance.

Parameters

  InstancePtr | is a pointer to the XDc instance.
  BaseAddr | sets the base address of the DC instance
  DeviceId | is the id of the device from the design.

Returns
  None.

Note
  Base address and DeviceId is same as the DP Core driver.

Referenced by XDcSub_CfgInitialize().

u32 XDc_ConfigureStream | ( | XDc * | InstancePtr,
|  | u8 | StreamSrc
| ) |  |

This function configures DC Blender.

Parameters

  InstancePtr | is a pointer to the XDc instance.
  VideoSrc | points to the stream source

Returns
  None.

References XDC_AV_BUF_GRAPHICS_COMP0_SCALE_FACTOR, XDC_AV_BUF_LIVE_GFX_CFG, XDC_AV_BUF_LIVE_GFX_COMP0_SF, XDC_AV_BUF_LIVE_VID_CFG, XDC_AV_BUF_LIVE_VID_COMP0_SF, XDC_AV_BUF_VID_COMP0_SCALE_FACTOR, XDc_SetNonLiveInputFormat(), XDC_V_BLEND_IN1CSC_COEFF0, XDC_V_BLEND_IN2CSC_COEFF0, XDC_V_BLEND_LAYER0_CONTROL, and XDC_V_BLEND_LAYER1_CONTROL.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_DisableAudio | ( | XDc * | InstancePtr | ) |

This function disables audio to DC.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_DC_AUDIO, and XDc_WriteReg.

void XDc_EnableAudio | ( | XDc * | InstancePtr | ) |

This function enables audio to DC.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_DC_AUDIO, and XDc_WriteReg.

void XDc_EnableAudioBuffer | ( | XDc * | InstancePtr | ) |

This function Enable Audio Buffer channel and sets the burst length.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_CHBUF_AUD, and XDc_WriteReg.

void XDc_EnablePartialBlend | ( | XDc * | InstancePtr | ) |

This function enables Partial Blend for corresponding video stream.

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_V0, and XDC_V1.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_EnableStream1Buffers | ( | XDc * | InstancePtr | ) |

This function enables the video channel interface between the DCDMA and the DC.

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_AV_CHBUF0, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_EnableStream2Buffers | ( | XDc * | InstancePtr | ) |

This function enables the video channel interface between the DCDMA and the DC.

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_AV_CHBUF3, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

XDc_VideoAttribute* XDc_GetLiveVideoAttribute | ( | XDc_VideoFormat | Format | ) |

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

Parameters

  Format | takes in the video format for which attributes are being requested.

Returns
  A pointer to the structure XDc_VideoAttribute if the video format is valid, else returns NULL.

Note
  None.

Referenced by XDcSub_SetInputLiveStreamFormat().

XDc_VideoAttribute* XDc_GetNonLiveVideoAttribute | ( | XDc_VideoFormat | Format | ) |

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

Parameters

  Format | takes in the video format for which attributes are being requested.

Returns
  A pointer to the structure XDc_VideoAttribute if the video format is valid, else returns NULL.

Note
  None.

Referenced by XDcSub_SetInputNonLiveVideoFormat().

XDc_VideoAttribute* XDc_GetOutputVideoAttribute | ( | XDc_VideoFormat | Format,
|  | XDc_VidInterface | Mode
| ) |  |

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

Parameters

  Format | takes in the output video format for which attributes are being requested.

Returns
  A pointer to the structure XDc_VideoAttribute if the video format is valid, else returns NULL.

Note
  None.

Referenced by XDcSub_SetOutputVideoFormat().

u64 XDc_GetStcCustomEvent2Ts | ( | XDc * | InstancePtr | ) |

This function reads Custom Event2 STC value and returns it.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_CUSTOM_EVENT2_TS_REG0, XDC_AV_BUF_STC_CUSTOM_EVENT2_TS_REG1, and XDc_ReadReg.

u64 XDc_GetStcCustomEventTs | ( | XDc * | InstancePtr | ) |

This function reads Custom Event STC value and returns it.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_CUSTOM_EVENT_TS_REG0, XDC_AV_BUF_STC_CUSTOM_EVENT_TS_REG1, and XDc_ReadReg.

u64 XDc_GetStcExtVSyncTs | ( | XDc * | InstancePtr | ) |

This function reads External VSync STC value and returns it.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_EXT_VSYNC_TS_REG0, XDC_AV_BUF_STC_EXT_VSYNC_TS_REG1, and XDc_ReadReg.

u64 XDc_GetStcSnapshot | ( | XDc * | InstancePtr | ) |

This function reads STC Snapshot value and returns it.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_SNAPSHOT0, XDC_AV_BUF_STC_SNAPSHOT1, and XDc_ReadReg.

u64 XDc_GetStcVSyncTs | ( | XDc * | InstancePtr | ) |

This function reads VSync STC value and returns it.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_VID_VSYNC_TS_REG0, XDC_AV_BUF_STC_VID_VSYNC_TS_REG1, and XDc_ReadReg.

void XDc_Initialize | ( | XDc * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

Note
  None.

References XDC_AUD_SOFT_RST, and XDc_WriteReg.

void XDc_SetAudInterface | ( | XDc * | InstancePtr | ) |

This function sets the audio mode for DC Instance.

Audio can be either in bypass mode or functional mode

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_DC_AUD, and XDc_WriteReg.

void XDc_SetAudioVideoClkSrc | ( | XDc * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

Note
  System uses PL Clock for Video when Live source is in use.

References XDC_AV_BUF_AUD_VID_CLK_SOURCE, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetBlenderBgColor | ( | XDc * | InstancePtr | ) |

This function sets the blender background color.

Parameters

  InstancePtr | is an pointer to the XDc Instance.
  Color | is a pointer to the structure XDc_BlenderBgClr

Returns
  None.

Note
  None.

References XDC_V_BLEND_BG_CLR_0, XDC_V_BLEND_BG_CLR_1, XDC_V_BLEND_BG_CLR_2, and XDc_WriteReg.

void XDc_SetChromaKey | ( | XDc * | InstancePtr | ) |

This function enables Chroma Keying.

Parameters

  InstancePtr | is an pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_V_BLEND_CHROMA_KEY_COMP1, XDC_V_BLEND_CHROMA_KEY_COMP2, XDC_V_BLEND_CHROMA_KEY_COMP3, XDC_V_BLEND_CHROMA_KEY_ENABLE, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetCursorBlend | ( | XDc * | InstancePtr | ) |

This function enables Cursor blending.

Parameters

  InstancePtr | is an pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_CURSOR_COORDINATE, XDC_CURSOR_SIZE, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetGlobalAlpha | ( | XDc * | InstancePtr | ) |

This function enables or disables global alpha.

Parameters

  InstancePtr | is an pointer to the XDc Instance.

Returns
  None.

Note
  GlobalAlphaEn = 1, enables the global alpha. GlobalAlphaEn = 0, disables the global alpha. Alpha = 0, transparent Alpha = 255, Opaque Alpha = 8:1 (Alpha value)

References XDC_V_BLEND_SET_GLOBAL_ALPHA_REG, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetInputAudioSelect | ( | XDc * | InstancePtr | ) |

This function selects the source type for audio stream.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

Note
  None.

References XDC_AV_BUF_OUTPUT_AUD_VID_SELECT, XDc_ReadReg, and XDc_WriteReg.

void XDc_SetInputVideoSelect | ( | XDc * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

Note
  None.

References XDC_AV_BUF_OUTPUT_AUD_VID_SELECT, XDc_ReadReg, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetNonLiveInputFormat | ( | XDc * | InstancePtr,
|  | u8 | VideoSrc,
|  | XDc_VideoAttribute * | Video
| ) |  |

This function applies Attributes for Non - Live source(Stream1/Stream2).

Parameters

  InstancePtr | is an pointer to the XDc Instance.

Returns
  None.

References XDC_AV_BUF_FORMAT, XDc_ReadReg, and XDc_WriteReg.

Referenced by XDc_ConfigureStream().

void XDc_SetNonLiveLatency | ( | XDc * | InstancePtr | ) |

This function configures the memory fetch latency.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_NON_LIVE_LATENCY, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetOutputCSC | ( | XDc * | InstancePtr | ) |

This function converts the Blender output to the desired output format.

Parameters

  InstancePtr | is an pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_V_BLEND_LUMA_OUTCSC_OFFSET, XDC_V_BLEND_RGB2YCBCR_COEFF0, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetOutputVideoFormat | ( | XDc * | InstancePtr | ) |

This function configures the Output of the Video Pipeline.

Parameters

  InstancePtr | is an pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_V_BLEND_OUTPUT_VID_FORMAT, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetSdpCursorBuffers | ( | XDc * | InstancePtr | ) |

This function enables SDP & Cursor buffers.

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_AV_CHBUF_CURSOR_SDP, and XDc_WriteReg.

Referenced by XDcSub_ConfigureDcVideo().

void XDc_SetSdpEmptyThreshold | ( | XDc * | InstancePtr | ) |

This function sets SDP Empty Threshold value.

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDC_SDP_EMPTY, and XDc_WriteReg.

void XDc_SetSdpSource | ( | XDc * | InstancePtr | ) |

This function enables SDP from DMA or PL.

Parameters

  InstancePtr | is a pointer to the XDc Instance.

Returns
  None.

Note
  None.

References XDc_ReadReg, XDC_SDP, and XDc_WriteReg.

void XDc_SetStcAdjust | ( | XDc * | InstancePtr | ) |

This function Adjusts STC Control value.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_ADJ, and XDc_WriteReg.

void XDc_SetStcCtrl | ( | XDc * | InstancePtr | ) |

This function enables STC Control.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_CONTROL, and XDc_WriteReg.

void XDc_SetStcLoad | ( | XDc * | InstancePtr | ) |

This function loads STC Init value.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_AV_BUF_STC_INIT_VALUE0, XDC_AV_BUF_STC_INIT_VALUE1, and XDc_WriteReg.

void XDc_SetVideoTiming | ( | XDc * | InstancePtr | ) |

This function configures DC Timings register.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDc_WriteReg.

void XDc_SetVidFrameSwitch | ( | XDc * | InstancePtr | ) |

This function configures the register to gate input video on/off at video frame boundary.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDc_WriteReg.

void XDc_SetVidInterfaceMode | ( | XDc * | InstancePtr | ) |

This function sets the mode for DC Instance.

DC can be either in bypass mode or functional mode

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_DC_BYPASS, and XDc_WriteReg.

Referenced by XDcSub_Initialize().

void XDc_VidClkSelect | ( | XDc * | InstancePtr | ) |

This function configures DC Video Clock Select.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_VID_CLK, and XDc_WriteReg.

void XDc_VideoSoftReset | ( | XDc * | InstancePtr | ) |

This function applies a soft reset to the Video pipeline.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

Note
  None.

References XDC_AV_BUF_SRST_REG, and XDc_WriteReg.

void XDc_WriteProtDisable | ( | XDc * | InstancePtr | ) |

This function enables writes to DC.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_WPROTS, and XDc_WriteReg.

Referenced by XDcSub_Initialize().

void XDc_WriteProtEnable | ( | XDc * | InstancePtr | ) |

This function disables writes to DC.

Parameters

  InstancePtr | is a pointer to the XDc instance.

Returns
  None.

References XDC_WPROTS, and XDc_WriteReg.