| v_hdmirx Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Functions
xv_hdmirx.c File Reference

## Overview

This is the main file for Xilinx HDMI RX core.

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

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.00  gm, mg 11/03/15 Initial release.
    1.01  MG     30/12/15 Added DDC HDCP 2.2 calls
    1.02  yh     15/01/16 Added 3D Video support
    1.03  MG     19/02/16 Added link error callback
    1.04  MG     08/03/16 Updated XV_HdmiRx_SetStream to use RefClk
    1.05  MG     27/05/16 Updated XV_HdmiRx_CfgInitialize
    1.06  YH     18/07/16 Replace xil_printf with xdbg_printf
    1.07  YH     25/07/16 Used UINTPTR instead of u32 for BaseAddress
                             XV_HdmiRx_CfgInitialize
    1.08  YH     18/08/16 squash unused variable compiler warning
    1.09  YH     29/08/16 Set Match to FALSE when HTotal = 0
    1.10  MG     02/03/17 Fixed YUV420 reading in function
                             XV_HdmiRx_GetVideoTiming
    1.40  YH     19/07/17 Clean up Print Statement line ending to "\r\n"
                 05/09/17 Enhanced Video Timing checking
    2.00  YH     16/11/17 Added dedicated reset for each clock domain
          YH     16/11/17 Added bridge overflow interrupt
          EB     18/01/18 Moved VicTable to Hdmi Common library
          EB     26/01/18 Updated XV_HdmiRx_GetVideoTiming to use
                             XVidC_GetVideoModeIdExtensive
    2.20  EB     16/08/18 Replaced TIME_10MS, TIME_16MS, TIME_200MS with
                             XV_HdmiRx_GetTime10Ms, XV_HdmiRx_GetTime16Ms
                             XV_HdmiRx_GetTime200Ms
                          Added TMDS Clock Ratio callback support
    2.30  EB     05/03/19 Updated the description of the API
                             XV_HdmiRx_GetLinkStatus
    2.40  EB     30/07/19 Updated XV_HdmiRx_GetVideoTiming to fix an issue where
                             FrameRate for YUV420 may be incorrect
                          Updated XV_HdmiRx_GetVideoTiming to fix an issue where
                             video timing values may be incorrect
                 06/08/19 Added Vic and Video Timing mismatch callback support
    2.50  EB     02/12/18 Added 3D Audio Support

