How to delete an output audio device?

I am using Manjaro Gnome, and I have 2 output devices for audio, one is the HDMI but there is no audio in my monitor, and the other is the notebook speakers, and always when I unplug my headphone it selects the HDMI device, and my sound stops to work.
There is a way to disable or delete this output device?

Here is my inxi -Fazy

System:
  Kernel: 5.15.84-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.15-x86_64
    root=UUID=52fa92b3-346f-49d0-8451-85818eabe887 rw rootflags=subvol=@ quiet
    splash apparmor=1 security=apparmor
    resume=UUID=a77cec8e-084c-42b3-a4e9-83bcb4d4d329 udev.log_priority=3
  Desktop: GNOME v: 43.2 tk: GTK v: 3.24.35 wm: gnome-shell dm: GDM v: 43.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Inspiron 5402 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0FJYHK v: A00 serial: <superuser required> UEFI: Dell
    v: 1.8.0 date: 10/01/2021
Battery:
  ID-1: BAT0 charge: 45.6 Wh (100.0%) condition: 45.6/53.0 Wh (85.9%)
    volts: 16.4 min: 15.0 model: BYD DELL TXD0316 type: Unknown serial: <filter>
    status: full
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8C (140) stepping: 1
    microcode: 0xA6
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB L3: 12 MiB
    desc: 1x12 MiB
  Speed (MHz): avg: 1208 high: 1285 min/max: 400/4700 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1221 2: 1230 3: 1211
    4: 1147 5: 1170 6: 1285 7: 1222 8: 1184 bogomips: 27040
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl and seccomp
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 status: Vulnerable: eIBRS with unprivileged eBPF
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell driver: i915
    v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports:
    active: HDMI-A-1,eDP-1 empty: DP-1 bus-ID: 0000:00:02.0 chip-ID: 8086:9a49
    class-ID: 0300
  Device-2: NVIDIA GP108M [GeForce MX330] vendor: Dell driver: nvidia
    v: 525.60.11 alternate: nouveau,nvidia_drm non-free: 525.xx+
    status: current (as of 2022-12) arch: Pascal code: GP10x process: TSMC 16nm
    built: 2016-21 bus-ID: 0000:2b:00.0 chip-ID: 10de:1d16 class-ID: 0302
  Device-3: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 3-6:4 chip-ID: 0bda:5538 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.org v: 1.21.1.6 with: Xwayland v: 22.1.7
    compositor: gnome-shell driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa dri: iris gpu: i915 display-ID: :1
    screens: 1
  Screen-1: 0 s-res: 3840x1080 s-size: <missing: xdpyinfo>
  Monitor-1: HDMI-A-1 mapped: HDMI-1 pos: right model: AOC 27G2G5
    serial: <filter> built: 2021 res: 1920x1080 hz: 60 dpi: 82 gamma: 1.2
    size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Monitor-2: eDP-1 pos: primary,left model: BOE Display 0x082e built: 2018
    res: 1920x1080 hz: 60 dpi: 158 gamma: 1.2 size: 309x174mm (12.17x6.85")
    diag: 355mm (14") ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 22.3.1 renderer: Mesa Intel Xe Graphics (TGL GT2)
    direct render: Yes
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3
    chip-ID: 8086:a0c8 class-ID: 0401
  Sound API: ALSA v: k5.15.84-1-MANJARO running: yes
  Sound Interface: sndio v: N/A running: no
  Sound Server-1: PulseAudio v: 16.1 running: yes
  Sound Server-2: PipeWire v: 0.3.63 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 0000:00:14.3
    chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IF-ID-1: br-01f3046a5370 state: down mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
  IF-ID-3: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 3-10:5 chip-ID: 8087:0aaa class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b rev: class-ID: 0104
Drives:
  Local Storage: total: 476.94 GiB used: 194.49 GiB (40.8%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: A-Data
    model: IM2P33F3A NVMe 512GB size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 92103061 temp: 44.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 75 GiB size: 75 GiB (100.00%) used: 60.67 GiB (80.9%)
    fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 608 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 393.44 GiB size: 393.44 GiB (100.00%)
    used: 133.83 GiB (34.0%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:4
  ID-4: /var/log raw-size: 75 GiB size: 75 GiB (100.00%)
    used: 60.67 GiB (80.9%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p2 maj-min: 259:2
Sensors:
  System Temperatures: cpu: 55.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 2955
Info:
  Processes: 381 Uptime: 32m wakeups: 4 Memory: 15.36 GiB used: 7.2 GiB (46.9%)
  Init: systemd v: 252 default: graphical tool: systemctl Compilers:
  gcc: 12.2.0 clang: 14.0.6 Packages: 1428 pm: pacman pkgs: 1418 libs: 318
  tools: gnome-software,pamac pm: flatpak pkgs: 0 pm: snap pkgs: 10 Shell: Zsh
  v: 5.9 running-in: terminator inxi: 3.3.24

Hi @andutra,

Please provide the output of:

lsmod | grep --ignore-case hdmi
░▒▓    ~  lsmod | grep --ignore-case hdmi               ✔  10:17:35  ▓▒░
snd_soc_hdac_hdmi      45056  1 snd_soc_skl_hda_dsp
snd_hda_codec_hdmi     86016  1
snd_hda_ext_core       36864  4 snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_core          393216  7 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_dmic,snd_soc_skl_hda_dsp
snd_hda_codec         184320  7 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_intel_hda_dsp_common,snd_soc_hdac_hda,snd_soc_skl_hda_dsp
snd_hda_core          118784  11 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_intel_hda_dsp_common,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_pcm               163840  12 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd                   126976  38 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_pcm,snd_soc_skl_hda_dsp

AFAIK that module is responsible for HDMI audio. So let’s test if removing it works first:

sudo modprobe --remove snd_hda_codec_hdmi

And test. If it works, we make it permanent, if not we simply reboot.

Edit:

I realized my way might be a tad complicated, so see here:

https://www.addictivetips.com/ubuntu-linux-tips/how-to-turn-sound-devices-on-and-off-in-linux/

Specifically the Gnome section.

The module was in use, but I put it in the modprobe blacklist (I will restart to see if it will work).
I went to this link, but all I saw is how to select the output audio, I am doing that already, what I want to do is to remove this HDMI to avoid me forgetting to select the speakers back when I unplug my headphone.

If that is what you do already, and it’s not what you’re looking for, then don’t worry 'bout it.