To ensure that the audio is working in the HDMI 2.1 RX Subsystem, the AXI4-Stream must be constructed as described below.
The HDMI 2.1 RX Subsystem supports up to 32 audio channels. The audio data is transmitted through an AXI4-Stream audio interface, which is a customized AXI4-Stream protocol that is used to send audio samples with sideband signals defined in the AES3 specification.
The sub-frame format for audio sample is shown as follows.
A frame is uniquely composed of two sub-frames. The first sub-frame normally starts with preamble X, and the second sub-frame always starts with preamble Y. However, every 192 frames forms one Audio Block. And the first sub-frame in each Audio Block starts with a preamble Z. An illustration is shown as follows.
In the case of more than 2 channels, every 2 channels are considered as a single AES3 audio block. For example, using 8 audio channels, one audio block consists of 192*8 audio samples. For the first 8 samples of an audio block, the preamble for audio ch0, ch2, ch4, ch6 are Z. In remaining part of audio block, the preamble for audio ch0, ch2, ch4, ch6 are X. The preambles for audio ch1, ch3, ch5, ch7 are always Y through out of the whole audio block.
If 8 channel audio is enabled in your design, and only N Channels (where N is less than 8, for example, 6) out of 8 channels carry valid audio data, for the unused channels, you must pack the audio data with zeros and the sub-frame data allocation.