ALSA: core: add hooks for audio timestamps
ALSA did not provide any direct means to infer the audio time for A/V sync and system/audio time correlations (eg. PulseAudio). Applications had to track the number of samples read/written and add/subtract the number of samples queued in the ring buffer. This accounting led to small errors, typically several samples, due to the two-step process. Computing the audio time in the kernel is more direct, as all the information is available in the same routines. Also add new .audio_wallclock routine to enable fine-grain synchronization between monotonic system time and audio hardware time. Using the wallclock, if supported in hardware, allows for a much better sub-microsecond precision and a common drift tracking for all devices sharing the same wall clock (master clock). Signed-off-by:Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
Showing
- include/sound/pcm.h 2 additions, 0 deletionsinclude/sound/pcm.h
- include/uapi/sound/asound.h 5 additions, 2 deletionsinclude/uapi/sound/asound.h
- sound/core/pcm_compat.c 11 additions, 8 deletionssound/core/pcm_compat.c
- sound/core/pcm_lib.c 30 additions, 2 deletionssound/core/pcm_lib.c
- sound/core/pcm_native.c 2 additions, 0 deletionssound/core/pcm_native.c
Loading
Please register or sign in to comment