如何將 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

相關內容