From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763850AbZFLBwz (ORCPT ); Thu, 11 Jun 2009 21:52:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757556AbZFLBws (ORCPT ); Thu, 11 Jun 2009 21:52:48 -0400 Received: from cantor.suse.de ([195.135.220.2]:54057 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756620AbZFLBwr (ORCPT ); Thu, 11 Jun 2009 21:52:47 -0400 Date: Fri, 12 Jun 2009 03:52:48 +0200 Message-ID: From: Takashi Iwai To: Sven =?ISO-8859-1?Q?K=F6hler?= Cc: David Miller , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Newsgroups: gmane.linux.kernel Subject: Re: sound skipping regression introduced in 2.6.30-rc8 In-Reply-To: <4A317949.9090301@gmail.com> References: <20090610.112804.193703669.davem@davemloft.net> <4A300B85.2010106@gmail.com> <4A30A882.5080206@gmail.com> <4A317949.9090301@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=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 11 Jun 2009 23:38:17 +0200, Sven Köhler wrote: > > >>>> Can somebody point out, how I can set this xrun_debug thing or can > >>>> somebody provide a patch that reverts the change? > >>> Did you read my reply to David? > >> I will try, what is described there and I will report back if I get any > >> debug output. > > > > Thanks, that'll be be helpful. > > Below is the output. Note, that audacious 2.x was not only skipping a > little bit. In fact, the clock that was showing the time of audio played > was running twice as fast or even 4 times as fast. The sound was played > at the right samplerate but in fast it seems, that much of the audio > data was skipped and I only heard a series of short fragments of what > should have been the song I'm listening to. > > > PCM: hw_ptr skipping! (pos=4096, delta=7169, period=1024, jdelta=0/149) OK, it must be the same problem indeed as David and Bartlomiej see. Although Bartlomiej wrote that reverting the commit below didn't help, I still suspect it comes from there. commit da2436a23c038055b1da6fe30b6ea2886b1e07b0 Author: Jaroslav Kysela Date: Mon Apr 13 21:31:25 2009 +0200 [ALSA] intel8x0: do not use zero value from PICB register The below is a revised patch to fix the possible regression from this. Could you guys give it a try, or check reverting the above? thanks, Takashi --- diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 173bebf..2446ed6 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -1077,15 +1077,18 @@ static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *subs ptr1 <<= ichdev->pos_shift; ptr = ichdev->fragsize1 - ptr1; ptr += position; - ichdev->last_pos = ptr; - ichdev->last_pos_jiffies = jiffies; } else { ptr1 = jiffies - ichdev->last_pos_jiffies; if (ptr1) ptr1 -= 1; ptr = ichdev->last_pos + ptr1 * ichdev->jiffy_to_bytes; ptr %= ichdev->size; + if (ptr < position || + ptr > position + substream->runtime->period_size) + ptr = position; } + ichdev->last_pos = ptr; + ichdev->last_pos_jiffies = jiffies; spin_unlock(&chip->reg_lock); if (ptr >= ichdev->size) return 0;