For HDMI, all data island packets consist of a 4-byte packet header and a 32 bytes of packet contents. The packet header, represented in the following figure, contains 24 data bits (3 bytes) and 8 bits (1 byte) of BCH ECC parity.
The packet body, represented in the following figure, is made from four subpackets; each subpacket includes 56 bits (7 bytes) of data and 8 bits (1 byte) of BCH ECC parity.
- ECC is calculated in the HDMI 2.1 RX Subsystem. Therefore, you must construct HB0...HB2, and PB0, PB1...PB26, PB27 according to HDMI specs in the software.
- When calculating the checksum value (PB0), the ECC values are ignored.
- Refer to section 5.2.3.4 and 5.2.3.5 of the HDMI 1.4 specification (http://www.hdmi.org/manufacturer/specification.aspx) for more information on the Aux packet structure.
In the following table, the packet types are identified as handled by hardware and handled by software.
Packet Type Value | Packet Type |
---|---|
0x00 1 | Null |
0x01 1 | Audio Clock Regeneration (N/CTS) |
0x02 1 | Audio Sample (L-PCM and IEC 61937 compressed formats) |
0x03 1 | General Control |
0x04 | ACP Packet |
0x05 | ISRC1 Packet |
0x06 | ISRC2 Packet |
0x07 | One Bit Audio Sample Packet |
0x08 | DST Audio Packet |
0x09 1 | High Bitrate (HBR) Audio Stream Packet (IEC 61937) |
0x0A | Gamut Metadata Packet |
0x0B 1 | 3D Audio Sample Packet (LPCM Format Only) |
0x0C | One Bit 3D Audio Sample Packet |
0x0D 2 | Audio MetaData Packet |
0x80+InfoFrame Type | InfoFrame Packet |
0x00 | Reserved |
0x01 2 | Vendor-Specific |
0x02 2 | Auxiliary Video Information (AVI) |
0x03 | Source Product Descriptor |
0x04 2 | Audio |
0x05 | MPEG Source |
0x06 | NTSC VBI |
0x07 2 | Dynamic Range and Mastering (HDR) |
|
Null packets are dropped by the HDMI 2.1 RX Subsystem automatically. ACR, Audio Sample, One-bit Audio, DST Audio, and HBR Audio are routed to the audio interface. The remaining packets (packet types not highlighted in the previous table) are routed to the software for further processing by generating AUX packet interrupts.
In the HDMI 2.1 RX Subsystem driver, there is a generic API function to allow you to retrieve aux packets.
XHdmiC_Aux *XV_HdmiRxSs1_GetAuxiliary(XV_HdmiRxSs1 *InstancePtr);
where,
- InstancePtr is a pointer to the HDMI 2.1 RX Subsystem instance.
- It returns a pointer to a data structure contains the complete AUX packet.
The AUX packet data structure defined in the driver is:
typedef union {
u32 Data;
u8 Byte[4];
} XHdmiC_AuxHeader;
typedef union {
u32 Data[8];
u8 Byte[32];
} XHdmiC_AuxData;
typedef struct {
XHdmiC_AuxHeader Header;
XHdmiC_AuxData Data;
} XHdmiC_Aux;
The HDMI Common driver also defines API functions to parse important InfoFrame packets and general control packets so that this information is available to be used in the user application software.
The list of available parser APIs are:
void XV_HdmiC_ParseAVIInfoFrame(XHdmiC_Aux *AuxPtr, XHdmiC_AVI_InfoFrame *infoFramePtr);
void XV_HdmiC_ParseAudioInfoFrame(XHdmiC_Aux *AuxPtr, XHdmiC_AudioInfoFrame *AudIFPtr);
int XV_HdmiC_VSIF_ParsePacket(XHdmiC_Aux *AuxPtr, XHdmiC_VSIF *VSIFPtr);
void XV_HdmiC_ParseGCP(XHdmiC_Aux *AuxPtr, XHdmiC_GeneralControlPacket *GcpPtr);
void XV_HdmiC_ParseDRMIF(XHdmiC_Aux *AuxPtr, XHdmiC_DRMInfoFrame *DRMInfoFrame);
The parsed information is stored in data structures with respect to the packet type.
Other packet types are not parsed by the driver. Instead, upon the AUX interrupt, you must retrieve those packets and process them in the application software. For example, if an HDMI source sends NTSC VBI Infoframe, upon receiving them by HDMI Subsystem, the NTSC VBI packet (both header and payload) is stored in the hardware FIFO, an AUX interrupt is generated. Then the application software reads out the AUX from the FIFO. By checking the packet header, the application knows that the packet is NTSC VBI. Then the application software must parse the payload data and handle it according to their system requirements.