## Functions
int | XV_HdmiRx_CfgInitialize (XV_HdmiRx *InstancePtr, XV_HdmiRx_Config *CfgPtr, UINTPTR EffectiveAddr)
| This function initializes the HDMI RX core. More...
void | XV_HdmiRx_Clear (XV_HdmiRx *InstancePtr)
| This function clears the HDMI RX variables and sets them to the defaults. More...
int | XV_HdmiRx_SetStream (XV_HdmiRx *InstancePtr, XVidC_PixelsPerClock Ppc, u32 Clock)
| This function sets the HDMI RX stream parameters. More...
void | XV_HdmiRx_INT_VRST (XV_HdmiRx *InstancePtr, u8 Reset)
| This function asserts or releases the HDMI RX Internal VRST. More...
void | XV_HdmiRx_INT_LRST (XV_HdmiRx *InstancePtr, u8 Reset)
| This function asserts or releases the HDMI RX Internal LRST. More...
void | XV_HdmiRx_EXT_VRST (XV_HdmiRx *InstancePtr, u8 Reset)
| This function asserts or releases the HDMI RX External VRST. More...
void | XV_HdmiRx_EXT_SYSRST (XV_HdmiRx *InstancePtr, u8 Reset)
| This function asserts or releases the HDMI RX External SYSRST. More...
int | XV_HdmiRx_SetPixelRate (XV_HdmiRx *InstancePtr)
| This function sets the pixel rate. More...
void | XV_HdmiRx_SetColorFormat (XV_HdmiRx *InstancePtr)
| This function sets the color format. More...
int | XV_HdmiRx_SetHpd (XV_HdmiRx *InstancePtr, u8 SetClr)
| This function enables/clear Hot-Plug-Detect. More...
void | XV_HdmiRx_WriteScdcRegister (XV_HdmiRx *InstancePtr, u8 address, u8 data)
| This function write data to SCDC register. More...
u32 | XV_HdmiRx_GetLinkStatus (XV_HdmiRx *InstancePtr, u8 Type)
| This function provides status of the HDMI RX core Link Status peripheral. More...
int | XV_HdmiRx_IsLinkStatusErrMax (XV_HdmiRx *InstancePtr)
| This function provides status of one of the link error counters reached the maximum value. More...
void | XV_HdmiRx_ClearLinkStatus (XV_HdmiRx *InstancePtr)
| This function clears the link error counters. More...
u32 | XV_HdmiRx_GetAcrCts (XV_HdmiRx *InstancePtr)
| This function provides audio clock regenerating CTS (Cycle-Time Stamp) value at the HDMI sink device. More...
u32 | XV_HdmiRx_GetAcrN (XV_HdmiRx *InstancePtr)
| This function provides audio clock regenerating factor N value. More...
u16 | XV_HdmiRx_DdcGetEdidWords (XV_HdmiRx *InstancePtr)
| This function gets the size of the EDID buffer of the DDC slave. More...
int | XV_HdmiRx_DdcLoadEdid (XV_HdmiRx *InstancePtr, u8 *EdidData, u16 Length)
| This function loads the EDID data into the DDC slave. More...
void | XV_HdmiRx_DdcHdcpSetAddress (XV_HdmiRx *InstancePtr, u32 Address)
| This function sets the HDCP address in the DDC peripheral. More...
void | XV_HdmiRx_DdcHdcpWriteData (XV_HdmiRx *InstancePtr, u32 Data)
| This function writes HDCP data in the DDC peripheral. More...
u32 | XV_HdmiRx_DdcHdcpReadData (XV_HdmiRx *InstancePtr)
| This function reads HDCP data from the DDC peripheral. More...
u16 | XV_HdmiRx_DdcGetHdcpWriteMessageBufferWords (XV_HdmiRx *InstancePtr)
| This function gets the number of bytes of the HDCP 2.2 write buffer in the DDC slave. More...
int | XV_HdmiRx_DdcIsHdcpWriteMessageBufferEmpty (XV_HdmiRx *InstancePtr)
| This function returns the status of the HDCP 2.2 write buffer in the DDC slave. More...
u16 | XV_HdmiRx_DdcGetHdcpReadMessageBufferWords (XV_HdmiRx *InstancePtr)
| This function gets the number of bytes of the HDCP 2.2 read buffer in the DDC slave. More...
int | XV_HdmiRx_DdcIsHdcpReadMessageBufferEmpty (XV_HdmiRx *InstancePtr)
| This function returns the status of the HDCP 2.2 read message buffer in the DDC slave. More...
void | XV_HdmiRx_DebugInfo (XV_HdmiRx *InstancePtr)
| This function prints stream and timing information on STDIO/Uart console. More...
int | XV_HdmiRx_IsStreamUp (XV_HdmiRx *InstancePtr)
| This function provides status of the stream. More...
int | XV_HdmiRx_IsStreamScrambled (XV_HdmiRx *InstancePtr)
| This function provides the stream scrambler status. More...
int | XV_HdmiRx_IsStreamConnected (XV_HdmiRx *InstancePtr)
| This function provides the stream connected status. More...
int | XV_HdmiRx_GetTmdsClockRatio (XV_HdmiRx *InstancePtr)
| This function gets the SCDC TMDS clock ratio bit. More...
u8 | XV_HdmiRx_GetAviVic (XV_HdmiRx *InstancePtr)
| This function returns the AVI VIC (captured by the AUX peripheral) More...
XVidC_ColorFormat | XV_HdmiRx_GetAviColorSpace (XV_HdmiRx *InstancePtr)
| This function returns the AVI colorspace (captured by the AUX peripheral) More...
XVidC_ColorDepth | XV_HdmiRx_GetGcpColorDepth (XV_HdmiRx *InstancePtr)
| This function returns the GCP color depth (captured by the AUX peripheral) More...
u32 | XV_HdmiRx_Divide (u32 Dividend, u32 Divisor)
| This function calculates the divider for the frame calculation. More...
XVidC_VideoMode | XV_HdmiRx_LookupVmId (u8 Vic)
| This function searches for the video mode based on the vic. More...
int | XV_HdmiRx_GetVideoProperties (XV_HdmiRx *InstancePtr)
| This function reads the video properties from the aux peripheral. More...
int | XV_HdmiRx_GetVideoTiming (XV_HdmiRx *InstancePtr)
| This function reads the video timing from the VTD peripheral. More...

## Function Documentation

int XV_HdmiRx_CfgInitialize | ( | XV_HdmiRx * | InstancePtr,
|  | XV_HdmiRx_Config * | CfgPtr,
|  | UINTPTR | EffectiveAddr
| ) |  |

This function initializes the HDMI RX core.

This function must be called prior to using the HDMI RX core. Initialization of the HDMI RX includes setting up the instance data, and ensuring the hardware is in a quiescent state.

Parameters

  InstancePtr | is a pointer to the XHdmiRx core instance.
  CfgPtr | points to the configuration structure associated with the HDMI RX core.
  EffectiveAddr | is 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 XV_HdmiRx_CfgInitialize was successful.
  - XST_FAILURE if HDMI RX PIO ID mismatched.

Note
  None.

References XV_HdmiRx::AudCallback, XV_HdmiRx::AuxCallback, XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HdmiRx::ConnectCallback, XV_HdmiRx::DdcCallback, XV_HdmiRx::HdcpCallback, XV_HdmiRx::IsAudCallbackSet, XV_HdmiRx::IsAuxCallbackSet, XV_HdmiRx::IsConnectCallbackSet, XV_HdmiRx_Stream::IsConnected, XV_HdmiRx::IsDdcCallbackSet, XV_HdmiRx::IsHdcpCallbackSet, XV_HdmiRx::IsLinkErrorCallbackSet, XV_HdmiRx::IsLnkStaCallbackSet, XV_HdmiRx::IsModeCallbackSet, XV_HdmiRx::IsReady, XV_HdmiRx::IsStreamDownCallbackSet, XV_HdmiRx::IsStreamInitCallbackSet, XV_HdmiRx::IsStreamUpCallbackSet, XV_HdmiRx::IsSyncLossCallbackSet, XV_HdmiRx::IsTmdsClkRatioCallbackSet, XV_HdmiRx::IsVicErrorCallbackSet, XV_HdmiRx::LinkErrorCallback, XV_HdmiRx::LnkStaCallback, XV_HdmiRx::ModeCallback, XV_HdmiRx::Stream, XV_HdmiRx::StreamDownCallback, XV_HdmiRx::StreamInitCallback, XV_HdmiRx::StreamUpCallback, XV_HdmiRx::SyncLossCallback, XV_HdmiRx::TmdsClkRatioCallback, XV_HdmiRx::VicErrorCallback, XV_HdmiRx_AudioDisable, XV_HdmiRx_AudioIntrEnable, XV_HdmiRx_AuxDisable, XV_HdmiRx_AuxIntrEnable, XV_HdmiRx_Clear(), XV_HdmiRx_DdcDisable, XV_HdmiRx_DdcEnable, XV_HdmiRx_DdcScdcClear, XV_HdmiRx_DdcScdcEnable, XV_HdmiRx_GetTime16Ms, XV_HdmiRx_LnkstaDisable, XV_HdmiRx_LnkstaEnable, XV_HDMIRX_MASK_16, XV_HDMIRX_PIO_ID, XV_HDMIRX_PIO_ID_OFFSET, XV_HDMIRX_PIO_IN_BRDG_OVERFLOW_MASK, XV_HDMIRX_PIO_IN_DET_MASK, XV_HDMIRX_PIO_IN_EVT_FE_OFFSET, XV_HDMIRX_PIO_IN_EVT_RE_OFFSET, XV_HDMIRX_PIO_IN_LNK_RDY_MASK, XV_HDMIRX_PIO_IN_MODE_MASK, XV_HDMIRX_PIO_IN_SCDC_SCRAMBLER_ENABLE_MASK, XV_HDMIRX_PIO_IN_SCDC_TMDS_CLOCK_RATIO_MASK, XV_HDMIRX_PIO_IN_VID_RDY_MASK, XV_HdmiRx_PioDisable, XV_HdmiRx_PioEnable, XV_HdmiRx_PioIntrDisable, XV_HdmiRx_PioIntrEnable, XV_HdmiRx_ReadReg, XV_HDMIRX_SCDC_BRAM_OFFSET, XV_HDMIRX_SHIFT_16, XV_HdmiRx_TmrDisable, XV_HdmiRx_TmrEnable, XV_HdmiRx_TmrIntrDisable, XV_HdmiRx_TmrIntrEnable, XV_HdmiRx_VtdDisable, XV_HdmiRx_VtdIntrDisable, XV_HdmiRx_VtdSetTimebase, and XV_HdmiRx_WriteReg.

