aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-11-20 08:08:28 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:29:20 -0500
commit204bdb1b50013c7aa3922d8b66df943123087bd8 (patch)
tree9e1721fe87bd960d497dfbb7a3abe9ddb57e5365 /sound/core/seq
parent332682b1cd540dd7abbbbfc1905af8139e76e1b7 (diff)
[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 <clemens@ladisch.de>
Diffstat (limited to 'sound/core/seq')
-rw-r--r--sound/core/seq/seq_clientmgr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index c8bd37ee8375..95bd5ae92b92 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)
157 } 157 }
158 } 158 }
159 } else if (clientid >= 64 && clientid < 128) { 159 } else if (clientid >= 64 && clientid < 128) {
160 int card = (clientid - 64) / 8; 160 int card = (clientid - 64) / 4;
161 if (card < snd_ecards_limit) { 161 if (card < snd_ecards_limit) {
162 if (! card_requested[card]) { 162 if (! card_requested[card]) {
163 card_requested[card] = 1; 163 card_requested[card] = 1;
@@ -2208,12 +2208,12 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
2208 2208
2209 if (callback == NULL) 2209 if (callback == NULL)
2210 return -EINVAL; 2210 return -EINVAL;
2211 if (card && client_index > 7) 2211 if (card && client_index > 3)
2212 return -EINVAL; 2212 return -EINVAL;
2213 if (card == NULL && client_index > 63) 2213 if (card == NULL && client_index > 63)
2214 return -EINVAL; 2214 return -EINVAL;
2215 if (card) 2215 if (card)
2216 client_index += 64 + (card->number << 3); 2216 client_index += 64 + (card->number << 2);
2217 2217
2218 if (down_interruptible(&register_mutex)) 2218 if (down_interruptible(&register_mutex))
2219 return -ERESTARTSYS; 2219 return -ERESTARTSYS;