I'm facing some problems passing the ALSA drivers' parameters from the kernel command line.
When I try to specify the ID string for the card (snd-sgalaxy=1,0,Waverider,0x220,0x530,10,3), the kernel just reboots immediately, even before printing anything! But when I leave the ID string unspecified (snd-sgalaxy=1,0,,0x220,0x530,10,3), it boots and works fine, and the card gets the default "Galaxy" ID. I believe this has something to do with the kmalloc() call in the get_id() function in the initval.h include file. Perhaps kmalloc() can not be used at this early boot stage?!? I fixed it by replacing kmalloc() with alloc_bootmem(), and now it works, but there's probably a better way to do it! Does this make any sense? Is this a known bug? Is this a bug, at all? Thanks. Here's the diff: --- initval.h.orig Tue Dec 23 16:56:26 2003 +++ initval.h Tue Dec 23 18:00:10 2003 @@ -136,25 +136,23 @@ #if defined(SNDRV_GET_ID) && !defined(MODULE) #include <linux/ctype.h> #include <linux/init.h> +#include <linux/bootmem.h> static int __init get_id(char **str, char **dst) { - char *s, *d; + char *s; if (!(*str) || !(**str)) return 0; for (s = *str; isalpha(*s) || isdigit(*s) || *s == '_'; s++); if (s != *str) { - *dst = (char *)kmalloc((s - *str) + 1, GFP_KERNEL); - s = *str; d = *dst; - while (isalpha(*s) || isdigit(*s) || *s == '_') { - if (d != NULL) - *d++ = *s; - s++; - } - if (d != NULL) + char *d = alloc_bootmem(s - *str + 1); + if (d != NULL) { + *dst = d; + while (s != *str) *d++ = *(*str)++; *d = '\0'; + } else + *str = s; } - *str = s; if (*s == ',') { (*str)++; return 2; -- André Batista de Oliveira http://mega.ist.utl.pt/~abo ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel