Debian 9 上的“虚拟输出”代替音频设备

Debian 9 上的“虚拟输出”代替音频设备

操作系统:Debian 9

核心:

Linux version 4.9.0-6-amd64 ([email protected]) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02)

使用笔记本电脑 6 个多月后,我再也看不到任何音频设备了。

在此处输入图片描述

我昨天注意到了这一点。现在我所有的音频卡都不知怎么的都是 HDMI。我使用笔记本电脑通过 HDMI 连接到外接显示器。但我以前没有遇到过音频问题。

trex@beast:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

PCI 信息

trex@beast:~$ lspci -nn | grep -i audio
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)

我看到一些编解码器错误:

trex@beast:~$ sudo dmesg | grep -i error | grep -v "wifi\|fs"
[   28.220604] snd_hda_intel 0000:00:1f.3: Codec #0 probe error; disabling it...

我尝试重新启动snd-hda-intel并重新配置pulseaudio,但没有成功

sudo apt-get install --reinstall linux-image-`uname -r`
sudo modprobe snd-hda-intel
rm -r ~/.config/pulse*
pulseaudio -k

答案1

就我而言,问题是由于另一项服务(即 timidity,在系统级别启动)正在使用声卡,因此 pulseaudio(在用户级别启动)没有使用它。

要检查这一点,您可以sudo fuser /dev/snd/*查看是否有其他进程正在使用声卡。如果是,您应该安排不启动该进程,这样就可以解决问题。

为了提供更多细节,我能够通过编辑/etc/pulse/daemon.conf设置log-level = debug、重新启动 pulseaudio 来隔离问题pulseaudio -k(然后 pulseaudio 由 systemd 自动重新生成),这就是我注意到问题的方式:

Aug  7 11:37:34 zeta pulseaudio[22178]: D: [pulseaudio] module-udev-detect.c: /devices/pci0000:00/0000:00:1f.3/sound/card0 is busy: yes

答案2

就我而言,问题是声卡配置文件已设置为仅输入,而不是输出+输入,因此只有虚拟输出可用。

我通过更改卡片配置文件解决了这个问题:

pacmd set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-stereo+input:analog-stereo

(从这里的说明中找到:https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Only_S/PDIF_output_available

在我的情况下,声卡配置文件名称与那里使用的相同,但您的可能不同。要查找名称,请执行

pacmd list-cards

示例输出(在我更改活动配置文件之后):

1 card(s) available.
    index: 0
    name: <alsa_card.pci-0000_00_1f.3>
    driver: <module-alsa-card.c>
    owner module: 6
    properties:
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0x2ffb018000 irq 144"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1f.3"
        sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "9d71"
        device.form_factor = "internal"
        device.string = "0"
        device.description = "Built-in Audio"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    profiles:
        input:analog-stereo: Analog Stereo Input (priority 60, available: unknown)
        output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
        output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
        output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
        output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
        output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
        output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
        output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
        output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
        output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
        output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (priority 5260, available: unknown)
        output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: unknown)
        output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: unknown)
        output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: unknown)
        output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: unknown)
        output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: unknown)
        output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (priority 5260, available: unknown)
        output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: unknown)
        output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: unknown)
        output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: unknown)
        output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: unknown)
        off: Off (priority 0, available: unknown)
    active profile: <output:analog-stereo+input:analog-stereo>
    sinks:
        alsa_output.pci-0000_00_1f.3.analog-stereo/#1: Built-in Audio Analog Stereo
    sources:
        alsa_input.pci-0000_00_1f.3.analog-stereo/#0: Built-in Audio Analog Stereo
        alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#2: Monitor of Built-in Audio Analog Stereo

相关内容