1#ifndef __SOUND_MINORS_H
2#define __SOUND_MINORS_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#define SNDRV_OS_MINORS 256
25
26#define SNDRV_MINOR_DEVICES 32
27#define SNDRV_MINOR_CARD(minor) ((minor) >> 5)
28#define SNDRV_MINOR_DEVICE(minor) ((minor) & 0x001f)
29#define SNDRV_MINOR(card, dev) (((card) << 5) | (dev))
30
31
32#define SNDRV_MINOR_CONTROL 0
33#define SNDRV_MINOR_GLOBAL 1
34#define SNDRV_MINOR_SEQUENCER 1
35#define SNDRV_MINOR_TIMER 33
36
37#ifndef CONFIG_SND_DYNAMIC_MINORS
38#define SNDRV_MINOR_COMPRESS 2
39#define SNDRV_MINOR_HWDEP 4
40#define SNDRV_MINOR_RAWMIDI 8
41#define SNDRV_MINOR_PCM_PLAYBACK 16
42#define SNDRV_MINOR_PCM_CAPTURE 24
43
44
45#define SNDRV_DEVICE_TYPE_CONTROL SNDRV_MINOR_CONTROL
46#define SNDRV_DEVICE_TYPE_HWDEP SNDRV_MINOR_HWDEP
47#define SNDRV_DEVICE_TYPE_RAWMIDI SNDRV_MINOR_RAWMIDI
48#define SNDRV_DEVICE_TYPE_PCM_PLAYBACK SNDRV_MINOR_PCM_PLAYBACK
49#define SNDRV_DEVICE_TYPE_PCM_CAPTURE SNDRV_MINOR_PCM_CAPTURE
50#define SNDRV_DEVICE_TYPE_SEQUENCER SNDRV_MINOR_SEQUENCER
51#define SNDRV_DEVICE_TYPE_TIMER SNDRV_MINOR_TIMER
52#define SNDRV_DEVICE_TYPE_COMPRESS SNDRV_MINOR_COMPRESS
53
54#else
55
56enum {
57 SNDRV_DEVICE_TYPE_CONTROL,
58 SNDRV_DEVICE_TYPE_SEQUENCER,
59 SNDRV_DEVICE_TYPE_TIMER,
60 SNDRV_DEVICE_TYPE_HWDEP,
61 SNDRV_DEVICE_TYPE_RAWMIDI,
62 SNDRV_DEVICE_TYPE_PCM_PLAYBACK,
63 SNDRV_DEVICE_TYPE_PCM_CAPTURE,
64 SNDRV_DEVICE_TYPE_COMPRESS,
65};
66
67#endif
68
69#define SNDRV_MINOR_HWDEPS 4
70#define SNDRV_MINOR_RAWMIDIS 8
71#define SNDRV_MINOR_PCMS 8
72
73
74#ifdef CONFIG_SND_OSSEMUL
75
76#define SNDRV_MINOR_OSS_DEVICES 16
77#define SNDRV_MINOR_OSS_CARD(minor) ((minor) >> 4)
78#define SNDRV_MINOR_OSS_DEVICE(minor) ((minor) & 0x000f)
79#define SNDRV_MINOR_OSS(card, dev) (((card) << 4) | (dev))
80
81#define SNDRV_MINOR_OSS_MIXER 0
82#define SNDRV_MINOR_OSS_SEQUENCER 1
83#define SNDRV_MINOR_OSS_MIDI 2
84#define SNDRV_MINOR_OSS_PCM 3
85#define SNDRV_MINOR_OSS_PCM_8 3
86#define SNDRV_MINOR_OSS_AUDIO 4
87#define SNDRV_MINOR_OSS_PCM_16 5
88#define SNDRV_MINOR_OSS_SNDSTAT 6
89#define SNDRV_MINOR_OSS_RESERVED7 7
90#define SNDRV_MINOR_OSS_MUSIC 8
91#define SNDRV_MINOR_OSS_DMMIDI 9
92#define SNDRV_MINOR_OSS_DMFM 10
93#define SNDRV_MINOR_OSS_MIXER1 11
94#define SNDRV_MINOR_OSS_PCM1 12
95#define SNDRV_MINOR_OSS_MIDI1 13
96#define SNDRV_MINOR_OSS_DMMIDI1 14
97#define SNDRV_MINOR_OSS_RESERVED15 15
98
99#define SNDRV_OSS_DEVICE_TYPE_MIXER 0
100#define SNDRV_OSS_DEVICE_TYPE_SEQUENCER 1
101#define SNDRV_OSS_DEVICE_TYPE_PCM 2
102#define SNDRV_OSS_DEVICE_TYPE_MIDI 3
103#define SNDRV_OSS_DEVICE_TYPE_DMFM 4
104#define SNDRV_OSS_DEVICE_TYPE_SNDSTAT 5
105#define SNDRV_OSS_DEVICE_TYPE_MUSIC 6
106
107#define MODULE_ALIAS_SNDRV_MINOR(type) \
108 MODULE_ALIAS("sound-service-?-" __stringify(type))
109
110#endif
111
112#endif
113