Differences between PulseAudio and PipeWire when using pactl
PipeWire version
$ pipewire --version
pipewire
Compiled with libpipewire 0.3.47
pactl
version
$ pactl --version
pactl 15.0
Compiled with libpulse 15.0.0
Linked with libpulse 15.0.0
Description of Problem:
When using PipeWire instead of PulseAudio I get a different result with the same pactl
command.
How Reproducible:
Always.
Steps to Reproduce:
Execute the following command:
pactl load-module module-pipe-source file=~/virtmic.fifo source_properties=device.description=Virtual-Microphone rate=48000 channels=2
Actual Results:
A source is created, however the description Virtual-Microphone
is ignored and the sample format is float32le
.
pactl list sources
[...]
Source #66
State: SUSPENDED
Name: pactl
Description: pactl
Driver: PipeWire
Sample Specification: float32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 536870913
Mute: no
Volume: front-left: 0 / 0% / -inf dB, front-right: 0 / 0% / -inf dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
node.group = "pipewire.dummy"
node.virtual = "true"
media.class = "Audio/Source"
pulse.module.id = "536870913"
media.name = "pipesource playback"
stream.is-live = "true"
node.name = "pactl"
node.autoconnect = "true"
adapt.follower.node = ""
object.register = "false"
factory.id = "6"
audio.adapt.follower = ""
factory.mode = "split"
library.name = "audioconvert/libspa-audioconvert"
clock.quantum-limit = "8192"
client.id = "45"
object.id = "46"
object.serial = "66"
Formats:
pcm
This is the source created when using PulseAudio by using the same command
Source #1
State: SUSPENDED
Name: fifo_input
Description: Virtual-Microphone
Driver: module-pipe-source.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 24
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.string = "/home/myuser/virtmic.fifo"
device.description = "Virtual-Microphone"
device.icon_name = "audio-input-microphone"
Formats:
pcm
Expected Results:
The source_properties=device.description=Virtual-Microphone
option should not get ignored and if unspecified the sample format should be s16
which is the default format according to the PulseAudio documentation.
Notes:
I managed to set the description with the following command:
pactl load-module module-pipe-source file=~/virtmic.fifo source_name=Virtual-Microphone format=s16 rate=48000 channels=2
Apparently, PipeWire derives the description from source_name
and uses it to set both Name
and Description
fields.