如何阻止 19.10 版本更改声音/音频输出设备?

如何阻止 19.10 版本更改声音/音频输出设备?

我的声音输出设备不断从我想要的“alsa_output.usb-Bose_Corporation_Bose_USB_Audio-00.analog-surround-50”变为“alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4”。

我已经指定希望 Bose 设备成为默认音频接收器set-default-sink(参见星号):

2 sink(s) available.
  * index: 42
    name: <alsa_output.usb-Bose_Corporation_Bose_USB_Audio-00.analog-surround-50>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: RUNNING
    suspend cause: (none)
    priority: 9049
    volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB,   rear-left: 25754 /  39% / -24.34 dB,   rear-right: 0 /   0% / -inf dB,   front-center: 0 /   0% / -inf dB
            balance -1.00
    base volume: 65687 / 100% / 0.06 dB
    volume steps: 65537
    muted: no
    current latency: 23.27 ms
    max request: 10 KiB
    max rewind: 10 KiB
    monitor source: 44
    sample spec: s16le 5ch 48000Hz
    channel map: front-left,front-right,rear-left,rear-right,front-center
                 Surround 5.0
    used by: 1
    linked by: 1
    configured latency: 23.22 ms; range is 0.50 .. 1820.44 ms
    card: 6 <alsa_card.usb-Bose_Corporation_Bose_USB_Audio-00>
    module: 29
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "USB Audio"
        alsa.id = "USB Audio"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "2"
        alsa.card_name = "Bose USB Audio"
        alsa.long_card_name = "Bose Corporation Bose USB Audio at usb-0000:00:14.0-10, full speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:00:14.0-usb-0:10:1.0"
        sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/sound/card2"
        udev.id = "usb-Bose_Corporation_Bose_USB_Audio-00"
        device.bus = "usb"
        device.vendor.id = "05a7"
        device.vendor.name = "Bose Corp."
        device.product.id = "1020"
        device.product.name = "Bose USB Audio"
        device.serial = "Bose_Corporation_Bose_USB_Audio"
        device.string = "surround50:2"
        device.buffering.buffer_size = "873810"
        device.buffering.fragment_size = "436900"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-surround-50"
        device.profile.description = "Analog Surround 5.0"
        device.description = "Bose USB Audio Analog Surround 5.0"
        alsa.mixer_name = "USB Mixer"
        alsa.components = "USB05a7:1020"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-usb"
    ports:
        analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
            properties:

    active port: <analog-output>
    index: 68
    name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra4>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9030
    volume: front-left: 12074 /  18% / -44.08 dB,   front-right: 12074 /  18% / -44.08 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 70
    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 .. 371.52 ms
    card: 0 <alsa_card.pci-0000_01_00.1>
    module: 7
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 4"
        alsa.id = "HDMI 4"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "10"
        alsa.card = "1"
        alsa.card_name = "HD-Audio Generic"
        alsa.long_card_name = "HD-Audio Generic at 0xdb560000 irq 159"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
        device.bus = "pci"
        device.vendor.id = "1002"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
        device.product.id = "ab08"
        device.product.name = "Polaris 22 HDMI Audio"
        device.string = "hdmi:1,4"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo-extra4"
        device.profile.description = "Digital Stereo (HDMI 5)"
        device.description = "Polaris 22 HDMI Audio Digital Stereo (HDMI 5)"
        alsa.mixer_name = "ATI R6xx HDMI"
        alsa.components = "HDA:1002aa01,00aa0100,00100700"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "video-display"
                device.product.name = "SAMSUNG"
    active port: <hdmi-output-4>

无论如何,Ubuntu 都会在某个时间切换回 HDMI 音频设备。声音继续通过 Bose 扬声器播放,但主音量控制不会改变音量。然后我在“设置”>“声音”>“输出”中更改了设备。

我可以禁用 HDMI 设备吗?

有没有其他人有这个问题?

提前谢谢了!

答案1

尝试添加blacklist snd_hda_codec_hdmi到您的 /etc/modprobe.d/blacklist.conf 文件,然后重新启动。

这就是我在 19.10 安装上禁用 HDMI 输出的方法。

希望有所帮助。

答案2

添加

blacklist snd_hda_codec_hdmi

到您的/etc/modprobe.d/blacklist.conf文件并重新启动。

虽然不是很友好,但在尝试了其他方法都失败后,它还是帮我解决了问题。每当我的 NUC 媒体中心调暗屏幕并在获得焦点后恢复时,它都会将音频输出从 S/PDIF 更改为 HDMI,这很烦人。

相关内容