AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 473694
Accepted
blihp
blihp
Asked: 2018-10-07 13:08:47 +0800 CST2018-10-07 13:08:47 +0800 CST 2018-10-07 13:08:47 +0800 CST

升级到 Debian 测试后,PulseAudio 无法识别 Intel HDA (Buster)

  • 772

从 Debian 9 stable 升级到 Debian 10 测试后,我在夏天注意到一个问题:PulseAudio 不再识别我的 Intel HDA 音频设备。当时我能够切换到通过 nVidia HDMI 连接的显示器音频,所以我回避了这个问题,希望未来的更新能够解决它。他们没有。快进几个月,我重新安排了我的工作空间,现在需要让英特尔 HDA 再次工作。

这是我到目前为止所看到的......

Debian 10 测试

内核看到它:

# dmesg | grep HDA
[  +0.005509] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input17
[  +0.000073] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input18
[  +0.000057] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input19
[  +0.000054] input: HDA Intel PCH Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input20
[  +0.000052] input: HDA Intel PCH Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input21
[  +0.000051] input: HDA Intel PCH Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card0/input22
[  +0.000053] input: HDA Intel PCH Line Out Side as /devices/pci0000:00/0000:00:1b.0/sound/card0/input23
[  +0.000058] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input24
[followed by NVidia HDMI audio devices that are recognized]

# lspci -nnk | grep -A2 Audio
00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 7 Series/C216 Chipset Family High Definition Audio Controller [1458:a002]
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
[followed by NVidia HDMI audio devices that are recognized]

ALSA 看到它:

# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[followed by NVidia HDMI audio devices that are recognized]

# aplay -L | grep PCH
default:CARD=PCH
    HDA Intel PCH, Generic Analog
sysdefault:CARD=PCH
    HDA Intel PCH, Generic Analog
front:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Digital
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, Generic Digital
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, Generic Digital
hw:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
hw:CARD=PCH,DEV=1
    HDA Intel PCH, Generic Digital
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, Generic Analog
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, Generic Digital

扬声器测试正常播放音频 aplay -D default:CARD=PCH /usr/share/sounds/alsa/Front_Left.wav

但是 PulseAudio 根本看不到该设备:

$ pacmd list-sinks
1 sink(s) available.
  * index: 0
    name: <auto_null>
    driver: <module-null-sink.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 1000
    volume: front-left: 55705 /  85% / -4.24 dB,   front-right: 55705 /  85% / -4.24 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 344 KiB
    max rewind: 344 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
    module: 16
    properties:
        device.description = "Dummy Output"
        device.class = "abstract"
        device.icon_name = "audio-card"

当我进入声音设置时,我看到的只是虚拟输出设备。(此处不再列出 nVidia 设备,因为在重新排列时,我使用的是不同的显示器,没有音频,因此当前没有连接 HDMI 音频设备。)

我试图清除 PulseAudio 配置,认为我可能有一些遗留问题:

