Users browsing this thread: 1 Guest(s)
Hello nixers,
I searched the forums and couldn't actually find anything related to audio.

I recently wrote a summary of the audio stack on open source Unix-like systems.
But I'd like to know your opinion and your actual local setup.

Do you prefer the audio processing to happen in user-land or kernel?
Do you have a use for audio pipeline?
Or for volume per-application?
What do you think of PipeWire, are you using it?
What's your preferred audio stack currently?
Do you generate music on your machine?

Otherwise, let's talk anything audio.

The thing I'm most amazed is that it's the first time that I actually understand ALSA's configuration format. Now it just clicked: it's a big dictionary of different profiles/devices that get merged.
Long time nixers
(08-02-2021, 03:37 AM)venam Wrote: I recently wrote a summary
A “summary”! 😂 That’s an awesome in-depth article that could show up in a book, my guy.

I use PulseAudio and Jack. PA has features that are really hard to do with plain ALSA, for example I can easily plug in an equalizer (or any LADSPA module!), I can set volume per-application (yes, I do that), I can easily move programs between sound cards (I have at least two of them, plus maybe HDMI). It’s also awesome to have those “Monitor” devices, where you can just record what’s playing on a certain device. They also allow me to use rtspeccy as a generic visualizer for everything, which is great. I admit that I skipped the first few years of PulseAudio where it might have been very buggy – no idea. It’s solid today and I actually like it.

pulsemixer is the frontend that I use. It’s a very tidy UI. Sometimes I get the impression that people are just confused by tools like pavucontrol and then blame PA for it, but that’s pure speculation, of course.

Jack is unavoidable for some software like Guitarix (which saved me a ton of money) or Ardour. My external audio interface (a Focusrite Scarlett Solo) is blacklisted in PulseAudio, so I can run Jack and PA at the same time, where Jack only uses the Scarlett. That said, Jack (or the applications using it) has more bugs than PA. For example, LMMS gets kicked from Jack all the time, which is very annoying. Ardour sometimes screws up everything, all the routing is gone. This is a major PITA, it really feels a bit fragile. Could be a bug in Ardour or Jack, I don’t know.

I used to have a hand-written ~/.asoundrc and used plain ALSA, but come on, this is so much work …

Haven’t used PipeWire yet. PA just became a really stable and solid platform for me, so I’m a bit reluctant to change again. (I have zero use for all that Flatpak stuff and containerized apps – yet.)

My desktop environment doesn’t use sound events. Well, GTK sometimes does, but not on purpose. Some of my scripts sometimes run beep, but that’s it. Sound events feel like a relic from the Windows 95 era to me. %)
I'm also currently using pulseaudio.

(09-02-2021, 01:06 PM)vain Wrote: pulsemixer is the frontend that I use
Similarly, I use pulsemixer, it's simple and neat.

I got paprefs installed in case I want to set simultaneous output, when I have multiple headsets connected like when watching a movie with friends each can have their own audio without bothering the rest of the house. I use the GUI instead of loading the module manually - It's just so much easier.

One thing I'm testing is having different virtual sinks for different cases: voip, media, notification.
So far, I have these in my
load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/bell.oga
#load-sample-lazy x11-bell  /home/vnm/media/musics/yeah_yeah.ogg
load-module module-x11-bell sample=x11-bell sink=notification

load-module module-virtual-sink use_volume_sharing=no force_flat_volume=yes sink_name=media master=alsa_output.usb-C-Media_Electronics_Inc._Microsoft_LifeChat_LX-3000-00.iec958-stereo sink_properties="device.description='media'"
load-module module-virtual-sink use_volume_sharing=no force_flat_volume=yes sink_name=voip master=alsa_output.usb-C-Media_Electronics_Inc._Microsoft_LifeChat_LX-3000-00.iec958-stereo sink_properties="device.description='voip'"
load-module module-virtual-sink use_volume_sharing=no force_flat_volume=yes sink_name=notification master=alsa_output.usb-C-Media_Electronics_Inc._Microsoft_LifeChat_LX-3000-00.iec958-stereo sink_properties="device.description='notification'"
set-default-sink alsa_output.usb-C-Media_Electronics_Inc._Microsoft_LifeChat_LX-3000-00.iec958-stereo
alsa_output.usb-C-Media_Electronics_Inc._Microsoft_LifeChat_LX-3000-00.iec958-stereo is the name of my headset (hardware sink).

NB: The module-x11-bell can't be rerouted using pulseaudio restoration database so you have to specify the sink at module load time.
Other than that this gives me 3 virtual sinks called "voip", "notification", and "media". Then I need pulseaudio to remember the routing of streams. It does that automatically normally when you manually move streams (according to different criteria) and saves it in the restoration database.
So far I haven't found any user-interface that allows editing it easily, so I started writing one today.
Long time nixers
(09-02-2021, 01:30 PM)venam Wrote: load-module module-virtual-sink
Do you know if there’s a comprehensive documentation on this module? Or the standard PA modules in general?

I know of this page:

But either I’m blind or module-virtual-sink is not listed here. Of course, I can try to deduce stuff from reading the source code, but meh.
(10-02-2021, 11:33 AM)vain Wrote: Do you know if there’s a comprehensive documentation on this module? Or the standard PA modules in general?

You can always do this:
pacmd describe-module module-virtual-sink
Name: module-virtual-sink
Version: 13.99.1
Description: Virtual sink
Author: Pierre-Louis Bossart
Usage: sink_name=<name for the sink> sink_properties=<properties for the sink> master=<name of sink to filter> rate=<sample rate> channels=<number of channels> channel_map=<channel map> use_volume_sharing=<yes or no> force_flat_volume=<yes or no>
Load Once: no

There are a bunch of default modules that comes with PulseAudio in the source directory you mentioned. Not all of them are documented on that page you sent. You can find a bigger list here. Another way would be to look in your local lib folder, somewhere like /usr/lib/pulse-<version>/modules.
That's really one of the drawback of PulseAudio and even more with PipeWire, the documentation is lacking, and the toolset could be much more advanced and easy if people were aware of the features.

EDIT: You can dump all installed modules like this:
pulseaudio --dump-modules --verbose