]> asedeno.scripts.mit.edu Git - linux.git/commit
ALSA: pcm: Workaround for weird PulseAudio behavior on rewind error
authorTakashi Iwai <tiwai@suse.de>
Wed, 3 Jan 2018 14:16:30 +0000 (15:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 5 Jan 2018 15:07:50 +0000 (16:07 +0100)
commitfb51f1cd06f9ced7b7085a2a4636375d520431ca
treebc9219bebba4fadf786a05f772424ea902d23d92
parent6708913750344a900f2e73bfe4a4d6dbbce4fe8d
ALSA: pcm: Workaround for weird PulseAudio behavior on rewind error

The commit 9027c4639ef1 ("ALSA: pcm: Call ack() whenever appl_ptr is
updated") introduced the possible error code returned from the PCM
rewind ioctl.  Basically the change was for handling the indirect PCM
more correctly, but ironically, it caused rather a side-effect:
PulseAudio gets pissed off when receiving an error from rewind, throws
everything away and stops processing further, resulting in the
silence.

It's clearly a failure in the application side, so the best would be
to fix that bug in PA.  OTOH, PA is mostly the only user of the rewind
feature, so it's not good to slap the sole customer.

This patch tries to mitigate the situation: instead of returning an
error, now the rewind ioctl returns zero when the driver can't rewind.
It indicates that no rewind was performed, so the behavior is
consistent, at least.

Fixes: 9027c4639ef1 ("ALSA: pcm: Call ack() whenever appl_ptr is updated")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c