From: Takashi Iwai Subject: Re: Driver code with mpc5200 pointer problem. Date: Tue, 28 Apr 2009 15:25:23 +0200 Message-ID: References: <9e4733910904270650g204d2660y7e3b9ea03446a752@mail.gmail.com> <20090427135737.GA20591@sirena.org.uk> <9e4733910904270702w317c8c62vbee38230979ad121@mail.gmail.com> <20090427140554.GB20591@sirena.org.uk> <9e4733910904270716v289e6d5exaf6e17331786ea11@mail.gmail.com> <20090427142437.GF20591@sirena.org.uk> <9e4733910904270742l751e660bg66844b98fe261f23@mail.gmail.com> <9e4733910904270804k6ed079d4h16b433b6f8a06fc7@mail.gmail.com> <20090427151512.GI20591@sirena.org.uk> 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 B809824478 for ; Tue, 28 Apr 2009 15:25:23 +0200 (CEST) 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: Jaroslav Kysela Cc: alsa-devel mailing list , Mark Brown List-Id: alsa-devel@alsa-project.org At Tue, 28 Apr 2009 14:02:01 +0200, I wrote: > > At Tue, 28 Apr 2009 13:30:09 +0200 (CEST), > Jaroslav Kysela wrote: > > > > On Tue, 28 Apr 2009, Takashi Iwai wrote: > > > > > At Tue, 28 Apr 2009 12:15:25 +0200 (CEST), > > > Jaroslav Kysela wrote: > > >> > > >> On Tue, 28 Apr 2009, Takashi Iwai wrote: > > >> > > >>> Well, I think it'd be better, at this moment for 2.6.30, to allow > > >>> problematic drivers to skip the jiffies check. Adding the fundamental > > >>> change at this late stage is bad, especially if the change wasn't > > >>> tested much by many others and has an influence on user-side API. > > >>> > > >>> So, as I proposed, we can simply add the pcm info check, and add > > >>> BATCH flag to needed drivers. Of course, it still requires some > > >>> more testing, but basically it'll take back to the old behavior and > > >>> should be safer. > > >>> > > >>> Meanwhile, applying the delay account patch now for 2.6.31 should be > > >>> good (ealier is better). It doesn't conflict with the info flag > > >>> check, so we can work parallel. > > >> > > >> Could we just add the runtime->delay variable without touching other code > > >> (pcm status), to correct the jiffies based check now? > > > > > > That's possible, of course. > > > > > >> It seems like a good > > >> step forward to me and the lowlevel drivers will be more prepared for next > > >> PCM midlevel code changes. > > > > > > Well, but I guess providing the proper FIFO size isn't trivial to each > > > driver. There are many devices, as Mark suggested, which may be > > > broken right now, and we can't determine all h/w specs and test them. > > > > > > OTOH, adding INFO_BATCH is fairly easy, because it can be found from > > > the pointer callback implementation of each driver. On these devices, > > > the jiffies check doesn't help much anyway because it cannot update > > > the hwptr any other than the period size. So, skipping jiffies check > > > is logically correct as a regression fix. > > > > I don't see much difference between adding INFO_BATCH and adding > > runtime->delay = (runtime->period_size)-1 to avoid jiffies check for one > > period to these drivers (with some notice to author of the driver to > > correct this value). > > INFO_BATCH is the correct flag for such drivers. They should have the > flag, independent from the fix. So fixed now on sound git tree. The drivers that can't report precise position have now INFO_BATCH flag. The workaround for jiffies check isn't applied yet. Just this flags, so far. Takashi