LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS
@ 2004-05-10 22:28 Andreas Schwab
  2004-05-11 14:25 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2004-05-10 22:28 UTC (permalink / raw)
  To: linux-kernel

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.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
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."

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

* Re: 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS
  2004-05-10 22:28 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS Andreas Schwab
@ 2004-05-11 14:25 ` Takashi Iwai
  2004-05-12 19:54   ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2004-05-11 14:25 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linux-kernel

At Tue, 11 May 2004 00:28:47 +0200,
Andreas Schwab wrote:
> 
> 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


--- linux/sound/ppc/keywest.c	2004-04-06 23:51:33.000000000 +0200
+++ linux/sound/ppc/keywest.c	2004-04-23 16:13:03.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)
 {
--- linux/sound/ppc/pmac.h	2004-04-06 23:51:33.000000000 +0200
+++ linux/sound/ppc/pmac.h	2004-04-23 16:13:03.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 {
--- linux/sound/ppc/powermac.c	2004-04-06 23:51:33.000000000 +0200
+++ linux/sound/ppc/powermac.c	2004-04-23 16:13:03.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:
--- linux/sound/ppc/tumbler.c	2004-04-06 23:51:33.000000000 +0200
+++ linux/sound/ppc/tumbler.c	2004-04-23 16:14:45.000000000 +0200
@@ -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);
 }

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

* Re: 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS
  2004-05-11 14:25 ` Takashi Iwai
@ 2004-05-12 19:54   ` Andreas Schwab
  2004-05-15 16:36     ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2004-05-12 19:54 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-kernel

Takashi Iwai <tiwai@suse.de> writes:

> At Tue, 11 May 2004 00:28:47 +0200,
> Andreas Schwab wrote:
>> 
>> 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.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
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."

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

* Re: 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS
  2004-05-12 19:54   ` Andreas Schwab
@ 2004-05-15 16:36     ` Andreas Schwab
  2004-05-16 15:07       ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2004-05-15 16:36 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-kernel

Andreas Schwab <schwab@suse.de> writes:

> Takashi Iwai <tiwai@suse.de> writes:
>
>> At Tue, 11 May 2004 00:28:47 +0200,
>> Andreas Schwab wrote:
>>> 
>>> 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.

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.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
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."

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

* Re: 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS
  2004-05-15 16:36     ` Andreas Schwab
@ 2004-05-16 15:07       ` Takashi Iwai
  2004-05-16 15:50         ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2004-05-16 15:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linux-kernel

At Sat, 15 May 2004 18:36:35 +0200,
Andreas Schwab wrote:
> 
> Andreas Schwab <schwab@suse.de> writes:
> 
> > Takashi Iwai <tiwai@suse.de> writes:
> >
> >> At Tue, 11 May 2004 00:28:47 +0200,
> >> Andreas Schwab wrote:
> >>> 
> >>> 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.
> 
> 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 

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


Takashi

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

* Re: 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS
  2004-05-16 15:07       ` Takashi Iwai
@ 2004-05-16 15:50         ` Andreas Schwab
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2004-05-16 15:50 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-kernel

Takashi Iwai <tiwai@suse.de> writes:

> do you mean after suspend/resume?

Yes.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
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."

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

end of thread, other threads:[~2004-05-16 15:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-10 22:28 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS Andreas Schwab
2004-05-11 14:25 ` Takashi Iwai
2004-05-12 19:54   ` Andreas Schwab
2004-05-15 16:36     ` Andreas Schwab
2004-05-16 15:07       ` Takashi Iwai
2004-05-16 15:50         ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).