You are not logged in.

#1 2024-09-17 20:47:45

QuantumToaster
Member
Registered: 2024-09-17
Posts: 2

[SOLVED] WirePlumber card for output is set to "Off" by default

Hi everyone,
I recently switched to a wired pair of headphones (always plugged into Line Out on the main-board) and now I have to manually set the audio card to use the "Analog Stereo Output" every time WirePlumber is restarted (e.g. on login).
How can I set this card to always use the "Analog Stereo Out" profile?

I have a little config for WirePlumber that
1. Set

bluez5.hfphsp-backend = "none"

because I didn't get my Bluetooth headphones to stick to A2DP.
2. Disable unused cards (HDMI, webcam)
3. Rename the output card:

monitor.alsa.rules = [
        {
                matches = [
                        {
                          device.name = "alsa_card.pci-0000_13_00.6"
                        }
                  ]
                  actions = {
                        update-props = {
                                device.description = "HD Audio Controller"
                                device.nick = "HD Audio Controller"
                                device.restore-profile = true
                                device.restore-routes = true
                        }
                  }
        }
]

Card in question:

$wpctl inspect 84
id 84, type PipeWire:Interface:Device
    alsa.card = "2"
    alsa.card_name = "HD-Audio Generic"
    alsa.components = "HDA:10ec0897,1458a194,00100402"
    alsa.driver_name = "snd_hda_intel"
    alsa.id = "Generic_1"
    alsa.long_card_name = "HD-Audio Generic at 0xf6580000 irq 128"
    alsa.mixer_name = "Realtek ALC897"
    api.acp.auto-port = "false"
    api.alsa.card = "2"
    api.alsa.card.longname = "HD-Audio Generic at 0xf6580000 irq 128"
    api.alsa.card.name = "HD-Audio Generic"
    api.alsa.path = "hw:2"
    api.alsa.use-acp = "true"
    api.dbus.ReserveDevice1 = "Audio2"
    api.dbus.ReserveDevice1.Priority = "-20"
  * client.id = "98"
  * device.api = "alsa"
    device.bus = "pci"
    device.bus-path = "pci-0000:13:00.6"
  * device.description = "HD Audio Controller"
    device.enum.api = "udev"
    device.icon-name = "audio-card-analog-pci"
  * device.name = "alsa_card.pci-0000_13_00.6"
  * device.nick = "HD Audio Controller"
    device.plugged.usec = "7284107"
    device.product.id = "0x15e3"
    device.product.name = "Family 17h/19h HD Audio Controller"
    device.restore-profile = "true"
    device.restore-routes = "true"
    device.string = "2"
    device.subsystem = "sound"
    device.sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:13:00.6/sound/card2"
    device.vendor.id = "0x1022"
    device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
  * factory.id = "15"
  * media.class = "Audio/Device"
    object.path = "alsa:acp:Generic_1"
  * object.serial = "256"

Sink when card is used:

wpctl inspect 123
id 123, type PipeWire:Interface:Node
    alsa.card = "2"
    alsa.card_name = "HD-Audio Generic"
    alsa.class = "generic"
    alsa.components = "HDA:10ec0897,1458a194,00100402"
    alsa.device = "0"
    alsa.driver_name = "snd_hda_intel"
    alsa.id = "Generic_1"
    alsa.long_card_name = "HD-Audio Generic at 0xf6580000 irq 128"
    alsa.mixer_name = "Realtek ALC897"
    alsa.name = "ALC897 Analog"
    alsa.resolution_bits = "16"
    alsa.subclass = "generic-mix"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.sync.id = "00000000:00000000:00000000:00000000"
    api.alsa.card.longname = "HD-Audio Generic at 0xf6580000 irq 128"
    api.alsa.card.name = "HD-Audio Generic"
    api.alsa.headroom = "0"
    api.alsa.path = "front:2"
    api.alsa.pcm.card = "2"
    api.alsa.pcm.stream = "playback"
    api.alsa.period-num = "32"
    api.alsa.period-size = "1024"
    audio.channels = "2"
    audio.position = "FL,FR"
    card.profile.device = "4"
  * client.id = "98"
    clock.quantum-limit = "8192"
    device.api = "alsa"
    device.class = "sound"
  * device.id = "84"
    device.profile.description = "Analog Stereo"
    device.profile.name = "analog-stereo"
    device.routes = "2"
  * factory.id = "19"
    factory.name = "api.alsa.pcm.sink"
    library.name = "audioconvert/libspa-audioconvert"
  * media.class = "Audio/Sink"
  * node.description = "HD Audio Controller Analog Stereo"
    node.driver = "true"
    node.loop.name = "data-loop.0"
    node.max-latency = "16384/48000"
  * node.name = "alsa_output.pci-0000_13_00.6.analog-stereo"
  * node.nick = "ALC897 Analog"
    node.pause-on-idle = "false"
  * object.path = "alsa:acp:Generic_1:4:playback"
  * object.serial = "325"
    port.group = "playback"
  * priority.driver = "1009"
  * priority.session = "1009"

Some Info:

$wireplumber --version
wireplumber
Compiled with libwireplumber 0.5.6
Linked with libwireplumber 0.5.6

$pipewire --version
pipewire
Compiled with libpipewire 1.2.3
Linked with libpipewire 1.2.3

$pacman -Qi linux-zen
Name            : linux-zen
Version         : 6.10.10.zen1-1

Last edited by QuantumToaster (2024-09-27 11:33:10)

Offline

#2 2024-09-27 11:32:22

QuantumToaster
Member
Registered: 2024-09-17
Posts: 2

Re: [SOLVED] WirePlumber card for output is set to "Off" by default

Turns out, the problem was leftover settings from plasma in ~/.local/state/wireplumber/default-nodes. After stopping wireplumber, deleting the entire wireplumber state directory and restarting wireplumber it now chooses a working profile (although it defaults to duplex and not just output. At least I now have sound by default).

Offline

Board footer

Powered by FluxBB