linux-mips
[Top] [All Lists]

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

To: Jaroslav Kysela <perex@suse.cz>
Subject: Re: Trouble with sound/mips/au1x00.c AC97 driver
From: Freddy Spierenburg <freddy@dusktilldawn.nl>
Date: Mon, 16 Apr 2007 16:47:52 +0200
Cc: Marco Braga <marco.braga@gmail.com>, Charles Eidsness <charles@cooper-street.com>, linux-mips@linux-mips.org
In-reply-to: <45F5DC73.9060004@cooper-street.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070307104930.GD25248@dusktilldawn.nl> <d459bb380703082322r18879381ma4c57149a8b7adfe@mail.gmail.com> <45F350E9.3020208@cooper-street.com> <d459bb380703120157wb3dde00p4c232e300e82fd3d@mail.gmail.com> <d459bb380703120259r53889966xd8af623ff01ef297@mail.gmail.com> <45F5DC73.9060004@cooper-street.com>
Sender: linux-mips-bounce@linux-mips.org
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 <freddy@dusktilldawn.nl>

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
results.

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 <freddy@dusktilldawn.nl>  http://freddy.snarl.nl/
GnuPG: 0x7941D1E1=C948 5851 26D2 FA5C 39F1  E588 6F17 FD5D 7941 D1E1
$ # Please read http://www.ietf.org/rfc/rfc2015.txt 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 <=