[ALSA] dynamic minors (6/6): increase maximum number of sound cards

Modules: ALSA Core,Memalloc module,ALSA sequencer

With dynamic minor numbers, we can increase the number of sound cards.

This requires that the sequencer client numbers of some kernel drivers
are allocated dynamically, too.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
Clemens Ladisch
2005-11-20 14:09:05 +01:00
committed by Jaroslav Kysela
parent 204bdb1b50
commit d001544ded
6 changed files with 49 additions and 21 deletions

View File

@@ -105,6 +105,8 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
int register1 = -1, register2 = -1;
struct device *carddev = NULL;
if (card && card->number >= 8)
return 0; /* ignore silently */
if (minor < 0)
return minor;
preg = kmalloc(sizeof(struct snd_minor), GFP_KERNEL);
@@ -162,6 +164,8 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
int track2 = -1;
struct snd_minor *mptr;
if (card && card->number >= 8)
return 0;
if (minor < 0)
return minor;
down(&sound_oss_mutex);