blob: 2f6108deb2116e434d1c55f6f8308706c91b0ac0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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>
Takashi Iwai9a1a2a12005-11-22 15:46:41 +010026#include <linux/device.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#include <linux/moduleparam.h>
28#include <sound/core.h>
29#include <sound/minors.h>
30#include <sound/info.h>
31#include <sound/version.h>
32#include <sound/control.h>
33#include <sound/initval.h>
34#include <linux/kmod.h>
35#include <linux/devfs_fs_kernel.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
37#define SNDRV_OS_MINORS 256
38
39static int major = CONFIG_SND_MAJOR;
40int snd_major;
41static int cards_limit = 1;
42static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO;
43
44MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
45MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards.");
46MODULE_LICENSE("GPL");
47module_param(major, int, 0444);
48MODULE_PARM_DESC(major, "Major # for sound driver.");
49module_param(cards_limit, int, 0444);
50MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards.");
51#ifdef CONFIG_DEVFS_FS
52module_param(device_mode, int, 0444);
53MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs.");
54#endif
55MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR);
56
57/* this one holds the actual max. card number currently available.
58 * as default, it's identical with cards_limit option. when more
59 * modules are loaded manually, this limit number increases, too.
60 */
61int snd_ecards_limit;
62
Clemens Ladisch6983b722005-11-20 14:05:49 +010063static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
Linus Torvalds1da177e2005-04-16 15:20:36 -070064static DECLARE_MUTEX(sound_mutex);
65
gregkh@suse.de619e6662005-03-23 09:51:41 -080066extern struct class *sound_class;
Linus Torvalds1da177e2005-04-16 15:20:36 -070067
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 */
78void 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
94static 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
Clemens Ladischf87135f2005-11-20 14:06:59 +0100110/**
111 * snd_lookup_minor_data - get user data of a registered device
112 * @minor: the minor number
113 * @type: device type (SNDRV_DEVICE_TYPE_XXX)
114 *
115 * Checks that a minor device with the specified type is registered, and returns
116 * its user data pointer.
117 */
118void *snd_lookup_minor_data(unsigned int minor, int type)
119{
120 struct snd_minor *mreg;
121 void *private_data;
122
123 if (minor > ARRAY_SIZE(snd_minors))
124 return NULL;
125 down(&sound_mutex);
126 mreg = snd_minors[minor];
127 if (mreg && mreg->type == type)
128 private_data = mreg->private_data;
129 else
130 private_data = NULL;
131 up(&sound_mutex);
132 return private_data;
133}
134
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135static int snd_open(struct inode *inode, struct file *file)
136{
Clemens Ladisch332682b2005-11-20 14:07:47 +0100137 unsigned int minor = iminor(inode);
Takashi Iwai512bbd62005-11-17 13:51:18 +0100138 struct snd_minor *mptr = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139 struct file_operations *old_fops;
140 int err = 0;
141
Clemens Ladisch332682b2005-11-20 14:07:47 +0100142 if (minor > ARRAY_SIZE(snd_minors))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143 return -ENODEV;
Clemens Ladisch332682b2005-11-20 14:07:47 +0100144 mptr = snd_minors[minor];
145 if (mptr == NULL) {
146#ifdef CONFIG_KMOD
147 int dev = SNDRV_MINOR_DEVICE(minor);
148 if (dev == SNDRV_MINOR_CONTROL) {
149 /* /dev/aloadC? */
150 int card = SNDRV_MINOR_CARD(minor);
151 if (snd_cards[card] == NULL)
152 snd_request_card(card);
153 } else if (dev == SNDRV_MINOR_GLOBAL) {
154 /* /dev/aloadSEQ */
155 snd_request_other(minor);
156 }
157#ifndef CONFIG_SND_DYNAMIC_MINORS
158 /* /dev/snd/{controlC?,seq} */
159 mptr = snd_minors[minor];
160 if (mptr == NULL)
161#endif
162#endif
163 return -ENODEV;
164 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165 old_fops = file->f_op;
166 file->f_op = fops_get(mptr->f_ops);
167 if (file->f_op->open)
168 err = file->f_op->open(inode, file);
169 if (err) {
170 fops_put(file->f_op);
171 file->f_op = fops_get(old_fops);
172 }
173 fops_put(old_fops);
174 return err;
175}
176
177static struct file_operations snd_fops =
178{
179 .owner = THIS_MODULE,
180 .open = snd_open
181};
182
Clemens Ladisch332682b2005-11-20 14:07:47 +0100183#ifdef CONFIG_SND_DYNAMIC_MINORS
184static int snd_find_free_minor(void)
185{
186 int minor;
187
188 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) {
189 /* skip minors still used statically for autoloading devices */
190 if (SNDRV_MINOR_DEVICE(minor) == SNDRV_MINOR_CONTROL ||
191 minor == SNDRV_MINOR_SEQUENCER)
192 continue;
193 if (!snd_minors[minor])
194 return minor;
195 }
196 return -EBUSY;
197}
198#else
Takashi Iwai512bbd62005-11-17 13:51:18 +0100199static int snd_kernel_minor(int type, struct snd_card *card, int dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200{
201 int minor;
202
203 switch (type) {
204 case SNDRV_DEVICE_TYPE_SEQUENCER:
205 case SNDRV_DEVICE_TYPE_TIMER:
206 minor = type;
207 break;
208 case SNDRV_DEVICE_TYPE_CONTROL:
209 snd_assert(card != NULL, return -EINVAL);
210 minor = SNDRV_MINOR(card->number, type);
211 break;
212 case SNDRV_DEVICE_TYPE_HWDEP:
213 case SNDRV_DEVICE_TYPE_RAWMIDI:
214 case SNDRV_DEVICE_TYPE_PCM_PLAYBACK:
215 case SNDRV_DEVICE_TYPE_PCM_CAPTURE:
216 snd_assert(card != NULL, return -EINVAL);
217 minor = SNDRV_MINOR(card->number, type + dev);
218 break;
219 default:
220 return -EINVAL;
221 }
222 snd_assert(minor >= 0 && minor < SNDRV_OS_MINORS, return -EINVAL);
223 return minor;
224}
Clemens Ladisch332682b2005-11-20 14:07:47 +0100225#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226
227/**
228 * snd_register_device - Register the ALSA device file for the card
229 * @type: the device type, SNDRV_DEVICE_TYPE_XXX
230 * @card: the card instance
231 * @dev: the device index
Clemens Ladisch2af677f2005-11-20 14:03:48 +0100232 * @f_ops: the file operations
Clemens Ladischf87135f2005-11-20 14:06:59 +0100233 * @private_data: user pointer for f_ops->open()
Linus Torvalds1da177e2005-04-16 15:20:36 -0700234 * @name: the device file name
235 *
236 * Registers an ALSA device file for the given card.
237 * The operators have to be set in reg parameter.
238 *
239 * Retrurns zero if successful, or a negative error code on failure.
240 */
Clemens Ladisch2af677f2005-11-20 14:03:48 +0100241int snd_register_device(int type, struct snd_card *card, int dev,
Clemens Ladischf87135f2005-11-20 14:06:59 +0100242 struct file_operations *f_ops, void *private_data,
243 const char *name)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700244{
Clemens Ladisch332682b2005-11-20 14:07:47 +0100245 int minor;
Takashi Iwai512bbd62005-11-17 13:51:18 +0100246 struct snd_minor *preg;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700247 struct device *device = NULL;
Clemens Ladisch416c1072005-12-07 09:11:05 +0100248 struct class_device *class_device = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700249
Linus Torvalds1da177e2005-04-16 15:20:36 -0700250 snd_assert(name, return -EINVAL);
Clemens Ladisch6983b722005-11-20 14:05:49 +0100251 preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252 if (preg == NULL)
253 return -ENOMEM;
Clemens Ladisch2af677f2005-11-20 14:03:48 +0100254 preg->type = type;
Clemens Ladisch6983b722005-11-20 14:05:49 +0100255 preg->card = card ? card->number : -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256 preg->device = dev;
Clemens Ladisch2af677f2005-11-20 14:03:48 +0100257 preg->f_ops = f_ops;
Clemens Ladischf87135f2005-11-20 14:06:59 +0100258 preg->private_data = private_data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700259 strcpy(preg->name, name);
260 down(&sound_mutex);
Clemens Ladisch332682b2005-11-20 14:07:47 +0100261#ifdef CONFIG_SND_DYNAMIC_MINORS
262 minor = snd_find_free_minor();
263#else
264 minor = snd_kernel_minor(type, card, dev);
265 if (minor >= 0 && snd_minors[minor])
266 minor = -EBUSY;
267#endif
268 if (minor < 0) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700269 up(&sound_mutex);
270 kfree(preg);
Clemens Ladisch332682b2005-11-20 14:07:47 +0100271 return minor;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272 }
Clemens Ladisch6983b722005-11-20 14:05:49 +0100273 snd_minors[minor] = preg;
274 if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700275 devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
Clemens Ladisch416c1072005-12-07 09:11:05 +0100276 if (card) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700277 device = card->dev;
Clemens Ladisch416c1072005-12-07 09:11:05 +0100278 class_device = card->parent_device;
279 }
280 class_device = class_device_create(sound_class, class_device,
281 MKDEV(major, minor), device,
282 "%s", name);
283 if (type == SNDRV_DEVICE_TYPE_CONTROL)
284 card->parent_device = class_device;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700285
286 up(&sound_mutex);
287 return 0;
288}
289
290/**
291 * snd_unregister_device - unregister the device on the given card
292 * @type: the device type, SNDRV_DEVICE_TYPE_XXX
293 * @card: the card instance
294 * @dev: the device index
295 *
296 * Unregisters the device file already registered via
297 * snd_register_device().
298 *
299 * Returns zero if sucecessful, or a negative error code on failure
300 */
Takashi Iwai512bbd62005-11-17 13:51:18 +0100301int snd_unregister_device(int type, struct snd_card *card, int dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700302{
Clemens Ladischf87135f2005-11-20 14:06:59 +0100303 int cardnum, minor;
Takashi Iwai512bbd62005-11-17 13:51:18 +0100304 struct snd_minor *mptr;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700305
Clemens Ladischf87135f2005-11-20 14:06:59 +0100306 cardnum = card ? card->number : -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700307 down(&sound_mutex);
Clemens Ladischf87135f2005-11-20 14:06:59 +0100308 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor)
309 if ((mptr = snd_minors[minor]) != NULL &&
310 mptr->type == type &&
311 mptr->card == cardnum &&
312 mptr->device == dev)
313 break;
314 if (minor == ARRAY_SIZE(snd_minors)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700315 up(&sound_mutex);
316 return -EINVAL;
317 }
318
Clemens Ladisch6983b722005-11-20 14:05:49 +0100319 if (mptr->type != SNDRV_DEVICE_TYPE_CONTROL ||
320 mptr->card >= cards_limit) /* created in sound.c */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321 devfs_remove("snd/%s", mptr->name);
gregkh@suse.de619e6662005-03-23 09:51:41 -0800322 class_device_destroy(sound_class, MKDEV(major, minor));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700323
Clemens Ladisch6983b722005-11-20 14:05:49 +0100324 snd_minors[minor] = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700325 up(&sound_mutex);
326 kfree(mptr);
327 return 0;
328}
329
Takashi Iwaie28563c2005-12-01 10:42:42 +0100330#ifdef CONFIG_PROC_FS
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331/*
332 * INFO PART
333 */
334
Takashi Iwai512bbd62005-11-17 13:51:18 +0100335static struct snd_info_entry *snd_minor_info_entry = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700336
Clemens Ladisch2af677f2005-11-20 14:03:48 +0100337static const char *snd_device_type_name(int type)
338{
339 switch (type) {
340 case SNDRV_DEVICE_TYPE_CONTROL:
341 return "control";
342 case SNDRV_DEVICE_TYPE_HWDEP:
343 return "hardware dependent";
344 case SNDRV_DEVICE_TYPE_RAWMIDI:
345 return "raw midi";
346 case SNDRV_DEVICE_TYPE_PCM_PLAYBACK:
347 return "digital audio playback";
348 case SNDRV_DEVICE_TYPE_PCM_CAPTURE:
349 return "digital audio capture";
350 case SNDRV_DEVICE_TYPE_SEQUENCER:
351 return "sequencer";
352 case SNDRV_DEVICE_TYPE_TIMER:
353 return "timer";
354 default:
355 return "?";
356 }
357}
358
Takashi Iwai512bbd62005-11-17 13:51:18 +0100359static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360{
Clemens Ladisch6983b722005-11-20 14:05:49 +0100361 int minor;
Takashi Iwai512bbd62005-11-17 13:51:18 +0100362 struct snd_minor *mptr;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700363
364 down(&sound_mutex);
Clemens Ladisch6983b722005-11-20 14:05:49 +0100365 for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) {
366 if (!(mptr = snd_minors[minor]))
367 continue;
368 if (mptr->card >= 0) {
369 if (mptr->device >= 0)
Clemens Ladischd0015442005-11-20 14:09:05 +0100370 snd_iprintf(buffer, "%3i: [%2i-%2i]: %s\n",
Clemens Ladisch6983b722005-11-20 14:05:49 +0100371 minor, mptr->card, mptr->device,
372 snd_device_type_name(mptr->type));
373 else
Clemens Ladischd0015442005-11-20 14:09:05 +0100374 snd_iprintf(buffer, "%3i: [%2i] : %s\n",
Clemens Ladisch6983b722005-11-20 14:05:49 +0100375 minor, mptr->card,
376 snd_device_type_name(mptr->type));
377 } else
Clemens Ladischd0015442005-11-20 14:09:05 +0100378 snd_iprintf(buffer, "%3i: : %s\n", minor,
Clemens Ladisch6983b722005-11-20 14:05:49 +0100379 snd_device_type_name(mptr->type));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700380 }
381 up(&sound_mutex);
382}
383
384int __init snd_minor_info_init(void)
385{
Takashi Iwai512bbd62005-11-17 13:51:18 +0100386 struct snd_info_entry *entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700387
388 entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL);
389 if (entry) {
390 entry->c.text.read_size = PAGE_SIZE;
391 entry->c.text.read = snd_minor_info_read;
392 if (snd_info_register(entry) < 0) {
393 snd_info_free_entry(entry);
394 entry = NULL;
395 }
396 }
397 snd_minor_info_entry = entry;
398 return 0;
399}
400
401int __exit snd_minor_info_done(void)
402{
403 if (snd_minor_info_entry)
404 snd_info_unregister(snd_minor_info_entry);
405 return 0;
406}
Takashi Iwaie28563c2005-12-01 10:42:42 +0100407#endif /* CONFIG_PROC_FS */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700408
409/*
410 * INIT PART
411 */
412
413static int __init alsa_sound_init(void)
414{
415 short controlnum;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700416
417 snd_major = major;
418 snd_ecards_limit = cards_limit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700419 devfs_mk_dir("snd");
420 if (register_chrdev(major, "alsa", &snd_fops)) {
421 snd_printk(KERN_ERR "unable to register native major device number %d\n", major);
422 devfs_remove("snd");
423 return -EIO;
424 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700425 if (snd_info_init() < 0) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700426 unregister_chrdev(major, "alsa");
427 devfs_remove("snd");
428 return -ENOMEM;
429 }
430 snd_info_minor_register();
431 for (controlnum = 0; controlnum < cards_limit; controlnum++)
432 devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
433#ifndef MODULE
434 printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n");
435#endif
436 return 0;
437}
438
439static void __exit alsa_sound_exit(void)
440{
441 short controlnum;
442
443 for (controlnum = 0; controlnum < cards_limit; controlnum++)
444 devfs_remove("snd/controlC%d", controlnum);
445
446 snd_info_minor_unregister();
447 snd_info_done();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700448 if (unregister_chrdev(major, "alsa") != 0)
449 snd_printk(KERN_ERR "unable to unregister major device number %d\n", major);
450 devfs_remove("snd");
451}
452
453module_init(alsa_sound_init)
454module_exit(alsa_sound_exit)
455
456 /* sound.c */
457EXPORT_SYMBOL(snd_major);
458EXPORT_SYMBOL(snd_ecards_limit);
459#if defined(CONFIG_KMOD)
460EXPORT_SYMBOL(snd_request_card);
461#endif
462EXPORT_SYMBOL(snd_register_device);
463EXPORT_SYMBOL(snd_unregister_device);
Clemens Ladischf87135f2005-11-20 14:06:59 +0100464EXPORT_SYMBOL(snd_lookup_minor_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700465#if defined(CONFIG_SND_OSSEMUL)
466EXPORT_SYMBOL(snd_register_oss_device);
467EXPORT_SYMBOL(snd_unregister_oss_device);
Clemens Ladischf87135f2005-11-20 14:06:59 +0100468EXPORT_SYMBOL(snd_lookup_oss_minor_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700469#endif
470 /* memory.c */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700471EXPORT_SYMBOL(copy_to_user_fromio);
472EXPORT_SYMBOL(copy_from_user_toio);
473 /* init.c */
474EXPORT_SYMBOL(snd_cards);
475#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
476EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
477#endif
478EXPORT_SYMBOL(snd_card_new);
479EXPORT_SYMBOL(snd_card_disconnect);
480EXPORT_SYMBOL(snd_card_free);
481EXPORT_SYMBOL(snd_card_free_in_thread);
482EXPORT_SYMBOL(snd_card_register);
483EXPORT_SYMBOL(snd_component_add);
484EXPORT_SYMBOL(snd_card_file_add);
485EXPORT_SYMBOL(snd_card_file_remove);
486#ifdef CONFIG_PM
487EXPORT_SYMBOL(snd_power_wait);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700488#endif
489 /* device.c */
490EXPORT_SYMBOL(snd_device_new);
491EXPORT_SYMBOL(snd_device_register);
492EXPORT_SYMBOL(snd_device_free);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700493 /* isadma.c */
Al Viro276bd312005-08-23 22:45:06 +0100494#ifdef CONFIG_ISA_DMA_API
Linus Torvalds1da177e2005-04-16 15:20:36 -0700495EXPORT_SYMBOL(snd_dma_program);
496EXPORT_SYMBOL(snd_dma_disable);
497EXPORT_SYMBOL(snd_dma_pointer);
498#endif
499 /* info.c */
500#ifdef CONFIG_PROC_FS
501EXPORT_SYMBOL(snd_seq_root);
502EXPORT_SYMBOL(snd_iprintf);
503EXPORT_SYMBOL(snd_info_get_line);
504EXPORT_SYMBOL(snd_info_get_str);
505EXPORT_SYMBOL(snd_info_create_module_entry);
506EXPORT_SYMBOL(snd_info_create_card_entry);
507EXPORT_SYMBOL(snd_info_free_entry);
508EXPORT_SYMBOL(snd_info_register);
509EXPORT_SYMBOL(snd_info_unregister);
510EXPORT_SYMBOL(snd_card_proc_new);
511#endif
512 /* info_oss.c */
513#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
514EXPORT_SYMBOL(snd_oss_info_register);
515#endif
516 /* control.c */
517EXPORT_SYMBOL(snd_ctl_new);
518EXPORT_SYMBOL(snd_ctl_new1);
519EXPORT_SYMBOL(snd_ctl_free_one);
520EXPORT_SYMBOL(snd_ctl_add);
521EXPORT_SYMBOL(snd_ctl_remove);
522EXPORT_SYMBOL(snd_ctl_remove_id);
523EXPORT_SYMBOL(snd_ctl_rename_id);
524EXPORT_SYMBOL(snd_ctl_find_numid);
525EXPORT_SYMBOL(snd_ctl_find_id);
526EXPORT_SYMBOL(snd_ctl_notify);
527EXPORT_SYMBOL(snd_ctl_register_ioctl);
528EXPORT_SYMBOL(snd_ctl_unregister_ioctl);
529#ifdef CONFIG_COMPAT
530EXPORT_SYMBOL(snd_ctl_register_ioctl_compat);
531EXPORT_SYMBOL(snd_ctl_unregister_ioctl_compat);
532#endif
533EXPORT_SYMBOL(snd_ctl_elem_read);
534EXPORT_SYMBOL(snd_ctl_elem_write);
535 /* misc.c */
Takashi Iwaib1d57762005-10-10 11:56:31 +0200536EXPORT_SYMBOL(release_and_free_resource);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700537#ifdef CONFIG_SND_VERBOSE_PRINTK
538EXPORT_SYMBOL(snd_verbose_printk);
539#endif
540#if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK)
541EXPORT_SYMBOL(snd_verbose_printd);
542#endif