Live data from Hacker News

PipeWire: The Linux audio/video bus

lwn.net

171–180 of 203 posts

Re: PipeWire: The Linux audio/video bus

#171
post #149

Earlier quoted context omitted.

I’m using pipewire in NixOS unstable and it’s working very well. I know they are working in integrating new pipewire configuration with Nix configuration.

I am just waiting the release of the next NixOS stable version, since the integration in the current stable version (20.09) is still lacking some important features.

I can't switch without SELinux support.

Re: PipeWire: The Linux audio/video bus

#172
post #36
post #5

Just tried it on NixOS, had no idea it was so fleshed out already! Thought it'd be full of bugs but was pleasantly surprised, it just worked. No issues with compatibility, extremely low latency and has JACK and PulseAudio shims, so everything works out of the box, including pro audio stuff like Reaper and Ardour. And thanks to the JACK shim I can patch around the outputs with qjackctl. This is compared to JACK, which…

>This is compared to JACK, which I never managed to properly combine with PulseAudio. Yeah making PulseAudio play nice with JACK seems to be tricky. Over time I configured it in four different environments (different Linux Distributions and/or Versions) and for each of them I had to do things (at least slightly) differently to get them to work.

> Yeah making PulseAudio play nice with JACK seems to be tricky.

for me https://github.com/brummer10/pajackconnect has worked flawlessly... but I've switched to pipewire and I'm not looking back !

Re: PipeWire: The Linux audio/video bus

#173
post #166

I wanted to give this a spin, but it’s seemingly not packaged in a meaningful way on Ubuntu yet. That is, there is no pipewire-pulse, pipewire-jack, etc. Oh well. Maybe next version?

I tried to get it running a few weeks ago on Ubuntu, but gave up. It's pretty simple on Arch or Fedora currently, but Ubuntu seems to be lacking the necessary packages. Hopefully soon.

I just tried building it from source, and in the end I got everything right... On paper.

I got pulseaudio wrapped by pipewire-pulse, and applications launched and acted as if they produced audio (as opposed to being blocked), but I still couldn't get any sound.

Granted I have a complicated setup with a laptop with 2 HDMI outputs, 2 USB-soundcards, built-in headphone adapter and a built-in speaker.

Obviously that setup is going to take some configuration to get right, but with PulseAudio I could set it up pretty quickly with pavucontrol.

No such luck with PipeWire ... yet. I guess it will get there sooner or later :)

Re: PipeWire: The Linux audio/video bus

#174
post #12
post #5

Just tried it on NixOS, had no idea it was so fleshed out already! Thought it'd be full of bugs but was pleasantly surprised, it just worked. No issues with compatibility, extremely low latency and has JACK and PulseAudio shims, so everything works out of the box, including pro audio stuff like Reaper and Ardour. And thanks to the JACK shim I can patch around the outputs with qjackctl. This is compared to JACK, which…

But does it work with the OSS shim for alsa shim for pulseaudio shim for jack shim for pipewire? Jokes aside my first reaction upon hearing about pipewire was "oh no, not yet an other Linux audio API" but maybe a miracle will happen and it'll be the Chosen One. I know that audio is hard but man the situation on Linux is such a terrible mess, not in small part because everybody reinvents the wheel instead of fixing th…

I also liked JACK the best. But was frustrated with compatibility layers.

Pipewire lets me use all the JACK tooling, but without needing a special compat layer to manage it. so for now, I'm pretty excited

Still havent figured out how to get anything working for video.

Re: PipeWire: The Linux audio/video bus

#175
post #158

Earlier quoted context omitted.

Libalsa is there in FreeBSD ports, but it's only for backward compatibility with Linux, and it's only userspace parts. The kernel implements OSS API.

I mean Linux, it does the same but reversed: the kernel implements the ALSA API, and libaoss is provided for backwards compatibility in userspace with OSS. What else should they have done? The ALSA API is not the same as OSS and has a different set of features.

Feature set doesn’t really depend on the API, FreeBSD implements all that functionality despite using OSS.

