linux-mips
[Top] [All Lists]

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

To: linux-mips@linux-mips.org
Subject: Re: Trouble with sound/mips/au1x00.c AC97 driver
From: "Marco Braga" <marco.braga@gmail.com>
Date: Mon, 12 Mar 2007 10:59:09 +0100
Cc: charles@cooper-street.com, "Freddy Spierenburg" <freddy@dusktilldawn.nl>
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=C6lKQpHSGshHgMFxoUuwLUByQlLqik0HMgDRwRurNU+bL78XJuhDYUtOQ0PaYGPPJQVRprecmt6pI3/d3FWlRp/C8FKGvrMuvTeU5ZF6VqOI3ib2ArnxCLBZoRcxRRJs28RywGulR5ktQQkCFCgmL0pn+kswtS8UUr/zRbqyQe8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ClT/M8xYnu2IgFW2tlJhw5yOAJWmXfWIjN3MOFAbBmlQp4+YEXp2lixy+J4n2i90A4OC+cDHkq/QIWMMzWulLrN7U/bduxhdl2g2462JwHmBJhMsNahytTsA8AKSv3iWhHuuWNb2fKmBet9RPNbkBKlPBirMI+Iirw3KOe3y8AU=
In-reply-to: <d459bb380703120157wb3dde00p4c232e300e82fd3d@mail.gmail.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>
Sender: linux-mips-bounce@linux-mips.org
Hello,

I've added to: "snd_au1000_ac97_new" the lines:

au1000->ac97_ioport->config = AC97C_SG | AC97C_SYNC;
udelay(100);
au1000->ac97_ioport->config = 0x0;

after the cold reset, as you suggested. Sadly this did not solve the problem.

It seems that the only solution I have at the moment is to add a longer delay between hard reset and warm reset. I've changed the "udelay(10)" to a "mdelay(250)" (I know, it is a huge delay) but now the module is loaded perfectly every time. Now I'll try to reduce the delay and find the min.
I don't know if this issue is related to our board or if you can explain it.

What about the spin_lock_irqsave stuff? Do you suggest to leave them in or it is better to return to the old simple spin_lock?


2007/3/12, Marco Braga <marco.braga@gmail.com>:
Hi Charles, just a quick note: the "spin_lock_irqrestore" should be "spin_unlock_irqrestore". Anyway, the changed does not solve my problem (I've also tried the change in au1000_ac97_write).
As you see in the logs at the end of the email, it seems that module loading has random results. I've managed to follow the problem to line 606, when it calls "snd_ac97_mixer". This call often returns an error.

I'll try with the resets now..


-- LOG: ------------------------------------------------

# modprobe snd_au1x00
[  584.704000] AC'97 0 does not respond - RESET
[  584.717000] AC'97 0 access error (not audio or modem codec)
insmod: cannot insert '/lib/modules/2.6.17.14/kernel/sound/mips/snd-au1x00.ko':
Success (13): Success
modprobe: failed to load module snd_au1x00

# modprobe snd_au1x00
[ 1345.967000] AC'97 0 does not respond - RESET
[ 1345.980000] AC'97 0 access error (not audio or modem codec)
insmod: cannot insert '/lib/modules/2.6.17.14/kernel/sound/mips/snd-au1x00.ko':
Success (13): Success
modprobe: failed to load module snd_au1x00

# modprobe snd_au1x00
[ 1351.211000] AC'97 0 does not respond - RESET
[ 1351.224000] AC'97 0 access error (not audio or modem codec)
insmod: cannot insert '/lib/modules/2.6.17.14/kernel/sound/mips/snd- au1x00.ko':
Success (13): Success
modprobe: failed to load module snd_au1x00

# modprobe snd_au1x00
[ 1355.471000] AC'97 0 analog subsections not ready
[ 1355.497000] ALSA AC97: Driver Initialized

# modprobe snd_au1x00
[ 1361.837000] ALSA AC97: Driver Initialized

# modprobe snd_au1x00
[ 1365.403000] AC'97 0 analog subsections not ready
[ 1365.428000] ALSA AC97: Driver Initialized

# modprobe snd_au1x00
[ 1369.037000] ALSA AC97: Driver Initialized

# modprobe snd_au1x00
[ 1372.374000] ALSA AC97: Driver Initialized



<Prev in Thread] Current Thread [Next in Thread>