[alsa-devel] [PATCH] ad1848 and cs4231 busy loop replacement

Krzysztof Helt krzysztof.h1 at gmail.com
Mon Sep 10 19:17:11 CEST 2007


On Sun, 09 Sep 2007 23:19:56 +0200
Rene Herman <rene.herman at gmail.com> wrote:

> On 09/09/2007 11:09 PM, Rene Herman wrote:
> 
> > Given that the only difference is that I wait less, yours would've 
> > worked as well -- thanks for looking into this! And could you viceversa 
> > test this on AD1848 and perhaps resubmit if you agree?
> 
> Oh, and I forgot to say (sigh) that I use a mdelay() and not an msleep() in 
> the ad1848 one due to the 1 ms being short enough and didn't keep the 
> snd_printd() because if one, then all please...
> 

I tested CS4231 on 450MHz sparc with 1000Hz kernel (I don't have PC card yet).
The waiting loop was changed as in my second patch (the 10ms blocks 
to schedule_timeout()). I played 48kHz wav (alsa "Front_Center.wav").

The waiting loop was passed 340 times after mce was down with msleep(1).
The delay between snd_printd "2 jiffies" and "8 jiffies" was 3 jiffies.

The waiting loop was passed 34 times after mce was down with msleep(2).
The delay between snd_printd "2 jiffies" and "8 jiffies" was 3 jiffies too.

It took about ten times less loop passes if the driver waits 2ms.
The 2ms seems like the optimal value for the CS4231.

Regards,
Krzysztof


More information about the Alsa-devel mailing list