我在基于 Raspberry Pi 和 Yocto Kirkstone 的嵌入式系统上的 USB 声卡驱动程序支持方面遇到问题。
USB 子系统正确枚举了声卡,但未显示为声卡。原因似乎是由于某种原因,系统中不存在 snd-usb-audio,尽管我可以看到它已在内核配置中作为模块启用。这个结论是因为该卡在另一个系统中工作,该系统报告它正在使用该驱动程序。系统中确实存在所需的其他驱动程序。
对于重要的情况,在我遇到这个问题的系统上,Linux 也没有列出 Raspberry Pi 的模拟音频输出。显示的唯一音频输出是属于 HDMI 输出一部分的数字音频输出。
dmesg
用于插入声卡:
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: new full-speed USB device number 11 using dwc_otg
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: config 1 has an invalid interface number: 3 but max is 2
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: config 1 has an invalid interface number: 3 but max is 2
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: config 1 has an invalid interface number: 3 but max is 2
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: config 1 has no interface number 2
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: New USB device found, idVendor=262a, idProduct=10aa, bcdDevice= 0.01
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: Product: NuForce USB Audio
[Sun Apr 2 13:52:24 2023] usb 1-1.3.4: Manufacturer: Nuforce Inc.
[Sun Apr 2 13:52:24 2023] hid-generic 0003:262A:10AA.0004: No inputs registered, leaving
[Sun Apr 2 13:52:24 2023] hid-generic 0003:262A:10AA.0004: hidraw2: USB HID v1.00 Device [Nuforce Inc. NuForce USB Audio] on usb-20980000.usb-1.3.4/input0
inxi -Ax
在声卡工作的系统上(该问题涉及的声卡是 3 号声卡):
Audio:
Device-1: AMD SBx00 Azalia vendor: ASRock driver: snd_hda_intel v: kernel
bus-ID: 00:14.2
Device-2: NVIDIA GK208 HDMI/DP Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus-ID: 01:00.1
Device-3: SAVITECH NuForce USB Audio type: USB
driver: hid-generic,snd-usb-audio,usbhid bus-ID: 7-4:2
Sound Server-1: ALSA v: k5.15.0-56-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes
grep snd /lib/modules/5.15.34/modules.builtin
在声卡不工作的系统上
kernel/sound/core/snd.ko
kernel/sound/core/snd-timer.ko
kernel/sound/core/snd-pcm.ko
kernel/sound/core/snd-pcm-dmaengine.ko
kernel/sound/core/snd-compress.ko
kernel/sound/soc/snd-soc-core.ko
kernel/sound/soc/codecs/snd-soc-hdmi-codec.ko
grep SND_USB_AUDIO tmp/work/raspberrypi-poky-linux-gnueabi/linux-raspberrypi/1_5.15.34+gitAUTOINC+e1b976ee4f_0086da6acd-r0/linux-raspberrypi-standard-build/.config
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y