I found it interesting the way you stated pa working through a dummy pulse audio server embedded in the pipewire system. …
I spent some time after reading that in your post, reading a bit further on this. I previously understood that pipewire was coded in a way to work with pulse audio, but I did not take the time to dig much further on this …
… ie after reading the way you summarized this (which I now kind of like as a good summary) I did dig a bit deeper now, albeit not too much deeper.
What I read recently is in modern GNU/Linux systems, pipewire-pulse serves as a compatibility layer that allows the PipeWire multimedia server to act as a direct replacement for the older PulseAudio sound server.
I had not looked at this much before in the past, and I confess I did not (until now) appreciate that pipewire is a direct replacement for pulse audio …
I had a very wrong (not researched) fuzzy speculation before, that they both might work a bit in parallel. I have that sorted now.
To re-iterate … what I understand now is that pipewire-pulse serves as a compatibility layer that allows the PipeWire multimedia server to act as a direct replacement for the older PulseAudio sound server - which you succinctly summed up as a ‘dummy server’.
I read a bit further, and now have updated my knowledge to note that an application, such as a web browser or a game, which has in the past been designed to interface with the PulseAudio “language,” will still function, as pipewire-pulse intercepts these requests and translates them into PipeWire’s own language.
This seamless translation means that a large amount of existing software that was built for PulseAudio can run on a PipeWire-based system without any modifications.
Pipewire Intercepts the requests
Of course, one of the first things I asked, was how does pipewire intercept requests intended for pulse audio?
What I read was that when PipeWire is installed, for some (most ? ) GNU/Linux distributions, it replaces libpulse.so with a symlink to PipeWire’s own libpulse.so ( where pipewire-pulse in essence replaces the old libpulse library.). I believe this is the preferred method by most distributions.
I also read that alternatively, in some other GNU/Linux distributions (ie possibly Gentoo, Slackware, Debian (pre-bookworm) or Ubuntu (pre-22.04)), the system’s LD_PRELOAD or PulseAudio client library overrides ensure that apps use PipeWire’s implementation instead of a real PulseAudio server. To me that reads to be a more complex approach, but I am no programmer. Also, I am not certain re: those mentioned distributions which initially may have used this LD_PRELOAD method is still in use (nor maybe never used) the LD_PRELOAD method.
Further research, suggested that OpenSUSE (both Tumbleweed and Leap) primarily uses the library symlinking method to redirect PulseAudio applications to PipeWire, similar to Fedora and Arch Linux, and I speculate all distributions may be moving toward this simlink approach. Note ‘speculate’ is the operative word, as I still trying to learn more here. I could have this wrong.
ie. In a sense, if I understand this , due to this compatibility layer, the audio application believes it’s interfacing to a PulseAudio server, but it’s actually communicating with pipewire-pulse, which handles the audio routing, mixing, and device management behind the scenes using PipeWire’s more advanced, low-latency framework.
Hence this approach allows users to benefit from PipeWire, which I read has improvements, such as better support for some audio, video, and Bluetooth devices — while maintaining backward compatibility with all the familiar desktop applications that used pulse audio.
I am behind in my knowledge here. Other aspects have taken priority in my life, and I fell behind in my understanding of GNU/Linux in regards to pulse audio and pipewire … and I am hoping now to gradually catch up.
Back on topic …
This ‘screeching audio’ thread, is IMHO, a nice example for learning, in which one can consider some aspects of the changes with pipewire introduction as a direct replacement for pulse audio.
.