2023-01-16
02:32amarioguy has quit [Remote host closed the connection]
04:29ricekot has joined #asahi-dev
04:29ricekot has quit []
06:14greguu has joined #asahi-dev
08:03hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:07hertz has joined #asahi-dev
08:24bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:55chadmed_ has quit [Remote host closed the connection]
09:03d4vehey all- I need CONFIG_FTRACE=y for some eBPF observability work. So far I've just been recompiling the kernel with a modified config, but that gets tedious. Is there any chance of getting that enabled, and how would I go about proposing that?
09:13tim has joined #asahi-dev
09:14tim is now known as Guest1483
09:22balor has quit [Ping timeout: 480 seconds]
09:28povikdsharshakov: basically the argument against AOP is: (1) i would rather support a hardware interface than a firmware interface; (2) we have more control over the stream if we program LEAP ourselves
09:29povikas to your other question, AOP doesn't do beamforming, it hands over an isolated stream from each mic
09:30bps2 has joined #asahi-dev
09:37hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:58leitao has joined #asahi-dev
10:16pg12_ has joined #asahi-dev
10:18pg12 has quit [Ping timeout: 480 seconds]
10:44jluthra has quit [Remote host closed the connection]
10:45jluthra has joined #asahi-dev
10:57bps2 has quit [Ping timeout: 480 seconds]
10:57tim has joined #asahi-dev
10:58tim is now known as Guest1490
11:05Guest1483 has quit [Ping timeout: 480 seconds]
11:05bisko has joined #asahi-dev
11:12dsharshakov_ has joined #asahi-dev
11:13dsharshakov_povik: thanks. (1) is obvious (likely the firmware is changing continuously with each macOS version). However, what (2) gives you extra?
11:14dsharshakov_ has quit []
11:25povikand a counterargument is that the apple's firmware might abstract away a hardware difference on future models
11:25povikanyway, re (2), we can at least disable some of the channels, if a single mic is all userspace can cope with
11:26bps has joined #asahi-dev
11:26dsharshakov has joined #asahi-dev
11:27dsharshakovare other AOP nice features useful for us? AFAIK it can wake the system up on some events, what else?
11:28dsharshakovsince if it will be needed later, its introduction will duplicate the works and block us from access to LEAP
11:28dsharshakovairtag-like functionality is likely to live on its own broadcasting everytime
11:30dsharshakovsven: I've read it's shared between AOP and BT. Likely they be beaconing 100% independently from the OS
11:31dsharshakovAOP somehow sets configs and gives keys as well
11:32povikdsharshakov: well, as to the other features of AOP: the only thing that comes to mind is that it reports the lid angle to the OS
11:36hightower2 has quit [Ping timeout: 480 seconds]
11:37chadmedthe smc has the hid event for the lid closing/opening but hid events seem to get suspended and the only way to wake the thing is with the hard power button
11:43dsharshakov has quit [Quit: Page closed]
11:50chadmeddsharshakov: on mb compressor optimisation, all the dsp paths in lsp-plugins are written in assembly
11:54dsharshakov has joined #asahi-dev
11:55dsharshakovchadmed: ASIMD support is there: https://github.com/lsp-plugins/lsp-dsp-lib/blob/master/src/main/aarch64/asimd.cpp
11:55ChaosPrincesssven: apparently it does on iphones
11:56dsharshakoveither the core capacity for icestorm is lower or it still lacks some opt on AArch64
11:57svenI could maybe see AOP doing some power Management but I’d be very surprised if it did more than that for bt
11:57dsharshakovMaybe make compressor only kick in when loudness is higher than x? Might be clicky in that case...
11:59svenlike, the sane way to do this is to have the AP pre-program the find my beacons in the BT chip and then put the BT chip to sleep. and then either BT has a timer to wake itself up or AOP wakes it up periodically to send those beacons
11:59chadmedin my testing the core power use is less than 4 W playing music through vlc with the dsp active, and this is without cpuidle so the pcores are still freewheeling
11:59chadmedits not that big of a deal at the end of the day, there are bigger targets to attack for power savings
12:01dsharshakovyes. However, let it sit in our thoughts, maybe I or you can figure out a newer option
12:03dsharshakovProbably when WirePlumber loads that filter it should be run within one wakeup (sound from pw-pulse -> *WKUP* -> filter in in wp -> ALSA plugin in WP -> *switch to kernel*
12:04dsharshakovwhat's the net power difference when removing the mb compressor?
12:04hightower2 has joined #asahi-dev
12:04ChaosPrincesssven: schematic says that there is a spmi link between aop and wifi chip. could that be the 'backchannel'?
12:06dsharshakovyes. worth thinking (since I'm frequently thinking about whatever sound processing)
12:06dsharshakovwithout PSCI we don't even seem to have wakeups as a power measure
12:06dsharshakov has quit [Quit: Page closed]
12:21bps has quit [Remote host closed the connection]
12:42eiln has joined #asahi-dev
12:42Dementor has quit [Read error: Connection reset by peer]
12:42Dementor1 has joined #asahi-dev
12:48cylm has quit [Ping timeout: 480 seconds]
12:53hightower2 has quit [Ping timeout: 480 seconds]
12:56chadmed_ has joined #asahi-dev
13:18faruk has joined #asahi-dev
13:41faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:46chadmed_ has quit [Remote host closed the connection]
13:49chadmed_ has joined #asahi-dev
14:18faruk has joined #asahi-dev
14:22kit_ty_kate has joined #asahi-dev
14:25seeeath has joined #asahi-dev
14:42flying_sausages has quit []
14:51faruk_ has joined #asahi-dev
14:52faruk has quit [Ping timeout: 480 seconds]
14:53flying_sausages has joined #asahi-dev
15:13marcanpersonally I'm more of the opinion that we should do whatever macOS does, even if it involves firmware, because diverging from that is more likely to come crashing down in bad ways with updates
15:13marcane.g. consider what happens if AOP starts talking to other firmwares or doing something special
15:14marcanwhy do we care about LEAP even? if we're bypassing things, can't we just get the raw mic data before LEAP?
15:15hightower2 has joined #asahi-dev
15:16marcan< sven> like, the sane way to do this is to have the AP pre-program the find my beacons in the BT chip and then put the BT chip to sleep. <- this is exactly how it works or at least how it worked at some point, for iPhones when they *shut down*
15:16marcanmaybe AOP is in charge during normal idle and the AP programs the beacons for full standalone mode on transition to actual shutdown?
15:17svenhrm, or maybe the BT chip stays somewhat alive in normal idle for wake-on-bluetooth anyway and does everything itself?
15:18marcanI think what happens is the cores shut down their clocks when you do that but not the cluster uncore
15:19marcanthe major reason why we have power usage proportional to pstate is probably just leakage current that comes with the higher voltage, not the actual frequency
15:19marcangoing into deep idle should power gate individual cores or the whole cluster if all cores are in that state, which will save all the leakage current
15:24marcankettenis: saw that, was going to mention we should probably blacklist the asmedia controllers until we support the firmware loading, and we need to talk about how to pass the firmware to u-boot
15:24kettenisI'm a little bit worried about what happens on the asmedia controllers without loading firmware though
15:25marcanAIUI they play dead and time out a bunch of things, so best case it slows everything down, worst case it triggers badness
15:25marcankettenis: right, can we pass it to u-boot directly? it wouldn't be hard to append it to the m1n1 image (e.g. as a ramdisk) as part of the install process / m1n1 update
15:25kettenispassing the firmware in memory and putting the addresses in the device tree would make things easier on my end
15:26marcaninitramfs would be easiest because we already have that functionality in and it mirrors how it works for linux
15:27marcanwould be nice if we taught u-boot how to minimally parse cpio (it's a very dumb format, and specifically only the version Linux understands) so we can just give it a subsetted vendorfw.cpio with just the components it needs (USB for now) and avoid a totally divergent mechanism
15:28marcankettenis: see driver-api/early-userspace/buffer-format.rst for a formal spec of the specific variant we care about
15:29faruk_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:30marcanwe can skip hardlink support for u-boot (I can at least guarantee we either never omit file contents or duplicate them for u-boot archives if it ever becomes necessary)
15:30marcanat that point parsing it is just parsing some hex numbers and looking for the filename you want
15:31marcanand since m1n1 will uncompress the initramfs for us (if compressed) you don't need to care about that either
15:31marcanthe installer can just build a uboot-subset initramfs and tack it on at install time, update-m1n1 can do the same at update time
15:32ChaosPrincessmarcan: if you have time, mind looking at the z2 driver draft and checking if im not doing anything super dumb
15:33kettenis(not sure I mentioned it here, but OpenBSD now automatically updates boot.bin on the ESP)
15:35kettenisanyway, if someone could test my current u-boot branch on an iMac or Mac Studio I would be grateful
15:36marcaninterestingly so does the m1 studio... which makes me wonder, but I wouldn't put it past apple to put an accelerometer in a desktop
15:37marcanIIRC it was designed in but unpopulated in the original m1 series, but it looks like they actually started populating it in m1pro/max unless the ADT lies
15:38povikthere were periodic lid angle measurements, so if the accelerometer was there, i would expect something similar
15:47hertz has joined #asahi-dev
15:52povikbtw, how does the wake on lid open work? does userspace configure hid events that should wake the system, and kernel does some filtering and possibly returns to sleep?
15:52svenyeah, i have code for the hotplug that "works" for the bt/wifi thing but doesn't for thunderbolt for some reason
15:57marcanI think there is some general wakeup source control we could implement, not sure if there is a mechanism to outright pick specific HID events though
15:58marcanif the HID events work while the thing is running there's no reason they'd stop working during s2idle
16:10Guest1490 has quit [Quit: Guest1490]
16:25eiln has quit [Quit: Page closed]
16:28faruk has joined #asahi-dev
16:28leitao has quit [Ping timeout: 480 seconds]
16:29leitao has joined #asahi-dev
16:37hightower2 has quit [Read error: Connection reset by peer]
16:38bcrumb has joined #asahi-dev
16:42bcrumb has quit []
16:42bcrumb has joined #asahi-dev
16:42bcrumb has quit []
16:43bcrumb has joined #asahi-dev
16:43bcrumb has quit []
16:44bcrumb has joined #asahi-dev
16:44bcrumb has quit []
16:45cylm has joined #asahi-dev
16:48svenokay, with sone ugly hacks it also shows up on the pcie bus now. now I’ll just have to see how to work around the „dart MMIO only comes up after the pcie port is up“ and add support for that tbt dart MMIO layout
16:58hightower2 has joined #asahi-dev
17:31eiln has joined #asahi-dev
18:00bcrumb has joined #asahi-dev
18:00bcrumb has quit []
18:02bcrumb has joined #asahi-dev
18:36faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:46hightower2 has quit [Ping timeout: 480 seconds]
18:52bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:10leitao has quit [Ping timeout: 480 seconds]
19:20tim has joined #asahi-dev
19:21tim is now known as Guest1517
19:23zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
19:23zzywysm has joined #asahi-dev
19:26faruk has joined #asahi-dev
19:26bcrumb has quit [Quit: WeeChat 3.8]
19:27bcrumb has joined #asahi-dev
20:02bcrumb has quit [Read error: Connection reset by peer]
20:03bcrumb has joined #asahi-dev
20:05hightower2 has joined #asahi-dev
20:16cylm has quit [Ping timeout: 480 seconds]
21:03bcrumb has quit [Remote host closed the connection]
21:03bcrumb has joined #asahi-dev
21:30Guest1517 has quit [Quit: Guest1517]
21:31bcrumb has quit [Ping timeout: 480 seconds]
21:39bcrumb has joined #asahi-dev
21:49bcrumb has quit [Quit: WeeChat 3.8]
21:51hightower3 has joined #asahi-dev
21:51hightower2 has quit [Ping timeout: 480 seconds]
21:54roxfan has quit [Ping timeout: 480 seconds]
22:01zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
22:05hightower4 has joined #asahi-dev
22:12hightower3 has quit [Ping timeout: 480 seconds]
22:29eiln has quit [Remote host closed the connection]
22:48chadmed_ has quit [Remote host closed the connection]
22:48chadmed_ has joined #asahi-dev
23:04seeeath has quit [Ping timeout: 480 seconds]
23:22faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:33faruk has joined #asahi-dev
23:47roxfan has joined #asahi-dev
23:56hightower3 has joined #asahi-dev