alsa: snd_pcm_drain() sometimes takes longer than it should #999
Open
Description
This happens with the bcm2835 driver.
snd_pcm_drain() should normally wait until all buffered audio data buffered has been played. But sometimes, it seems to take much longer. It takes seconds, even though the amount of buffered audio is only milliseconds.
Here's a backtrace (with mpv):
#0 0x756c2dc8 in ioctl () at ../sysdeps/unix/syscall-template.S:82
#1 0x75b7fc1c in snd_pcm_hw_drain () from /usr/local/lib/libasound.so.2
#2 0x75b672dc in snd_pcm_drain () from /usr/local/lib/libasound.so.2
#3 0x0002a95c in drain (ao=0x83ea50) at ../audio/out/push.c:158
This seems to happen pretty randomly (and somehow timing related), so I'm really not sure how to provide a reproducible test case.