Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / sound / minors.h
index b7b0d83..46bcd20 100644 (file)
 #define SNDRV_MINOR_DEVICE(minor)      ((minor) & 0x001f)
 #define SNDRV_MINOR(card, dev)         (((card) << 5) | (dev))
 
-#define SNDRV_MINOR_CONTROL            0       /* 0 - 0 */
-#define SNDRV_MINOR_SEQUENCER          1
-#define SNDRV_MINOR_TIMER              (1+32)
+/* these minors can still be used for autoloading devices (/dev/aload*) */
+#define SNDRV_MINOR_CONTROL            0       /* 0 */
+#define SNDRV_MINOR_GLOBAL             1       /* 1 */
+#define SNDRV_MINOR_SEQUENCER          (SNDRV_MINOR_GLOBAL + 0 * 32)
+#define SNDRV_MINOR_TIMER              (SNDRV_MINOR_GLOBAL + 1 * 32)
+
+#ifndef CONFIG_SND_DYNAMIC_MINORS
+                                               /* 2 - 3 (reserved) */
 #define SNDRV_MINOR_HWDEP              4       /* 4 - 7 */
-#define SNDRV_MINOR_HWDEPS             4
 #define SNDRV_MINOR_RAWMIDI            8       /* 8 - 15 */
-#define SNDRV_MINOR_RAWMIDIS           8
 #define SNDRV_MINOR_PCM_PLAYBACK       16      /* 16 - 23 */
 #define SNDRV_MINOR_PCM_CAPTURE                24      /* 24 - 31 */
-#define SNDRV_MINOR_PCMS               8
 
+/* same as first respective minor number to make minor allocation easier */
 #define SNDRV_DEVICE_TYPE_CONTROL      SNDRV_MINOR_CONTROL
 #define SNDRV_DEVICE_TYPE_HWDEP                SNDRV_MINOR_HWDEP
-#define SNDRV_DEVICE_TYPE_MIXER                SNDRV_MINOR_MIXER
 #define SNDRV_DEVICE_TYPE_RAWMIDI      SNDRV_MINOR_RAWMIDI
 #define SNDRV_DEVICE_TYPE_PCM_PLAYBACK SNDRV_MINOR_PCM_PLAYBACK
-#define SNDRV_DEVICE_TYPE_PCM_PLOOP    SNDRV_MINOR_PCM_PLOOP
 #define SNDRV_DEVICE_TYPE_PCM_CAPTURE  SNDRV_MINOR_PCM_CAPTURE
-#define SNDRV_DEVICE_TYPE_PCM_CLOOP    SNDRV_MINOR_PCM_CLOOP
 #define SNDRV_DEVICE_TYPE_SEQUENCER    SNDRV_MINOR_SEQUENCER
 #define SNDRV_DEVICE_TYPE_TIMER                SNDRV_MINOR_TIMER
 
+#else /* CONFIG_SND_DYNAMIC_MINORS */
+
+enum {
+       SNDRV_DEVICE_TYPE_CONTROL,
+       SNDRV_DEVICE_TYPE_SEQUENCER,
+       SNDRV_DEVICE_TYPE_TIMER,
+       SNDRV_DEVICE_TYPE_HWDEP,
+       SNDRV_DEVICE_TYPE_RAWMIDI,
+       SNDRV_DEVICE_TYPE_PCM_PLAYBACK,
+       SNDRV_DEVICE_TYPE_PCM_CAPTURE,
+};
+
+#endif /* CONFIG_SND_DYNAMIC_MINORS */
+
+#define SNDRV_MINOR_HWDEPS             4
+#define SNDRV_MINOR_RAWMIDIS           8
+#define SNDRV_MINOR_PCMS               8
+
+
 #ifdef CONFIG_SND_OSSEMUL
 
 #define SNDRV_MINOR_OSS_DEVICES                16