On Wed, 11 Sep 2002, Anders Torger wrote: > I use a RME9652 hammerfall with two periods (the hardware is that way). > > I watch a file descriptor associated to the output with select(), when > it gets ready for writing, I write data to the pcm with > snd_pcm_writen(). In the beginning, the state of the pcm is PREPARED. > > What I would expect then, is that the file descriptor is ready for > writing until the two periods has been filled with data, and then > select will block (output buffers full, sound card not running). But > instead, when the two periods is filled with data, select() still > returns and says that the file descriptor is ready for writing, but > when calling snd_pcm_writen(), it returns -EPIPE. The pcm state is > still PREPARED. > > What is wrong? Is it me (probably), or is it alsa?
You should also check for POLLERR. I'm not sure, that it's necessary to return POLLOUT together with POLLERR in that case. Anyway, application should check for POLLERR at first and then write data. Jaroslav ----- Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project http://www.alsa-project.org SuSE Linux http://www.suse.com ------------------------------------------------------- In remembrance www.osdn.com/911/ _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel