From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755828AbZFGK2s (ORCPT ); Sun, 7 Jun 2009 06:28:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755337AbZFGK2l (ORCPT ); Sun, 7 Jun 2009 06:28:41 -0400 Received: from cantor.suse.de ([195.135.220.2]:52274 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754439AbZFGK2k convert rfc822-to-8bit (ORCPT ); Sun, 7 Jun 2009 06:28:40 -0400 Date: Sun, 07 Jun 2009 12:28:41 +0200 Message-ID: From: Takashi Iwai To: Jaroslav Kysela Cc: Jiri Slaby , LKML Subject: Re: [sound] mpd loops on current -next In-Reply-To: References: <4A2A8F6A.80705@gmail.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.3 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Sat, 06 Jun 2009 18:37:11 +0200, I wrote: > > At Sat, 6 Jun 2009 17:52:44 +0200 (CEST), > Jaroslav Kysela wrote: > > > > On Sat, 6 Jun 2009, Jiri Slaby wrote: > > > > > Hi, > > > > > > I found a regression in current -next caused by > > > c44941e05900fe85f6091456f9e313b446a97ae9 > > > (PCM midlevel: Do not update hw_ptr_jiffies when hw_ptr is not changed) > > > > Oops. It seems like typo. Could you try this patch, please? > > Ah, that's the cause of the bug with PA on the recent driver. > I didn't experience the problem because I myself don't use PA :) I found another bug with that change. The fix is attached below. Takashi === >>From ab1863fc9bc18c806338564124b1e5e7e3ef53d1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 7 Jun 2009 12:09:17 +0200 Subject: [PATCH] ALSA: pcm - Fix update of runtime->hw_ptr_interrupt The commit 13f040f9e55d41e92e485389123654971e03b819 made another regression, the missing update of runtime->hw_ptr_interrupt. Since this field is only checked in snd_pcmupdate__hw_ptr_interrupt(), not in snd_pcm_update_hw_ptr(), it must be updated before the hw_ptr change check. Signed-off-by: Takashi Iwai --- sound/core/pcm_lib.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index bf34603..adb306f 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -299,6 +299,8 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) hw_ptr_interrupt = new_hw_ptr - new_hw_ptr % runtime->period_size; } + runtime->hw_ptr_interrupt = hw_ptr_interrupt; + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && runtime->silence_size > 0) snd_pcm_playback_silence(substream, new_hw_ptr); @@ -309,7 +311,6 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) runtime->hw_ptr_base = hw_base; runtime->status->hw_ptr = new_hw_ptr; runtime->hw_ptr_jiffies = jiffies; - runtime->hw_ptr_interrupt = hw_ptr_interrupt; if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_ENABLE) snd_pcm_gettime(runtime, (struct timespec *)&runtime->status->tstamp); -- 1.6.3.2