7

I don't want my computer's output to ever change to a particular sink (sometimes the sink switches over on reboot).
I cannot fix a sink to be constant because I want the default sink to change when I connect my bluetooth headset.

This is the sink I do not want to connect to -

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>

Somewhat related question - https://askubuntu.com/questions/15497/how-to-remove-nvidia-hdmi-audio-output-in-pulseaudio

Pratyush Das
  • 283
  • 1
  • 12
  • 1
    Did you find a solution ? I have a similar issue. The system finds an audio sink for my GPU (??) and it often chooses it instead of my external audio interface. I can't find any way to simply disallow pulseaudio to use this sink. – Atralb Dec 04 '20 at 09:09

2 Answers2

5

@Arthur's answer works if you boot with the device plugged in. However, if it's a hot-pluggable device that won't exactly work. It looks like PulseAudio 14 put out a fix for your issue (switching to HDMI specifically) by adding a default blacklist option for HDMI outputs. In my case, I want to blacklist my CalDigit dock, so I've modified my /etc/pulse/default.pa with the following:

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

Documentation is here: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-switch-on-connect

aiguofer
  • 181
  • 1
  • 4
4

you can set the default profile to be off in /etc/pulse/default.pa like

set-card-profile alsa_card.pci-0000_0a_00.1 off
Arthur
  • 41
  • 2