fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / sound / core / seq / seq.c
index f8d6293..2f0d877 100644 (file)
 #include <sound/seq_device.h>
 
 #if defined(CONFIG_SND_SEQ_DUMMY_MODULE)
-int seq_client_load[64] = {[0] = SNDRV_SEQ_CLIENT_DUMMY, [1 ... 63] = -1};
+int seq_client_load[15] = {[0] = SNDRV_SEQ_CLIENT_DUMMY, [1 ... 14] = -1};
 #else
-int seq_client_load[64] = {[0 ... 63] = -1};
+int seq_client_load[15] = {[0 ... 14] = -1};
 #endif
 int seq_default_timer_class = SNDRV_TIMER_CLASS_GLOBAL;
 int seq_default_timer_sclass = SNDRV_TIMER_SCLASS_NONE;
 int seq_default_timer_card = -1;
-int seq_default_timer_device = SNDRV_TIMER_GLOBAL_SYSTEM;
+int seq_default_timer_device =
+#ifdef CONFIG_SND_SEQ_RTCTIMER_DEFAULT
+       SNDRV_TIMER_GLOBAL_RTC
+#else
+       SNDRV_TIMER_GLOBAL_SYSTEM
+#endif
+       ;
 int seq_default_timer_subdevice = 0;
 int seq_default_timer_resolution = 0;  /* Hz */
 
@@ -51,8 +57,7 @@ MODULE_AUTHOR("Frank van de Pol <fvdpol@coil.demon.nl>, Jaroslav Kysela <perex@s
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer.");
 MODULE_LICENSE("GPL");
 
-static int boot_devs;
-module_param_array(seq_client_load, int, boot_devs, 0444);
+module_param_array(seq_client_load, int, NULL, 0444);
 MODULE_PARM_DESC(seq_client_load, "The numbers of global (system) clients to load through kmod.");
 module_param(seq_default_timer_class, int, 0644);
 MODULE_PARM_DESC(seq_default_timer_class, "The default timer class.");
@@ -71,35 +76,37 @@ MODULE_PARM_DESC(seq_default_timer_resolution, "The default timer resolution in
  *  INIT PART
  */
 
-
 static int __init alsa_seq_init(void)
 {
        int err;
 
+       snd_seq_autoload_lock();
        if ((err = client_init_data()) < 0)
-               return err;
+               goto error;
 
        /* init memory, room for selected events */
        if ((err = snd_sequencer_memory_init()) < 0)
-               return err;
+               goto error;
 
        /* init event queues */
        if ((err = snd_seq_queues_init()) < 0)
-               return err;
+               goto error;
 
        /* register sequencer device */
        if ((err = snd_sequencer_device_init()) < 0)
-               return err;
+               goto error;
 
        /* register proc interface */
        if ((err = snd_seq_info_init()) < 0)
-               return err;
+               goto error;
 
        /* register our internal client */
        if ((err = snd_seq_system_client_init()) < 0)
-               return err;
+               goto error;
 
-       return 0;
+ error:
+       snd_seq_autoload_unlock();
+       return err;
 }
 
 static void __exit alsa_seq_exit(void)
@@ -122,25 +129,3 @@ static void __exit alsa_seq_exit(void)
 
 module_init(alsa_seq_init)
 module_exit(alsa_seq_exit)
-
-  /* seq_clientmgr.c */
-EXPORT_SYMBOL(snd_seq_create_kernel_client);
-EXPORT_SYMBOL(snd_seq_delete_kernel_client);
-EXPORT_SYMBOL(snd_seq_kernel_client_enqueue);
-EXPORT_SYMBOL(snd_seq_kernel_client_enqueue_blocking);
-EXPORT_SYMBOL(snd_seq_kernel_client_dispatch);
-EXPORT_SYMBOL(snd_seq_kernel_client_ctl);
-EXPORT_SYMBOL(snd_seq_kernel_client_write_poll);
-EXPORT_SYMBOL(snd_seq_set_queue_tempo);
-  /* seq_memory.c */
-EXPORT_SYMBOL(snd_seq_expand_var_event);
-EXPORT_SYMBOL(snd_seq_dump_var_event);
-  /* seq_ports.c */
-EXPORT_SYMBOL(snd_seq_event_port_attach);
-EXPORT_SYMBOL(snd_seq_event_port_detach);
-  /* seq_lock.c */
-#if defined(CONFIG_SMP) || defined(CONFIG_SND_DEBUG)
-/*EXPORT_SYMBOL(snd_seq_sleep_in_lock);*/
-/*EXPORT_SYMBOL(snd_seq_sleep_timeout_in_lock);*/
-EXPORT_SYMBOL(snd_use_lock_sync_helper);
-#endif