]> git.alsa-project.org Git - alsa-lib.git/commit
pcm_plugin: Fix return value of snd_pcm_rewind
authorDavid Henningsson <david.henningsson@canonical.com>
Thu, 30 May 2013 10:26:34 +0000 (12:26 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 30 May 2013 12:04:15 +0000 (14:04 +0200)
commitf2d39afe6139ab16aa2aeea0f51f32db79ab1262
tree250cfedcec93a45f280e1fe54af04c71db1b8a5d
parent7f877543a36efd8fd5d38fae21352fc0567ece21
pcm_plugin: Fix return value of snd_pcm_rewind

In case the rewind did not rewind as much as expected, e g due to
time delay between the latest avail update and the rewind, we must
properly account for that in the plugin layer.

Otherwise, the plugin's appl ptr and the hw's appl ptr become
unsynchronised, which is very bad, especially in mmap_shadow plugins,
e g, this could cause the overlapping memcpy in the softvol plugin
as seen here:
https://bugs.freedesktop.org/show_bug.cgi?id=64299

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_plugin.c