From: Takashi Iwai Subject: Re: rate plugin issue Date: Mon, 19 Nov 2007 12:09:58 +0100 Message-ID: References: <4738A89D.9060601@aknet.ru> <473B561A.1050203@aknet.ru> <473F01E9.8070907@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 (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 6BDAF24877 for ; Mon, 19 Nov 2007 12:30:56 +0100 (CET) In-Reply-To: <473F01E9.8070907@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 Sat, 17 Nov 2007 17:59:53 +0300, Stas Sergeev wrote: > > > And above all, the fix would be really easy like the patch below. > Your patch works very well. > Actually, much better than mine, for > the reasons I can't explain (there is > probably another similar loop somewhere, > otherwise they would work in the similar > way). > Just a few questions: > 1. Do you want to "round" avail_min only > when it is < period_size, or maybe you > want something like this instead: > --- > avail_min += period_size - 1; > avail_min -= avail_min % period_size; > --- > so that it is always rounded up? A good question. I'm a kind of conservative about that. avail_min itself doesn't guarantee the timing accuracy, so it's no driver/system problem even if the app is woken up slightly after the exact time. But it's very unlikely that this round-up would break anything, though. > 2. What is it really good for? Why would > the one want avail_min != period_size? > Now, after you disallow avail_min it makes even less sense - why would > someone set avail_min>period_size, instead > of increasing the period_size itself? > So maybe something like this is also > possible: > --- > /* there seem to be no reason to set avail_min, > * period_size is enough */ > avail_min = period_size; > --- Changing period_size isn't allowed arbitrarilly because it's a hardware constraint. OTOH, avail_min is the software parameter. So avail_min > period_size makes sense in some cases. In my patch I disallowed the case avail_min < period_size because it doesn't work *practically*. > > Then which version of mpg123 with which configuration? > But I am not sure if you tried _any_ > mpg123 with any configuration. :) Well, one of my versions on my machine has even no ALSA support. thanks, Takashi