void XV_HdmiRx_Clear | ( | XV_HdmiRx * | InstancePtr | ) |

This function clears the HDMI RX variables and sets them to the defaults.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  None.

Note
  This is required after a reset or init.

References XV_HdmiRx_AudioStream::Active, XV_HdmiRx::AudCts, XV_HdmiRx::AudFormat, XV_HdmiRx_Stream::Audio, XV_HdmiRx::AudN, XV_HdmiRx::Aux, XV_HdmiRx_AudioStream::Channels, XV_HdmiRx_Stream::IsHdmi, XV_HdmiRx::IsStreamDownCallbackSet, XV_HdmiRx_Stream::State, XV_HdmiRx::Stream, XV_HdmiRx::StreamDownCallback, XV_HdmiRx::StreamDownRef, XV_HdmiRx_Stream::Vic, XV_HdmiRx_Stream::Video, and XV_HDMIRX_STATE_STREAM_DOWN.

Referenced by XV_HdmiRx_CfgInitialize().

void XV_HdmiRx_ClearLinkStatus | ( | XV_HdmiRx * | InstancePtr | ) |

This function clears the link error counters.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  None.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_LNKSTA_CTRL_CLR_OFFSET, XV_HDMIRX_LNKSTA_CTRL_ERR_CLR_MASK, XV_HDMIRX_LNKSTA_CTRL_SET_OFFSET, and XV_HdmiRx_WriteReg.

u16 XV_HdmiRx_DdcGetEdidWords | ( | XV_HdmiRx * | InstancePtr | ) |

This function gets the size of the EDID buffer of the DDC slave.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  - EDID buffer size

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_DDC_EDID_STA_OFFSET, XV_HDMIRX_DDC_STA_EDID_WORDS_MASK, XV_HDMIRX_DDC_STA_EDID_WORDS_SHIFT, and XV_HdmiRx_ReadReg.

Referenced by XV_HdmiRx_DdcLoadEdid().

u16 XV_HdmiRx_DdcGetHdcpReadMessageBufferWords | ( | XV_HdmiRx * | InstancePtr | ) |

This function gets the number of bytes of the HDCP 2.2 read buffer in the DDC slave.

Parameters

  InstancePtr | is a pointer to the XHdmi_Rx core instance.

Returns
  - HDCP 2.2 read buffer words

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_DDC_HDCP_STA_OFFSET, XV_HDMIRX_DDC_STA_HDCP_RMSG_WORDS_MASK, XV_HDMIRX_DDC_STA_HDCP_RMSG_WORDS_SHIFT, and XV_HdmiRx_ReadReg.

u16 XV_HdmiRx_DdcGetHdcpWriteMessageBufferWords | ( | XV_HdmiRx * | InstancePtr | ) |

This function gets the number of bytes of the HDCP 2.2 write buffer in the DDC slave.

Parameters

  InstancePtr | is a pointer to the XHdmi_Rx core instance.

Returns
  - HDCP 2.2 write buffer words

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_DDC_HDCP_STA_OFFSET, XV_HDMIRX_DDC_STA_HDCP_WMSG_WORDS_MASK, XV_HDMIRX_DDC_STA_HDCP_WMSG_WORDS_SHIFT, and XV_HdmiRx_ReadReg.

u32 XV_HdmiRx_DdcHdcpReadData | ( | XV_HdmiRx * | InstancePtr | ) |

This function reads HDCP data from the DDC peripheral.

This is implemented as a function and not a macro, so the HDCP driver can bind the function call with a handler.

Parameters

  InstancePtr | is a pointer to the XHdmi_Rx core instance.

Returns
  Returns the HDCP data read from the DDC peripheral.

Note
  C-style signature: u32 XHdmiRx_DdcHdcpReadData(XHdmi_Rx *InstancePtr)

References XV_HDMIRX_DDC_HDCP_DATA_OFFSET, and XV_HdmiRx_ReadReg.

void XV_HdmiRx_DdcHdcpSetAddress | ( | XV_HdmiRx * | InstancePtr,
|  | u32 | Address
| ) |  |

This function sets the HDCP address in the DDC peripheral.

This is implemented as a function and not a macro, so the HDCP driver can bind the function call with a handler.

Parameters

  InstancePtr | is a pointer to the XHdmi_Rx core instance.
  Address | is the HDCP address.

Returns
  None.

Note
  C-style signature: void XHdmiRx_DdcHdcpSetAddress(XHdmi_Rx *InstancePtr, u8 Address)

References XV_HDMIRX_DDC_HDCP_ADDRESS_OFFSET, and XV_HdmiRx_WriteReg.

void XV_HdmiRx_DdcHdcpWriteData | ( | XV_HdmiRx * | InstancePtr,
|  | u32 | Data
| ) |  |

This function writes HDCP data in the DDC peripheral.

This is implemented as a function and not a macro, so the HDCP driver can bind the function call with a handler.

Parameters

  InstancePtr | is a pointer to the XHdmi_Rx core instance.
  Data | is the HDCP data to be written.

Returns
  None.

Note
  C-style signature: void XHdmiRx_DdcHdcpWriteData(XHdmi_Rx *InstancePtr, u8 Data)

References XV_HDMIRX_DDC_HDCP_DATA_OFFSET, and XV_HdmiRx_WriteReg.

int XV_HdmiRx_DdcIsHdcpReadMessageBufferEmpty | ( | XV_HdmiRx * | InstancePtr | ) |

This function returns the status of the HDCP 2.2 read message buffer in the DDC slave.

Parameters

  InstancePtr | is a pointer to the XHdmi_Rx core instance.

Returns
  - TRUE = HDCP 2.2 message buffer is empty.
  - FALSE = HDCP 2.2 message buffer contains data.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_DDC_HDCP_STA_OFFSET, XV_HDMIRX_DDC_STA_HDCP_RMSG_EP_MASK, and XV_HdmiRx_ReadReg.

int XV_HdmiRx_DdcIsHdcpWriteMessageBufferEmpty | ( | XV_HdmiRx * | InstancePtr | ) |

This function returns the status of the HDCP 2.2 write buffer in the DDC slave.

Parameters

  InstancePtr | is a pointer to the XHdmi_Rx core instance.

Returns
  - TRUE = HDCP 2.2 message buffer is empty.
  - FALSE = HDCP 2.2 message buffer contains data.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_DDC_HDCP_STA_OFFSET, XV_HDMIRX_DDC_STA_HDCP_WMSG_EP_MASK, and XV_HdmiRx_ReadReg.

int XV_HdmiRx_DdcLoadEdid | ( | XV_HdmiRx * | InstancePtr,
|  | u8 * | EdidData,
|  | u16 | Length
| ) |  |

This function loads the EDID data into the DDC slave.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  EdidData | is a pointer to the EDID data array.
  Length | is the length, in bytes, of the EDID array.

Returns
  - XST_SUCCESS if the EDID data was loaded successfully
  - XST_FAILURE if the EDID data load failed

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_DDC_CTRL_EDID_EN_MASK, XV_HDMIRX_DDC_CTRL_SET_OFFSET, XV_HDMIRX_DDC_EDID_DATA_OFFSET, XV_HDMIRX_DDC_EDID_WP_OFFSET, XV_HdmiRx_DdcGetEdidWords(), and XV_HdmiRx_WriteReg.

void XV_HdmiRx_DebugInfo | ( | XV_HdmiRx * | InstancePtr | ) |

This function prints stream and timing information on STDIO/Uart console.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  None.

Note
  None.

References XV_HdmiRx::Stream, and XV_HdmiRx_Stream::Video.

u32 XV_HdmiRx_Divide | ( | u32 | Dividend,
|  | u32 | Divisor
| ) |  |

This function calculates the divider for the frame calculation.

Parameters

  Dividend | is the dividend value to use in the calculation.
  Divisor | is the divisor value to use in the calculation.

Returns
  The result of the calculation.

Note
  None.

Referenced by XV_HdmiRx_GetVideoTiming().

void XV_HdmiRx_EXT_SYSRST | ( | XV_HdmiRx * | InstancePtr,
|  | u8 | Reset
| ) |  |

This function asserts or releases the HDMI RX External SYSRST.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  Reset | specifies TRUE/FALSE value to either assert or release HDMI RX External SYSRST.

Returns
  None.

Note
  The reset output of the PIO is inverted. When the system is in reset, the PIO output is cleared and this will reset the HDMI RX. Therefore, clearing the PIO reset output will assert the HDMI External system reset. C-style signature: void XV_HdmiRx_EXT_SYSRST(XV_HdmiRx *InstancePtr, u8 Reset)

