GPD Pocket 4 Speaker DSP: Configuring PipeWire so laptop speakers sound better
79 comments
·April 9, 2025smj-edison
cassepipe
Would you share the profiles you used for your framework ? I have one too and it could use a better sound
smj-edison
Here's the one I created, but be sure to try the others like @blutack mentioned: https://gist.github.com/smj-edison/280c7b293f727b40c29ffef3d...
EDIT: and full easy effects profile: https://gist.github.com/smj-edison/915c3a72bf485bd8910125b68...
blutack
If it's a 13, there's a couple linked from here: https://wiki.archlinux.org/title/Framework_Laptop_13_(AMD_Ry...
I use the "cab404" one and very impressed with it.
ahartmetz
Work on PipeWire started AFAIU as a simpler plugin API for GStreamer, so of course many things are pluggable and interposable and routable etc.
sintax
Followed an article in one of the wiki links to tune a laptop, result was quite the improvement: https://jontes.page/misc-static/enhancing-notebook-speakers
tuukkah
Do you have the version 1 (original) or the version 2 (80 dB) of the Framework speakers?
smj-edison
Version 1 (I got a framework 12 and so far have only swapped the screen). Now that I think of it, which one is the official EQ for?
tuukkah
I was thinking of the same but perhaps it's for both. I saw an explanation that the EQ compensates for the biases caused by the laptop chassis.
userbinator
I couldn't find any mentions of what audio codec it uses in an initial search, but I see "HD Audio" and other sources online say it's a Realtek, so this seems to be a standard Intel HD Audio codec. What's lesser-known is that most if not all of them have a built-in EQ function which can be used to accomplish this (and perhaps the original vendor's Windows drivers already do), but it's not well-documented. Linux has some code for that too (search for EQ in here):
https://raw.githubusercontent.com/torvalds/linux/master/soun...
manawyrm
It's an AMD platform, so it's the native AMD HD Audio Controller (17h/19h/1ah), with a Realtek ALC245 codec behind it. I have no idea what other hardware is involved, presumably an external Class-D amplifier IC (but I don't know as there doesn't seem to be a datasheet for the ALC245 available).
v-yadli
Note, this is not all about EQ. A lot of other techniques are also used, e.g. limiter, exciter (to shift the energy from mid to low), and some psychological tricks to make you believe it's making a fat bass sound, etc.
ahub
Ho wow, the sample video shows incredible results, I'd love to read more about how to configure it with my own laptop and microphone. Settings ought to be different for each laptop model, right ?
dylan604
Watching the video when they switch profiles??? sounds like when you're watching a movie and they make the music sound like coming from something in the scene and then switch to just music for the movie like showing someone with headphones/earbuds.
Pretty impressive demo.
BizarroLand
I would also like to know this. I have a Lenovo Legion and the sound quality is dramatically worse on Linux vs Windows. A fix would be a godsend.
userbinator
the sound quality is dramatically worse on Linux vs Windows
Windows drivers (Realtek?) likely load EQ coefficients into the codec, while the Linux one doesn't.
There are some tools and info here on how to get the coefficients you need (it's Hackintosh-oriented, but the basic principles apply):
https://github.com/acidanthera/AppleALC/wiki/Dumping-process...
Humbly8967
FYI, when attempting to apply this to speakers, the anechoic frequency response is required. If you try to equalize for flat-in-room response, the results are terrible. See this video[1] for loads more information and context.
rzzzt
On an old MBP I have a similar setup with these two tools:
- https://ju-x.com/hostingau.html
- https://existential.audio/blackhole/
Default output for applications is set to BlackHole's virtual sound device which the "Ext-In / Track D" channel can pick up in Hosting AU as an input. An "AUDynamicsProcessor" and "AUGraphicEQ" stage later (both built-in macOS units) it is sent back to the real output device.
c-hendricks
A lot of fun to be had with black hole + guitar rig.
thrtythreeforty
Impulse response is sort of overkill here. If you design a filter bank in the first place, you can just implement that filter bank much cheaper than doing even an FFT-based convolution. Convolution is useful when you don't know the underlying filter transfer function.
Sesse__
It really depends on what your filter bank looks like. If it's a 4-band parametric EQ, then sure, you can have four biquad IIR filters and that's it. But if you've measured an impulse response and want its inverse (e.g. through a Wiener filter), that's not what you have; you simply have another impulse response (effectively closer to a N-band graphical EQ where N >= 100), not a parametric EQ.
As a nitpick: You always know the filter transfer function, it's the DFT of the impulse response (and without the impulse response, you obviously cannot convolve).
patrakov
There are a few procedures that convert an impulse response to an approximating IIR filter:
1. Hartmut Brandenstein and Rolf Unbehauen, "Weighted Least-Squares Approximation of FIR by IIR Digital Filters", IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 49, NO. 3, MARCH 2001
2. Hon Keung Kwan and Aimin Jiang, "Recent Advances in FIR Approximation by IIR Digital Filters", 2006 International Conference on Communications, Circuits and Systems
3. Ngai Wong and Chi-Un Lei, "FIR Filter Approximation by IIR Filters Based on Discrete-Time Vector Fitting", 2007 IEEE International Symposium on Circuits and Systems (ISCAS)
The third one is approachable by anyone who has studied linear algebra at the level usually taught for physics students and knows NumPy. No special DSP course is required. My implementation takes approximately 200 lines of Python code.
The article contains a deterministic algorithm that takes a guess on the pole positions in the complex plane and returns a better guess. The idea is to start with a random guess with the correct symmetry and apply the algorithm iteratively.
The only two tricks to be aware of are: 1) their reformulation of everything in section III.B in terms of real numbers (instead of complex numbers) is not making anything simpler and should be ignored, and 2) explicitly symmetrize matrices that are supposed to be symmetrical, it order to avoid accumulation of numerical errors.
Still, it is not something that I would be willing to fully automate: for good results, one has to add a small delay or chop off a few initial near-zero samples, and guessing the delay correctly is what separates an easy-to-approximate filter from a bad one.
thrtythreeforty
Agreed - I read this bit in the article:
> generating a filter curve for a 300Hz slope, both channels were divided (A/B) against that curve
as defining a parametric EQ band. If you just generally want to invert a measured impulse response, then yeah, you don't know the underlying transfer function.
Sesse__
Well, immediately after that, they say they inverted the entire curve (through a naïve 1/|X| and then un-FFT, presumably) and saved it as an impulse response. I think the 300Hz slope is to _keep_ the rolloff in that area, so that the system doesn't try to boost bass by 40 dB and just end up clipping madly.
Since these operations sort-of commute, it is easier to understand if you invert the order of operations:
1. Invert the spectrum (ideally through something less sensitive to noise than what's done here). Now you have an impulse response that will, in theory, give you a perfectly flat frequency response.
2. Apply a 300 Hz slope. Now you gave up some of that flatness, but you have something that's physically realizable without murdering your speakers.
Retr0id
> Convolution is useful when you don't know the underlying filter transfer function
But we don't?
cycomanic
I'm not sure I understand. How would you apply your FIR filter? Are you suggesting there is a different way than to either do convolution in the time domain or a multiplication in the frequency domain?
manawyrm
REW can generate a set of peaking/shelf equalizer filters, but why would I want to do that instead of just applying the inverse impulse response instead? It's just more work for a less perfect solution/result...
colanderman
Presumably GP is suggesting IIR filters?
gmueckl
This depends entirely on the length of the impulse response, doesn't it? A very short time domain convolution isn't actually more computationally expensive than a bank of crossover filters.
smj-edison
Perhaps it's simpler to configure with a single impulse response vs multiple filters?
Glyptodon
What kills me is that I'm going to have to learn half of the skills to do this sort of thing just to reverse one PC's stereo channels. (Though in all fairness maybe it only seems complicated because this is my first contact with Suse/Tumbleweed.)
snvzz
If it's a PC, you can just do it at the wires. Much easier than software.
Glyptodon
If only. I'm stuck with current wiring/display unless I want to rewire stuff and my audio out is through display port.
nicman23
easyeffects has a filter just for that and you select RL
zveyaeyv3sfye
[flagged]
worthless-trash
We know mate, we know.. its time for your nap.
lupusreal
He's not wrong though. LLMs can significant reduce the chore of fixing odd linux desktop shit.
rasz
Under windows https://sourceforge.net/projects/equalizerapo/
>Equalizer APO can be used in conjunction with Room EQ Wizard (http://www.roomeqwizard.com/), because it can read its filter text file format.
out-of-ideas
i highly recommend https://github.com/jaakkopasanen/AutoEq for headsets - though i have not added any of these to pipewire as it seems others have done [i still prefer foobar2000 with APO + Peace + AutoEq]
rasz
Nice. Tried with Koss headphones and despite 3 entries (with custom earpads? audiophools are insane) for my model it all sounded the same to my ear when flipping EQ in player. I thought it was broken until I found Advanced and switched Target to Flat - instant difference for the worse :) Same when selecting wrong headphones resulting in bad sound with EQ enabled. Either Im deaf or my super cheap Koss KSC75 dont need additional processing to sound good.
out-of-ideas
and trying with cd quality audio? from my recollection (using a bose qc 25 in passive mode) from my first setup it changed it a little but i cannot describe it nowadays, i concluded the difference was "better" and kept it for (too?) many years now. funny thing i do remember was adding AutoEQ in twice - once through APO and once through Peace. but i notice it now more when im not listening via my headset, its subtle.
sounds like a win though on the Koss KSC75 regardless though, just makes em more portable to other devices for you
snvzz
Or get some neutral headphones like Sennheiser HD600 and do away with EQ.
abdullahkhalids
Can you similarly process the laptop microphone input so it sounds better?
lxgr
Different idea, but a lot of DSP magic happens there too: https://news.ycombinator.com/item?id=43461701
dizhn
One can do similar things with JamesDSP on Android. I believe there are ways to do it without root nowadays. Also you'd be able to find flattening eq curves for your headphone on GitHub and other places. I'll find the link if anybody is interested. This fixes artificially bass heavy headphones pretty well.
dsr_
If your headphone has already been measured, https://autoeq.app is your friend.
jorvi
Thank you for mentioning AutoEQ, I didn't know about it and it looks like a great resource :)
I wonder why laptops don't come with an internal speaker DSP profile loaded onto the EEPROM. This seems like one of those things that you really just want to do in firmware.
IEMs and headphones come EQed out of the factory AFAIK, but apparently quite poorly. I ran the autoEQ profile on my Moondrop Aria beater IEMs and it both cut through the muddiness and opened up the soundstage quite dramatically.
grandrew
I've been in this endeavor with Surface Book 2. While the results where good, the CPU usage for software DSP killed the entire effort. Microsoft is using intel's DSP accelerator to do this. While linux technically can use intel's audio DSP I never had enough time to dig into it
Blackthorn
What DSP accelerator does Intel have?
pengaru
my guess is Intel provides software windows uses to accelerate common dsp operations with simd/sse etc.
OJFord
What a rollercoaster, not having heard of the GPD Pocket 4 before now, I went through:
- cool!
- oh but there's no way this isn't hard and somewhat manual, something to tune
- wait what, end of blog, that's it, just install a package?
- oh no this is the Asahi announcement, so it's Mac only? [follows link to GitHub]
- no! This is separate, it really is just install a package!
- oh, hang on, GPD Pocket 4 is the laptop shown in image, it's for that only
No slight against the author, nothing wrong with that, just a rollercoaster to follow!
Is there any technical reason it couldn't be generic though? Surely environment has almost as much impact as the hardware anyway, wouldn't you ideally have it sample and adjust every so often on a systemd timer or whatever?
manawyrm
> Is there any technical reason it couldn't be generic though? It includes 2 .wav files containing a measured, real-life calibration data for this specific laptop.
If you measure your own device (and it's frequency/impulse response) and replace those .wav files with that -- you're good to go! There's just no universal format/place to put such calibration yet, which is why I published a custom package (incl. the filter config).
I'm kinda hoping more people generate such files for their laptops and share them, maybe we can build a collection of such profiles for many laptops :)
mycall
Perhaps there are other approaches to obtain similar results such as using Dolby Atmos?
Huh, I didn't realize pipewire had builtin support for this! I've been using a different piece of software called Easy Effects[1] on my framework laptop.
To equalize my laptop, I ended up buying a umik-1, and using REW to calculate all the filter coefficients (you can import REW's filter export right into Easy Effects). It's a subtle difference at first, but it's much cleaner (I also usually have a compressor and loudness effect enabled, as the framework speakers are pretty quiet).
[1] https://github.com/wwmm/easyeffects