From: Takashi Iwai Subject: Re: hw_ptr accuracy with intel8x0 -> PulseAudio issue Date: Tue, 08 Dec 2009 14:21:28 +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> 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 (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 04A8A103856 for ; Tue, 8 Dec 2009 14:21:29 +0100 (CET) In-Reply-To: <4f3252890912041817u7ab83a3eh7643476d64d709f3@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 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