From 204bdb1b50013c7aa3922d8b66df943123087bd8 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 20 Nov 2005 14:08:28 +0100 Subject: [ALSA] dynamic minors (5/6): reduce maximum number of MIDI devices per card Modules: ALSA sequencer,Generic drivers To allow increasing the maximum number of sound cards, we have to limit the number of sequencer clients per card because client numbers are still allocated statically. Reducing the number of clients to four limits the number of sequencer MIDI ports to 1024 per card. Signed-off-by: Clemens Ladisch --- sound/core/seq/seq_clientmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/core/seq') diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index c8bd37ee837..95bd5ae92b9 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -157,7 +157,7 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid) } } } else if (clientid >= 64 && clientid < 128) { - int card = (clientid - 64) / 8; + int card = (clientid - 64) / 4; if (card < snd_ecards_limit) { if (! card_requested[card]) { card_requested[card] = 1; @@ -2208,12 +2208,12 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index, if (callback == NULL) return -EINVAL; - if (card && client_index > 7) + if (card && client_index > 3) return -EINVAL; if (card == NULL && client_index > 63) return -EINVAL; if (card) - client_index += 64 + (card->number << 3); + client_index += 64 + (card->number << 2); if (down_interruptible(®ister_mutex)) return -ERESTARTSYS; -- cgit v1.2.3