4 ms·
Manufacturers can do a lot with DSP to make small speakers sound better. But "advanced" is saying a lot here. Recent speakers in macs and macbooks are over-driv
by johnwalkr 3y ago
Manufacturers can do a lot with DSP to make small speakers sound better. But "advanced" is saying a lot here. Recent speakers in macs and macbooks are over-driven to sound better and louder, with the DSP modeling energy input to the speaker and temperature of the speaker and keeping it within its physical limits. Without this DSP, the speakers not only sound terrible but become physically damaged if you try to use them at more than a very low volume. Any modern smart speaker or smartphone you buy will use similar DSP to sound much better and louder than it ought to, given its size. I think other laptops also do something similar at the hardware level.
Rightly or wrongly, Apple does it in software on the CPU but until now this wasn't replicated in linux. So the Asahi project (which is for macs with M1/2/3 CPUs), has added this feature to linux[1] and is working on adding DSP models for each model of Mx Mac. In Asahi Linux Speakers have been disabled by default on all models until this feature as well as the specific DSP for each model is ready. Now they have reached the point where speakers are enabled for the first model, which is a huge milestone.
[1] I originally wrote "linux kernel" but it is actually done in user space, with interlocks in the kernel to fall back to simple aggressive volume limiting.
- MichaelZuo 3y agoSo if the DSP model were only slightly off, then it could permanently damage the speakers?
- johnwalkr 3y agoNo because you make the models conservative. In the link marcan mentions they will improve performance over time (presumably partly by making the models less conservative) and are "shipping with a hard volume reduction limit of -7dBFS to catch potential bugs or misbehavior."
- MichaelZuo 3y agoIf so, how are the speakers over-driven to sound better and louder? Do they have a very very conservative profile by default?
- CuriousCosmic 3y agoSo speakers have a worst case maximum power and sound profile. That is the bounds that if you never exceed you will be safe. But if you push past those worst case bounds, now you are entering a dynamic system where things like temperature start determining the actual bounds of the hardware and the points where stuff starts causing damage. Apple provides a system that drives the speakers within those bounds as close to the actual bounds as possible to get the most out of the system that they realistically can. Asahi is trying to do the same but are choosing a profile that is far more conservative than apple to start with while they get things ironed out. This profile they have is still an improvement over the worst case bounds but it has very sharp/jarring "safeties" that trigger when the system suspects it might be close to damaging the hardware (dropping immediately to a much lower, safe level vs apple's profile which gradually shifts the audio to a safe point without making it obvious that it is doing so).
- johnwalkr 3y agoYou could say Asahi Linux was very conservative about this because they disabled speakers altogether until now. It’s ok to be quite loud for any one peak for a short amount of time (let’s say 50dB for 10ms) but for indefinite time periods much less is ok (let’s say 30dB but these are totally made up numbers). There are also limits to how much energy you can put into the speaker before it overheats. There also may be some frequencies with different limits (this is total speculation on my part). So the DSP models the behavior of the speakers and tweaks the input to prevent them from overheating (in my understanding). Normally you won’t notice this unless you are trying to play a single tone at max volume. Without this advanced DSP, you would have to just limit the output to 30dB which in practice means high volume parts of your audio are clipped or you limit to a very low volume to have enough headroom to play the louder components of your audio. Considering how loud and good modern macbooks, smartphones and smart speakers sound compared to similar sized speakers from even 10 years ago I think the effect is pretty great.
- c0pium 3y agoThe real answer to this question is yes. There’s a caveat by the devs that their safeguards make bugs unlikely, but a bug here means permanently damaged hardware.
- cyberax 3y agoYup. Directly outputting maximum sound energy (high-frequency high-amplitude) will permanently damage the speakers in just a few seconds.
- leidenfrost 3y agoDoes Windows have this? If it does, can we "import" it to linux?
- pantalaimon 3y agoIt's not Windows itself, but vendors providing machine specific drivers.