[patch 29/96] ALSA: fix excessive background noise introduced by OSS emulation rate shrink

Greg KH
2009-03-14T00:31:38Z

[-- Attachment #1: alsa-fix-excessive-background-noise-introduced-by-oss-emulation-rate-shrink.patch --]
[-- Type: text/plain, Size: 833 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------

From: Steve Chen <schen@mvista.com>

commit 5370d96f85962769ea3df3a81cc885f257c51589 upstream.

Incorrect variable was used to get the next sample which caused S2
to be stuck with the same value resulting in loud background noise.

Signed-off-by: Steve Chen <schen@mvista.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
sound/core/oss/rate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/core/oss/rate.c
+++ b/sound/core/oss/rate.c
@@ -157,7 +157,7 @@ static void resample_shrink(struct snd_p
while (dst_frames1 > 0) {
S1 = S2;
if (src_frames1-- > 0) {
- S1 = *src;
+ S2 = *src;
src += src_step;
}
if (pos & ~R_MASK) {