Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Advanced Linux Sound Architecture |
| 3 | * Copyright (c) by Jaroslav Kysela <perex@suse.cz> |
| 4 | * |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #include <sound/driver.h> |
| 23 | #include <linux/init.h> |
| 24 | #include <linux/slab.h> |
| 25 | #include <linux/time.h> |
| 26 | #include <linux/moduleparam.h> |
| 27 | #include <sound/core.h> |
| 28 | #include <sound/minors.h> |
| 29 | #include <sound/info.h> |
| 30 | #include <sound/version.h> |
| 31 | #include <sound/control.h> |
| 32 | #include <sound/initval.h> |
| 33 | #include <linux/kmod.h> |
| 34 | #include <linux/devfs_fs_kernel.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
| 36 | #define SNDRV_OS_MINORS 256 |
| 37 | |
| 38 | static int major = CONFIG_SND_MAJOR; |
| 39 | int snd_major; |
| 40 | static int cards_limit = 1; |
| 41 | static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO; |
| 42 | |
| 43 | MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); |
| 44 | MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards."); |
| 45 | MODULE_LICENSE("GPL"); |
| 46 | module_param(major, int, 0444); |
| 47 | MODULE_PARM_DESC(major, "Major # for sound driver."); |
| 48 | module_param(cards_limit, int, 0444); |
| 49 | MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards."); |
| 50 | #ifdef CONFIG_DEVFS_FS |
| 51 | module_param(device_mode, int, 0444); |
| 52 | MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs."); |
| 53 | #endif |
| 54 | MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); |
| 55 | |
| 56 | /* this one holds the actual max. card number currently available. |
| 57 | * as default, it's identical with cards_limit option. when more |
| 58 | * modules are loaded manually, this limit number increases, too. |
| 59 | */ |
| 60 | int snd_ecards_limit; |
| 61 | |
| 62 | static struct list_head snd_minors_hash[SNDRV_CARDS]; |
| 63 | |
| 64 | static DECLARE_MUTEX(sound_mutex); |
| 65 | |
gregkh@suse.de | 619e666 | 2005-03-23 09:51:41 -0800 | [diff] [blame] | 66 | extern struct class *sound_class; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | |
| 68 | |
| 69 | #ifdef CONFIG_KMOD |
| 70 | |
| 71 | /** |
| 72 | * snd_request_card - try to load the card module |
| 73 | * @card: the card number |
| 74 | * |
| 75 | * Tries to load the module "snd-card-X" for the given card number |
| 76 | * via KMOD. Returns immediately if already loaded. |
| 77 | */ |
| 78 | void snd_request_card(int card) |
| 79 | { |
| 80 | int locked; |
| 81 | |
| 82 | if (! current->fs->root) |
| 83 | return; |
| 84 | read_lock(&snd_card_rwlock); |
| 85 | locked = snd_cards_lock & (1 << card); |
| 86 | read_unlock(&snd_card_rwlock); |
| 87 | if (locked) |
| 88 | return; |
| 89 | if (card < 0 || card >= cards_limit) |
| 90 | return; |
| 91 | request_module("snd-card-%i", card); |
| 92 | } |
| 93 | |
| 94 | static void snd_request_other(int minor) |
| 95 | { |
| 96 | char *str; |
| 97 | |
| 98 | if (! current->fs->root) |
| 99 | return; |
| 100 | switch (minor) { |
| 101 | case SNDRV_MINOR_SEQUENCER: str = "snd-seq"; break; |
| 102 | case SNDRV_MINOR_TIMER: str = "snd-timer"; break; |
| 103 | default: return; |
| 104 | } |
| 105 | request_module(str); |
| 106 | } |
| 107 | |
| 108 | #endif /* request_module support */ |
| 109 | |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 110 | static struct snd_minor *snd_minor_search(int minor) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | { |
| 112 | struct list_head *list; |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 113 | struct snd_minor *mptr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | |
| 115 | list_for_each(list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]) { |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 116 | mptr = list_entry(list, struct snd_minor, list); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | if (mptr->number == minor) |
| 118 | return mptr; |
| 119 | } |
| 120 | return NULL; |
| 121 | } |
| 122 | |
| 123 | static int snd_open(struct inode *inode, struct file *file) |
| 124 | { |
| 125 | int minor = iminor(inode); |
| 126 | int card = SNDRV_MINOR_CARD(minor); |
| 127 | int dev = SNDRV_MINOR_DEVICE(minor); |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 128 | struct snd_minor *mptr = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | struct file_operations *old_fops; |
| 130 | int err = 0; |
| 131 | |
Clemens Ladisch | 3939e71 | 2005-10-24 17:02:03 +0200 | [diff] [blame] | 132 | if (dev != SNDRV_MINOR_GLOBAL) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | if (snd_cards[card] == NULL) { |
| 134 | #ifdef CONFIG_KMOD |
| 135 | snd_request_card(card); |
| 136 | if (snd_cards[card] == NULL) |
| 137 | #endif |
| 138 | return -ENODEV; |
| 139 | } |
| 140 | } else { |
| 141 | #ifdef CONFIG_KMOD |
| 142 | if ((mptr = snd_minor_search(minor)) == NULL) |
| 143 | snd_request_other(minor); |
| 144 | #endif |
| 145 | } |
| 146 | if (mptr == NULL && (mptr = snd_minor_search(minor)) == NULL) |
| 147 | return -ENODEV; |
| 148 | old_fops = file->f_op; |
| 149 | file->f_op = fops_get(mptr->f_ops); |
| 150 | if (file->f_op->open) |
| 151 | err = file->f_op->open(inode, file); |
| 152 | if (err) { |
| 153 | fops_put(file->f_op); |
| 154 | file->f_op = fops_get(old_fops); |
| 155 | } |
| 156 | fops_put(old_fops); |
| 157 | return err; |
| 158 | } |
| 159 | |
| 160 | static struct file_operations snd_fops = |
| 161 | { |
| 162 | .owner = THIS_MODULE, |
| 163 | .open = snd_open |
| 164 | }; |
| 165 | |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 166 | static int snd_kernel_minor(int type, struct snd_card *card, int dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 167 | { |
| 168 | int minor; |
| 169 | |
| 170 | switch (type) { |
| 171 | case SNDRV_DEVICE_TYPE_SEQUENCER: |
| 172 | case SNDRV_DEVICE_TYPE_TIMER: |
| 173 | minor = type; |
| 174 | break; |
| 175 | case SNDRV_DEVICE_TYPE_CONTROL: |
| 176 | snd_assert(card != NULL, return -EINVAL); |
| 177 | minor = SNDRV_MINOR(card->number, type); |
| 178 | break; |
| 179 | case SNDRV_DEVICE_TYPE_HWDEP: |
| 180 | case SNDRV_DEVICE_TYPE_RAWMIDI: |
| 181 | case SNDRV_DEVICE_TYPE_PCM_PLAYBACK: |
| 182 | case SNDRV_DEVICE_TYPE_PCM_CAPTURE: |
| 183 | snd_assert(card != NULL, return -EINVAL); |
| 184 | minor = SNDRV_MINOR(card->number, type + dev); |
| 185 | break; |
| 186 | default: |
| 187 | return -EINVAL; |
| 188 | } |
| 189 | snd_assert(minor >= 0 && minor < SNDRV_OS_MINORS, return -EINVAL); |
| 190 | return minor; |
| 191 | } |
| 192 | |
| 193 | /** |
| 194 | * snd_register_device - Register the ALSA device file for the card |
| 195 | * @type: the device type, SNDRV_DEVICE_TYPE_XXX |
| 196 | * @card: the card instance |
| 197 | * @dev: the device index |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 198 | * @f_ops: the file operations |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 | * @name: the device file name |
| 200 | * |
| 201 | * Registers an ALSA device file for the given card. |
| 202 | * The operators have to be set in reg parameter. |
| 203 | * |
| 204 | * Retrurns zero if successful, or a negative error code on failure. |
| 205 | */ |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 206 | int snd_register_device(int type, struct snd_card *card, int dev, |
| 207 | struct file_operations *f_ops, const char *name) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | { |
| 209 | int minor = snd_kernel_minor(type, card, dev); |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 210 | struct snd_minor *preg; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 211 | struct device *device = NULL; |
| 212 | |
| 213 | if (minor < 0) |
| 214 | return minor; |
| 215 | snd_assert(name, return -EINVAL); |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 216 | preg = kzalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | if (preg == NULL) |
| 218 | return -ENOMEM; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 219 | preg->number = minor; |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 220 | preg->type = type; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 221 | preg->device = dev; |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 222 | preg->f_ops = f_ops; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 223 | strcpy(preg->name, name); |
| 224 | down(&sound_mutex); |
| 225 | if (snd_minor_search(minor)) { |
| 226 | up(&sound_mutex); |
| 227 | kfree(preg); |
| 228 | return -EBUSY; |
| 229 | } |
| 230 | list_add_tail(&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]); |
| 231 | if (strncmp(name, "controlC", 8) || card->number >= cards_limit) |
| 232 | devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); |
| 233 | if (card) |
| 234 | device = card->dev; |
Greg Kroah-Hartman | 53f4654 | 2005-10-27 22:25:43 -0700 | [diff] [blame] | 235 | class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | |
| 237 | up(&sound_mutex); |
| 238 | return 0; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * snd_unregister_device - unregister the device on the given card |
| 243 | * @type: the device type, SNDRV_DEVICE_TYPE_XXX |
| 244 | * @card: the card instance |
| 245 | * @dev: the device index |
| 246 | * |
| 247 | * Unregisters the device file already registered via |
| 248 | * snd_register_device(). |
| 249 | * |
| 250 | * Returns zero if sucecessful, or a negative error code on failure |
| 251 | */ |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 252 | int snd_unregister_device(int type, struct snd_card *card, int dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | { |
| 254 | int minor = snd_kernel_minor(type, card, dev); |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 255 | struct snd_minor *mptr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | |
| 257 | if (minor < 0) |
| 258 | return minor; |
| 259 | down(&sound_mutex); |
| 260 | if ((mptr = snd_minor_search(minor)) == NULL) { |
| 261 | up(&sound_mutex); |
| 262 | return -EINVAL; |
| 263 | } |
| 264 | |
| 265 | if (strncmp(mptr->name, "controlC", 8) || card->number >= cards_limit) /* created in sound.c */ |
| 266 | devfs_remove("snd/%s", mptr->name); |
gregkh@suse.de | 619e666 | 2005-03-23 09:51:41 -0800 | [diff] [blame] | 267 | class_device_destroy(sound_class, MKDEV(major, minor)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 268 | |
| 269 | list_del(&mptr->list); |
| 270 | up(&sound_mutex); |
| 271 | kfree(mptr); |
| 272 | return 0; |
| 273 | } |
| 274 | |
| 275 | /* |
| 276 | * INFO PART |
| 277 | */ |
| 278 | |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 279 | static struct snd_info_entry *snd_minor_info_entry = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 280 | |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 281 | static const char *snd_device_type_name(int type) |
| 282 | { |
| 283 | switch (type) { |
| 284 | case SNDRV_DEVICE_TYPE_CONTROL: |
| 285 | return "control"; |
| 286 | case SNDRV_DEVICE_TYPE_HWDEP: |
| 287 | return "hardware dependent"; |
| 288 | case SNDRV_DEVICE_TYPE_RAWMIDI: |
| 289 | return "raw midi"; |
| 290 | case SNDRV_DEVICE_TYPE_PCM_PLAYBACK: |
| 291 | return "digital audio playback"; |
| 292 | case SNDRV_DEVICE_TYPE_PCM_CAPTURE: |
| 293 | return "digital audio capture"; |
| 294 | case SNDRV_DEVICE_TYPE_SEQUENCER: |
| 295 | return "sequencer"; |
| 296 | case SNDRV_DEVICE_TYPE_TIMER: |
| 297 | return "timer"; |
| 298 | default: |
| 299 | return "?"; |
| 300 | } |
| 301 | } |
| 302 | |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 303 | static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 304 | { |
| 305 | int card, device; |
| 306 | struct list_head *list; |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 307 | struct snd_minor *mptr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | |
| 309 | down(&sound_mutex); |
| 310 | for (card = 0; card < SNDRV_CARDS; card++) { |
| 311 | list_for_each(list, &snd_minors_hash[card]) { |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 312 | mptr = list_entry(list, struct snd_minor, list); |
Clemens Ladisch | 3939e71 | 2005-10-24 17:02:03 +0200 | [diff] [blame] | 313 | if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_GLOBAL) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 314 | if ((device = mptr->device) >= 0) |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 315 | snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, snd_device_type_name(mptr->type)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 316 | else |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 317 | snd_iprintf(buffer, "%3i: [%i] : %s\n", mptr->number, card, snd_device_type_name(mptr->type)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | } else { |
Clemens Ladisch | 2af677f | 2005-11-20 14:03:48 +0100 | [diff] [blame^] | 319 | snd_iprintf(buffer, "%3i: : %s\n", mptr->number, snd_device_type_name(mptr->type)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 320 | } |
| 321 | } |
| 322 | } |
| 323 | up(&sound_mutex); |
| 324 | } |
| 325 | |
| 326 | int __init snd_minor_info_init(void) |
| 327 | { |
Takashi Iwai | 512bbd6 | 2005-11-17 13:51:18 +0100 | [diff] [blame] | 328 | struct snd_info_entry *entry; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | |
| 330 | entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL); |
| 331 | if (entry) { |
| 332 | entry->c.text.read_size = PAGE_SIZE; |
| 333 | entry->c.text.read = snd_minor_info_read; |
| 334 | if (snd_info_register(entry) < 0) { |
| 335 | snd_info_free_entry(entry); |
| 336 | entry = NULL; |
| 337 | } |
| 338 | } |
| 339 | snd_minor_info_entry = entry; |
| 340 | return 0; |
| 341 | } |
| 342 | |
| 343 | int __exit snd_minor_info_done(void) |
| 344 | { |
| 345 | if (snd_minor_info_entry) |
| 346 | snd_info_unregister(snd_minor_info_entry); |
| 347 | return 0; |
| 348 | } |
| 349 | |
| 350 | /* |
| 351 | * INIT PART |
| 352 | */ |
| 353 | |
| 354 | static int __init alsa_sound_init(void) |
| 355 | { |
| 356 | short controlnum; |
| 357 | int err; |
| 358 | int card; |
| 359 | |
| 360 | snd_major = major; |
| 361 | snd_ecards_limit = cards_limit; |
| 362 | for (card = 0; card < SNDRV_CARDS; card++) |
| 363 | INIT_LIST_HEAD(&snd_minors_hash[card]); |
| 364 | if ((err = snd_oss_init_module()) < 0) |
| 365 | return err; |
| 366 | devfs_mk_dir("snd"); |
| 367 | if (register_chrdev(major, "alsa", &snd_fops)) { |
| 368 | snd_printk(KERN_ERR "unable to register native major device number %d\n", major); |
| 369 | devfs_remove("snd"); |
| 370 | return -EIO; |
| 371 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 372 | if (snd_info_init() < 0) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 373 | unregister_chrdev(major, "alsa"); |
| 374 | devfs_remove("snd"); |
| 375 | return -ENOMEM; |
| 376 | } |
| 377 | snd_info_minor_register(); |
| 378 | for (controlnum = 0; controlnum < cards_limit; controlnum++) |
| 379 | devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); |
| 380 | #ifndef MODULE |
| 381 | printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n"); |
| 382 | #endif |
| 383 | return 0; |
| 384 | } |
| 385 | |
| 386 | static void __exit alsa_sound_exit(void) |
| 387 | { |
| 388 | short controlnum; |
| 389 | |
| 390 | for (controlnum = 0; controlnum < cards_limit; controlnum++) |
| 391 | devfs_remove("snd/controlC%d", controlnum); |
| 392 | |
| 393 | snd_info_minor_unregister(); |
| 394 | snd_info_done(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 395 | if (unregister_chrdev(major, "alsa") != 0) |
| 396 | snd_printk(KERN_ERR "unable to unregister major device number %d\n", major); |
| 397 | devfs_remove("snd"); |
| 398 | } |
| 399 | |
| 400 | module_init(alsa_sound_init) |
| 401 | module_exit(alsa_sound_exit) |
| 402 | |
| 403 | /* sound.c */ |
| 404 | EXPORT_SYMBOL(snd_major); |
| 405 | EXPORT_SYMBOL(snd_ecards_limit); |
| 406 | #if defined(CONFIG_KMOD) |
| 407 | EXPORT_SYMBOL(snd_request_card); |
| 408 | #endif |
| 409 | EXPORT_SYMBOL(snd_register_device); |
| 410 | EXPORT_SYMBOL(snd_unregister_device); |
| 411 | #if defined(CONFIG_SND_OSSEMUL) |
| 412 | EXPORT_SYMBOL(snd_register_oss_device); |
| 413 | EXPORT_SYMBOL(snd_unregister_oss_device); |
| 414 | #endif |
| 415 | /* memory.c */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 416 | EXPORT_SYMBOL(copy_to_user_fromio); |
| 417 | EXPORT_SYMBOL(copy_from_user_toio); |
| 418 | /* init.c */ |
| 419 | EXPORT_SYMBOL(snd_cards); |
| 420 | #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) |
| 421 | EXPORT_SYMBOL(snd_mixer_oss_notify_callback); |
| 422 | #endif |
| 423 | EXPORT_SYMBOL(snd_card_new); |
| 424 | EXPORT_SYMBOL(snd_card_disconnect); |
| 425 | EXPORT_SYMBOL(snd_card_free); |
| 426 | EXPORT_SYMBOL(snd_card_free_in_thread); |
| 427 | EXPORT_SYMBOL(snd_card_register); |
| 428 | EXPORT_SYMBOL(snd_component_add); |
| 429 | EXPORT_SYMBOL(snd_card_file_add); |
| 430 | EXPORT_SYMBOL(snd_card_file_remove); |
| 431 | #ifdef CONFIG_PM |
| 432 | EXPORT_SYMBOL(snd_power_wait); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | #endif |
| 434 | /* device.c */ |
| 435 | EXPORT_SYMBOL(snd_device_new); |
| 436 | EXPORT_SYMBOL(snd_device_register); |
| 437 | EXPORT_SYMBOL(snd_device_free); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 438 | /* isadma.c */ |
Al Viro | 276bd31 | 2005-08-23 22:45:06 +0100 | [diff] [blame] | 439 | #ifdef CONFIG_ISA_DMA_API |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 440 | EXPORT_SYMBOL(snd_dma_program); |
| 441 | EXPORT_SYMBOL(snd_dma_disable); |
| 442 | EXPORT_SYMBOL(snd_dma_pointer); |
| 443 | #endif |
| 444 | /* info.c */ |
| 445 | #ifdef CONFIG_PROC_FS |
| 446 | EXPORT_SYMBOL(snd_seq_root); |
| 447 | EXPORT_SYMBOL(snd_iprintf); |
| 448 | EXPORT_SYMBOL(snd_info_get_line); |
| 449 | EXPORT_SYMBOL(snd_info_get_str); |
| 450 | EXPORT_SYMBOL(snd_info_create_module_entry); |
| 451 | EXPORT_SYMBOL(snd_info_create_card_entry); |
| 452 | EXPORT_SYMBOL(snd_info_free_entry); |
| 453 | EXPORT_SYMBOL(snd_info_register); |
| 454 | EXPORT_SYMBOL(snd_info_unregister); |
| 455 | EXPORT_SYMBOL(snd_card_proc_new); |
| 456 | #endif |
| 457 | /* info_oss.c */ |
| 458 | #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) |
| 459 | EXPORT_SYMBOL(snd_oss_info_register); |
| 460 | #endif |
| 461 | /* control.c */ |
| 462 | EXPORT_SYMBOL(snd_ctl_new); |
| 463 | EXPORT_SYMBOL(snd_ctl_new1); |
| 464 | EXPORT_SYMBOL(snd_ctl_free_one); |
| 465 | EXPORT_SYMBOL(snd_ctl_add); |
| 466 | EXPORT_SYMBOL(snd_ctl_remove); |
| 467 | EXPORT_SYMBOL(snd_ctl_remove_id); |
| 468 | EXPORT_SYMBOL(snd_ctl_rename_id); |
| 469 | EXPORT_SYMBOL(snd_ctl_find_numid); |
| 470 | EXPORT_SYMBOL(snd_ctl_find_id); |
| 471 | EXPORT_SYMBOL(snd_ctl_notify); |
| 472 | EXPORT_SYMBOL(snd_ctl_register_ioctl); |
| 473 | EXPORT_SYMBOL(snd_ctl_unregister_ioctl); |
| 474 | #ifdef CONFIG_COMPAT |
| 475 | EXPORT_SYMBOL(snd_ctl_register_ioctl_compat); |
| 476 | EXPORT_SYMBOL(snd_ctl_unregister_ioctl_compat); |
| 477 | #endif |
| 478 | EXPORT_SYMBOL(snd_ctl_elem_read); |
| 479 | EXPORT_SYMBOL(snd_ctl_elem_write); |
| 480 | /* misc.c */ |
Takashi Iwai | b1d5776 | 2005-10-10 11:56:31 +0200 | [diff] [blame] | 481 | EXPORT_SYMBOL(release_and_free_resource); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 482 | #ifdef CONFIG_SND_VERBOSE_PRINTK |
| 483 | EXPORT_SYMBOL(snd_verbose_printk); |
| 484 | #endif |
| 485 | #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) |
| 486 | EXPORT_SYMBOL(snd_verbose_printd); |
| 487 | #endif |