From: Takashi Iwai Subject: Re: hw_ptr accuracy with intel8x0 -> PulseAudio issue Date: Wed, 09 Dec 2009 14:46:03 +0100 Message-ID: References: <6160a5130912020115t45bd4635hceb0ac3de4fb1efe@mail.gmail.com> <4f3252890912021826g732292ecv8959a7cfbf574446@mail.gmail.com> <6160a5130912030828m5b2401f3w31a67b6b51e8d8b6@mail.gmail.com> <4f3252890912031442i56ccc905g935a4d6ed48f40c6@mail.gmail.com> <6160a5130912031650u5949c921jc86d0847b2844803@mail.gmail.com> <4f3252890912041817u7ab83a3eh7643476d64d709f3@mail.gmail.com> <4f3252890912090355n70a2b5cfu4fbb74d473480a94@mail.gmail.com> 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 mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 6F876103803 for ; Wed, 9 Dec 2009 14:46:03 +0100 (CET) In-Reply-To: <4f3252890912090355n70a2b5cfu4fbb74d473480a94@mail.gmail.com> 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: Raymond Yau Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 9 Dec 2009 19:55:15 +0800, Raymond Yau wrote: > > 2009/12/8 Takashi Iwai > > > At Sat, 5 Dec 2009 10:17:07 +0800, > > Raymond Yau wrote: > > > > > > 2009/12/4 pl bossart > > > > > > > >> 17. hwptr 24351 buffer 16384 appl 24332, avail=16403 > > > > > > > > > > appl pointer is behind hwprtr ( underrun ) , need timestamp to find > > out > > > > > whether PA is unable to write audio data in time since > > > > > > > > I commented out the portion of the code that increases the watermark > > and > > > > clamped the number of available samples to the buffer size, and it > > works > > > > just fine, no audio > > > > underflows. > > > > > > > > > > Do you mean that the underrun is related the the portion of code that > > > increase the watermark (i.e It is a pulseaudio bug instead of driver bug > > ) > > > ? > > > > Or, we can try simply to change to periods_min = 2 whether this fixes > > the PA issues. > > > > periods_min = 1 is anyway fairly fragile. With that setup, apps are > > supposed (implicitly) to wake up frequently enough to get pointers in > > sync. This is because you can't trust whether the IRQ wake up is > > really fast enough. There are machines that aren't. > > > > > > thanks, > > > > Takashi > > > > The intel8x0 driver has code to handle one period per buffer , Yes, but it doesn't work so reliably. That's why I asked for testing periods_min = 2. > Is the feature "one period per buffer" designed for dmix ? No. > The system timer may be running faster or slower than the sound card > on differnt machine Yes. > PA only adjust the watermark/sleeping time in one direction only Yes. thanks, Takashi