If the sequencer device for a card is requested unsuccessfully (e.g.
"pmidi -l" when a USB MIDI device isn't yet connected), the device is
plugged in, and then the device is accessed, ALSA doesn't load the
sequencer driver.

The reason for this is that snd_seq_client_use_ptr() assumes that the
sequencer driver cannot be loaded when the card driver has failed to load
before.

This patch removes the "!card_requested" protection from the call to
snd_seq_device_load_drivers().


-- 
Clemens


Index: core/seq/seq_clientmgr.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_clientmgr.c,v
retrieving revision 1.15
diff -u -r1.15 seq_clientmgr.c
--- core/seq/seq_clientmgr.c    13 Aug 2002 16:13:34 -0000      1.15
+++ core/seq/seq_clientmgr.c    14 Oct 2002 09:34:21 -0000
@@ -152,9 +152,11 @@
                        }
                } else if (clientid >= 64 && clientid < 128) {
                        int card = (clientid - 64) / 8;
-                       if (card < snd_ecards_limit && ! card_requested[card]) {
-                               card_requested[card] = 1;
-                               snd_request_card(card);
+                       if (card < snd_ecards_limit) {
+                               if (! card_requested[card]) {
+                                       card_requested[card] = 1;
+                                       snd_request_card(card);
+                               }
                                snd_seq_device_load_drivers();
                        }
                }



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to