#
✕ nick:marcan
#asahi · 2023-10-30 02:20
marcanplus with a concert you know how loud you're going to be anyway, it's not like you need to handle an arbitrary input
#asahi · 2023-10-30 02:20
marcanjust like with macs, there's a lot of DSP and fancy processing that goes into big concert installations
#asahi · 2023-10-30 02:19
marcanit's different tech to the microspeaker stuff but a similar concept
#asahi · 2023-10-30 02:19
marcanyes, big speaker systems have running average power limiters of some sort
#asahi · 2023-10-30 02:07
marcanbut also what I said about tweeters, metal music isn't putting all its power in the tweeter range is it :p
#asahi · 2023-10-30 02:07
marcanthat means IWTLW is **4 times** the sound power of the idiotic EDM producer, give or take (okay LUFS isn't RMS power but you get the idea)
#asahi · 2023-10-30 02:06
marcan-14 is the YouTube normalization standard, -9 is typical crunchy CD, -6 is where things start getting stupid, -3 is what ISTR some idiotic EDM producer boasted. IWTLW is **+3**.
#asahi · 2023-10-30 02:05
marcanjust look at the actual LUFS numbers
#asahi · 2023-10-30 02:05
marcanvery much so
#asahi · 2023-10-30 02:05
marcanyes
#asahi · 2023-10-30 02:04
marcanif you were designing a system with safe absolute maximum power, like dumb amp systems, you'd have to cripple your volume to make that safe
#asahi · 2023-10-30 02:04
marcanbut that never happens with real things people listen to
#asahi · 2023-10-30 02:04
marcanbut a worst-case signal like a 5kHz square wave would send max power to the tweeter
#asahi · 2023-10-30 02:04
marcanthis is *especially* true once you have 2-way systems with a tweeter, since the tweeter will usually end up with a tiny fraction of the total power
#asahi · 2023-10-30 02:03
marcanso you can play it a lot louder and not blow your speakers
#asahi · 2023-10-30 02:03
marcanmost music has a lot lower average power than the aforementioned worst-case song
#asahi · 2023-10-30 02:03
marcanspeakers care about average power
#asahi · 2023-10-30 02:03
marcanit's not "overdriving"
#asahi · 2023-10-30 02:02
marcanno, we don't do excursion protection either
#asahi · 2023-10-30 02:01
marcan(Apple don't use excursion protection, it's turned off in all their configs)
#asahi · 2023-10-30 02:01
marcanthat (well the thermal part) is what speakersafetyd implements
#asahi · 2023-10-30 02:00
marcanand the algorithm is described here: https://www.ti.com/lit/an/slaa857/slaa857.pdf (using an iPhone 7 speaker as the example, cough cough I wonder who they were working with)
#asahi · 2023-10-30 01:59
marcanif anyone wants to learn more, marketing slides: https://www.ti.com/jp/lit/ml/slyp715/slyp715.pdf (Apple version in page 15 "non-integrated")
#asahi · 2023-10-30 01:59
marcanoh yeah
#asahi · 2023-10-30 01:55
marcanwhich is why pretty much every phone uses smart amp technology like Apple (usually done in firmware though)
#asahi · 2023-10-30 01:54
marcanmeanwhile every phone manufacturer cares about this because you have to on phones to get *any* volume out of speakers that small lol
#asahi · 2023-10-30 01:54
marcansome engineer somewhere put in 1W speakers and configured the amps for 1W and that's that
#asahi · 2023-10-30 01:54
marcanpretty sure nobody asked anything, most laptop manufacturers just *do not care* about any of this
#asahi · 2023-10-30 01:53
marcan(but that won't melt a speaker that quickly and it's not IWTLW level with VLC, Dell were also definitely overdriving them to begin with)
#asahi · 2023-10-30 01:52
marcanbut most manufacturers don't know that, they just say "1W speakers so max volume is 1W RMS nominal" where "nominal" is calculated using a sine wave as it always is, and then VLC starts clipping your audio at >100% volume and that happens
#asahi · 2023-10-30 01:51
marcan(that song is engineered to have absolute maximum output power, and loudness by proxy)
#asahi · 2023-10-30 01:50
marcanwhich incidentally is precisely the total power of that song, all throughout.
#asahi · 2023-10-30 01:49
marcanpeak power for an audio signal is *2 times* the power of a full scale sine wave (e.g. a full scale square wave)
#asahi · 2023-10-30 01:49
marcan let peak_pwr = 10f32.powf(amp_gain / 10.) / new_speaker.z_nominal * 2.;
#asahi · 2023-10-30 01:49
marcan // Worst-case peak power is 2x RMS power
#asahi · 2023-10-30 01:49
marcanthey were overdriving the speakers *and* forgot the I Won The Loudness War safety factor (or didn't care).
#asahi · 2023-10-30 01:46
marcanthat's why there's a whole bunch of kernel-side interlocks involved
#asahi · 2023-10-30 01:45
marcanand yes if speakersafetyd dies the kernel turns down the speakers. automatically if the process dies, or after a 250ms timeout.
#asahi · 2023-10-30 01:45
marcanthis is also different from lowering the volume the normal way, because the normal way uses DSP to do equal-loudness adjustment, so lower levels have more bass (to sound similar). the -20dB pad is hardware so it will sound tinnier at that volume (just like every other laptop again, almost nobody but Apple does equal-loudness compensation)
#asahi · 2023-10-30 01:44
marcanwhich is, perceptually, 1/4 the loudness
#asahi · 2023-10-30 01:43
marcan-20dB is the safety level
#asahi · 2023-10-30 01:43
marcanin practice we are really conservative with the caps and other manufacturers push it and blow up their speakers *cough Dell and VLC fiasco cough* so it's probably less, but not like unbearably quiet
#asahi · 2023-10-30 01:43
marcanso without speakersafetyd, on paper, it should be as loud as your average laptop (which is a lot quieter than Macs)
#asahi · 2023-10-30 01:42
marcanthe whole point of speakersafetyd is *raising* the max volume caps from worst-case. worst-case is basically what you get on every other laptop.
#asahi · 2023-10-30 01:42
marcanthe speakers will just be quiet without speakersafetyd, yes (not unusably quiet even, they're loud to begin with)
#asahi · 2023-10-27 01:03
marcanan asahi-diagnose dump taken after the problem suspend will tell us what happened (or just a journal log covering the relevant period if the machine ended up running out of battery or whatever)
#asahi · 2023-10-27 01:02
marcanbut it's also possible for a kernel/driver bug to cause suspend entry to fail, in which case the machine remains alive
#asahi · 2023-10-27 01:02
marcan(freezing userspace)
#asahi · 2023-10-27 01:02
marcanSIGSTOP is not how it works btw, but it's sort of like that I suppose
#asahi · 2023-10-27 01:02
marcanuserspace is in charge of *triggering* suspend, so it can fail to do that

plus ›