<p>你提出的问题基本上是:在ALSA控制的系统中,能有超过32个声卡吗?显然,当你的USB控制器知道你连接的所有声卡时,ALSA系统却不知道。在</p>
<p>让我们进入内核源代码来检查这里发生了什么。在<code>/sound/core/sound.c</code>中,您将找到有关声卡最大值问题的更多信息:</p>
<pre><code> 39 static int cards_limit = 1;
40
41 MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
42 MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards.");
43 MODULE_LICENSE("GPL");
44 module_param(major, int, 0444);
45 MODULE_PARM_DESC(major, "Major # for sound driver.");
46 module_param(cards_limit, int, 0444);
47 MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards.");
48 MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR);
49
50 /* this one holds the actual max. card number currently available.
51 * as default, it's identical with cards_limit option. when more
52 * modules are loaded manually, this limit number increases, too.
53 */
54 int snd_ecards_limit;
55 EXPORT_SYMBOL(snd_ecards_limit);
</code></pre>
<p>从代码和它的注释中,我读到两件事:</p>
<ol>
<li><p>可变卡的限制是一个模块参数。我假设在安装时这个参数被设置为32。如果内核中内置了ALSA支持,则可以在更改此选项的位置构建自定义内核。如果ALSA支持不是内置的,而是作为模块加载的,则可以在模块加载期间设置此参数。为此,您可以更改系统配置(<code>man modprobe.d</code>)或卸载模块,然后使用选项(<code>man modprobe</code>)重新加载它。</p></li>
<li><p>这个限制被描述为只限制自动加载声卡的数量。为了克服这个限制,手动加载负责声卡的模块就足够了。对于手动添加的声卡,内核中没有设置限制。</p></li>
</ol>
<p>来源:<a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=sound/core/sound.c;h=70ccdab7415320e3b20a2aba6c5837f42962f758;hb=HEAD" rel="noreferrer">Kernel 2.8 Git</a></p>