[alsa-devel] underruns and strange code in pcm_rate.c (and patch)

Takashi Iwai tiwai at suse.de
Thu Nov 8 07:25:49 CET 2007


At Thu, 08 Nov 2007 12:13:29 +0300,
Stas Sergeev wrote:
> 
> Hello.
> 
> 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.

Yeah, but it's the case of partial writes again, i.e. when apps cannot
write a full period size.  When apps check its availability via poll,
the hack isn't triggered.


Takashi


More information about the Alsa-devel mailing list