]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: ioplug: Fix the regression of pulse plugin drain
authorTakashi Iwai <tiwai@suse.de>
Wed, 19 Dec 2018 13:23:38 +0000 (14:23 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 19 Dec 2018 13:23:38 +0000 (14:23 +0100)
commitd7ba06afce54f386eda1eec462f27824fb4c380f
treeae2eca94e1b7b86f404c7ba1964751ba0e1daaab
parentee64b4b83afc0b1bdf99e1ccf7e6ea4602ef613f
pcm: ioplug: Fix the regression of pulse plugin drain

The recent change to support the drain via polling caused a regression
for pulse plugin; with speaker-test -c2 -twav with pulse, it leads to
either no sounds or stall.

The only sensible behavior change in the commit wrt pulse plugin is
that now it starts the stream before calling drain callback.  This
supposed to be correct, but it seems hitting a pulse plugin bug.

The start before drain callback is only a matter of consistency, and
since this doesn't work for the single existing plugin using drain
callback, we don't need to stick with this behavior.

For addressing the regression, we check the presence of the drain
callback and start the stream only when it doesn't exist, i.e. only in
drain-via-poll mode.

Fixes: ce2095c41f28 ("pcm: ioplug: Implement proper drain behavior")
Reported-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_ioplug.c