Update of /cvsroot/alsa/alsa-kernel/core In directory sc8-pr-cvs1:/tmp/cvs-serv3283/core
Modified Files: sound.c Log Message: - cards_limit=1 as default instead of 8. - cards_limit means the number of auto-loaded cards. not limits the actual card numbers for manual loading (e.g. hotplug). Index: sound.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/sound.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- sound.c 23 Oct 2003 14:34:52 -0000 1.51 +++ sound.c 29 Oct 2003 16:33:06 -0000 1.52 @@ -36,7 +36,7 @@ static int major = CONFIG_SND_MAJOR; int snd_major; -static int cards_limit = SNDRV_CARDS; +static int cards_limit = 1; #ifdef CONFIG_DEVFS_FS static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO; #endif @@ -50,7 +50,7 @@ MODULE_PARM_DESC(major, "Major # for sound driver."); MODULE_PARM_SYNTAX(major, "default:116,skill:devel"); MODULE_PARM(cards_limit, "i"); -MODULE_PARM_DESC(cards_limit, "Count of soundcards installed in the system."); +MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards."); MODULE_PARM_SYNTAX(cards_limit, "default:8,skill:advanced"); #ifdef CONFIG_DEVFS_FS MODULE_PARM(device_mode, "i"); @@ -58,6 +58,10 @@ MODULE_PARM_SYNTAX(device_mode, "default:0666,base:8"); #endif +/* this one holds the actual max. card number currently available. + * as default, it's identical with cards_limit option. when more + * modules are loaded manually, this limit number increases, too. + */ int snd_ecards_limit; static struct list_head snd_minors_hash[SNDRV_CARDS]; @@ -224,7 +228,7 @@ } list_add_tail(&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]); #ifdef CONFIG_DEVFS_FS - if (strncmp(name, "controlC", 8)) /* created in sound.c */ + if (strncmp(name, "controlC", 8) || card->number >= cards_limit) devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); #endif up(&sound_mutex); @@ -257,6 +261,8 @@ #ifdef CONFIG_DEVFS_FS if (strncmp(mptr->name, "controlC", 8)) /* created in sound.c */ devfs_remove("snd/%s", mptr->name); + else if (card->number >= cards_limit) + devfs_remove("snd/%s", mptr->name); /* manualy created */ #endif list_del(&mptr->list); up(&sound_mutex); ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog