[alsa-devel] bug in alsa-lib/snd_pcm_plugin_delay for capture?

pl bossart bossart.nospam at gmail.com
Tue Nov 16 08:08:42 CET 2010


Since the PulseAudio commit 29acfd0e0413a9bd126782763ee2dcf10357546 I
am seeing errors messages telling me that the information reported by
snd_pcm_avail_delay is not accurate on the capture path, more
specifically the delay is lower than the available samples.
I spent a little bit of time to find the root cause, and I believe
this is a problem with alsa-lib plugins. I never see any errors when
using hw devices. Conversely I always have these errors when using the
front: plugin (the pulseaudio default).
When I looked at the code, I saw that snd_pcm_plugin_delay and
snd_pcm_plugin_avail_update don't really match. There is additional
code in snd_pcm_plugin_avail_update for the capture case that is not
present when in the delay code, and that causes the delta between the
values reported.
Since I don't understand this code that has all kinds of
mmap_commit/forward/undos, I have to ask higher powers for advice.
Jaroslav, could you take a look at the code and let me know if my
analysis is correct?
Thanks,
-Pierre


More information about the Alsa-devel mailing list