C0d1ng4fun

HDMI Basic Audio

2021

60 HDMI frames of test pattern with packets in blanking periods from simulation.
60 HDMI frames of test pattern with packets in blanking periods from simulation.

HDMI basic audio is the simplest form of audio that can be transmitted over HDMI in the form of LPCM samples in one of a few fixed sampling rates. Having already designed an HDMI video transmitter to experiment with Scanline Rendering I felt the need to add audio to take it one step further.

Several standards are involved when transmitting audio over HDMI. HDMI specifies how and when data can be encoded into the video stream down to the packet structure. Packets are placed in data islands in the blanking intervals between lines and frames. HDMI together with CEA-861 (EDID) specify the meaning of the packet content. HDMI audio sample packets, when delivering basic audio, carry a data stream according to IEC60958 (S/PDIF).

By limiting the design to basic audio it could be kept fairly simple as even VGA video has plenty of room to carry the required data without intricate scheduling to meet timing requirements. I simulated the design and verified data timing and content against a python model while extracting video, audio and packet metadata. Decoding and illustrating the video frames together with the data islands in the blanking periods showed that packets were scheduled as supposed to. Finally I implemented the design on an Arty-Z7 board and verified it on four different displays in VGA and 720p60 with a register interface to choose one of four waveforms and control frequency and amplitude for left and right audio channels.