[Top] [All Lists]

Re: Trouble with sound/mips/au1x00.c AC97 driver

To: Jaroslav Kysela <>
Subject: Re: Trouble with sound/mips/au1x00.c AC97 driver
From: Freddy Spierenburg <>
Date: Mon, 16 Apr 2007 16:47:52 +0200
Cc: Marco Braga <>, Charles Eidsness <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <>
User-agent: Mutt/1.5.13 (2006-08-11)
Hi Jaroslav,

Please find attached a patch that fixes some known problems
currently part of the au1x00 ALSA audio driver.

Signed-off-by: Freddy Spierenburg <>

Below is a small time explanation of why the patch is needed.

On Mon, Mar 12, 2007 at 07:04:19PM -0400, Charles Eidsness wrote:
> I wonder if the AC'97 Controller has to be up for at least one
> frame before issuing the cold reset. Each frame is 20.8us, you
> could try setting that delay to 25us instead of 500ms.

The 10us delay indeed is not enough. 25us gives way better
results. Combining it with...

> Sergei on the mailing list had a good suggestion as well. You could try 
> replacing every udelay with an au_sync_udelay, and each mdelay with an 
> au_sync_delay.

...Sergei his suggestion, and more importantly...

> I think that spin_lock_irqsave stuff might fix the problem that Freddy 
> has

...replacing spin_lock() by spin_lock_irqsave() gives me good

Still not perfectly, but way better than it was. Using the Python
audio-script I've attached to this email I've loaded and unloaded
the driver 4033 times and it failed 6 times on me. Failing means
one control is missing or a control features the wrong settings.
If this happens the Python script tries to load the driver again
and in all of my tests succeeds right away.

$ cat ~/.signature
Freddy Spierenburg <>
GnuPG: 0x7941D1E1=C948 5851 26D2 FA5C 39F1  E588 6F17 FD5D 7941 D1E1
$ # Please read before complain!

Attachment: au1x00.patch
Description: Text Data

Attachment: audio
Description: Text document

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Trouble with sound/mips/au1x00.c AC97 driver, Freddy Spierenburg <=