Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Posted Mar 6, 2020 7:54 UTC (Fri) by mads (subscriber, #55377)Parent article: Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Posted Mar 6, 2020 8:58 UTC (Fri)
by smcv (subscriber, #53363)
[Link] (19 responses)
If Pulseaudio broke compatibility, old apps would stop working: it seems better to give the new thing a new name or major version number, and have them work in parallel (presumably one can be made to output via the other) until the last Pulseaudio app goes away, at which point you no longer need Pulseaudio.
In packages that document that they break compatibility with each major version (like GTK, Qt, and taking an example from outside Unix, Direct3D) maybe the incompatible version would have been called "Pulseaudio 2", but Pulseaudio doesn't use major versions like that: Pulseaudio 13 is compatible with Pulseaudio 1.
See also the renames between the X11 and Wayland protocols, the OpenGL and Vulkan APIs, and the Win32 and WinRT APIs. (And contrast with Direct3D, where Direct3D 12 has little in common with older versions.)
Posted Mar 6, 2020 9:12 UTC (Fri)
by mads (subscriber, #55377)
[Link] (18 responses)
I get the feeling that the whole reason for making a new sound server is because people don't like PulseAudio for personal reasons.
Posted Mar 6, 2020 9:46 UTC (Fri)
by intelfx (subscriber, #130118)
[Link] (3 responses)
Haters gonna hate.
Those who disliked PA (and still do so when there are little to no rational reasons left for such dislike) can be well expected to contempt PipeWire even more.
Posted Mar 6, 2020 11:30 UTC (Fri)
by LtWorf (subscriber, #124958)
[Link] (2 responses)
The fact that something works for you does not imply that it works for everyone else in the world.
For several years on my computers, whenever the sound stopped working it meant that some package had pulled in pulseaudio.
Of course I'm sure I could have put in the time to debug the issue and fix it. On the other hand, why bother if removing it was all it took to fix the issue?
Also remember that the default configuration of pulseaudio does a thing about relative volumes of streams, which means you'll end up blasting full volumes sounds and possibly getting hearing damage. Distributions are expected to workaround this.
Anyway, I still don't use it because despite now it works ok out of the box, it still solves an issue I've never had. And without it I've always had multiple processes producing sounds.
So please don't be a fanboy and do not discount other people's legitimate issues just because you don't have them. It's not very inclusive.
Posted Mar 6, 2020 12:04 UTC (Fri)
by intelfx (subscriber, #130118)
[Link] (1 responses)
I'm not joining you on this flame war.
What has been said is simple: if someone dislikes PulseAudio for personal reasons (i. e., the definition of "hater"), it's more than likely that they will dislike PipeWire even more.
Therefore, it's unlikely that this specific consideration was the driving force behind PipeWire.
Posted Mar 6, 2020 18:43 UTC (Fri)
by joib (subscriber, #8541)
[Link]
Posted Mar 6, 2020 10:07 UTC (Fri)
by Wol (subscriber, #4433)
[Link] (12 responses)
Well, the reason PulseAudio was written was because Alsa was fundamentally flawed, and it was easier to start from scratch. PipeWire has been written because PulseAudio is fundamentally flawed, and it's easier to start from scratch. Fundamentally, that is, as in the design itself is wrong.
PulseAudio is a sound *playback* system. If you have problems, you increase the buffer and delay the output - bit like "live" tv is delayed a couple of seconds to allow the staff to take action if something happens that shouldn't. That's why Jack was written - because the option of delaying output is simply unacceptable in a feedback situation (ie, the lead is singing con belto into a mike on stage).
So just as PulseAudio sought to provide a single unified response to the problem of sound in early linux distros (where each application thought it had total control into the sound card), now PipeWire is fixing PulseAudio's delusion that it has total control of sound output.
Cheers,
Posted Mar 6, 2020 11:42 UTC (Fri)
by mads (subscriber, #55377)
[Link] (11 responses)
From the outside this all looks like some cadt thing.
Posted Mar 6, 2020 19:13 UTC (Fri)
by ocrete (subscriber, #107180)
[Link] (10 responses)
Wim actually started by trying to add security enforcement to PulseAudio, and it quickly turned into a disaster. And that is before starting to talk about unfixable design issues that make the latency quite high. And then having latency means you need things like rollback: being able to undo any effect you apply and re-apply a new effect, so that changing the volume is instant. All of those things make the PulseAudio code quite complex in ways that PipeWire is a much more simple and elegant solution.
Posted Mar 7, 2020 15:53 UTC (Sat)
by kleptog (subscriber, #1183)
[Link] (5 responses)
Posted Mar 8, 2020 22:33 UTC (Sun)
by Wol (subscriber, #4433)
[Link] (4 responses)
So now you have an interface where you fool PulseAudio into thinking it has control of the soundcard ...
This is the way computing *should* advance - the new layer fools the old layer into thinking nothing's changed ... I always think of IBM mainframes, where an IBM 360 program runs on a virtual 360, which used to run on a 370 and now runs on a virtual 370 which runs on ... well I don't know the progression of mainframes, but old 360 applications sit on top of three or four emulators to run on the latest hardware.
Cheers,
Posted Mar 17, 2020 21:49 UTC (Tue)
by nix (subscriber, #2304)
[Link] (3 responses)
Posted Mar 18, 2020 11:06 UTC (Wed)
by smurf (subscriber, #17840)
[Link] (1 responses)
ALSA is/was way easier, pulseaudio hooks itself into it reasonably seamlessly, though the extra layer is painfully visible at times.
Posted Mar 19, 2020 22:00 UTC (Thu)
by nix (subscriber, #2304)
[Link]
Posted Mar 18, 2020 14:55 UTC (Wed)
by nybble41 (subscriber, #55106)
[Link]
For ALSA, PulseAudio provides an ALSA plugin which connects to PA. That is essentially PA emulating a sound card, if one considers other ALSA plugins like dmix or plughw which appear the same as sound cards to applications to be "soundcard emulation". Only OSS required the LD_PRELOAD, since OSS applications accessed the device nodes directly. With CUSE and osspd to provide literal "soundcard emulation" for OSS apps one doesn't even need that.
Posted Mar 7, 2020 21:07 UTC (Sat)
by luto (guest, #39314)
[Link] (3 responses)
Posted Mar 8, 2020 17:16 UTC (Sun)
by Wol (subscriber, #4433)
[Link]
As far as Jack is concerned you can NOT buffer the audio - it needs HARD realtime with a latency measured in fractions of a millisecond. (Miss that target, and the result will - literally - be painful for your listeners.)
If you've got sub-millisecond latency, sounds like your requirements would be fairly easy to meet.
Cheers,
Posted Mar 14, 2020 13:03 UTC (Sat)
by wtay (guest, #55923)
[Link] (1 responses)
It keeps buffers as small as the lowest requested latency by all clients. The largest buffer it can fill is 8192 samples (171ms). Buffers are usually 1024 samples or 21ms.
It will wake up more often and never needs to zap large buffers. This makes things much less complex so that you can make those frequent wake-ups so much more efficient.
There is some performance data here:
Posted Mar 19, 2020 3:19 UTC (Thu)
by flussence (guest, #85566)
[Link]
Posted Mar 6, 2020 19:53 UTC (Fri)
by flussence (guest, #85566)
[Link]
Posted Mar 6, 2020 9:48 UTC (Fri)
by smurf (subscriber, #17840)
[Link]
Better to start with a design that takes all of this into account from the beginning and worry about PA compatibility later, it's not that difficult (in contrast to JACK, pulseaudio doesn't even require hard realtime – you can just increase the deadline and ask your source to send the audio earlier if things are tight) and frankly the least of your worries when writing a new multimedia subsystem.
Posted Mar 6, 2020 11:13 UTC (Fri)
by kazer (subscriber, #134462)
[Link]
But it looks like PW has stable API that is backwards-compatible with PA already.
Posted Mar 6, 2020 13:10 UTC (Fri)
by darwi (subscriber, #131202)
[Link]
Unfortunately the security issues are unfixable due to core design decisions made by PA in its very early days. I've summarized these issues some long time ago here:
https://www.freedesktop.org/wiki/Software/PulseAudio/Docu...
This is not to blame PA by the way. As said in the article, it was created in a completely different time. Computer usage scenarios are much different today.
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Wol
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Wol
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Wol
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/...
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
Bouzas: PipeWire, the media service transforming the Linux multimedia landscape
https://lists.freedesktop.org/archives/pulseaudio-discuss...
