From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Chris Shen <chris2shen@gmail.com>
Subject: Re: Why my linux OS has only 8 sound cards ? How can I modify it ?
Date: Tue, 08 Nov 2011 18:37:53 +0100 [thread overview]
Message-ID: <4EB968F1.2000100@ladisch.de> (raw)
In-Reply-To: <s5hsjlyehe9.wl%tiwai@suse.de>
Takashi Iwai wrote:
> Linus Torvalds wrote:
> > Takashi, any idea? Do we have some 8-sound-card limit somewhere?
> >
> > I do see that we have that odd
> >
> > if (card && card->number >= 8)
> > return 0; /* ignore silently */
> >
> > in sound/core/sound_oss.c: snd_register_oss_device(), but it has no
> > comments. The thing goes back to 2005 with the commit log entry of
> > "[ALSA] dynamic minors (6/6): increase maximum number of sound cards",
> > but the value '8'isn't explained.
>
> ALSA itself can support 32 cards when CONFIG_SND_DYNAMIC_MINORS is
> set ...
> The above code is, however, about OSS-emulation. And I guess it's
> just a left-over of the old static limitation.
Yes; I didn't change the limit in the OSS emulation because the minor
number layout doesn't have space for all 32 cards, and extending the
limit to 16 did not seem worth the effort for a 'legacy' interface.
> Actually OSS could support up to 16 cards (in theory).
>
> Below is an untested fix patch. Does it work?
Not without increasing SNDRV_OSS_MINORS, too:
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index 0c164e5..d6dbe46 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -34,7 +34,7 @@
#include <linux/sound.h>
#include <linux/mutex.h>
-#define SNDRV_OSS_MINORS 128
+#define SNDRV_OSS_MINORS 256
static struct snd_minor *snd_oss_minors[SNDRV_OSS_MINORS];
static DEFINE_MUTEX(sound_oss_mutex);
next prev parent reply other threads:[~2011-11-08 17:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8c87f06b-dbfc-4035-8e5b-044e598939ae@i13g2000prg.googlegroups.com>
2011-11-08 15:43 ` Why my linux OS has only 8 sound cards ? How can I modify it ? Linus Torvalds
2011-11-08 15:57 ` Takashi Iwai
2011-11-08 17:37 ` Clemens Ladisch [this message]
2011-11-08 17:42 ` Takashi Iwai
[not found] ` <CALprvwVuTdNUnxCvPNLu-KQZw2pcoeeRa4Q7V7wctTGXY9GYpA@mail.gmail.com>
2011-11-09 8:10 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EB968F1.2000100@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=chris2shen@gmail.com \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.