rm ~/.pulse/* ~/.config/pulse/*

Debian 9 稳定版

我在这台机器上有另一个分区,它仍在运行 Debian 9 stable,英特尔 HDA 在 PulseAudio 下工作,ALSA 驱动程序与 Debian 10 似乎确实存在差异,所以下面是我注意到的差异......

# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

# aplay -L | grep PCH

sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Digital
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, ALC887-VD Digital
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, ALC887-VD Digital
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC887-VD Digital
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC887-VD Digital

当然,Debian 9 在 PulseAudio 中看到了 Intel HDA:

$ pacmd list-sinks
1 sink(s) available.
  * index: 2
    name: <alsa_output.pci-0000_00_1b.0.iec958-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
    state: RUNNING
    suspend cause: 
    priority: 9958
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 24.26 ms
    max request: 4 KiB
    max rewind: 344 KiB
    monitor source: 3
    sample spec: s16le 2ch 48000Hz
    channel map: front-left,front-right
                 Stereo
    used by: 1
    linked by: 1
    configured latency: 25.00 ms; range is 0.50 .. 1837.50 ms
    card: 1 <alsa_card.pci-0000_00_1b.0>
    module: 7
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "ALC887-VD Digital"
        alsa.id = "ALC887-VD Digital"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "1"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf5130000 irq 30"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "1e20"
        device.product.name = "7 Series/C216 Chipset Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "iec958:0"
        device.buffering.buffer_size = "352800"
        device.buffering.fragment_size = "176400"
        device.access_mode = "mmap+timer"
        device.profile.name = "iec958-stereo"
        device.profile.description = "Digital Stereo (IEC958)"
        device.description = "Built-in Audio Digital Stereo (IEC958)"
        alsa.mixer_name = "Realtek ALC887-VD"
        alsa.components = "HDA:10ec0887,1458a002,00100302"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
            properties:

    active port: <iec958-stereo-output>

所以问题很明显:如何让英特尔 HDA 音频在 Debian 10 的 PulseAudio 中再次工作?这是我可以从配置的角度解决的问题,还是需要由 ALSA 或 PulseAudio 维护人员解决的驱动程序问题?

linux debian
  • 4 4 个回答
  • 12837 Views

4 个回答

  • Voted
  1. Ntropia
    2018-11-03T09:15:40+08:002018-11-03T09:15:40+08:00

    由于同样的问题,我最终来到这里,从 Stretch 升级后,音频消失了。类似的症状和输出(Nvidia 卡和 Intel HDA 声音)。但是,在按照说明进行操作时,我发现我无法执行此步骤:

    root@desk:~# aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Center.wav
    aplay: main:828: audio open error: Device or resource busy
    

    我发现罪魁祸首是胆怯:

    root@desk:~# fuser -v /dev/snd/*
                         USER        PID ACCESS COMMAND
    /dev/snd/pcmC0D0p:   timidity   1274 F...m timidity
    /dev/snd/seq:        timidity   1274 F.... timidity
    

    一旦我杀了它,我就可以继续编辑/etc/pulse/default.pa,一切都到位了。我仍然不确定问题是缺少 PA 接收器还是胆怯接管。

    我也考虑过提交错误报告,但我不确定哪里更合适。如果您有任何建议,我将很乐意听从您的建议,并在报告中加入我的支持。

    感谢您分享解决方案!

    • 15
  2. Debianuser
    2019-04-10T21:35:27+08:002019-04-10T21:35:27+08:00

    我刚刚遇到了这个确切的问题,卸载 Timidity 解决了它。从字面上看,由于 apt 删除了软件包,我看到一条通知显示我有一张声卡(解释为音量变化)。

    • 9
  3. Best Answer
    blihp
    2018-10-14T19:33:43+08:002018-10-14T19:33:43+08:00

    如果其他人遇到这种情况,这是强制 PulseAudio 使用 ALSA 设备的解决方法...

    首先,通过 ALSA 直接播放一些音频,确认您知道正确的声卡和设备:

    aplay -D plughw:<CARD#>,<DEVICE#> /usr/share/sounds/alsa/Front_Center.wav
    

    就我而言,我想要光学音频输出,因此根据我aplay -l在上面的问题中看到的输出,它是:

    aplay -D plughw:0,1 /usr/share/sounds/alsa/Front_Center.wav
    

    记下卡和设备号并添加一个条目/etc/pulse/default.pa(将 0,1 替换为上一步中对您有用的):

    load-module module-alsa-sink device=plughw:0,1
    

    我在文件中的.ifexists module-udev-detect.so行之前添加了这一行(即在### Load audio drivers statically 注释下方)

    然后以您的桌面会话登录的用户身份运行以下命令(即不是以 root 身份):

    pulseaudio --kill
    pulseaudio --start
    

    然后您应该能够打开声音设置以查看并选择卡:

    在此处输入图像描述

    此时,您应该可以通过 PulseAudio 重新播放音频。(我注意到,即使它现在可以工作,它仍然pacmd list-cards不会列出该卡) 提醒:这是一种解决方法,而不是长期修复,因此请务必记下自己以在将来的某个时间撤消此操作以查看如果它已正确修复。但它暂时使音频正常工作。

    • 5
  4. nd34567s32e
    2019-07-10T12:51:52+08:002019-07-10T12:51:52+08:00

    在 debian 9 到 debian 10 升级后,我只有一个虚拟接收器,没有任何音频

    aplay -l失败,报告错误打开 99-pulse.conf

    我/etc/alsa/conf.d/99-pulse.conf使用从 Xubuntu 安装中获取的内容创建:

    # PulseAudio alsa plugin configuration file to set the pulseaudio plugin as
    # default output for applications using alsa when pulseaudio is running.
    hook_func.pulse_load_if_running {
        lib "libasound_module_conf_pulse.so"
        func "conf_pulse_hook_load_if_running"
    }
    
    @hooks [
        {
            func pulse_load_if_running
            files [
                "/usr/share/alsa/pulse-alsa.conf"
            ]
            errors false
        }
    ]
    

    这解决了我的问题

    • 0

相关问题

  • astyle 不会更改源文件格式

  • 接收有关全新 Debian 的电子邮件

  • Debian Stretch:libgs_plugin_systemd-updates.so 中的 gnome-software 段错误

  • 通过标签将根文件系统传递给linux内核

  • 如何在拼音输入法中输入ü?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    ssh 无法协商:“找不到匹配的密码”,正在拒绝 cbc

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    如何卸载内核模块“nvidia-drm”?

    • 13 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Wong Jia Hau ssh-add 返回:“连接代理时出错:没有这样的文件或目录” 2018-08-24 23:28:13 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Bagas Sanjaya 为什么 Linux 使用 LF 作为换行符? 2017-12-20 05:48:21 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve