Application Integration - 1.2 English

HDMI 2.1 Receiver Subsystem v1.2 Product Guide (PG351)

Document ID
PG351
Release Date
2023-10-31
Version
1.2 English

The following figure shows example code to show how an HDMI 2.1 RX Subsystem can be used in your application.

Figure 1. Application Example Code

To integrate and use the HDMI 2.1 RX Subsystem driver in your application, the following steps must be followed:

  1. Include the subsystem header file xv_hdmirxss1.h that defines the subsystem object.
  2. Provide the storage for a subsystem driver instance in your application code. For example:
    XV_HdmiRxSs1 HdmiRxSs1;
  3. In the subsystem driver instance, there is a metadata structure to store the subsystem hardware configuration. Declare a pointer variable in the application code to point to the instance:
    XV_HdmiRxSs1_Config *XV_HdmiRxSs1_ConfigPtr;
  4. Set the EDID parameter for the HDMI 2.1 RX Subsystem Subsystem.
    void XV_HdmiRxSs1_SetEdidParam(XV_HdmiRxSs1 *InstancePtr,
                                   u8 *EdidDataPtr,
                                   u16 Length);
  5. For each subsystem instance, the data structures declared in the previous two steps need to be initialized based on its hardware configuration, which is passed through metadata structure from xparameters.h uniquely identified by device ID.

    To initialize the subsystem, call the following two API functions:

    XV_HdmiRxSs1_Config* XV_HdmiRxSs1_LookupConfig(u32 DeviceId); 
    int XV_HdmiRxSs1_CfgInitialize(XV_HdmiRxSs1 *InstancePtr,
                                   XV_HdmiRxSs1_Config *CfgPtr, 
                                   u32 EffectiveAddr);

    The Device ID can be found in xparameters.h:

    XPAR_[HDMI RX 2.1 Subsystem Instance Name in IPI]_DEVICE_ID
  6. Each interrupt source has an associated ISR defined in the subsystem. Register the ISR with the system interrupt controller and enable the interrupt.
    int XIntc_Connect(XIntc *InstancePtr,
                      u8 Id,
                      XInterruptHandler Handler,
                      void *CallBackRef);
    void XIntc_Enable(XIntc *InstancePtr,
                      u8 Id);

    where ID can be found in xparameters.h.

  7. Set the default Link Training Patterns, Threshold, and FFE Support. These values will be used by the RX Driver during FRL training.
    void XV_HdmiRxSs1_FrlModeEnable(XV_HdmiRxSs1 *InstancePtr,
                                   u8 LtpThreshold,
                                   XV_HdmiRx1_FrltpDefaultLtp,
                                   u8 FfeSuppFlag);
Note:
  1. Prepare the 256 bytes of EDID data and store in an array before calling the specified API function.
  2. The EDID data is loaded into the HDMI 2.1 RX Subsystem during initialization. This is handled by the subsystem driver, no user intervention is needed.