diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-11-23 11:43:19 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-11-23 23:53:25 -0500 |
commit | 03cfe6f57dc5c13ccdd235c23c80e3fa170f03d1 (patch) | |
tree | babee2b37a52ec6b0c5f62f8e4783c937fd265d3 /include/sound/minors.h | |
parent | 109fef9edcc100952eec980acbc2e1295627fbab (diff) |
ALSA: support module on-demand loading for seq and timer
If CONFIG_SND_DYNAMIC_MINORS is used, assign /dev/snd/seq and
/dev/snd/timer the usual static minors, and export specific
module aliases to generate udev module on-demand loading
instructions:
$ cat /lib/modules/2.6.33.4-smp/modules.devname
# Device nodes to trigger on-demand module loading.
microcode cpu/microcode c10:184
fuse fuse c10:229
ppp_generic ppp c108:0
tun net/tun c10:200
uinput uinput c10:223
dm_mod mapper/control c10:236
snd_timer snd/timer c116:33
snd_seq snd/seq c116:1
The last two lines instruct udev to create device nodes, even
when the modules are not loaded at that time.
As soon as userspace accesses any of these nodes, the in-kernel
module-loader will load the module, and the device can be used.
The header file minor calculation needed to be simplified to
make __stringify() (supports only two indirections) in
the MODULE_ALIAS macro work.
This is part of systemd's effort to get rid of unconditional
module load instructions and needless init scripts.
Cc: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/minors.h')
-rw-r--r-- | include/sound/minors.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sound/minors.h b/include/sound/minors.h index a81798ab73ed..8f764204a856 100644 --- a/include/sound/minors.h +++ b/include/sound/minors.h | |||
@@ -31,8 +31,8 @@ | |||
31 | /* these minors can still be used for autoloading devices (/dev/aload*) */ | 31 | /* these minors can still be used for autoloading devices (/dev/aload*) */ |
32 | #define SNDRV_MINOR_CONTROL 0 /* 0 */ | 32 | #define SNDRV_MINOR_CONTROL 0 /* 0 */ |
33 | #define SNDRV_MINOR_GLOBAL 1 /* 1 */ | 33 | #define SNDRV_MINOR_GLOBAL 1 /* 1 */ |
34 | #define SNDRV_MINOR_SEQUENCER (SNDRV_MINOR_GLOBAL + 0 * 32) | 34 | #define SNDRV_MINOR_SEQUENCER 1 /* SNDRV_MINOR_GLOBAL + 0 * 32 */ |
35 | #define SNDRV_MINOR_TIMER (SNDRV_MINOR_GLOBAL + 1 * 32) | 35 | #define SNDRV_MINOR_TIMER 33 /* SNDRV_MINOR_GLOBAL + 1 * 32 */ |
36 | 36 | ||
37 | #ifndef CONFIG_SND_DYNAMIC_MINORS | 37 | #ifndef CONFIG_SND_DYNAMIC_MINORS |
38 | /* 2 - 3 (reserved) */ | 38 | /* 2 - 3 (reserved) */ |