mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]: M5451 (OSS trident.c) did not come out of reset
@ 2003-02-18 15:11 Muli Ben-Yehuda
  2003-02-18 16:56 ` Alan Cox
  2003-02-19 14:25 ` Ian Soboroff
  0 siblings, 2 replies; 3+ messages in thread
From: Muli Ben-Yehuda @ 2003-02-18 15:11 UTC (permalink / raw)
  To: Linux-Kernel; +Cc: Alan Cox

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	alan@lxorguk.ukuu.org.uk	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	mulix@alhambra.mulix.org	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. */







-- 
Muli Ben-Yehuda
http://www.mulix.org
http://syscalltrack.sf.net


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: M5451 (OSS trident.c) did not come out of reset
  2003-02-18 15:11 [PATCH]: M5451 (OSS trident.c) did not come out of reset Muli Ben-Yehuda
@ 2003-02-18 16:56 ` Alan Cox
  2003-02-19 14:25 ` Ian Soboroff
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2003-02-18 16:56 UTC (permalink / raw)
  To: Muli Ben-Yehuda; +Cc: Linux Kernel Mailing List

On Tue, 2003-02-18 at 15:11, Muli Ben-Yehuda wrote:

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: M5451 (OSS trident.c) did not come out of reset
  2003-02-18 15:11 [PATCH]: M5451 (OSS trident.c) did not come out of reset Muli Ben-Yehuda
  2003-02-18 16:56 ` Alan Cox
@ 2003-02-19 14:25 ` Ian Soboroff
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Soboroff @ 2003-02-19 14:25 UTC (permalink / raw)
  To: linux-kernel

Muli Ben-Yehuda <mulix@mulix.org> writes:

> 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:

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-19 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-18 15:11 [PATCH]: M5451 (OSS trident.c) did not come out of reset Muli Ben-Yehuda
2003-02-18 16:56 ` Alan Cox
2003-02-19 14:25 ` Ian Soboroff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®