2010/4/22 Stefan Schoenleitner <dev.c0debabe@xxxxxxxxx> > Stefan Schoenleitner wrote: > > Since a POLLIN event only occurs after at least a full period is > available for > > reading (as set up by snd_pcm_sw_params_set_avail_min() above) > > and I only read after a POLLIN event occured on the capture device fd, > > I really do not understand why I get the above error. > > By using snd_pcm_avail_update() I found out that polling on the PCMs > *does not work at all*. > > Although I verified that avail_min is 160 frames, polling on the > capture/playback PCMs returns a POLLIN/POLLOUT event even if the number > of frames for reading/writing *is less than avail_main*. > > I also tried snd_pcm_wait() which should also wait until there are at > least avail_min frames available for reading/writing. > The result is the same: snd_pcm_avail_update() shows that it returns > even if there are far less than avail_min frames available for processing. > > I suspect that this is a bug in ALSA ? > > > cheers, > stefan > your program expect the driver support 2 periods per buffer but does not expicitly set the period 8000 Hz , S16_LE and mono >> I verified that avail_min is 160 frames is there any specific reason to choose 160 frames ? _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel