From: Takashi Iwai Subject: Re: [patch] snd-pcsp fixes Date: Fri, 30 Oct 2009 13:27:38 +0100 Message-ID: References: <4ADF4827.8060608@aknet.ru> <4AEADA8F.8030408@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 mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id BA7C2103899 for ; Fri, 30 Oct 2009 13:27:40 +0100 (CET) In-Reply-To: <4AEADA8F.8030408@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 List-Id: alsa-devel@alsa-project.org At Fri, 30 Oct 2009 15:22:39 +0300, Stas Sergeev wrote: > > Hi. > > Takashi Iwai wrote: > > I applied the patch now as is, as I suppose you tested it well :) > Well, no! :) I only tested it on 2 > machines yet. Please give it more > testing if you can. OK, will check later. But I think it should be irrelevant with machine since it's the core part of hrtimer. > > I don't remember exactly the changes for pcsp driver right now, > > but the change of the initial delay was due to the change of start > > logic. At least, at the time HRTIMER_CB_IRQSAFE was removed, starting > > with zero didn't work at all on my machine. Maybe something got fixed > > in the core side. > OK, it would be nice if you can check > whether or not the problem is there on > that particular machine... Maybe I have no more that machine. Anyway, more testing would be needed. > > But, I still don't understand why it has to be zero. The first > > bit-flip is done inside the trigger-start, so the next wakeup should > > be after the calculated ns. Isn't it? > That was the logic you invented, but > initially, and with my patch, there > is no bitflip on start trigger. Or, > at least, not supposed to be - there > was only a timer mode setup, or if not - > that was a bug. :) OK, then we should revert the zero-delay logic again. The zero-delay start means to do the bitflip again immediately. This is wrong, of course. > Also, you added some caching variables: > > + unsigned int fmt_size; > + unsigned int is_signed; > > What was the intention? Is this a speed-up? > If not - reverting that too? It's for speeding up. We should minimize any calculations in the hrtimer callback. thanks, Takashi