Re: PipeWire: The Linux audio/video bus

#176

Earlier quoted context omitted.

> extremely low latency How low is "extremely low", especially compared to JACK that I'm currently using when doing music production?

What latency do you get using JACK?

Not in front of the right computer, but I think it's around 15ms for a full roundtrip.

Re: PipeWire: The Linux audio/video bus

#177
post #98
post #48

> Second, D-Bus was replaced as the IPC protocol. Instead, a native fully asynchronous protocol that was inspired by Wayland — without the XML serialization part — was implemented over Unix-domain sockets. Taymans wanted a protocol that is simple and hard-realtime safe. I'm surprised to read this; I was under the impression that D-Bus was the de jure path forward for interprocess communication like this. That's not t…

Well, D-Bus was originally designed to solve the problem of... a message bus. So you can pass messages down the bus and multiple consumers can see it, you can call "into" other bus services as a kind of RPC, etc. Even today, there's no real alternative, natively-built solution to the message bus problem for Linux. There have been various proposals to solve this directly in Linux (e.g. multicast AF_UNIX, bus1, k-dbus)…

> There's one problem with capability oriented design: once you learn about it, everything else is obviously, painfully broken and inadequate.

oh yes!

I wonder if localhost-only UDP multicast can be an usablesubstitute for the missing AF_UNIX multicast.

Re: PipeWire: The Linux audio/video bus

#178
post #98

Earlier quoted context omitted.

Well, D-Bus was originally designed to solve the problem of... a message bus. So you can pass messages down the bus and multiple consumers can see it, you can call "into" other bus services as a kind of RPC, etc. Even today, there's no real alternative, natively-built solution to the message bus problem for Linux. There have been various proposals to solve this directly in Linux (e.g. multicast AF_UNIX, bus1, k-dbus)…

> The biggest is multicast; as far as I know there's just no good way to write a message once and have it appear atomically for N listeners, without D-Bus... I once wrote a proof of concept that uses the file system to do this. Basically, writers write their message as a file to a directory that readers watch via inotify. When done in a RAM based file system like tmpfs, you need not even touch the disk. There are sec…

If you use shared memory, then you can use interprocess futexes for signaling, no need for inotify. That's pretty much how posix mq_open is implemented.

Re: PipeWire: The Linux audio/video bus

#179
post #119
post #37

Earlier quoted context omitted.

I don't remember this at all, but this might explain that. Or maybe a distribution like debian stable shipped with an outdated ALSA version, taken from the short period between release and dmix. Or just disabled dmix. Would love if someone remembered specifics. I kinda assumed people mix up Alsa and OSS or don't remember anymore what actually did and what did not work before Pulseaudio was introduced.

In the early 00's (before PulseAudio), my desktop had an old SoundBlaster Live PCI card that was pretty common around the turn of the millennium. ALSA dmix Just Worked with that one. Any other hardware I encountered required some kind of software mixing, IIRC. Not that my experience was extensive, but I got the impression that hardware or driver support for dmix wasn't that common.

Dmix was that software mixing; in the early 00's there were some cards capable of mixing in hardware and dmix was not used for them.

Re: PipeWire: The Linux audio/video bus

#180
post #136
post #119

Earlier quoted context omitted.

In the early 00's (before PulseAudio), my desktop had an old SoundBlaster Live PCI card that was pretty common around the turn of the millennium. ALSA dmix Just Worked with that one. Any other hardware I encountered required some kind of software mixing, IIRC. Not that my experience was extensive, but I got the impression that hardware or driver support for dmix wasn't that common.

> Any other hardware I encountered required some kind of software mixing, IIRC. Yes, that was dmix :) And it fits the timeline, hardware mixing was killed off back then by soundcard vendors/microsoft, iirc.

Hardware mixing was killed, because it turned out that it is more efficient to mix several streams with CPU and move just a single one via the bus. It was also more flexible and without weird limits - for example, GUS could mix 14 streams at 44,1 kHz, and if you went above (up to 32), the frequency of each stream went down.
Post reply on HN