aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-08 11:25:56 -0400
committerTakashi Iwai <tiwai@suse.de>2012-05-08 11:25:56 -0400
commit779ae5a08368c423f0c3b6075a518356eacd41f6 (patch)
tree60c9fd6d60f02b253f42ae3ac90271116bd7ce4c /sound
parenta2e888f0d7cf6f2011740acb1f310bcc959c2842 (diff)
ALSA: Fix the card number limit of OSS-emulation
There are left-over codes from the ancient days with the static device number limitation of 8. Actaully OSS can support up to 16 cards. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/sound_oss.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index c70092043061..e9528333e36d 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -35,7 +35,7 @@
35#include <linux/sound.h> 35#include <linux/sound.h>
36#include <linux/mutex.h> 36#include <linux/mutex.h>
37 37
38#define SNDRV_OSS_MINORS 128 38#define SNDRV_OSS_MINORS 256
39 39
40static struct snd_minor *snd_oss_minors[SNDRV_OSS_MINORS]; 40static struct snd_minor *snd_oss_minors[SNDRV_OSS_MINORS];
41static DEFINE_MUTEX(sound_oss_mutex); 41static DEFINE_MUTEX(sound_oss_mutex);
@@ -111,7 +111,7 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
111 int register1 = -1, register2 = -1; 111 int register1 = -1, register2 = -1;
112 struct device *carddev = snd_card_get_device_link(card); 112 struct device *carddev = snd_card_get_device_link(card);
113 113
114 if (card && card->number >= 8) 114 if (card && card->number >= SNDRV_MINOR_OSS_DEVICES)
115 return 0; /* ignore silently */ 115 return 0; /* ignore silently */
116 if (minor < 0) 116 if (minor < 0)
117 return minor; 117 return minor;
@@ -170,7 +170,7 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
170 int track2 = -1; 170 int track2 = -1;
171 struct snd_minor *mptr; 171 struct snd_minor *mptr;
172 172
173 if (card && card->number >= 8) 173 if (card && card->number >= SNDRV_MINOR_OSS_DEVICES)
174 return 0; 174 return 0;
175 if (minor < 0) 175 if (minor < 0)
176 return minor; 176 return minor;