From: Takashi Iwai Subject: Re: ALSA: fix excessive background noise introduced by OSS emulation rate shrink Date: Mon, 23 Feb 2009 08:46:14 +0100 Message-ID: References: <1235225104.3144.114.camel@linux-1lbu.site> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8CEF3243D0 for ; Mon, 23 Feb 2009 08:46:16 +0100 (CET) In-Reply-To: <1235225104.3144.114.camel@linux-1lbu.site> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Steve Chen Cc: alsa-devel@alsa-project.org, DaVinci List-Id: alsa-devel@alsa-project.org At Sat, 21 Feb 2009 08:05:04 -0600, Steve Chen wrote: > > > 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 Oh what a long-living bug. Applied now. Thanks! Takashi > > diff --git a/sound/core/oss/rate.c b/sound/core/oss/rate.c > index a466443..2fa9299 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, > while (dst_frames1 > 0) { > S1 = S2; > if (src_frames1-- > 0) { > - S1 = *src; > + S2 = *src; > src += src_step; > } > if (pos & ~R_MASK) { > >