Audio Data Stream - 1.2 English

HDMI 2.1 Transmitter Subsystem v1.2 Product Guide (PG350)

Document ID
Release Date
1.2 English

An AXI4-Stream audio cycle is illustrated in the following figure. The data is captured when both the valid (TVLD) and ready (TRDY) signals are asserted. The HDMI 2.1 TX Subsystem expects the channels in sequential order. If the channel data is not in order, the channel data might be mapped into other channel sample slots. Therefore, ensure that the audio stream source sends out adjacent channels in sequential order (CH0, CH1, etc.). Audio signals are defined in Audio Input Stream Interface.

Figure 1. Audio Cycle

In the HDMI 2.1 TX Subsystem, the number of Audio Channels is set through the software driver. You must enable the correct number of audio channels according to your use case and send the corresponding audio channel data mapping to the channel ID (TID). For example, if you intend to send out 8 channel audio, then you must set the Audio Channel number to 8 in the HDMI 2.1 TX Subsystem driver. Then, the corresponding audio data must be prepared and sent to the HDMI 2.1 TX Subsystem in the hardware, as described in the previous figure.

In the HDMI 2.1 TX Subsystem, L-PCM (IEC 60958, Packet Type 0x02), HBR (Packet Type 0x09), and 3D Audio (Packet Type 0x0B) are handled by the hardware. An API function is available that allows for the setting of the audio format, and the hardware packs the audio based on the Audio Format selected.

void XV_HdmiTxSs1_SetAudioFormat(XV_HdmiTxSs1 *InstancePtr,
        XV_HdmiTx1_AudioFormatType format)


  1. InstancePtr is a pointer to XV_HdmiTxSs1 instance.
  2. the format is a selector of Audio Format.
    typedef enum {
        XV_HDMITX1_AUDFMT_LPCM = 0, /*L-PCM*/
        XV_HDMITX1_AUDFMT_HBR,      /*HBR*/
        XV_HDMITX1_AUDFMT_3D,       /*3D Audio*/
    } XV_HdmiTx1_AudioFormatType;
    Important: When multiple channel audio is enabled in the system, ensure that the audio data is properly sent to their perspective channel allocation. Unused channels must be packed with zero (Mute) to avoid audio channel swapping, which means audio data might appear in unexpected channel locations.
Important: The HDMI specification requires all audio to be packed evenly (See table 7-6 of the HDMI specification). To send an odd number of channels, add a dummy channel. A dummy channel is created by adding zero data to last channel of the audio stream. This will make sure the audio packet is packed correctly by transferring your odd channels plus one dummy channel.