TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Linux audio stack demystified

134 pointsby ruffyx6411 months ago

11 comments

ruffyx6411 months ago
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
评论 #41048418 未加载
评论 #41081712 未加载
评论 #41081382 未加载
amy-petrik-21411 months ago
I can explain it much more simple<p>&quot;At first Linus created &#x2F;dev&#x2F;dsp, and the user did smile upon him, and the user did see that it was good, and the user did see that it was simple, and people did use their sound, and people did pipe in and out sound as they did please, and Ken Thompson Shined upon them for following the way&quot;<p>&quot;Then the fiends got in on it and ruined it all, with needless complexities and configurations and situationships, with servers and daemons, and server and daemon wrappers to wrap the servers and daemons, and wrappers for those server wrappers, and then came security permissions for the server wrapper wrapper wrappers, why doesn&#x27;t my sound work anymore, and then the server wrapper server wrapper wrapper server did need to be managed for massive added complexity, so initd was replaced by systemd, which solves the server wrapper wrapper server server wrapper through a highly complicated system of servers and services and wrappers&quot;<p>RIP &#x2F;dev&#x2F;dsp you will be missed<p>- Kernighan 3:16
评论 #41087556 未加载
anvuong11 months ago
Thanks for the nice writing. But do you have any insight on why is bluetooth audio so clunky on Linux? I&#x27;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&#x27;t understand (mostly from reading Arch Wiki), just to get it working <i>some</i> 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&#x27;m so fed up that I just switched to wired headphones every time I use my Ubuntu.
评论 #41082075 未加载
评论 #41082132 未加载
评论 #41081898 未加载
评论 #41082422 未加载
评论 #41083274 未加载
评论 #41082797 未加载
评论 #41081964 未加载
epx11 months ago
I miss the simplicity of OSS :\
评论 #41081899 未加载
评论 #41081988 未加载
评论 #41082481 未加载
评论 #41082330 未加载
Zamiel_Snawley11 months ago
An informative article for the Linux parts, I skipped the basics&#x2F;intro.<p>I’d like to see some more detail on the rating chart, particularly on the axes where pipewire doesn’t surpass JACK&#x2F;pulseaudio.<p>As an embedded software engineer who deals with processing at hundreds of kilohertz, it is funny hearing anything running Linux called “real time”.<p>If it’s not carefully coded on bare metal for well understood hardware, it’s not real time, it’s just low latency. No true Scotsman though(looking over my shoulder for the FPGA programmers).
mannyv11 months ago
So far the audio section is a great intro to audio and digitization, and applies to any a-to-d process at some level. Looking forward tomplowing through the rest.<p>The problem with audio is it&#x27;s realtime (isochronous), which means good audio processing requires a guarantee of sorts. To get that guarantee requires a path through the system that&#x27;s clear, which can be difficult to construct.
评论 #41083635 未加载
ladzoppelin11 months ago
&quot;Professional audio will typicall utilize 24-bit. Everything higher than that is usually bogus. Bogus where only audiophiles will hear a difference.&quot; Does he mean internal DAW bit rates like 64&#x2F;32bit float are bogus, I am probably reading it wrong ?
评论 #41081788 未加载
评论 #41081697 未加载
评论 #41081814 未加载
评论 #41083832 未加载
Voklen10 months ago
Very nice article, I love posts that go right from the basics and build up to answer the question. And I certainly have a better understanding of DACs as a bonus!
g15jv2dp11 months ago
Dupe from three days ago by the same author <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41042753">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41042753</a>
Venn111 months ago
No mention of AoIP. I make heavy use of Netjack2 in my production &#x2F; streaming studio. Great way to move 25&#x2F;30 channels of audio between 5 PCs in real-time.<p>Beats the pants off DANTE.
评论 #41083050 未加载
lofaszvanitt11 months ago
Well, the most confusing part of linux is definitely the audio stack. Thanks for the writeup.