Attached a set of patches to show how the audio wall clock (eg. the HDAudio one) can be used to provide precise audio timestamps and track the drift between audio time and system time. On my laptop I am able to track a 7ppm delta. I will explain in more details how this can be used during LPC in San Diego, but with the summer coming I'd like to get feedback as there are changes to the core/alsa-lib that haven't been modified in years.
Pierre-Louis Bossart (2): ALSA: core: add hooks for audio timestamps read from WALLCLOCK ALSA: hda: support for wallclock timestamps
include/sound/asound.h | 7 +++- include/sound/pcm.h | 2 + sound/core/pcm_lib.c | 15 ++++++- sound/core/pcm_native.c | 2 + sound/pci/hda/hda_intel.c | 106 ++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 128 insertions(+), 4 deletions(-)