: M5451 (OSS trident.c) did not come out of reset
PATCH 1/1 : M5451 (OSS trident.c) did not come out of reset
Last time I booted 2.5, I noticed that my sound card no longer works. The card is:
00:06.0 Multimedia audio controller: Acer Laboratories Inc. [ALi] M5451 PCI AC-Link Controller Audio Device (rev 01)
And the computer is a thinkpad R30. It turns out that this patch, from Alan Cox on 01/11/2002, broke it for me, by failing ali_reset_5451 if the card doesn't come out of reset:
# --------------------------------------------
# 02/11/01 [email protected] 1.786.161.45
# [PATCH] some trident needs longer delays to power up codecs # --------------------------------------------
The 2.4 behaviour is to continue as usual even if the card doesn't come out of reset, because it's a non fatal error on at least some cards. This patch reverts the behaviour to the 2.4 behaviour, which works for me. If anyone knows how to tell for a given card whether this is a fatal error or not, please let me know and I'll update the patch.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1046 -> 1.1047
# sound/oss/trident.c 1.30 -> 1.31
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/02/18 [email protected] 1.1047
# The M5451 can sometimes not come out of reset.
# This is non fatal and it continues to work fine, so print a nasty message
# but don't fail the driver initialization. # -------------------------------------------- # diff -Nru a/sound/oss/trident.c b/sound/oss/trident.c --- a/sound/oss/trident.c Tue Feb 18 10:10:50 2003 +++ b/sound/oss/trident.c Tue Feb 18 10:10:50 2003 @@ -3933,8 +3933,10 @@ udelay(5000); }
- printk(KERN_ERR "ALi 5451 did not come out of reset.\n");
- return 1;
+ /* This is non fatal if you have a non PM capable codec.. */
+ printk(KERN_ERR "ALi 5451 did not come out of reset "
+ "- continuing anyway.\n");
+ return 0;
}
/* AC97 codec initialisation. */
Signature · 3 lines
Muli Ben-Yehuda http://www.mulix.org http://syscalltrack.sf.net
Quoted 6 lines · Muli Ben-Yehuda
The 2.4 behaviour is to continue as usual even if the card doesn't come out of reset, because it's a non fatal error on at least some cards. This patch reverts the behaviour to the 2.4 behaviour, which works for me. If anyone knows how to tell for a given card whether this is a fatal error or not, please let me know and I'll update the patch.
Looks fine. 2.4 went from short delay -> long with check -> long with check counted non fatal. The trick used to check the codec came up doesnt work for all codecs alas. Fix is fine
Alan
Quoted 9 lines · Muli Ben-Yehuda
Last time I booted 2.5, I noticed that my sound card no longer works. The card is:
00:06.0 Multimedia audio controller: Acer Laboratories Inc. [ALi] M5451 PCI AC-Link Controller Audio Device (rev 01)
And the computer is a thinkpad R30. It turns out that this patch, from Alan Cox on 01/11/2002, broke it for me, by failing
ali_reset_5451if the card doesn't come out of reset:
A similar change came in a 2.4.21pre-ac that broke sound on my Fujitsu P-2110. I patched it to return success even if it never appeared to come out of reset, and sound worked again. So that's another example.
Ian