Pipewire

install pipewire

pacman -S pipewire wireplumber pipewire-audio pipewire-alsa pipewire-pulse 

needed for steam and gaming, remember to enable multilib

pacman -S lib32-pipewire lib32-libpulse

maybe needed for non onboard snd cards

pacman -S alsa-firmware

use pw-cli to find card information

pw-cli list-objects Device
    id 42, type PipeWire:Interface:Device/3
        object.serial = "42"
        factory.id = "14"
        client.id = "41"
        device.api = "alsa"
        device.description = "SB-Z"
        device.name = "alsa_card.pci-0000_06_00.0"
        device.nick = "HDA Creative"
        media.class = "Audio/Device"
    id 43, type PipeWire:Interface:Device/3
        object.serial = "43"
        factory.id = "14"
        client.id = "41"
        device.api = "alsa"
        device.description = "Arctis"
        device.name = "alsa_card.usb-SteelSeries_Arctis_Nova_Pro_Wireless-00"
        device.nick = "Arctis Nova Pro Wireless"
        media.class = "Audio/Device"

make user wireplumber.conf.d

mkdir -p ~/.config/wireplumber/wireplumber.conf.d

51-alsa-acp.conf

monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "~alsa_card.*"
      }
    ]
    actions = {
      update-props = {
        api.alsa.use-acp = true,
        api.acp.auto-profile = false
        api.acp.auto-port = false
      }
    }
  }
]

51-disable-suspension.conf

see https://wiki.archlinux.org/title/PipeWire#Noticeable_audio_delay_or_audible_pop/crack_when_starting_playback

monitor.alsa.rules = [
  {
    matches = [
      {
        # Matches all sources
        node.name = "~alsa_input.*"
      },
      {
        # Matches all sinks
        node.name = "~alsa_output.*"
      }
    ]
    actions = {
      update-props = {
        session.suspend-timeout-seconds = 0
      }
    }
  }
]
# bluetooth devices
monitor.bluez.rules = [
  {
    matches = [
      {
        # Matches all sources
        node.name = "~bluez_input.*"
      },
      {
        # Matches all sinks
        node.name = "~bluez_output.*"
      }
    ]
    actions = {
      update-props = {
        session.suspend-timeout-seconds = 0
      }
    }
  }
]

51-soundblasterz.conf

setting device.profile-set to analog-only.conf to disable S/PDIFF

monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "alsa_card.pci-0000_06_00.0"
      }
    ]
    actions = {
      update-props = {
        device.description = "SB-Z"
        device.product.name = "SB-Z"
        device.profile-set = "analog-only.conf"
      }
    }
  }
]

51-arctis-rename.conf

monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "alsa_card.usb-SteelSeries_Arctis_Nova_Pro_Wireless-00"
      }
    ]
    actions = {
      update-props = {
        device.description = "Arctis"
        device.product.name = "Arctis"
      }
    }
  }
]

51-nvidia-disable-hdmi-devices.conf

monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "alsa_card.pci-0000_0a_00.1"
      }
    ]
    actions = {
      update-props = {
        device.disabled = true,
      }
    }
  }
]

forcing specific profiles for specific cards

This seems like a fucking broken mess at the moment, could not find a proper solution to set this in wireplumber. For now just using a bash script to run at startup of DE.

#!/bin/bash
for i in $(pactl list cards short|cut -d$'\t' -f2); do
  if [[ $i =~ alsa_card.pci ]]; then
    pactl set-card-profile alsa_card.pci-0000_06_00.0 output:analog-surround-21
  fi
  if [[ $i =~ SteelSeries_Arctis_Nova_Pro_Wireless ]]; then
    pactl set-card-profile alsa_card.usb-SteelSeries_Arctis_Nova_Pro_Wireless-00 output:iec958-stereo+input:mono-fallback
  fi
done

Last modified: Mon May 20 20:31:14 2024