modprobe: ERROR: could not insert 'snd_aloop': No such device

modprobe: ERROR: could not insert 'snd_aloop': No such device

我正在尝试在 gentoo 上创建一个 Jack-ALSA 桥,但是我无法加载 snd_aloop 模块。

内核:

$ uname -a
Linux MalfattiTux 4.6.7-rt-rt11 #1 SMP Thu Sep 22 14:54:42 BRT 2016 x86_64 Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz GenuineIntel GNU/Linux

snd_aloop编译为模块:

$ cat /usr/src/linux-4.6.7-rt11/.config | grep ALOOP
CONFIG_SND_ALOOP=m

snd_aloop 信息:

$ sudo modinfo snd_aloop
filename:       /lib/modules/4.6.7-rt-rt11/kernel/sound/drivers/snd-aloop.ko
license:        GPL
description:    A loopback soundcard
author:         Jaroslav Kysela <perex@perex.cz>
depends:        snd-pcm
intree:         Y
vermagic:       4.6.7-rt-rt11 SMP mod_unload modversions 
parm:           index:Index value for loopback soundcard. (array of int)
parm:           id:ID string for loopback soundcard. (array of charp)
parm:           enable:Enable this loopback soundcard. (array of bool)
parm:           pcm_substreams:PCM substreams # (1-8) for loopback driver. (array of int)
parm:           pcm_notify:Break capture when PCM format/rate/channels changes. (array of int)

snd_aloop 模块的设置:

$ cat /etc/modprobe.d/alsa.conf | grep aloop
options snd-aloop id=Loopback index=0 pcm_substreams=2 enable=1
alias snd-card-0 snd-aloop

音频设备:

$ sudo lspci | grep -i audio
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)

$ sudo lspci -k -s 00:03.0
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
    Subsystem: Lenovo Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

$ sudo lspci -k -s 00:1b.0
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
    Subsystem: Lenovo 8 Series/C220 Series Chipset High Definition Audio Controller
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

看起来一切正常。但是然后:

$ sudo modprobe snd_aloop
modprobe: ERROR: could not insert 'snd_aloop': No such device

我也试过不把它编译成一个模块,而是包含在内核中。然后,我有环回设备,但我无法控制它们(例如子流的数量)。

此模块在 gentoo 上运行是否需要任何特定设置?

谢谢:)

声音驱动程序的index选项指定了它应该使用的卡号。 但是,如果另一个驱动程序已加载到同一索引,则这将不起作用。

因此您必须在所有使用的驱动程序(以及将来可能使用的驱动程序,例如 USB 音频)上设置匹配的 index 选项。

一个更好的主意是删除所有 index 选项,并使用 snd 模块的 slots 选项来指定只有特定的驱动程序可以使用特定的索引:

options snd slots=snd-aloop,snd-hda-intel,snd-hda-intel

或者如果环回驱动程序不应该是第一个(默认):

options snd slots=snd-hda-intel,snd-hda-intel,snd-aloop