Skip to contentSkip to conversation

2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS

DISCUSSION Andreas Schwab 2 participants 6 messages May 10, 2004 – May 16, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I've never been able to get a working sound with ALSA after booting my iBook G3 (dmasound is working fine). Any idea what's wrong with snd-powermac?

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#1 lore raw

At Tue, 11 May 2004 00:28:47 +0200,

Quoted 4 lines · Andreas Schwab

I've never been able to get a working sound with ALSA after booting my iBook G3 (dmasound is working fine). Any idea what's wrong with snd-powermac?

does the attached patch work? it's a partial patch from the latest ALSA cvs tree.
the problem seems like the initialization of i2c-keywest.

Takashi

sound/ppc/keywest.c +12 -6
@@ -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)
 {
sound/ppc/pmac.h +1 -0
@@ -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 {
sound/ppc/powermac.c +1 -1
@@ -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:
sound/ppc/tumbler.c +2 -0
@@ -684,6 +684,8 @@
 
 static int snapper_set_capture_source(pmac_tumbler_t *mix)
 {
+	if (! mix->i2c.client)
+		return -ENODEV;
 	return snd_pmac_keywest_write_byte(&mix->i2c, TAS_REG_ACS,
 					   mix->capture_source ? 2 : 0);
 }
#2 lore raw
Quoted 10 lines · Takashi Iwai

At Tue, 11 May 2004 00:28:47 +0200,

Quoted 4 lines · Andreas Schwab

I've never been able to get a working sound with ALSA after booting my iBook G3 (dmasound is working fine). Any idea what's wrong with snd-powermac?

does the attached patch work? it's a partial patch from the latest ALSA cvs tree.
the problem seems like the initialization of i2c-keywest.

I have now imported the alsa patch from 2.6.6-mm1 and the problem seems to be fixed.

Thanks, Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#3 lore raw
Quoted 9 lines · Andreas Schwab
Quoted 7 lines · Takashi Iwai

At Tue, 11 May 2004 00:28:47 +0200,

Quoted 4 lines · Andreas Schwab

I've never been able to get a working sound with ALSA after booting my iBook G3 (dmasound is working fine). Any idea what's wrong with snd-powermac?

Quoted 6 lines
Quoted 3 lines

does the attached patch work? it's a partial patch from the latest ALSA cvs tree.
the problem seems like the initialization of i2c-keywest.

I have now imported the alsa patch from 2.6.6-mm1 and the problem seems to be fixed.

Actually there are still similar problems when waking up:

kernel: tumbler_init_client error
kernel: ALSA sound/ppc/tumbler.c:589: failed to set mono volume 7 last message repeated 2 times
kernel: ALSA sound/ppc/tumbler.c:460: failed to set mono volume 1
kernel: ALSA sound/ppc/tumbler.c:460: failed to set mono volume 2
kernel: ALSA sound/ppc/tumbler.c:356: failed to set DRC
kernel: ALSA sound/ppc/tumbler.c:221: failed to set volume

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#4 lore raw

At Sat, 15 May 2004 18:36:35 +0200,

Quoted 21 lines · Andreas Schwab
Quoted 9 lines · Andreas Schwab
Quoted 7 lines · Takashi Iwai

At Tue, 11 May 2004 00:28:47 +0200,

Quoted 4 lines · Andreas Schwab

I've never been able to get a working sound with ALSA after booting my iBook G3 (dmasound is working fine). Any idea what's wrong with snd-powermac?

Quoted 6 lines
Quoted 3 lines

does the attached patch work? it's a partial patch from the latest ALSA cvs tree.
the problem seems like the initialization of i2c-keywest.

I have now imported the alsa patch from 2.6.6-mm1 and the problem seems to be fixed.

Actually there are still similar problems when waking up:

Quoted 7 lines

kernel: tumbler_init_client error
kernel: ALSA sound/ppc/tumbler.c:589: failed to set mono volume 7 last message repeated 2 times
kernel: ALSA sound/ppc/tumbler.c:460: failed to set mono volume 1
kernel: ALSA sound/ppc/tumbler.c:460: failed to set mono volume 2
kernel: ALSA sound/ppc/tumbler.c:356: failed to set DRC
kernel: ALSA sound/ppc/tumbler.c:221: failed to set volume

do you mean after suspend/resume?
then a similiar hack might be needed.

Takashi

#5 lore raw
Quoted 1 line · Takashi Iwai

do you mean after suspend/resume?

Yes.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."