v_sdirxss
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
xv_sdirxss.c File Reference

Overview

This is the main file for Xilinx SDI RX core.

Please see xv_ddirxss.h for more details of the driver.

MODIFICATION HISTORY:
Ver   Who    Date      Changes


1.00 jsr 07/17/17 Initial release. 2.00 kar 01/25/18 Second release.

#include "xv_sdirxss.h"
#include "xv_sdirxss_coreinit.h"

Functions

void XV_SdiRxSS_SdiRxIntrHandler (XV_SdiRxSs *InstancePtr)
 This function calls the interrupt handler for SDI RX. More...
 
void XV_SdiRxSs_ReportCoreInfo (XV_SdiRxSs *InstancePtr)
 This function reports list of cores included in Video Processing Subsystem. More...
 
int XV_SdiRxSs_CfgInitialize (XV_SdiRxSs *InstancePtr, XV_SdiRxSs_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the video subsystem and included sub-cores. More...
 
void XV_SdiRxSs_StreamFlowEnable (XV_SdiRxSs *InstancePtr)
 This function enables the AXIS and video bridges. More...
 
void XV_SdiRxSs_StreamFlowDisable (XV_SdiRxSs *InstancePtr)
 This function disables the AXIS and video bridges. More...
 
void XV_SdiRxSs_Start (XV_SdiRxSs *InstancePtr, XV_SdiRx_SearchMode Mode)
 This function starts the SDI RX stream detection. More...
 
void XV_SdiRxSs_Stop (XV_SdiRxSs *InstancePtr)
 This function stops the SDI RX stream detection. More...
 
int XV_SdiRxSs_SetCallback (XV_SdiRxSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
 This function installs an asynchronous callback function for the given HandlerType: More...
 
u32 * XV_SdiRxSs_GetPayloadId (XV_SdiRxSs *InstancePtr, u8 StreamId)
 Retrieves the payload ID for a specified stream in the SDI Rx subsystem. More...
 
XSdiVid_Transport * XV_SdiRxSs_GetTransport (XV_SdiRxSs *InstancePtr)
 Gets the Transport information from the SDI Rx subsystem. More...
 
XSdiVid_TransMode XV_SdiRxSs_GetTransportMode (XV_SdiRxSs *InstancePtr)
 Gets the transport mode of the SDI receiver subsystem. More...
 
u8 XV_SdiRxSs_GetTransportBitRate (XV_SdiRxSs *InstancePtr)
 Gets the transport bit rate information from the SDI Rx subsystem. More...
 
XVidC_VideoStream * XV_SdiRxSs_GetVideoStream (XV_SdiRxSs *InstancePtr, u8 StreamId)
 This function returns the pointer to SDI RX SS video stream. More...
 
void XV_SdiRxSs_ReportDetectedError (XV_SdiRxSs *InstancePtr)
 Reports detected errors in the SDI Rx Subsystem. More...
 
void XV_SdiRxSs_SetYCbCr444_RGB_10bit (XV_SdiRxSs *InstancePtr)
 This function enable the YUV444/RGB 10bit support SDI RX SS video stream. More...
 
void XV_SdiRxSs_ClearYCbCr444_RGB_10bit (XV_SdiRxSs *InstancePtr)
 This function disable the YUV444/RGB 10bit support SDI RX SS video stream. More...
 
void XV_SdiRxSs_ReportInfo (XV_SdiRxSs *InstancePtr)
 This function prints the SDI RX SS information. More...
 
void XV_SdiRxSs_ReportDebugInfo (XV_SdiRxSs *InstancePtr)
 This function prints the SDI RX SS debug information. More...
 
int XV_SdiRxSs_IsStreamUp (XV_SdiRxSs *InstancePtr)
 This function checks if the video stream is up. More...
 
void XV_SdiRxSs_IntrEnable (XV_SdiRxSs *InstancePtr, u32 IntrMask)
 This function is used to configure the SDI RX interrupts that are to be handled by the application. More...
 
void XV_SdiRxSs_IntrDisable (XV_SdiRxSs *InstancePtr, u32 IntrMask)
 This function is used to configure the SDI RX interrupts that are to be handled by the application. More...
 
u32 XV_SdiRxSs_WaitforPayLoad (XV_SdiRxSs *InstancePtr)
 This function is used to wait for the payload valid bit to be set. More...
 
void XV_SdiRxSs_HandleNoPayload (XV_SdiRxSs *InstancePtr, u8 enable)
 This function disables handling for no payload case. More...
 

Variables

XV_SdiRxSs_SubCores XV_SdiRxSs_SubCoreRepo []
 Define Driver instance of all sub-core included in the design. More...
 

Function Documentation

int XV_SdiRxSs_CfgInitialize ( XV_SdiRxSs InstancePtr,
XV_SdiRxSs_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the video subsystem and included sub-cores.

This function must be called prior to using the subsystem. Initialization includes setting up the instance data for top level as well as all included sub-core therein, and ensuring the hardware is in a known stable state.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
CfgPtrpoints to the configuration structure associated with the subsystem instance.
EffectiveAddris the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
XST_SUCCESS if initialization is successful else XST_FAILURE

References XV_SdiRxSs_Config::BaseAddress, XV_SdiRxSs::Config, XV_SdiRxSs::IsReady, XV_SdiRxSs::SdiRxPtr, and XV_SdiRxSs_SubcoreInitSdiRx().

Referenced by SdiRxSs_SelfTestExample().

void XV_SdiRxSs_ClearYCbCr444_RGB_10bit ( XV_SdiRxSs InstancePtr)

This function disable the YUV444/RGB 10bit support SDI RX SS video stream.

Parameters
InstancePtrpointer to XV_SdiRxSs instance

References XV_SdiRxSs::SdiRxPtr.

u32* XV_SdiRxSs_GetPayloadId ( XV_SdiRxSs InstancePtr,
u8  StreamId 
)

Retrieves the payload ID for a specified stream in the SDI Rx subsystem.

This function returns the payload identifier associated with the given stream in the SDI Receiver subsystem instance.

Parameters
InstancePtrPointer to the XV_SdiRxSs instance to be worked on.
StreamIdThe stream identifier for which the payload ID is to be retrieved.
Returns
Pointer to u32 containing the payload ID for the specified stream. Returns NULL if the InstancePtr is invalid or StreamId is out of range.
Note
The caller must ensure that InstancePtr is a valid and initialized XV_SdiRxSs instance before calling this function.

References XV_SdiRxSs::SdiRxPtr.

XSdiVid_Transport* XV_SdiRxSs_GetTransport ( XV_SdiRxSs InstancePtr)

Gets the Transport information from the SDI Rx subsystem.

Parameters
InstancePtrPointer to the XV_SdiRxSs instance.
Returns
Pointer to the XSdiVid_Transport structure containing transport information.

References XV_SdiRxSs::SdiRxPtr.

u8 XV_SdiRxSs_GetTransportBitRate ( XV_SdiRxSs InstancePtr)

Gets the transport bit rate information from the SDI Rx subsystem.

This function retrieves the transport bit rate information of the SDI (Serial Digital Interface) receiver subsystem instance. It indicates whether the transport is operating in fractional mode or not.

Parameters
InstancePtrPointer to the XV_SdiRxSs instance to query. Must not be NULL.
Returns
u8 Returns 1 if the transport is operating in fractional mode, otherwise returns 0.
Note
The InstancePtr must point to a valid and initialized XV_SdiRxSs instance.

References XV_SdiRxSs::SdiRxPtr.

XSdiVid_TransMode XV_SdiRxSs_GetTransportMode ( XV_SdiRxSs InstancePtr)

Gets the transport mode of the SDI receiver subsystem.

This function retrieves the current transport mode configuration of the SDI (Serial Digital Interface) receiver subsystem instance.

Parameters
InstancePtrPointer to the XV_SdiRxSs instance to query. Must not be NULL.
Returns
XSdiVid_TransMode The current transport mode of the SDI receiver. Returns the transport mode enumeration value indicating the data transport configuration.
Note
The InstancePtr must point to a valid and initialized XV_SdiRxSs instance.

References XV_SdiRxSs::Config, and XV_SdiRxSs::SdiRxPtr.

XVidC_VideoStream* XV_SdiRxSs_GetVideoStream ( XV_SdiRxSs InstancePtr,
u8  StreamId 
)

This function returns the pointer to SDI RX SS video stream.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
StreamIdspecifies which video stream's pointer to be returned
Returns
XVidC_VideoStream pointer
Note
None.

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_HandleNoPayload ( XV_SdiRxSs InstancePtr,
u8  enable 
)

This function disables handling for no payload case.

Parameters
InstancePtris a pointer to the XV_SdiRxSs core instance.
enableis to enable/disable the Handling of nopayload case

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_IntrDisable ( XV_SdiRxSs InstancePtr,
u32  IntrMask 
)

This function is used to configure the SDI RX interrupts that are to be handled by the application.

Refer to xv_sdirxss_hw.h for interrupt masks.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
IntrMaskIndicates Mask for disabling interrupts.
Note
None.

References XV_SdiRxSs::SdiRxPtr, and XV_SDIRXSS_IER_ALLINTR_MASK.

void XV_SdiRxSs_IntrEnable ( XV_SdiRxSs InstancePtr,
u32  IntrMask 
)

This function is used to configure the SDI RX interrupts that are to be handled by the application.

Refer to xv_sdirxss_hw.h for interrupt masks.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
IntrMaskIndicates Mask for enable interrupts.
Note
None.

References XV_SdiRxSs::SdiRxPtr, and XV_SDIRXSS_IER_ALLINTR_MASK.

int XV_SdiRxSs_IsStreamUp ( XV_SdiRxSs InstancePtr)

This function checks if the video stream is up.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
Returns
  • TRUE if stream is up.
  • FALSE if stream is down.
Note
None.

References XV_SdiRxSs::IsStreamUp.

void XV_SdiRxSs_ReportCoreInfo ( XV_SdiRxSs InstancePtr)

This function reports list of cores included in Video Processing Subsystem.

Parameters
InstancePtris a pointer to the Subsystem instance.
Note
None.

References XV_SdiRxSs::SdiRxPtr.

Referenced by XV_SdiRxSs_ReportInfo().

void XV_SdiRxSs_ReportDebugInfo ( XV_SdiRxSs InstancePtr)

This function prints the SDI RX SS debug information.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
Note
None.

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_ReportDetectedError ( XV_SdiRxSs InstancePtr)

Reports detected errors in the SDI Rx Subsystem.

This function examines the SDI Rx Subsystem instance and reports any detected errors that have occurred during SDI reception operations. The function can be used for debugging and error handling purposes.

Parameters
InstancePtrPointer to the XV_SdiRxSs instance to be operated on.
Note
The caller must ensure that InstancePtr is a valid pointer to an initialized XV_SdiRxSs instance before calling this function.

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_ReportInfo ( XV_SdiRxSs InstancePtr)

This function prints the SDI RX SS information.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
Note
None.

References XV_SdiRxSs::SdiRxPtr, and XV_SdiRxSs_ReportCoreInfo().

void XV_SdiRxSS_SdiRxIntrHandler ( XV_SdiRxSs InstancePtr)

This function calls the interrupt handler for SDI RX.

Parameters
InstancePtris a pointer to the SDI RX Subsystem

References XV_SdiRxSs::SdiRxPtr.

int XV_SdiRxSs_SetCallback ( XV_SdiRxSs InstancePtr,
u32  HandlerType,
void *  CallbackFunc,
void *  CallbackRef 
)

This function installs an asynchronous callback function for the given HandlerType:

HandlerType                     Callback Function Type
-----------------------         ---------------------------------------------
(XV_SDIRXSS_HANDLER_STREAM_DOWN)         StreamDownCallback
(XV_SDIRXSS_HANDLER_STREAM_UP)           StreamUpCallback
(XV_SDIRXSS_HANDLER_OVERFLOW)           OverFlowCallback
(XV_SDIRXSS_HANDLER_UNDERFLOW)           UnderFlowCallback
(XV_SDIRXSS_HANDLER_VSYNC)                 VsyncCallback
Parameters
InstancePtris a pointer to the SDI RX Subsystem instance.
HandlerTypespecifies the type of handler.
CallbackFuncis the address of the callback function.
CallbackRefis a user data item that will be passed to the callback function when it is invoked.
Returns
  • XST_SUCCESS if callback function installed successfully.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

References XV_SdiRxSs::OverFlowCallback, XV_SdiRxSs::OverFlowRef, XV_SdiRxSs::StreamDownCallback, XV_SdiRxSs::StreamDownRef, XV_SdiRxSs::StreamUpCallback, XV_SdiRxSs::StreamUpRef, XV_SdiRxSs::UnderFlowCallback, XV_SdiRxSs::UnderFlowRef, XV_SdiRxSs::VsyncCallback, XV_SdiRxSs::VsyncRef, XV_SDIRXSS_HANDLER_OVERFLOW, XV_SDIRXSS_HANDLER_STREAM_DOWN, XV_SDIRXSS_HANDLER_STREAM_UP, XV_SDIRXSS_HANDLER_UNDERFLOW, and XV_SDIRXSS_HANDLER_VSYNC.

void XV_SdiRxSs_SetYCbCr444_RGB_10bit ( XV_SdiRxSs InstancePtr)

This function enable the YUV444/RGB 10bit support SDI RX SS video stream.

Parameters
InstancePtrpointer to XV_SdiRxSs instance

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_Start ( XV_SdiRxSs InstancePtr,
XV_SdiRx_SearchMode  Mode 
)

This function starts the SDI RX stream detection.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
Modespecifies the mode of SDI modes searching operation.
  • 0 = XV_SDIRX_SINGLESEARCHMODE_HD
  • 1 = XV_SDIRX_SINGLESEARCHMODE_SD
  • 2 = XV_SDIRX_SINGLESEARCHMODE_3G
  • 4 = XV_SDIRX_SINGLESEARCHMODE_6G
  • 5 = XV_SDIRX_SINGLESEARCHMODE_12GI
  • 6 = XV_SDIRX_SINGLESEARCHMODE_12GF
  • 10 = XV_SDIRX_MULTISEARCHMODE where the supported modes will be enabled by XV_SdiRx_EnableMode function
Note
None.

References XV_SdiRxSs::SdiRxPtr, XV_SDIRXSS_LOG_EVT_START, and XV_SdiRxSs_LogWrite().

void XV_SdiRxSs_Stop ( XV_SdiRxSs InstancePtr)

This function stops the SDI RX stream detection.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Note
None.

References XV_SdiRxSs::SdiRxPtr, XV_SDIRXSS_LOG_EVT_STOP, and XV_SdiRxSs_LogWrite().

void XV_SdiRxSs_StreamFlowDisable ( XV_SdiRxSs InstancePtr)

This function disables the AXIS and video bridges.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
Note
None.

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_StreamFlowEnable ( XV_SdiRxSs InstancePtr)

This function enables the AXIS and video bridges.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
Note
None.

References XV_SdiRxSs::SdiRxPtr.

u32 XV_SdiRxSs_WaitforPayLoad ( XV_SdiRxSs InstancePtr)

This function is used to wait for the payload valid bit to be set.

This has to be called from application based on the callback indication of the video lock interrupt handler.

Parameters
InstancePtrpointer to XV_SdiRxSs instance
Returns
  • XST_FAILURE if the payload valid bits are not set.
  • XST_SUCCESS if ST352 registers are read and loaded to Rx structures
Note
None.

References XV_SdiRxSs::SdiRxPtr.

Variable Documentation

XV_SdiRxSs_SubCores XV_SdiRxSs_SubCoreRepo[]

Define Driver instance of all sub-core included in the design.