[alsa-devel] underruns and strange code in pcm_rate.c (and patch)
stsp at aknet.ru
Thu Nov 8 10:13:29 CET 2007
Takashi Iwai wrote:
> Not really. It checks appl_ptr of the client, not hw_ptr. appl_ptr
> is what app writes. So, as long as app writes only the period size,
> the hack isn't triggered.
No, its not that simple.
When the partially filled period
on slave appears, it then gets
populated back. Namely, snd_pcm_write_areas()
takes it via snd_pcm_avail_update().
It then adjusts the "frames" accordingly,
and then also "size" gets infected.
Then the hack triggers.
More information about the Alsa-devel