[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Alsa issues on 2.6.5 ppc (was G3 iBook resume kernel oops ...)



On 20/04/2004 at 20:36, Kiko Piris wrote:

> The question is that now with pbbuttonsd, I can not reproduce the oops,
> it resumes perfectly from sleep (even with the setmixer... stuff in
> pbbuttonsd Script_ProfChanged).
> 
> It could be that, as you point, pmud was slightly faster than pbbutonsd
> calling the script on wakeup; and that's why now kernel does not crash.

Hi everyone

obi_wan posted the attached patch on alsa-bugtracking page
(https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=192)

I've compiled it myself, and I see no differences at all. Let's go by
parts:


Oops:
-----

The patch is supposed to fix the oops of myself and the OP who started
this thread (CC'ed).

As I can no longer reproduce the oops, I couldn't tell if it really
fixes it or not :-/.

James, if you compiled your own kernel, could you test if this patch
fixes it.

If anyone else is also having this oops, could he/she test it.


Mixer errors requiring to restart alsa:
---------------------------------------

The patch is also supposed to fix this. The fact is that it makes no
difference to me as I'm having the same problems with the too low volume
that other people described here just today (and restarting alsa makes
no diference at all).

To sum up, if anyone is willing to test it, I suppose alsa people will
welcome any feedback you can provide. If you post it here (on
debian-powerpc, I can update Alsa bugtracking system).

Thanks in advance.


---8<---
diff -Nurd linux-2.6.5/sound/ppc/keywest.c ../k-t/linux-2.6.5/sound/ppc/keywest.c
--- linux-2.6.5/sound/ppc/keywest.c	2004-04-04 05:38:19.000000000 +0200
+++ ../k-t/linux-2.6.5/sound/ppc/keywest.c	2004-04-12 17:38:09.000000000 +0200
@@ -79,12 +79,7 @@
 
 	new_client->id = keywest_ctx->id++; /* Automatically unique */
 	keywest_ctx->client = new_client;
-
-	if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) {
-		snd_printk(KERN_ERR "tumbler: cannot initialize the MCS\n");
-		goto __err;
-	}
-
+	
 	/* Tell the i2c layer a new client has arrived */
 	if (i2c_attach_client(new_client)) {
 		snd_printk(KERN_ERR "tumbler: cannot attach i2c client\n");
@@ -121,6 +116,17 @@
 	}
 }
 
+int __init snd_pmac_tumbler_post_init(void)
+{
+	int err;
+	
+	if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) {
+		snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err);
+		return err;
+	}
+	return 0;
+}
+
 /* exported */
 int __init snd_pmac_keywest_init(pmac_keywest_t *i2c)
 {
diff -Nurd linux-2.6.5/sound/ppc/pmac.h ../k-t/linux-2.6.5/sound/ppc/pmac.h
--- linux-2.6.5/sound/ppc/pmac.h	2004-04-04 05:37:36.000000000 +0200
+++ ../k-t/linux-2.6.5/sound/ppc/pmac.h	2004-04-12 17:39:48.000000000 +0200
@@ -180,6 +180,7 @@
 int snd_pmac_burgundy_init(pmac_t *chip);
 int snd_pmac_daca_init(pmac_t *chip);
 int snd_pmac_tumbler_init(pmac_t *chip);
+int snd_pmac_tumbler_post_init(void);
 
 /* i2c functions */
 typedef struct snd_pmac_keywest {
diff -Nurd linux-2.6.5/sound/ppc/powermac.c ../k-t/linux-2.6.5/sound/ppc/powermac.c
--- linux-2.6.5/sound/ppc/powermac.c	2004-04-04 05:38:25.000000000 +0200
+++ ../k-t/linux-2.6.5/sound/ppc/powermac.c	2004-04-12 17:09:58.000000000 +0200
@@ -104,7 +104,7 @@
 		sprintf(card->shortname, "PowerMac %s", name_ext);
 		sprintf(card->longname, "%s (Dev %d) Sub-frame %d",
 			card->shortname, chip->device_id, chip->subframe);
-		if ((err = snd_pmac_tumbler_init(chip)) < 0)
+		if ( snd_pmac_tumbler_init(chip) < 0 || snd_pmac_tumbler_post_init() < 0)
 			goto __error;
 		break;
 	case PMAC_AWACS:
--->8---

-- 
Kiko



Reply to: