-
Notifications
You must be signed in to change notification settings - Fork 2
HDMI Audio Reference Measurements
The AV Latency.com software tools are built on the idea of using a commonly available device that has two audio outputs, an analog audio signal and a digital audio signal, that have a predictable time offset between the two types of audio output. After this time offset is measured, this hardware can be used as a point of reference for measuring the audio latency of other digital audio sink devices.
This page describes the process used to accurately measure the time offset between analog and HDMI audio signals.
Measurements revealed that the number of channels or the bit depth of the audio format did not have a notable impact on the time offset between HDMI audio and analog audio output of the HDV-MB01 HDMI audio extractor.
Positive value means that analog leads HDMI, negative value means HDMI leads analog.
| Sample Rate | HDV-MB01 |
|---|---|
| 44.1 kHz | −0.1197 ms |
| 48 kHz | -0.1030 ms |
| 96 kHz | -0.0100 ms |
| 192 kHz | 0.0181 ms |
Detailed measurements can be found here: HDV-MB01 analog audio vs. HDMI audio output offset measurements
There are two signal types for HDMI audio, TMDS and FRL. This method describes measuring TMDS HDMI audio.
In TMDS HDMI audio, audio packets are contained in data islands within the video signal's horizontal and vertical blanking regions. The bandwidth of an HDMI signal is very high, so it requires very expensive and very specialized equipment to perform bit-perfect capture of a TMDS data pair.
But we don't need to fully decode an HDMI signal to understand when audio data has changed. Instead, we can measure audio latency through manipulation of the source audio and video and spectral analysis of a bandwidth limited analog representation of the HMDI signal. In short, the colour of the video lines are manipulated to result in what appears to a low bandwidth oscilloscope as high frequency with high attenuation. Conversely, the audio tone is manipulated to appear as low frequency with low attenuation. This allows us to visualize the change in audio data as a change in amplitude on the low bandwidth oscilloscope’s voltage axis.
Before measuring the offset between the HDMI audio output and the analog audio output of a dual-output reference device, such as an HDMI audio extractor, it is important to first prove that this method of accurately measuring audio latency at the electrical level is possible. We start by connecting a 300 MHz oscilloscope via a simple 10x probe to the positive TMDS Data2 pin of the HMDI signal. Because we are depending on attenuation of higher frequencies of the analog representation of the HDMI electrical signal, it's actually helpful to have a couple of full-length HDMI cables involved. Here I'm using two 6 foot HDMI cables with a cable breakout that I made. Inductance is added and the signal quality degrades, but that's actually helpful for this bandwidth limited approach. In fact, it's important that the analog electrical signal entering the oscilloscope does not have a high quality digital signal because we want a high attenuation of higher frequency signals.
We can see the horizontal blanking regions, and it's possible we're even looking at the data island that hosts the audio packets, but it's very hard to see from the overall view of the signal where a change in these audio packets might happen. The next step is to increase the analog frequency of this electrical signal during the video lines, which will increase the signal attenuation and decrease the visual size of the video lines on the oscilloscope's view.
This might sound difficult, but it's as simple as opening Photoshop and making a full screen colour appear on the display. Then gradually change the brightness, one step at a time to find a colour that results in a high frequency TMDS signal during the video lines. For these specific signal parameters (1080p 24 Hz), I found that #545454 was best at attenuating the video lines by increasing their analog electrical frequency:
Now it's much easier to see a change in the horizontal blanking regions when zoomed out. The audio signal is prepared by the Audio Generator and Driver Check tool, which generates a repeating 100 ms pattern that has unique sample patterns that are easy to visually identify. This tool allows us to change the volume of the audio output, which will change the audio packet data and allow us to control the resulting analog frequency. I found a volume level of 0.632 to result in very clear changes in audio packet data due to a low analog frequency that has low attenuation:
Now that our HDMI signal is easy to visually analyze, let's add on an audio recording from an AV receiver to get an accurate audio latency measurement:
This measurement comes in at 5.5 ms between the time the audio data was transmitted over HDMI and when the audio is presented as sound by the AV receiver. In this test, the microphone was placed less than a centimeter from the speaker driver, so very little latency was added due to distance from the speaker.
Now that we have demonstrated that it is possible to measure audio latency using this method, we will measure the offset between the HMDI audio output and the analog audio output of a dual-output reference device.
Here is a capture of an 800x600 60 Hz HDMI signal and an analog audio signal on a 300 MHz oscilloscope. The audio pattern was generated by the Audio Generator and Driver Check tool, which, as mentioned previously, generates a repeating 100 ms pattern that has unique sample patterns that are easy to visually identify. The HDMI and analog audio signals were generated by the HDV MB01 audio extractor. In this 27.96 ms long capture, you can see one vertical blanking region and changes in the horizontal blanking regions that align perfectly to the analog audio signal. This shows that the analog audio signal and the HDMI audio signal have a very small offset from each other.
If we zoom in on one of these changes in audio signal, we can see each individual horizontal blanking region and notice the change in audio data that causes a visual spike in the analog representation of this HDMI pin:
We can assume that audio data transmission begins around the time of the first horizontal blanking region that contains a different analog representation. This means that presentation of the audio signal by a sink device with zero audio latency should occur sometime within that line of video, before the completion of the following horizontal blanking region.
It is not possible with this measurement method to know exactly when, within this 31 microsecond period, that audio data should begin, so the mid point of these two horizontal blanking regions is used for offset measurements.
We can now measure the offset between HDMI audio and analog audio by measuring the time difference between the start of a change in analog audio and the mid-point of the two horizontal blanking regions where audio data has begun. In this case, the offset is only 32.7 microseconds, or about 0.033 milliseconds, with the analog signal leading the HDMI audio signal.








