Skip to contentSkip to conversation

CVS: alsa-kernel/core/seq seq_clientmgr.c,1.50,1.51

alsa-cvslog Thierry Vignaud 1 participant 1 message Nov 21, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · Clemens Ladisch

Update of /cvsroot/alsa/alsa-kernel/core/seq
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2283/alsa-kernel/core/seq

Modified Files:
seq_clientmgr.c
Log Message:
Summary: dynamic minors (5/6): reduce maximum number of MIDI devices per card

Quoted 6 lines

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.

defining MAX_MIDI_DEVICES to 4 and using either MAX_MIDI_DEVICES, (MAX_MIDI_DEVICES-1), or (MAX_MIDI_DEVICES/2-1), ... would be better instead

Quoted 22 lines

Index: seq_clientmgr.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_clientmgr.c,v retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51

seq_clientmgr.c +1 -2
@@ -157,7 +157,7 @@
 				}
 			}
 		} 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 @@
 
 	if (callback == NULL)
 		return -EINVAL;
-	if (card && client_index > 7)

seq_clientmgr.c line 2219

Quoted 10 lines
seq_clientmgr.c +2 -1
+	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(&register_mutex))
 		return -ERESTARTSYS;

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click