From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: underruns and strange code in pcm_rate.c (and patch) Date: Thu, 08 Nov 2007 12:13:29 +0300 Message-ID: <4732D339.5060509@aknet.ru> References: <472E5A64.6010705@aknet.ru> <473091F4.80105@aknet.ru> <473206A7.1000305@aknet.ru> <4732C87E.8000706@aknet.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.aknet.ru (mail.AKNET.ru [77.246.241.226]) by alsa0.perex.cz (Postfix) with ESMTP id 1C6F42480E for ; Thu, 8 Nov 2007 10:12:14 +0100 (CET) In-Reply-To: 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: Takashi Iwai Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Hello. Takashi Iwai wrote: > Not really. It checks appl_ptr of the client, not hw_ptr. appl_ptr > is what app writes. So, as long as app writes only the period size, > the hack isn't triggered. No, its not that simple. When the partially filled period on slave appears, it then gets populated back. Namely, snd_pcm_write_areas() takes it via snd_pcm_avail_update(). It then adjusts the "frames" accordingly, and then also "size" gets infected. Then the hack triggers.