AR# 68780

HDMI Transmitter (TX) Subsystem v2.0 - Software Driver v3.0 - How do I send custom AVI InfoFrames?

Description

How do I send custom AVI InfoFrames?

Solution

2018.1 and Later:

The AUX packet APIs were rewritten to make them more flexible and to make sending HDR and other AUX information easier.

The generic API for sending AUX packets is:

void XV_HdmiTxSs_SendGenericAuxInfoframe(XV_HdmiTxSs *InstancePtr, void *Aux)

More information can be found in the HDMI Tx Subsystem Product Guide (PG235) under the AUX Packets section, including how to adjust the AVI InfoFrame information using the new structures.

2015.4 to 2017.4:

The current HDMI Software Driver always sends the basic AVI InfoFrame in which many of the fields are set to the default values and cannot be updated.

Below are the change that the user will need to make to the driver and to the example software application be able to send their own AVI InfoFrame.

We will do this in two major steps:

  • Move Auto Generated AVI InfoFrames to the User Application
    This verifies that all the necessary changes are made and the user can still call the Xilinx function as a reference.
  • Disable Auto Generated AVI InfoFrames and use Custom AVI InfoFrames
    We can now comment out the Xilinx AVI InfoFrames and generate our own or add a command to switch between then if needed for testing.

Move Auto Generated AVI InfoFrames to the User Application


In the HDMI TX Subsystem Software Driver v3.0 (v_hdmitxss_v3_0) you will need to make the following changes:


Note: these changes are to be made in the xv_hdmitxss.c file.

1) Disable the auto generation of the AVI InfoFrame.

Comment out lines 862-863 from the XV_HdmiTxSs_VsCallback function:

/*
// AVI infoframe
XV_HdmiTxSs_SendAviInfoframe(HdmiTxSsPtr->HdmiTxPtr);
*/

Make the AVI InfoFrame functions public so that they can be called from the user application

Comment out line 137:

// static void XV_HdmiTxSs_SendAviInfoframe(XV_HdmiTx *HdmiTxPtr);

Change line 889:

Change from:

static void XV_HdmiTxSs_SendAviInfoframe(XV_HdmiTx *HdmiTx)

Change to:

void XV_HdmiTxSs_SendAviInfoframe(XV_HdmiTx *HdmiTx)

Add the AVI InfoFrame function declarations to the header file so that they can be called from the user application.

Add between Lines 343 and 344:

void XV_HdmiTxSs_SendAviInfoframe(XV_HdmiTx *HdmiTxPtr);


2) Update the user application to include the AVI InfoFrame during the Vertical Sync callback.

These changes are to be made in the xhdmi_example.c file.

Update the TxVsCallback function by adding the following lines between lines 894 and 895:

// AVI infoframe
XV_HdmiTxSs_SendAviInfoframe(HdmiTxSs.HdmiTxPtr);



Disable Auto Generated AVI InfoFrames and use Custom AVI InfoFrames

Comment out the Xilinx AVI InfoFrame generation from the TxVsCallback function between lines 894 and 895:

These changes are to be made in the xhdmi_example.c file.

Update the TxVsCallback function by adding the following lines between lines 894 and 895:

// AVI infoframe
XV_HdmiTxSs_SendAviInfoframe(HdmiTxSs.HdmiTxPtr);

User can then use the XV_HdmiTxSs_SendGenericAuxInfoframe function to generate their own AVI Info Frames.

It is recommended that users use the Xilinx AVI InfoFrame function (XV_HdmiTxSs_SendAviInfoframe) as an example on how to generate the arrays to be sent using the XV_HdmiTxSs_SendGenericAuxInfoframe function.

Users should keep in mind that they will need to skip every 8th byte in the AUX Data array so that the ECC values can be inserted by the HDMI TX Subsystem. 

You can find more information on the ECC bytes in the HDMI 1.4b Spec section 5.2.3.4 & 5.2.3.5.

AUX Header:

0x82 0x02 0x0D 0xE4
HB0 HB1 HB1 ECC

AUX Data:

0x72 0x00 0x28 0x00 0x10 0x00 0x00 0x07
PB0 PB1 PB2 PB3 PB4 PB5 PB6 ECC
0x00 0x39 0x04 0x00 0x00 0x81 0x07 0x69
PB7 PB8 PB9 PB10 PB11 PB12 PB13 ECC
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
PB14 PB15 PB16 PB17 PB18 PB19 PB20 ECC
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
PB21 PB22 PB23 PB24 PB25 PB26 PB27 ECC

Linked Answer Records

Master Answer Records

Associated Answer Records

AR# 68780
Date 06/01/2018
Status Active
Type General Article
IP