#asahi · 2023-03-10 23:46
chadmedthe other part of this equation is that the DSP we apply via pipewire is by itself enough to prevent *catastrophic* failure of the speakers. i have been dogfooding my work for over a year at this point and ive done some incredibly evil things to this laptop #asahi · 2023-03-10 23:45
chadmedthe risk assessment here is that if someone has sufficient access to your system to stop a daemon owned by root and replace it with their own bad code from under your node you have far bigger things to worry about than your speakers#asahi · 2023-03-10 23:43
chadmedwe cant control for every "what if a squad of deadly cyborg hyperninjas breaks into your house and desolders the current sensing shunt" hypothetical #asahi · 2023-03-10 23:42
chadmedelvishjerricco: well yeah but like... cmon#asahi · 2023-03-10 23:25
chadmedi guess unreasonably expensive laptops are a decent stand-in #asahi · 2023-03-10 23:24
chadmedi miss having such things to play with#asahi · 2023-03-10 23:23
chadmedyou havent lived until youve fried a dynacord cobra line array :D#asahi · 2023-03-10 23:21
chadmedwhen speakers are released officially you can be satisfied that you will have no possible way to blow them up from userspace under any circumstances#asahi · 2023-03-10 23:20
chadmedlike i said anyone whos not convinced is free to just not use the speakers but this isnt our first rodeo#asahi · 2023-03-10 23:20
chadmedthe whole idea is that we will always explicitly fail safe so that folks dont have to tiptoe around the machine and have this stuff front of mind #asahi · 2023-03-10 23:19
chadmedbut once speaker support is officially merged then yes, the kernel will start the codecs already in safe mode and only unlock them if the daemon hits the correct IOCTL#asahi · 2023-03-10 23:18
chadmedmps: not at the moment because the requisite kernel features havent been wired up just yet #asahi · 2023-03-10 22:02
chadmedof course, anyone whos not convinced that this is a safe architecture is more than welcome to not use the speakers :)#asahi · 2023-03-10 22:01
chadmedwhy go through all that when we can just far more easily implement it in userspace#asahi · 2023-03-10 22:01
chadmedayke_: it's not that it's technically impossible outright, it's that its annoying to implement, way more work than its worth, and would result in a shitfight on the mailing lists#asahi · 2023-03-10 09:17
chadmedits really the tweeters we're most concerned about here#asahi · 2023-03-10 09:17
chadmedwell the desktop machines dont get loud enough to cause damage in any case because they dont have tweeters#asahi · 2023-03-10 09:16
chadmedi believe so yes #asahi · 2023-03-10 09:15
chadmedthe watchdog should reboot the system before too long if the kernel dies anyway#asahi · 2023-03-10 09:15
chadmedso even if the kernel shits the bed while youre playing loud music and you get a looping sample it should never have gotten loud enough to cause damage to the machine#asahi · 2023-03-10 09:14
chadmedif the daemon hasnt died than you can be guaranteed that the volume currently coming out of the speakers is safe for them#asahi · 2023-03-10 09:14
chadmedif the daemon dies then the codecs will go into safe mode#asahi · 2023-03-10 09:14
chadmednot a lot#asahi · 2023-03-10 09:13
chadmedright so whats the concern#asahi · 2023-03-10 09:13
chadmedit takes in voltage and current measurements made by the codec at the voice coil of each speaker, and then uses that to compute the temperature of each speaker #asahi · 2023-03-10 09:12
chadmedthe daemon exists so that we can use the entire dynamic range of the system without having to _rely_ on safe mode all the time#asahi · 2023-03-10 09:11
chadmedthis all happens transparent to the rest of userspace, and only the daemon knows about this via ioctls#asahi · 2023-03-10 09:11
chadmedif the driver doesnt hear from it, it will put the codecs into a safe mode that limits their output to half the max, which is safe enough to prevent any damage#asahi · 2023-03-10 09:10
chadmedwell it works in tandem with the kernel. the daemon will kick the asoc driver periodically to tell the kernel that it's still alive#asahi · 2023-03-10 09:05
chadmedseems i have some work to do this weekend...#asahi · 2023-03-10 09:05
chadmedoh my god i just used the mac mini's speaker for the first time (accidentally)#asahi · 2023-03-10 08:21
chadmedso it _needs_ to be done in userspace#asahi · 2023-03-10 08:21
chadmedthe kernel cannot do the former and the latter is not quite as stable as one would think it to be #asahi · 2023-03-10 08:20
chadmedelvishjerricco: the speaker safety stuff relies on floating point math and interfacing with the sound card#asahi · 2023-03-07 12:57
chadmedDRM_ASAHI is its kconfig switch#asahi · 2023-03-07 12:57
chadmedthe gpu driver is just called asahi #asahi · 2023-03-07 12:57
chadmedthats the dcp driver#asahi · 2023-03-07 12:51
chadmedmaybe your device trees need updating with the ones from the kernel tag youre building #asahi · 2023-03-07 12:51
chadmedsomethings funky though#asahi · 2023-03-07 12:51
chadmedtry modprobing it i guess#asahi · 2023-03-07 12:50
chadmedor if you did its not loaded#asahi · 2023-03-07 12:49
chadmedyou didnt build DRM_ASAHI #asahi · 2023-03-07 12:47
chadmedcan you try dbus-run-session startplasma-wayland from a tty? #asahi · 2023-03-07 12:44
chadmedsame with whatever qt errors youre getting#asahi · 2023-03-07 12:43
chadmedrun asahi-diagnose and paste it somewhere and link here #asahi · 2023-03-07 12:41
chadmedthe lack of avd support should be all you need to know how that endeavour ended#asahi · 2023-03-07 12:41
chadmedi looked into v4l when i first started tracing avd months and months ago and wanted to cry #asahi · 2023-03-07 12:38
chadmedwould the driver have to poll for the file descriptor#asahi · 2023-03-07 12:38
chadmedyeah that makes sense#asahi · 2023-03-07 12:38
chadmedisnt that just an ioctl with extra steps?