From: Takashi Iwai Subject: Re: underruns and strange code in pcm_rate.c (and patch) Date: Thu, 08 Nov 2007 07:25:49 +0100 Message-ID: References: <472E5A64.6010705@aknet.ru> <473091F4.80105@aknet.ru> <473206A7.1000305@aknet.ru> <4732C87E.8000706@aknet.ru> <4732D339.5060509@aknet.ru> 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 1723724841 for ; Thu, 8 Nov 2007 10:37:01 +0100 (CET) In-Reply-To: <4732D339.5060509@aknet.ru> 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: Stas Sergeev Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 08 Nov 2007 12:13:29 +0300, Stas Sergeev wrote: > > 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. Yeah, but it's the case of partial writes again, i.e. when apps cannot write a full period size. When apps check its availability via poll, the hack isn't triggered. Takashi