Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | /* * ALSA sequencer main module * Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@home.nl> * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include <sound/driver.h> #include <linux/init.h> #include <sound/core.h> #include <sound/initval.h> #include <sound/seq_kernel.h> #include "seq_clientmgr.h" #include "seq_memory.h" #include "seq_queue.h" #include "seq_lock.h" #include "seq_timer.h" #include "seq_system.h" #include "seq_info.h" #include <sound/seq_device.h> int snd_seq_client_load[64] = {[0 ... 63] = -1}; int snd_seq_default_timer_class = SNDRV_TIMER_CLASS_GLOBAL; int snd_seq_default_timer_sclass = SNDRV_TIMER_SCLASS_NONE; int snd_seq_default_timer_card = -1; int snd_seq_default_timer_device = SNDRV_TIMER_GLOBAL_SYSTEM; int snd_seq_default_timer_subdevice = 0; int snd_seq_default_timer_resolution = 0; /* Hz */ MODULE_AUTHOR("Frank van de Pol <fvdpol@home.nl>, Jaroslav Kysela <perex@suse.cz>"); MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer."); MODULE_LICENSE("GPL"); MODULE_CLASSES("{sound}"); MODULE_SUPPORTED_DEVICE("sound"); MODULE_PARM(snd_seq_client_load, "i"); MODULE_PARM_DESC(snd_seq_client_load, "The numbers of global (system) clients to load through kmod."); MODULE_PARM(snd_seq_default_timer_class, "i"); MODULE_PARM_DESC(snd_seq_default_timer_class, "The default timer class."); MODULE_PARM(snd_seq_default_timer_sclass, "i"); MODULE_PARM_DESC(snd_seq_default_timer_sclass, "The default timer slave class."); MODULE_PARM(snd_seq_default_timer_card, "i"); MODULE_PARM_DESC(snd_seq_default_timer_card, "The default timer card number."); MODULE_PARM(snd_seq_default_timer_device, "i"); MODULE_PARM_DESC(snd_seq_default_timer_device, "The default timer device number."); MODULE_PARM(snd_seq_default_timer_subdevice, "i"); MODULE_PARM_DESC(snd_seq_default_timer_subdevice, "The default timer subdevice number."); MODULE_PARM(snd_seq_default_timer_resolution, "i"); MODULE_PARM_DESC(snd_seq_default_timer_resolution, "The default timer resolution in Hz."); /* * INIT PART */ static int __init alsa_seq_init(void) { int err; if ((err = client_init_data()) < 0) return err; /* init memory, room for selected events */ if ((err = snd_sequencer_memory_init()) < 0) return err; /* init event queues */ if ((err = snd_seq_queues_init()) < 0) return err; /* register sequencer device */ if ((err = snd_sequencer_device_init()) < 0) return err; /* register proc interface */ if ((err = snd_seq_info_init()) < 0) return err; /* register our internal client */ if ((err = snd_seq_system_client_init()) < 0) return err; return 0; } static void __exit alsa_seq_exit(void) { /* unregister our internal client */ snd_seq_system_client_done(); /* unregister proc interface */ snd_seq_info_done(); /* delete timing queues */ snd_seq_queues_delete(); /* unregister sequencer device */ snd_sequencer_device_done(); /* release event memory */ snd_sequencer_memory_done(); } 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); /* 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(__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 |