如何将 pacmd 接收器列入黑名单?

如何将 pacmd 接收器列入黑名单?

我不希望我的计算机的输出更改为特定接收器(有时接收器会在重新启动时切换)。
我无法将接收器固定为恒定,因为我希望在连接蓝牙耳机时更改默认接收器。

这是我不想连接的水槽 -

index: 1
    name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: IDLE
    suspend cause: (none)
    priority: 9030
    volume: front-left: 71984 / 110% / 2.45 dB,   front-right: 71984 / 110% / 2.45 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 1496.34 ms
    max request: 344 KiB
    max rewind: 344 KiB
    monitor source: 1
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 1999.82 ms; range is 0.50 .. 1999.82 ms
    card: 1 <alsa_card.pci-0000_01_00.1>
    module: 25
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 0"
        alsa.id = "HDMI 0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "3"
        alsa.card = "1"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xad080000 irq 17"
        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 = "10de"
        device.vendor.name = "NVIDIA Corporation"
        device.product.id = "10f0"
        device.product.name = "GP104 High Definition Audio Controller"
        device.string = "hdmi:1"
        device.buffering.buffer_size = "352768"
        device.buffering.fragment_size = "176384"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo"
        device.profile.description = "Digital Stereo (HDMI)"
        device.description = "GP104 High Definition Audio Controller Digital Stereo (HDMI)"
        alsa.mixer_name = "Nvidia GPU 83 HDMI/DP"
        alsa.components = "HDA:10de0083,00000000,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "video-display"
                device.product.name = "LG IPS FULLHD"
    active port: <hdmi-output-0>

有点相关的问题 -https://askubuntu.com/questions/15497/how-to-remove-nvidia-hdmi-audio-output-in-pulseaudio

答案1

如果您在插入设备的情况下启动,@Arthur 的答案就有效。但是,如果它是热插拔设备,则无法正常工作。 PulseAudio 14 似乎通过为 HDMI 输出添加默认黑名单选项来解决您的问题(特别是切换到 HDMI)。就我而言,我想将我的 CalDigit 坞站列入黑名单,因此我进行了/etc/pulse/default.pa以下修改:

.ifexists module-switch-on-connect.so
load-module module-switch-on-connect blacklist="CalDigit|hdmi"
.endif

文档在这里:https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-switch-on-connect

答案2

您可以将默认配置文件设置为关闭,/etc/pulse/default.pa例如

set-card-profile alsa_card.pci-0000_0a_00.1 off

相关内容