#
✕ nick:chadmed
#asahi-dev · 2023-02-17 23:52
chadmedsven: ive had a blog post about audio waiting around to be finished for like 3 months :P
#asahi-dev · 2023-02-17 12:42
chadmedtldr is schedutil + uclamp has the best perf/W by a decent margin and performs decently close to the performance governor
#asahi-dev · 2023-02-17 12:41
chadmedhttps://gist.github.com/chadmed/e889ea905876db29cbebb7265039f5a8
#asahi-dev · 2023-02-17 08:15
chadmedi want to log AP and GPU power
#asahi-dev · 2023-02-17 08:14
chadmedgonna do some testing with uclamp now
#asahi-dev · 2023-02-17 08:14
chadmedcan anyone quickly get the t600x smc key for gpu power?
#asahi-dev · 2023-02-17 07:55
chadmedyeah
#asahi-dev · 2023-02-17 07:54
chadmedinferring fps seems like a decent route but i wonder if that wouldnt just lead to UCLAMP_MIN ending up as 1024 anyway as apps without vsync will just hog all the performance they can get out of the hardware
#asahi-dev · 2023-02-17 07:53
chadmedyeah
#asahi-dev · 2023-02-17 07:52
chadmedthat would basically be the same as using the performance governor
#asahi-dev · 2023-02-17 07:49
chadmedyoud have to pick some performance metric and then optimise for the minimum uclamp value (0,1024) that lets $app satisfy that
#asahi-dev · 2023-02-17 07:48
chadmedid be interested to see how one would implement that
#asahi-dev · 2023-02-17 07:45
chadmeduclamp goes a long way to fixing that
#asahi-dev · 2023-02-17 07:45
chadmedthe scheduler will never, ever, have enough information about those types of loads to work well without some help from userspace
#asahi-dev · 2023-02-17 07:44
chadmedthis is why userspace is being encouraged to start making use of uclamp
#asahi-dev · 2023-02-17 07:44
chadmed(PREEMPT_DYNAMIC and 1000 Hz timer of course)
#asahi-dev · 2023-02-17 07:43
chadmedthat being said, with the current default behaviour and uclamp enabled for FAIR tasks i see no apparent loss in interactivity on the desktop
#asahi-dev · 2023-02-17 07:42
chadmedalyssa: as lina said it will happen regardless _unless_ the ecores get pushed to 80% util in which case PELT and EAS go out the window and stuff gets shuffled over to less busy cores by force
#asahi-dev · 2023-02-16 09:25
chadmedobviously xonotic is not the most demanding thing in the world... but theres not really much else more demanding i can test right now in terms of interactivity-critical cpu use tasks
#asahi-dev · 2023-02-16 09:24
chadmedthere is some low level use of the pcores but the bulk of it happens on the two icestorm cores
#asahi-dev · 2023-02-16 09:23
chadmedfwiw xonotic gets essentially pegged to the ecores on my machine and it runs without a hitch
#asahi-dev · 2023-02-16 09:23
chadmedespecially with eas enabled, for short loads it will always try to minimise the energy use
#asahi-dev · 2023-02-16 09:23
chadmedmarcan, alyssa, jannau, lina: re the scheduling convo in -gpu, theres not a lot that can be done for short (time domain) loads in particular given that the scheduler will never have enough information to about them
#asahi-dev · 2023-02-14 20:58
chadmedmore accurately, i take the slice of samples relating to each speaker and convert the elements of that slice
#asahi-dev · 2023-02-14 20:57
chadmedpovik: the buffer which the samples are read into is an array of i16s. I convert them to 32-bit floats after the samples are in.
#asahi-dev · 2023-02-14 12:41
chadmed\o/
#asahi-dev · 2023-02-14 12:24
chadmedthey might poke the register but theres a volume ramp down in coreaudio too
#asahi-dev · 2023-02-14 12:23
chadmedsame on startup
#asahi-dev · 2023-02-14 12:23
chadmedapple actually have a slight buffer and quick signal decay in userspace because these amps pop when you cut off their singnal too quick lmfao
#asahi-dev · 2023-02-14 12:19
chadmedit can definitely cut audio levels which is good but its erm.... very crude so needs refining
#asahi-dev · 2023-02-14 12:18
chadmedit mustve just not liked 44.1
#asahi-dev · 2023-02-14 12:18
chadmedoh its working at different rates now
#asahi-dev · 2023-02-14 12:15
chadmedyeah the only issue i see is the rate. re idleness we can just stop talking to visense when the speakers up indicator goes dark, and we can also block program flow on an empty sample buffer
#asahi-dev · 2023-02-14 12:11
chadmedis there a way to get samples out of a pcm without having it "properly" open?
#asahi-dev · 2023-02-14 12:09
chadmedbut being that theyre still bindings for alsa-lib its all very fragile :(
#asahi-dev · 2023-02-14 12:09
chadmedalsa-lib will let you query the pcm for supported rates (and by extension the rust bindings)
#asahi-dev · 2023-02-14 12:07
chadmedwhich is more than a little bit annoying
#asahi-dev · 2023-02-14 12:06
chadmedwe will need a way to know what sample rate the main pcm has been opened by $audio_server at since the visense pcm will refuse to be opened at any other rate
#asahi-dev · 2023-02-14 12:06
chadmedpushed some fixes
#asahi-dev · 2023-02-14 11:10
chadmedit works (kinda)!
#asahi-dev · 2023-02-14 10:32
chadmeddoesnt really do anything with the magnet temp after it gets it
#asahi-dev · 2023-02-14 10:31
chadmedhttps://github.com/chadmed/speakersafetyd very very basic proof of concept for the model
#asahi-dev · 2023-02-14 09:27
chadmedoh cool thanks!
#asahi-dev · 2023-02-14 09:23
chadmed(specifically the model and derivation of the voltage/current)
#asahi-dev · 2023-02-14 09:22
chadmedmarcan: do you have the speaker work you did on stream published anywhere?
#asahi-dev · 2023-02-13 12:21
chadmedtheres a fix for that coming
#asahi-dev · 2023-02-13 12:21
chadmedprobably admac
#asahi-dev · 2023-02-13 09:41
chadmedthe pitfalls of a 9-to-5 :P
#asahi-dev · 2023-02-13 08:28
chadmedand then idk performance enhancements or whatever. i doubt the runtime logic i have planned is optimal
#asahi-dev · 2023-02-13 08:26
chadmedbeyond that it's just comms with the kernel which i hope ive made easy enough to glue on without changing a ton of code

plus ›