From: Takashi Iwai <tiwai@suse.de>
To: Andreas Schwab <schwab@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.6: ALSA sound/ppc/keywest.c:84: tumbler: cannot initialize the MCS
Date: Tue, 11 May 2004 16:25:05 +0200 [thread overview]
Message-ID: <s5hu0yndose.wl@alsa2.suse.de> (raw)
In-Reply-To: <m3y8nzgbmo.fsf@whitebox.m5r.de>
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);
}
next prev parent reply other threads:[~2004-05-11 14:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hu0yndose.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox