#
…

2021-12-13

00:21slicey has joined #asahi-dev
03:07PhilippvK has joined #asahi-dev
03:12phiologe has quit [Ping timeout: 480 seconds]
03:58marcanj`ey: looking now :)
04:01marcan< alyssa> Needed to backport changes from pci.c to apple-ans.c b84ba30b6c7a ("block: remove the gendisk argument to blk_execute_rq") <- that one's already in the asahi branch
04:07marcan< jannau> linux has 3 distinct drivers for the touchpad events. applespi (used by corellium), kettenis found bcm5974 (input device), hid-magicmouse is convenient since it is already hid <= ha
04:14marcanvery nice find on hid-magicmouse
04:15marcan< jannau> unrelentingtech: hid-magicmouse works out of the box with my WIP SPI HID transport driver
04:15marcanawesome :D
04:37marcando you have this in a branch somewhere? I definitely want to start testing it soon, if it looks good it can go into asahi
05:22leah has quit [Quit: WeeChat 3.3]
05:40leah has joined #asahi-dev
05:59Jamie[m]1am I right in understanding that the t600x macs have a different audio amp?
06:00Jamie[m]1the part number in ioreg has no* google hits
06:00Jamie[m]1,it actually has one, but weirdly it's about an amp with a completely different model number
06:02Jamie[m]1(SN00012776)
06:02Jamie[m]1(google result for that is TAS5731M)
06:30Jamie[m]1s/sn00012776/sn012776/
06:34Jamie[m]1ah i see povik has already IDed it
06:55marcanJamie[m]1: a common pattern seems to be Google "magically" knowing which public part number Apple secret part numbers are related to
06:55marcanhappens with TI partnos too
06:55marcanI suspect the Algorithm™ is learning from internal engineer google searches or something :-)
07:02the_lanetly_052___ has joined #asahi-dev
07:10thunfisch has quit [Ping timeout: 480 seconds]
07:17Jamie[m]1What do we know about the MCA audio peripherals? I see the speaker experiment in m1n1 never interacts with them (only the mca-switch), which suprised me
07:34thunfisch has joined #asahi-dev
07:41marcanJamie[m]1: I think that's a decoding mistake
07:41marcanif you look at the reg ranges, they overlap
07:41marcanmca-switch covers all the MCAs
07:41marcanso that code should more properly be using the mcaX device paths, most likely
07:42marcanApple love to do horrible things with reg ranges...
07:42Jamie[m]1ahh gotcha
07:42marcanin particular mca_switch0_base + 0x4xxx is mca1, which is connected to the speaker on the Mac Mini
07:42marcanso that checks out
07:46kettenisouch, the smc on the j293 has 1435 keys
08:06marcannot surprising
08:06marcanit does a lot of stuff :)
08:31svenlol, apple. for some reason they send some undocumented nvme command a few times (0xd8 on the admin queue) when they initialize their controller. except that these commands don't use the NVMMU but SART now
08:47jannaumarcan: not yet, it's still more PoC than proper driver. I'll bring it in testable state tonight
08:48jannauJamie[m]1: povik is working on audio in https://github.com/povik/linux/tree/asahi-sound
09:17j`eyjannau: how many LOC is the spihid?
09:20povikJamie[m]1: MCA is mostly figured out, see sound/soc/apple/mca.c in asahi-sound as jannau linked
09:20Jamie[m]1yeah sweet
09:21as400 has joined #asahi-dev
09:22as400povik: does the sound hardware differ between t8000 and t6000 SOCs ?
09:23povikthe MCA clusters are one after other in MMIO address space, and there's no use pretending they aren't
09:23povikespecially given that you have to interact with multiple clusters even if setting one audio path
09:24povikas400: ADMAC and MCA seems to mostly be the same, or exactly same
09:24povikcodecs are different
09:24povikjack codec will probably be an iteration of the one on t8000 macs, likely the same driver can be used
09:25slicey has quit [Quit: zzz]
09:25povikspeaker amp is different, i don't know if linux has a driver for the analogue part i found
09:26povikit does, just looked
09:27povikas400: i expect some work due to the many speakers found on the new mbps
09:27povikbut as a baseline we can bring it up using only two speakers for left/right
09:27as400povik: thx, I'm just considering trying your driver on t6000 - that's why I'm asking.
09:27Jamie[m]1yeah it won't work as-is
09:28povikthe jack is closest to working
09:28povikbut still i need to write the DT for that, then it has some chance of working
09:29as400povik: if you do need someone to test - I volunteer.
09:30jannauj`ey: currently ~800 lines, still with some stub only omplementations and some debugging code which can be removed
09:35povikJamie[m]1: also i looked to make sure tas5731 isn't also a good match for sn012776, but it isn't
09:35povikthere's still the codec on imacs i haven't looked into
09:35Jamie[m]1ah interesting
09:36j`eyjannau: drivers/hid/i2c-hid/i2c-hid-core.c is 1100, so that sounds reasonable!
09:36povikyersterday i noticed imacs have some other codec/speaker-amp
09:36Jamie[m]1where are you getting an understanding of the sn012776 register layout?
09:36poviki read it through i2c after reset
09:36Jamie[m]1macos kext RE?
09:36povikoh god no
09:37Jamie[m]1ah right, by comparing the reset values to the datasheet?
09:38Jamie[m]1the M1 boot process sure is neat, but they certainly haven't optimised for the performance of picking a non-default option lol
09:38povikhaha, no they haven't
09:40Jamie[m]1it's so refreshing to see a boot process that doesn't involve layers of messy cruft
09:47yuyichao has quit [Ping timeout: 480 seconds]
09:56as400 has quit [Quit: Page closed]
09:57aleasto has joined #asahi-dev
10:07svenoh fun. 0xd8 is some kind of debug command tunnel because ofc the normal mailbox interface wasn't enough for that
10:07svenapparently macos uses it to uh... send the current time to ANS
10:08poviksee, an ordinary debug message right there
10:09svenlooks like it's also possibly to enable error injection and do all kinds of fancy (and some scary) things with that one
10:12aleasto has quit [Quit: Konversation terminated!]
10:15aleasto has joined #asahi-dev
10:39Jamie[m]1does ioctl truncate the address in "xxx@address" to 32 bits?
10:39Jamie[m]1s/ioctl/ioreg/
10:40Jamie[m]1that's evil :/
10:47marcanpovik: the multispeaker thing needs some kind of filter/crossover thing
10:47marcanmy idea is to grab an impulse response of what macOS does :-)
10:47marcanthat should all be done in userspace, of course; not sure if all the ALSA/PA profile thing can handle EQ/convolution filters, but if it can't, well, maybe it's time to start that conversation
11:08povikmarcan: that's my idea exactly, grabbing impulse response
11:09povikstealing the samples sent to speakers in hypervisor
11:10povikby now i have almost ruled out that the filtering is done in hardware
11:33marcanpovik: iBoot has pre-filtered boot chime samples with channels for each speaker, so yeah
11:33marcanvery unlikely they'd be doing it in hardware
11:33marcanotherwise they'd use it for iBoot too
11:34j`eymarcan: are you going to write a jingle/chime for m1n1? :D
11:34povikthat would be a second chime, don't be evil
11:35marcandefinitely not :p
11:38_jannau_we could check if the boot chime was disabled and play the m1n1 chime only if it is. to be extra evil, we make it almost the same as the iboot chime
11:38j`ey_jannau_: just one semitone out
11:39jndetuned into hell
11:39yuyichao has joined #asahi-dev
11:54landscape15[m]marcan: I like the idea of a m1n1 boot chime, but as jannau says only if the Mac boot chime isn’t played.
12:00arnd_ has quit []
12:01arnd has joined #asahi-dev
12:03marcan_jannau_: clearly we need to do this: https://hub.marcan.st/t/better_apple_chime.mp3
12:07bps has joined #asahi-dev
12:13al3xtjames has quit [Quit: Ping timeout (120 seconds)]
12:13al3xtjames has joined #asahi-dev
12:20Gaspare has joined #asahi-dev
12:54Gaspare has quit [Quit: Gaspare]
12:56riker77 has quit [Quit: Quitting IRC - gone for good...]
13:09riker77 has joined #asahi-dev
13:20Gaspare has joined #asahi-dev
13:40landscape15[m]marcan: well, I like it. You can recreate the chime in the minor chord instead
13:44* mazsuggests making it a configuration option (I want the opening chord sequence to Zoot Allures)
13:45as400 has joined #asahi-dev
13:45as400 has quit []
13:57Jamie[m]1sounds like we need an m1n1 midi keyboard driver
13:57Jamie[m]1with an apple boot chime sampler
14:45nabaiste^ has quit [Remote host closed the connection]
15:40svenmacOS tells ANS what time it is and then uses two commands to get the NAND ID and something they seem to call NAND geometry. probably all things we can ignore for linux
15:42svennow it also makes sense why that debug command uses SART instead of the NVMMU though. the buffers are written to directly by the ANS firmware
15:45svenand here's a simple nvme tracer if anyone wants to play with it https://github.com/AsahiLinux/m1n1/pull/133
16:41kenzie has quit [Quit: The Lounge - https://thelounge.chat]
16:41kenzie has joined #asahi-dev
16:55kenzie has quit [Quit: The Lounge - https://thelounge.chat]
16:56kenzie has joined #asahi-dev
17:00bps has quit [Ping timeout: 480 seconds]
17:07Gaspare has quit [Ping timeout: 480 seconds]
17:25Gaspare has joined #asahi-dev
17:31the_lanetly_052___ has quit [Ping timeout: 480 seconds]
17:58bps has joined #asahi-dev
18:11Gaspare has quit [Read error: Connection reset by peer]
19:17aleasto has quit [Ping timeout: 480 seconds]
19:18aleasto has joined #asahi-dev
19:32aleasto has quit [Ping timeout: 480 seconds]
19:33aleasto has joined #asahi-dev
19:50aleasto has quit [Ping timeout: 480 seconds]
19:50aleasto has joined #asahi-dev
19:54Dcow_ has joined #asahi-dev
20:07aleasto has quit [Ping timeout: 480 seconds]
20:07aleasto has joined #asahi-dev
20:13jannauunrelentingtech: re usb magic trackpad 2: how large are the hid reports
20:15unrelentingtechtiny, 21 bytes for 1 finger
20:18jannauok, the internal one in mt mode produces 78 bytes for one finger iirc
20:18unrelentingtechyeah, I've just logged some packets from my 2015 mbp too
20:19unrelentingtechthey do have the first 8 bytes in common, at least
20:20unrelentingtechthe 9th byte is always 0x31 on the magic and 0x75 on the internal, maybe that means compact vs big format for the following finger data
20:25aleasto has quit [Ping timeout: 480 seconds]
20:27unrelentingtechbcm5974 uses the 48th byte (on current models) as the beginning of big finger data. so the fixed size whatever before that does also contain finger data in the compact format it seems. I'm gonna play with some parser things..
20:28Dcow_ has quit [Quit: Textual IRC Client: www.textualapp.com]
21:15slicey has joined #asahi-dev
22:48LorenzKofler[m] has joined #asahi-dev
23:46yuyichao has quit [Ping timeout: 480 seconds]
…