public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in media-libs/alsa-lib/files: alsa-lib-1.0.27.1-rewind.patch
@ 2013-07-19 16:41 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; only message in thread
From: Samuli Suominen (ssuominen) @ 2013-07-19 16:41 UTC (permalink / raw
  To: gentoo-commits

ssuominen    13/07/19 16:41:41

  Added:                alsa-lib-1.0.27.1-rewind.patch
  Log:
  Backport upstream patch from 1.0.27.2 to stabilization target 1.0.27.1 wrt #477282#c3
  
  (Portage version: 2.2.0_alpha188/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)

Revision  Changes    Path
1.1                  media-libs/alsa-lib/files/alsa-lib-1.0.27.1-rewind.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.27.1-rewind.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.27.1-rewind.patch?rev=1.1&content-type=text/plain

Index: alsa-lib-1.0.27.1-rewind.patch
===================================================================
From f2d39afe6139ab16aa2aeea0f51f32db79ab1262 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Thu, 30 May 2013 12:26:34 +0200
Subject: [PATCH] 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index 96218a8..17157e8 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -219,9 +219,9 @@ static snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t
 		snd_atomic_write_end(&plugin->watom);
 		return sframes;
 	}
-	snd_pcm_mmap_appl_backward(pcm, (snd_pcm_uframes_t) frames);
+	snd_pcm_mmap_appl_backward(pcm, (snd_pcm_uframes_t) sframes);
 	snd_atomic_write_end(&plugin->watom);
-	return (snd_pcm_sframes_t) frames;
+	return (snd_pcm_sframes_t) sframes;
 }
 
 static snd_pcm_sframes_t snd_pcm_plugin_forwardable(snd_pcm_t *pcm)
-- 
1.7.11.7






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-19 16:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19 16:41 [gentoo-commits] gentoo-x86 commit in media-libs/alsa-lib/files: alsa-lib-1.0.27.1-rewind.patch Samuli Suominen (ssuominen)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox