Disable port in pulseaudio

When I run a steam streaming session the port selected on my main soundcard keeps getting switched back to speakers.

Where can I configure pulseaudio to completely disable one of the output port?

pacmd list-sinks outputs:

1 sink(s) available.
* index: 0
name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: 
priority: 9959
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: 17.29 ms
max request: 3 KiB
max rewind: 64 KiB
monitor source: 0
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
             Stereo
used by: 1
linked by: 1
configured latency: 21.33 ms; range is 0.50 .. 341.33 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 = "ALC3223 Analog"
    alsa.id = "ALC3223 Analog"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "0"
    alsa.card = "1"
    alsa.card_name = "HDA Intel PCH"
    alsa.long_card_name = "HDA Intel PCH at 0xe3614000 irq 46"
    alsa.driver_name = "snd_hda_intel"
    device.bus_path = "pci-0000:00:1b.0"
    sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
    device.bus = "pci"
    device.vendor.id = "8086"
    device.vendor.name = "Intel Corporation"
    device.product.id = "9c20"
    device.product.name = "8 Series HD Audio Controller"
    device.form_factor = "internal"
    device.string = "front:1"
    device.buffering.buffer_size = "65536"
    device.buffering.fragment_size = "32768"
    device.access_mode = "mmap+timer"
    device.profile.name = "analog-stereo"
    device.profile.description = "Analogue Stereo"
    device.description = "Built-in Audio Analogue Stereo"
    alsa.mixer_name = "Realtek ALC3223"
    alsa.components = "HDA:10ec0283,102805fb,00100003"
    module-udev-detect.discovered = "1"
    device.icon_name = "audio-card-pci"
ports:
    analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
        properties:
            device.icon_name = "audio-speakers"
    analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
        properties:
            device.icon_name = "audio-headphones"
active port: <analog-output-headphones>

Solution 1:

Note: I only recommended this method if you wish to disable a port for the long-term. If you want to fix undesired automatic port switching, and still be able to use all of your ports, I recommend a different solution.

To completely disable a port:

Navigate to /usr/share/pulseaudio/alsa-mixer/paths

Find the .conf file for the port you want to disable and add .backup to its name.

In your case, you might want to change analog-output-speaker.conf to analog-output-speaker.conf.backup

This makes the file invisible to pulseaudio while retaining it as a backup.

To make the change effective, log out and log in.