aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorSteve Chen <schen@mvista.com>2009-02-21 09:05:04 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-23 01:49:04 -0500
commit5370d96f85962769ea3df3a81cc885f257c51589 (patch)
tree109090f4e1660340b5932d886991be471acf01e3 /sound
parente8bf069c419c1dc0657e02636441fe1179a9db14 (diff)
ALSA: fix excessive background noise introduced by OSS emulation rate shrink
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 at mvista.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/oss/rate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/oss/rate.c b/sound/core/oss/rate.c
index a466443c4a26..2fa9299a440d 100644
--- a/sound/core/oss/rate.c
+++ b/sound/core/oss/rate.c
@@ -157,7 +157,7 @@ static void resample_shrink(struct snd_pcm_plugin *plugin,
157 while (dst_frames1 > 0) { 157 while (dst_frames1 > 0) {
158 S1 = S2; 158 S1 = S2;
159 if (src_frames1-- > 0) { 159 if (src_frames1-- > 0) {
160 S1 = *src; 160 S2 = *src;
161 src += src_step; 161 src += src_step;
162 } 162 }
163 if (pos & ~R_MASK) { 163 if (pos & ~R_MASK) {