Live data from Hacker News

The Linux audio stack demystified

blog.rtrace.io

1–10 of 59 posts

Re: The Linux audio stack demystified

#2
Wrote this blog article as I needed to get a better understanding of the audio stack on Linux (esp. PipeWire, PulseAudio, ALSA, etc. ...). The article turned out to be a lenghty in-depth explanation of how audio works, how digital audio works, and what sound servers on linux actually do. Tried to write it in a way so it is accessible and understandable for beginners but also enlightening for experienced users. Hope it's helpful to HN

Re: The Linux audio stack demystified

#3
post #2

Wrote this blog article as I needed to get a better understanding of the audio stack on Linux (esp. PipeWire, PulseAudio, ALSA, etc. ...). The article turned out to be a lenghty in-depth explanation of how audio works, how digital audio works, and what sound servers on linux actually do. Tried to write it in a way so it is accessible and understandable for beginners but also enlightening for experienced users. Hope i…

My experience:

I'm interested in how Linux Audio works. The first half of the article covers other topics. It could be a separate article. An article focused on Linux Audio could say "For audio basics, click this link to my article on Audio Basics."

Even for beginners, that's useful because even beginners just want to get sound out of their speakers and anatomy and physics lessons are in the way. It's ok to start with ALSA. There's no need to boil the ocean.

Re: The Linux audio stack demystified

#4
post #2

Wrote this blog article as I needed to get a better understanding of the audio stack on Linux (esp. PipeWire, PulseAudio, ALSA, etc. ...). The article turned out to be a lenghty in-depth explanation of how audio works, how digital audio works, and what sound servers on linux actually do. Tried to write it in a way so it is accessible and understandable for beginners but also enlightening for experienced users. Hope i…

I really appreciate blogs/articles like this. It really helps me get beyond the surface on things and I always learn something. Thanks for taking the time to share.

Re: The Linux audio stack demystified

#5
Thanks for the nice writing. But do you have any insight on why is bluetooth audio so clunky on Linux? I'm using a pair of Sony XM4 and I have never had any problems on my 4 Windows machines. But on Ubuntu (both 22.04 and 24.04), I have had to jump through many hoops, from editing a bunch of config files, changing kernel flags, disable and enable a bunch of things I don't understand (mostly from reading Arch Wiki), just to get it working some of the times. Some days it will just outright refuse to connect, sometime it connects but not playing anything (switching audio device to it generates some undecipherable error logs), and (probably worst) sometime it connects very quickly but stay locked in low fidelity mode instead of a2dp sink. I'm so fed up that I just switched to wired headphones every time I use my Ubuntu.

Re: The Linux audio stack demystified

#6
"Professional audio will typicall utilize 24-bit. Everything higher than that is usually bogus. Bogus where only audiophiles will hear a difference." Does he mean internal DAW bit rates like 64/32bit float are bogus, I am probably reading it wrong ?

Re: The Linux audio stack demystified

#8

"Professional audio will typicall utilize 24-bit. Everything higher than that is usually bogus. Bogus where only audiophiles will hear a difference." Does he mean internal DAW bit rates like 64/32bit float are bogus, I am probably reading it wrong ?

I read them as talking about listening, as represented in mentioning audiophiles.

The extra depth/range available in DAW's are useful for effects processing, mixing, and mastering and are a little colored by trying to squeeze max-performance DSP on a general-purpose/commodity CPU. I just don't take them as talking about that here though.

Re: The Linux audio stack demystified

#9
post #2

Wrote this blog article as I needed to get a better understanding of the audio stack on Linux (esp. PipeWire, PulseAudio, ALSA, etc. ...). The article turned out to be a lenghty in-depth explanation of how audio works, how digital audio works, and what sound servers on linux actually do. Tried to write it in a way so it is accessible and understandable for beginners but also enlightening for experienced users. Hope i…

Learning by trying to teach is probably the best way to clarify and crystallize what we think we know. Always appreciate these kind of posts, especially since they tend to shine a line on all the contextual bullshit that experts take for granted.

Right now I’m doing the same for an identification/contextual guide of local weeds and insects for seasonal scouts (I’m an agronomist). Unfortunately I find complexity tends to quickly become fractal and highly interlinked and it’s hard to set an entry point or tell when to limit scope.

I think you’ve done a great job of doing just that.

Re: The Linux audio stack demystified

#10

"Professional audio will typicall utilize 24-bit. Everything higher than that is usually bogus. Bogus where only audiophiles will hear a difference." Does he mean internal DAW bit rates like 64/32bit float are bogus, I am probably reading it wrong ?

If you listen to an audio file at 24 bit vs 64 bits (bit depth, not bitrate), you won't notice a difference. However, if you're manipulating audio in a DAW or similar, it's possible for noise to end up amplified in the final output, so a higher bit depth could make a difference.

Think of it this way: every time you add a filter or any type of audio manipulation in your DAW, you're discarding some information and replacing it with noise (how much depends on what manipulation you're doing, but it's almost always >0). If you start at 24 bits and then don't manipulate anything, it's all good. But if you start at 24 bits and then lose 10 bits of the true signal, you're down to just 12 bits of information. But if you start at 64 bits, you can lose 40 bits before you start to notice anything (or really it depends quite a lot on many different factors, but in general there's a threshold where noise goes from "not noticeable" to "noticeable" and it's probably usually between 8 bits and 32 bits).

Don't quote me on the details (I am not an audio engineer or anything even slightly related), but that's the general gist of it.

Post reply on HN