Update of /cvsroot/alsa/alsa-kernel/ppc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16927
Modified Files:
keywest.c pmac.h powermac.c tumbler.c
Log Message:
fixed the oops on resume and the initialization of chip.
Index: keywest.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/ppc/keywest.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- keywest.c 25 Sep 2003 18:55:43 -0000 1.16
+++ keywest.c 23 Apr 2004 14:18:25 -0000 1.17
@@ -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)
{
Index: pmac.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/ppc/pmac.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- pmac.h 15 Apr 2004 16:23:18 -0000 1.13
+++ pmac.h 23 Apr 2004 14:18:25 -0000 1.14
@@ -179,6 +179,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 {
Index: powermac.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/ppc/powermac.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- powermac.c 7 Apr 2004 17:48:22 -0000 1.16
+++ powermac.c 23 Apr 2004 14:18:25 -0000 1.17
@@ -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:
Index: tumbler.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/ppc/tumbler.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- tumbler.c 9 Mar 2004 16:58:22 -0000 1.29
+++ tumbler.c 23 Apr 2004 14:18:25 -0000 1.30
@@ -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);
}
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog