我有一台装有 Ubuntu 16.04 的 PC,其中我使用了 Gigabyte GA-H97-Gaming 3 板载 Realtek ALC1150 编解码器(始终可以完美初始化)和 PCI ASUS Xonar Essence ST 以及 H6 子板声卡,在初始化之前需要随机重启几次。
之前,在 Ubuntu 14.04 上也偶尔(很少)发生我必须重启一次(并且仅一次)才能初始化 Xonar 的情况。
当添加的声卡正确初始化后,它会继续正常工作,直到重新启动。
当我查看 PCI 总线(使用 lspci)时,无论 Xonar PCI 卡是否已初始化,我始终都能看到声卡,但当 Xonar 正确初始化时,只有细微的差别。
Kernel driver in use: snd_virtuoso
添加并为其分配的 IRQ 为 16(如果发生故障,则为 IRQ 11),并且 ASMedia PCI 桥 ASM1083/1085 在发生故障时将 IRQ 19 更改为 IRQ 15
当它正常工作时,cat /proc/interrupts
IRQ 16 的报告
CPU0 CPU1 CPU2 CPU3
16: 244 2 75 2 IO-APIC 16-fasteoi ehci_hcd:usb1, snd_oxygen_lib<code>
当失败时
16: 0 0 28 3 IO-APIC 16-fasteoi ehci_hcd:usb1
并且对于该情况下为 XONAR 卡分配的 IRQ 11 没有任何报告。
有没有办法确保两个声音设备始终正确初始化。我尝试使用 sudo sh -c "echo 1 > /sys/bus/rescan" 以及 sudo alsa force-reload,但没有成功。我可以添加一些始终强制初始化设备的配置吗?
一些额外的信息:与声音相关的摘录sudo lspci -v
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family HD Audio Controller
Flags: bus master, fast devsel, latency 0, IRQ 30
Memory at f7c30000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
03:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04) (prog-if 01 [Subtractive decode])
Flags: bus master, fast devsel, latency 0, IRQ 15 <= IRQ 19 WHEN INITIALIZED CORRECTLY
Bus: primary=03, secondary=04, subordinate=04, sec-latency=32
I/O behind bridge: 0000e000-0000efff
Capabilities: [c0] Subsystem: ASUSTeK Computer Inc. ASM1083/1085 PCIe to PCI Bridge04:01.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 [Oxygen HD Audio]
Subsystem: ASUSTeK Computer Inc. Virtuoso 100 (Xonar ST)
Flags: bus master, medium devsel, latency 32, IRQ 11 <= IRQ 16 WHEN INITIALIZED CORRECTLY
I/O ports at e000 [size=256]
Capabilities: [c0] Power Management version 2
Kernel driver in use: snd_virtuoso # <= ONLY WHEN INITIALIZED CORRECTLY
Kernel modules: snd_virtuoso
健全的内核版本cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version k4.4.0-34-generic.
未初始化时给出的asound版本aplay -version
是1.1.0版本 。cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel
cat /proc/asound/modules
正确初始化后
0 snd_virtuoso
1 snd_hda_intel
2 snd_hda_intel
cat /proc/asound/cards
未初始化时
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7c30000 irq 30
1 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf7c34000 irq 31
cat /proc/asound/cards
正确初始化后
0 [STH6 ]: AV200 - Xonar ST+H6
Asus Virtuoso 100 at 0xe000, irq 16
1 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf7c34000 irq 31
2 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7c30000 irq 30
aplay -l
未初始化时
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC1150 Digital [ALC1150 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1 Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
aplay -l
正确初始化后
**** List of PLAYBACK Hardware Devices ****
card 0: STH6 [Xonar ST+H6], device 0: Multichannel [Multichannel]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: STH6 [Xonar ST+H6], device 1: Digital [Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: PCH [HDA Intel PCH], device 1: ALC1150 Digital [ALC1150 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
答案1
重新排序声卡时,使用驱动程序的index
选项是危险的,因为其他驱动程序可能会获取相同的索引。
相反,使用模块slots
的选项snd
来分配驱动程序:
options snd slots=snd-virtuoso,snd-hda-intel,snd-hda-intel