The Advanced Linux Sound Architecture (ALSA) - library
Find a file
Takashi Iwai ce2095c41f pcm: ioplug: Implement proper drain behavior
This patch fixes the draining behavior of ioplug in the following
ways:

- When no draining ioplug callback is defined, implement the draining
  loop using snd_pcm_wait*() and sync with the drain finishes.
  This is equivalent with the implementation in the kernel write().
  Similarly as in kernel code, for non-blocking mode, it returns
  immediately after setting DRAINING state.

- The hw_ptr update function checks the PCM state and stops the stream
  if the draining finishes.

- When draining ioplug callback is defined, leave the whole draining
  operation to it.  The callback is supposed to return -EAGAIN for
  non-blocking case, too.

- When an error happens during draining, it drops the stream, for a
  safety reason.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-29 09:51:46 +02:00
alsalisp Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
aserver a set of fixes to reduce gcc warnings 2018-03-27 15:16:41 +02:00
doc doxygen: Suppress timestamp 2016-06-23 16:29:07 +02:00
include a set of fixes to reduce gcc warnings 2018-03-27 15:16:41 +02:00
m4 Add the attributes.m4 macro file from xine/lscube. 2008-11-21 13:04:19 +01:00
modules modules: smixer_python - add support for python3 2018-03-27 14:51:39 +02:00
src pcm: ioplug: Implement proper drain behavior 2018-03-29 09:51:46 +02:00
test test: correct emulation for channel-map TLV 2017-11-24 13:47:17 +01:00
utils autotools: update style 2014-02-26 08:16:22 +01:00
.gitignore Add pcm-multi-thread to .gitignore 2016-07-07 16:30:54 +02:00
acinclude.m4 fixed for the recent autoconf. 2004-01-26 15:52:17 +00:00
ChangeLog * update to libtool 1.3.3 1999-07-22 12:18:42 +00:00
configure.ac modules: smixer_python - add support for python3 2018-03-27 14:51:39 +02:00
COPYING Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
gitcompile a set of fixes to reduce gcc warnings 2018-03-27 15:16:41 +02:00
INSTALL pcm: Add thread-safety to PCM API 2016-07-11 15:25:30 +02:00
Makefile.am autotools: update style 2014-02-26 08:16:22 +01:00
MEMORY-LEAK Initial version 2003-02-04 14:56:07 +00:00
NOTES Change assert condition in error message handler 2007-10-24 12:53:08 +02:00
TODO Added snd_config_load_override(). 2002-01-09 21:28:15 +00:00