]> err.no Git - linux-2.6/commitdiff
[ALSA] clean up device types symbols
authorClemens Ladisch <clemens@ladisch.de>
Mon, 24 Oct 2005 15:02:03 +0000 (17:02 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 4 Nov 2005 12:19:58 +0000 (13:19 +0100)
Modules: ALSA Core,ALSA Minor Numbers

Remove the unused and undefined symbols SNDRV_DEVICE_TYPE_{MIXER,
PCM_PLOOP,PCM_CLOOP}, and introduce a new symbol SNDRV_MINOR_GLOBAL
for non-card-specific devices like the sequencer or the timer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
include/sound/minors.h
sound/core/sound.c

index b7b0d83094497b9d37c43c682bfe3ac457f542d0..a17b5c9961bb2246e62f59658922738108e962ca 100644 (file)
@@ -27,8 +27,9 @@
 #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)
+#define SNDRV_MINOR_GLOBAL             1       /* 1 */
+#define SNDRV_MINOR_SEQUENCER          (SNDRV_MINOR_GLOBAL + 0 * 32)
+#define SNDRV_MINOR_TIMER              (SNDRV_MINOR_GLOBAL + 1 * 32)
 #define SNDRV_MINOR_HWDEP              4       /* 4 - 7 */
 #define SNDRV_MINOR_HWDEPS             4
 #define SNDRV_MINOR_RAWMIDI            8       /* 8 - 15 */
 
 #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
 
index dee602245fe8cd1a7b60fd0cd14a0be8b5f497b2..1139dd8ca8eb0d38aa3dcd1f22857ad6b888669f 100644 (file)
@@ -130,7 +130,7 @@ static int snd_open(struct inode *inode, struct file *file)
        struct file_operations *old_fops;
        int err = 0;
 
-       if (dev != SNDRV_MINOR_SEQUENCER && dev != SNDRV_MINOR_TIMER) {
+       if (dev != SNDRV_MINOR_GLOBAL) {
                if (snd_cards[card] == NULL) {
 #ifdef CONFIG_KMOD
                        snd_request_card(card);
@@ -287,7 +287,7 @@ static void snd_minor_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buf
        for (card = 0; card < SNDRV_CARDS; card++) {
                list_for_each(list, &snd_minors_hash[card]) {
                        mptr = list_entry(list, snd_minor_t, list);
-                       if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_SEQUENCER) {
+                       if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_GLOBAL) {
                                if ((device = mptr->device) >= 0)
                                        snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, mptr->comment);
                                else