References XV_HDMIRX_PIO_OUT_CLR_OFFSET, XV_HDMIRX_PIO_OUT_EXT_SYSRST_MASK, XV_HDMIRX_PIO_OUT_SET_OFFSET, and XV_HdmiRx_WriteReg.

void XV_HdmiRx_EXT_VRST | ( | XV_HdmiRx * | InstancePtr,
|  | u8 | Reset
| ) |  |

This function asserts or releases the HDMI RX External VRST.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  Reset | specifies TRUE/FALSE value to either assert or release HDMI RX External VRST.

Returns
  None.

Note
  The reset output of the PIO is inverted. When the system is in reset, the PIO output is cleared and this will reset the HDMI RX. Therefore, clearing the PIO reset output will assert the HDMI external video reset. C-style signature: void XV_HdmiRx_EXT_VRST(XV_HdmiRx *InstancePtr, u8 Reset)

References XV_HDMIRX_PIO_OUT_CLR_OFFSET, XV_HDMIRX_PIO_OUT_EXT_VRST_MASK, XV_HDMIRX_PIO_OUT_SET_OFFSET, and XV_HdmiRx_WriteReg.

u32 XV_HdmiRx_GetAcrCts | ( | XV_HdmiRx * | InstancePtr | ) |

This function provides audio clock regenerating CTS (Cycle-Time Stamp) value at the HDMI sink device.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  Audio clock CTS value.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_AUD_CTS_OFFSET, and XV_HdmiRx_ReadReg.

u32 XV_HdmiRx_GetAcrN | ( | XV_HdmiRx * | InstancePtr | ) |

This function provides audio clock regenerating factor N value.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  ACR N value.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_AUD_N_OFFSET, and XV_HdmiRx_ReadReg.

XVidC_ColorFormat XV_HdmiRx_GetAviColorSpace | ( | XV_HdmiRx * | InstancePtr | ) |

This function returns the AVI colorspace (captured by the AUX peripheral)

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  The AVI colorspace value.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_AUX_STA_AVI_CS_MASK, XV_HDMIRX_AUX_STA_AVI_CS_SHIFT, XV_HDMIRX_AUX_STA_OFFSET, and XV_HdmiRx_ReadReg.

Referenced by XV_HdmiRx_GetVideoProperties().

u8 XV_HdmiRx_GetAviVic | ( | XV_HdmiRx * | InstancePtr | ) |

This function returns the AVI VIC (captured by the AUX peripheral)

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  The AVI VIC code.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_AUX_STA_AVI_VIC_MASK, XV_HDMIRX_AUX_STA_AVI_VIC_SHIFT, XV_HDMIRX_AUX_STA_OFFSET, and XV_HdmiRx_ReadReg.

Referenced by XV_HdmiRx_GetVideoProperties().

XVidC_ColorDepth XV_HdmiRx_GetGcpColorDepth | ( | XV_HdmiRx * | InstancePtr | ) |

This function returns the GCP color depth (captured by the AUX peripheral)

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  The GCP color depth.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_AUX_STA_GCP_CD_MASK, XV_HDMIRX_AUX_STA_GCP_CD_SHIFT, XV_HDMIRX_AUX_STA_OFFSET, and XV_HdmiRx_ReadReg.

Referenced by XV_HdmiRx_GetVideoProperties().

u32 XV_HdmiRx_GetLinkStatus | ( | XV_HdmiRx * | InstancePtr,
|  | u8 | Type
| ) |  |

This function provides status of the HDMI RX core Link Status peripheral.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  Type | specifies one of the type for which status to be provided: 0 = Link error counter for channel 0. 1 = Link error counter for channel 1. 2 = Link error counter for channel 2.

Returns
  Link status of the HDMI RX core link.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_LNKSTA_LNK_ERR0_OFFSET, and XV_HdmiRx_ReadReg.

int XV_HdmiRx_GetTmdsClockRatio | ( | XV_HdmiRx * | InstancePtr | ) |

This function gets the SCDC TMDS clock ratio bit.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  - TRUE = TMDS clock ratio bit is set.
  - FALSE = TMDS clock ratio bit is cleared.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_PIO_IN_OFFSET, XV_HDMIRX_PIO_IN_SCDC_TMDS_CLOCK_RATIO_MASK, and XV_HdmiRx_ReadReg.

