rpms/kernel/F-11 alsa-pcm-safer-boundary-checks.patch, 1.2, 1.3 kernel.spec, 1.1674, 1.1675 alsa-pcm-midlevel-add-more-strict-buffer-position.patch, 1.1, NONE

Chuck Ebbert cebbert at fedoraproject.org
Wed Jul 8 00:28:48 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1520

Modified Files:
	kernel.spec 
Added Files:
	alsa-pcm-safer-boundary-checks.patch 
Removed Files:
	alsa-pcm-midlevel-add-more-strict-buffer-position.patch 
Log Message:
Drop the correct patch to fix bug #498858

alsa-pcm-safer-boundary-checks.patch:

Index: alsa-pcm-safer-boundary-checks.patch
===================================================================
RCS file: alsa-pcm-safer-boundary-checks.patch
diff -N alsa-pcm-safer-boundary-checks.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ alsa-pcm-safer-boundary-checks.patch	8 Jul 2009 00:28:17 -0000	1.3
@@ -0,0 +1,49 @@
+From: Takashi Iwai <tiwai at suse.de>
+Date: Fri, 20 Mar 2009 15:26:15 +0000 (+0100)
+Subject: ALSA: pcm - Safer boundary checks
+X-Git-Url: http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff_plain;h=d9b59892fb7108f6ee33a4fcdc257587b68f2ed6
+
+ALSA: pcm - Safer boundary checks
+
+Make the boundary checks a bit safer.
+These caese are rare or theoretically won't happen, but nothing
+bad to keep the checks safer...
+
+Signed-off-by: Takashi Iwai <tiwai at suse.de>
+Signed-off-by: Jaroslav Kysela <perex at perex.cz>
+---
+
+diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
+index 063c675..fbb2e39 100644
+--- a/sound/core/pcm_lib.c
++++ b/sound/core/pcm_lib.c
+@@ -222,8 +222,9 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
+ 	hw_ptr_interrupt = runtime->hw_ptr_interrupt + runtime->period_size;
+ 	delta = new_hw_ptr - hw_ptr_interrupt;
+ 	if (hw_ptr_interrupt >= runtime->boundary) {
+-		hw_ptr_interrupt %= runtime->boundary;
+-		if (!hw_base) /* hw_base was already lapped; recalc delta */
++		hw_ptr_interrupt -= runtime->boundary;
++		if (hw_base < runtime->boundary / 2)
++			/* hw_base was already lapped; recalc delta */
+ 			delta = new_hw_ptr - hw_ptr_interrupt;
+ 	}
+ 	if (delta < 0) {
+@@ -241,7 +242,7 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
+ 			delta = 0;
+ 		} else {
+ 			hw_base += runtime->buffer_size;
+-			if (hw_base == runtime->boundary)
++			if (hw_base >= runtime->boundary)
+ 				hw_base = 0;
+ 			new_hw_ptr = hw_base + pos;
+ 		}
+@@ -296,7 +297,7 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
+ 			return 0;
+ 		}
+ 		hw_base += runtime->buffer_size;
+-		if (hw_base == runtime->boundary)
++		if (hw_base >= runtime->boundary)
+ 			hw_base = 0;
+ 		new_hw_ptr = hw_base + pos;
+ 	}


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1674
retrieving revision 1.1675
diff -u -p -r1.1674 -r1.1675
--- kernel.spec	6 Jul 2009 17:46:56 -0000	1.1674
+++ kernel.spec	8 Jul 2009 00:28:17 -0000	1.1675
@@ -663,7 +663,7 @@ Patch603: alsa-pcm-fix-delta-calc-at-ove
 Patch605: alsa-hda-dont-reset-BDL-unnecessarily.patch
 Patch606: alsa-dont-reset-stream-at-each-prepare-callb.patch
 Patch607: alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch
-Patch608: alsa-pcm-midlevel-add-more-strict-buffer-position.patch
+Patch608: alsa-pcm-safer-boundary-checks.patch
 Patch610: hda_intel-prealloc-4mb-dmabuffer.patch
 Patch611: linux-2.6.29-alsa-update-quirks.patch
 Patch612: alsa-hda-add-debugging.patch
@@ -1310,7 +1310,7 @@ ApplyPatch alsa-pcm-fix-delta-calc-at-ov
 ApplyPatch alsa-hda-dont-reset-BDL-unnecessarily.patch
 ApplyPatch alsa-dont-reset-stream-at-each-prepare-callb.patch
 ApplyPatch alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch
-ApplyPatch alsa-pcm-midlevel-add-more-strict-buffer-position.patch
+ApplyPatch alsa-pcm-safer-boundary-checks.patch
 ApplyPatch hda_intel-prealloc-4mb-dmabuffer.patch
 ApplyPatch alsa-hda-add-debugging.patch
 
@@ -2096,6 +2096,9 @@ fi
 # and build.
 
 %changelog
+* Tue Jul 07 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.6-213
+- Drop the correct patch to fix bug #498858
+
 * Mon Jul 06 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.6-212
 - Additional fixes for bug #498854
 


--- alsa-pcm-midlevel-add-more-strict-buffer-position.patch DELETED ---




More information about the fedora-extras-commits mailing list