Hi,

I want to approximate the delay between the time I provide a sample to ALSA
and the time it is presented. I thought snd_pcm_status_get_delay would help
me but I am confused about the output.

I tried snd_pcm_status_get_delay on two systems. The first one is my Linux
workstation with a cheap USB audio device (Behringer UCA202). The second
system is an i.MX6 Eval Board with an onboard Audio Codec (WM8960).

The ALSA documentation on snd_pcm_status_get_delay says:

"Delay is distance between current application frame position and sound
frame position. It's positive and less than buffer size in normal
situation, negative on playback underrun and greater than buffer size on
capture overrun."
Though, on both systems the delay is constant. Period size does not seem to
matter. On the eval board the delay is always equal to the period size. On
my workstation it is twice the period time for small sizes and for larger
sizes it is slightly larger than the period size. But it is always the same
value.

I call snd_pcm_status_get_delay says almost directly after
snd_pcm_avail_update. I also tried with snd_pcm_avail. No difference.

What is going on here? Is this expected behaviour? Could it be related to
the drivers for the devices I use?

Thanks
Jan
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to