Introduction

Today I finally found the time to fight my audio interface device names, which in my opinion are broken.

The current situation is quite annoying because the names are too long. Furthermore there are devices listed that I don't use at all (Displayport/ HDMI Audio) see for yourself:

Kmix

how to?

I have setup wireplumber on my Archlinux. The Archlinux documentation also has an example for disabling a device: https://wiki.archlinux.org/title/WirePlumber

However, I have multiple devices and I'm sure there must be a way to edit multiple devices at the same time. The wireplumber documentation has the answer to this question 😉 see https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/conf_file.html

let's start

  1. Navigate to the folder where wireplumber looks for rules and configurations (depends on the distribution!) :

    cd ~/.config/wireplumber
  2. create and go to the wireplumber.conf.d folder

    mkdir wireplumber.conf.d
    cd wireplumber.conf.d
  3. create a file which contains the rules for doing the renaming

    vim 51-device-rename.conf
  4. my file looks like this:

    monitor.alsa.rules = [
    {
    matches = [
      {node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink"},
      {node.name = "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__source"}
    ]
    actions = {update-props = {node.description = "Laptop"}}
    },
    {
    matches = [
    {node.name = "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_6__source"}
    ]
    actions = {update-props = {node.description = "Laptop digital"}}
    }
    ]
  5. save the file with :wq

  6. restart the wireplumber service

    systemctl --user restart wireplumber

step by step

so what happens here ?

  1. In line 1 of the script the needed rule will be created.
  2. lines 3-6 and 10-12 define a selection of the devices we want to change.
    • The needed values for the select definition (matches) can be queried using the wpctl status and wpctl inspect {DeviceID} Command:
  3. The lines 7 and 13 change the description of the selected devices

After this rule and the restart of Wireplumber kmix shows Laptop for the Speakers and Laptop/Laptop digital for the integrated Microphones:

RWill_2024-06-06%2011-28-01 RWill_2024-06-06%2011-31-04

remove unwanted outputs (HDMI/DP Devices)

Next, we take care of the unnecessary devices. we create another file 51-disable-dell-dp-audio.conf

monitor.alsa.rules = [
  {
    matches = [
      {
        device.profile.description = "~HDMI / DisplayPort*"
      }
    ]
    actions = {
      update-props = {
         node.disabled = true
      }
    }
  }
]

look how beautiful:
RWill_2024-06-06%2011-37-50

Previous Post Next Post