Skip to contentSkip to conversation

Fix for ALSA AC'97 Init not working in post 2.6.7 mm-kernels

PATCH In review Stefan Schweizer 2 participants 3 messages Aug 11, 2004 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for ALSA AC'97 Init not working in post 2.6.7 mm-kernels

Hi,

I noticed that my soundcad stopped working in the mm-kernels after 2.6.7. The kernel log produces this message:

AC'97 0 does not respond - RESET

I grepped for it in the mm-patch and reverted the mm-changes there, that fixed it for me.
I do not know what the change in the code is useful for but it breaks my soundcard
Intel Corp. 82801BA/BAM AC'97 Audio (rev 05)
driver snd-intel8x0

My Revert-fix-patch:
--- linux-2.6.8-rc4-mm1/sound/pci/ac97/ac97_codec.c.orig

2004-08-11 20:07:12.359531728 +0200
+++ linux-2.6.8-rc4-mm1/sound/pci/ac97/ac97_codec.c     2004-08-11
20:07:24.743649056 +0200
@@ -1891,14 +1891,8 @@
                bus->ops->wait(ac97);
        else {
                udelay(50);

- if (ac97->scaps & AC97_SCAP_SKIP_AUDIO)
- err = ac97_reset_wait(ac97, HZ/2, 1);
- else {
- err = ac97_reset_wait(ac97, HZ/2, 0);
- if (err < 0)
- err = ac97_reset_wait(ac97, 0, 1);

-               }
-               if (err < 0) {
+               if (ac97_reset_wait(ac97, HZ/2, 0) < 0 &&
+                   ac97_reset_wait(ac97, HZ/2, 1) < 0) {
                        snd_printk(KERN_WARNING "AC'97 %d does not
respond - RESET\n", ac97->num);
                        /* proceed anyway - it's often non-critical */
                }
#1 lore raw
Quoted 9 lines · Stefan Schweizer

Hi,

I noticed that my soundcad stopped working in the mm-kernels after 2.6.7. The kernel log produces this message:

AC'97 0 does not respond - RESET

I grepped for it in the mm-patch and reverted the mm-changes there, that fixed it for me.

Could you try this patch?

Index: ac97_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v retrieving revision 1.143

ac97_codec.c +1 -1
diff -u -r1.143 ac97_codec.c
@@ -1898,7 +1898,7 @@
 		else {
 			err = ac97_reset_wait(ac97, HZ/2, 0);
 			if (err < 0)
-				err = ac97_reset_wait(ac97, 0, 1);
+				err = ac97_reset_wait(ac97, HZ/2, 1);
 		}
 		if (err < 0) {
 			snd_printk(KERN_WARNING "AC'97 %d does not respond - RESET\n", ac97->num);

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 1 line

Could you try this patch?

Thank you, your works too.