[Pipewire-devel] Migration from pulseaudio to pipewire

Martin Petzold martin.petzold at tavla.de
Sat Feb 25 01:12:19 UTC 2023


Hello,

I'm trying to migrate from pulseaudio to pipewire on a Debian bullseye 
basis (own custom build). I'm using pipewire and related packages from 
bullseye-backports:

- pipewire/bullseye-backports
- libpipewire-0.3-modules/bullseye-backports
- pipewire-bin/bullseye-backports
- pipewire-pulse/bullseye-backports
- libspa-0.2-bluetooth/bullseye-backports

- wireplumber/bullseye-backports
- libwireplumber-0.4-0/bullseye-backports

- pulseaudio-utils

Currently the setup is with wireplumber and pipewire-pulse support. More 
or less default configuration provided by the Debian packages.

I have actually two problems and was not able to find any solution or 
information about this:

1. I have a Java application, which typically uses direct access to ALSA 
(with pulseaudio using some weird routing), however it does not output 
anything after I switched to pipewire? Audio output via pw-play does 
work for another user, when I login via SSH (which starts the user 
services). The processes seem to run (there is one systemd service for 
weston and another for the Java application; both use PAMName=login):

tavla at tavla:~$ ps -u tavla-run
     PID TTY          TIME CMD
    1068 ?        00:00:00 systemd     --- started automatically
    1069 ?        00:00:00 (sd-pam)     --- login A?
    1075 ?        00:00:00 pipewire     --- started automatically
    1076 ?        00:00:02 wireplumber     --- started automatically
    1077 ?        00:00:00 pipewire-pulse     --- started automatically
    1081 ?        00:00:00 dbus-daemon     --- started automatically
    2187 tty7     00:00:00 weston     --- weston service A
    2191 tty7     00:00:00 weston-keyboard     --- weston service A
    2192 tty7     00:00:00 weston-desktop-     --- weston service A
    2380 ?        00:00:10 java     --- application service B
    2381 ?        00:00:00 (sd-pam)     --- login B?

2. I need to migrate some modules from pulseaudio to pipewire (first 
ones create sink / sources with specific format and second ones map 
channels). I can't really figure out where to start in the 
configuration. How is this done with pipewire and wireplumber:

----------

load-module module-alsa-sink device=hw:0 name=audio-xu316 format=s32le 
rate=48000 tsched=0 fragment_size=1024 fragments=4
load-module module-alsa-sink device=hw:1 name=audio-hdmi

load-module module-alsa-source name=audio-xu316 device=hw:0 format=s32le 
rate=48000 tsched=0 fragment_size=1024 fragments=4

load-module module-remap-source master=alsa_input.audio-xu316 
channel_map=front-left,front-right 
master_channel_map=front-right,front-right source_name=audio-xu316-speech
load-module module-remap-source master=alsa_input.audio-xu316 
channel_map=front-left,front-right 
master_channel_map=front-left,front-left source_name=audio-xu316-call

----------

Thanks,

Martin



More information about the Pipewire-devel mailing list