int XV_HdmiRx_GetVideoProperties | ( | XV_HdmiRx * | InstancePtr | ) |

This function reads the video properties from the aux peripheral.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HdmiRx::Stream, XV_HdmiRx_Stream::Vic, XV_HdmiRx_Stream::Video, XV_HDMIRX_AUX_STA_AVI_MASK, XV_HDMIRX_AUX_STA_OFFSET, XV_HdmiRx_GetAviColorSpace(), XV_HdmiRx_GetAviVic(), XV_HdmiRx_GetGcpColorDepth(), and XV_HdmiRx_ReadReg.

int XV_HdmiRx_GetVideoTiming | ( | XV_HdmiRx * | InstancePtr | ) |

This function reads the video timing from the VTD peripheral.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  None.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HdmiRx_Stream::PixelClk, XV_HdmiRx::Stream, XV_HdmiRx_Stream::Video, XV_HdmiRx_Divide(), XV_HdmiRx_ReadReg, XV_HDMIRX_VTD_ACT_LIN_OFFSET, XV_HDMIRX_VTD_ACT_PIX_OFFSET, XV_HDMIRX_VTD_HBP_OFFSET, XV_HDMIRX_VTD_HFP_OFFSET, XV_HDMIRX_VTD_HSW_OFFSET, XV_HDMIRX_VTD_STA_FMT_MASK, XV_HDMIRX_VTD_STA_HS_POL_MASK, XV_HDMIRX_VTD_STA_OFFSET, XV_HDMIRX_VTD_STA_VS_POL_MASK, XV_HDMIRX_VTD_TOT_LIN_OFFSET, XV_HDMIRX_VTD_TOT_PIX_OFFSET, XV_HDMIRX_VTD_VBP_OFFSET, XV_HDMIRX_VTD_VFP_OFFSET, and XV_HDMIRX_VTD_VSW_OFFSET.

void XV_HdmiRx_INT_LRST | ( | XV_HdmiRx * | InstancePtr,
|  | u8 | Reset
| ) |  |

This function asserts or releases the HDMI RX Internal LRST.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  Reset | specifies TRUE/FALSE value to either assert or release HDMI RX Internal LRST.

Returns
  None.

Note
  The reset output of the PIO is inverted. When the system is in reset, the PIO output is cleared and this will reset the HDMI RX. Therefore, clearing the PIO reset output will assert the HDMI Internal link reset. C-style signature: void XV_HdmiRx_INT_VRST(XV_HdmiRx *InstancePtr, u8 Reset)

References XV_HDMIRX_PIO_OUT_CLR_OFFSET, XV_HDMIRX_PIO_OUT_INT_LRST_MASK, XV_HDMIRX_PIO_OUT_SET_OFFSET, and XV_HdmiRx_WriteReg.

void XV_HdmiRx_INT_VRST | ( | XV_HdmiRx * | InstancePtr,
|  | u8 | Reset
| ) |  |

This function asserts or releases the HDMI RX Internal VRST.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  Reset | specifies TRUE/FALSE value to either assert or release HDMI RX Internal VRST.

Returns
  None.

Note
  The reset output of the PIO is inverted. When the system is in reset, the PIO output is cleared and this will reset the HDMI RX. Therefore, clearing the PIO reset output will assert the HDMI Internal video reset. C-style signature: void XV_HdmiRx_INT_VRST(XV_HdmiRx *InstancePtr, u8 Reset)

References XV_HDMIRX_PIO_OUT_CLR_OFFSET, XV_HDMIRX_PIO_OUT_INT_VRST_MASK, XV_HDMIRX_PIO_OUT_SET_OFFSET, and XV_HdmiRx_WriteReg.

int XV_HdmiRx_IsLinkStatusErrMax | ( | XV_HdmiRx * | InstancePtr | ) |

This function provides status of one of the link error counters reached the maximum value.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  - TRUE = Maximum error counter reached.
  - FALSE = Maximum error counter not reached.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_LNKSTA_STA_ERR_MAX_MASK, XV_HDMIRX_LNKSTA_STA_OFFSET, and XV_HdmiRx_ReadReg.

int XV_HdmiRx_IsStreamConnected | ( | XV_HdmiRx * | InstancePtr | ) |

This function provides the stream connected status.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  - TRUE = Stream is connected.
  - FALSE = Stream is connected.

Note
  None.

References XV_HdmiRx_Stream::IsConnected, and XV_HdmiRx::Stream.

int XV_HdmiRx_IsStreamScrambled | ( | XV_HdmiRx * | InstancePtr | ) |

This function provides the stream scrambler status.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  - TRUE = Stream is scrambled.
  - FALSE = Stream is not scrambled.

Note
  None.

References XV_HdmiRx_Stream::IsScrambled, and XV_HdmiRx::Stream.

int XV_HdmiRx_IsStreamUp | ( | XV_HdmiRx * | InstancePtr | ) |

This function provides status of the stream.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  - TRUE = Stream is up.
  - FALSE = Stream is down.

Note
  None.

References XV_HdmiRx_Stream::State, XV_HdmiRx::Stream, and XV_HDMIRX_STATE_STREAM_UP.

XVidC_VideoMode XV_HdmiRx_LookupVmId | ( | u8 | Vic | ) |

This function searches for the video mode based on the vic.

Parameters

  Vic |

Returns
  Vic defined in the VIC table.

Note
  None.

void XV_HdmiRx_SetColorFormat | ( | XV_HdmiRx * | InstancePtr | ) |

This function sets the color format.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  None.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HdmiRx::Stream, XV_HdmiRx_Stream::Video, XV_HDMIRX_PIO_OUT_COLOR_SPACE_MASK, XV_HDMIRX_PIO_OUT_COLOR_SPACE_SHIFT, XV_HDMIRX_PIO_OUT_MSK_OFFSET, XV_HDMIRX_PIO_OUT_OFFSET, and XV_HdmiRx_WriteReg.

int XV_HdmiRx_SetHpd | ( | XV_HdmiRx * | InstancePtr,
|  | u8 | SetClr
| ) |  |

This function enables/clear Hot-Plug-Detect.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  SetClr | specifies TRUE/FALSE value to either enable or clear HPD respectively.

Returns
  - XST_SUCCESS is always returned.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HdmiRx_DdcScdcClear, XV_HdmiRx_DdcScdcSet, XV_HDMIRX_PIO_OUT_CLR_OFFSET, XV_HDMIRX_PIO_OUT_HPD_MASK, XV_HDMIRX_PIO_OUT_SET_OFFSET, and XV_HdmiRx_WriteReg.

int XV_HdmiRx_SetPixelRate | ( | XV_HdmiRx * | InstancePtr | ) |

This function sets the pixel rate.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.

Returns
  - XST_SUCCESS is always returned.

Note
  None.

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HdmiRx::Stream, XV_HdmiRx_Stream::Video, XV_HDMIRX_PIO_OUT_MSK_OFFSET, XV_HDMIRX_PIO_OUT_OFFSET, XV_HDMIRX_PIO_OUT_PIXEL_RATE_MASK, XV_HDMIRX_PIO_OUT_PIXEL_RATE_SHIFT, and XV_HdmiRx_WriteReg.

Referenced by XV_HdmiRx_SetStream().

int XV_HdmiRx_SetStream | ( | XV_HdmiRx * | InstancePtr,
|  | XVidC_PixelsPerClock | Ppc,
|  | u32 | Clock
| ) |  |

This function sets the HDMI RX stream parameters.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  Ppc | specifies the pixel per clock. 1 = XVIDC_PPC_1 2 = XVIDC_PPC_2 4 = XVIDC_PPC_4
  Clock | specifies reference pixel clock frequency.

Returns
  - XST_SUCCESS is always returned.

Note
  None.

References XV_HdmiRx_Stream::RefClk, XV_HdmiRx::Stream, XV_HdmiRx_Stream::Video, and XV_HdmiRx_SetPixelRate().

void XV_HdmiRx_WriteScdcRegister | ( | XV_HdmiRx * | InstancePtr,
|  | u8 | address,
|  | u8 | data
| ) |  |

This function write data to SCDC register.

Parameters

  InstancePtr | is a pointer to the XV_HdmiRx core instance.
  data | specifies address of BRAM, and data to be written

Returns
  None

Note
  SCDC register 0x01,0x02,0x10,0x20,0x21,0x40 are handled by H/W directly These registers should not be written by User application

References XV_HdmiRx_Config::BaseAddress, XV_HdmiRx::Config, XV_HDMIRX_SCDC_BRAM_OFFSET, and XV_HdmiRx_WriteReg.