#
…

2022-11-26

00:02povikthis is what i got to
00:02poviki think it's almost ready for audio samples being shoveled in on the SIO side
00:03poviknow to get the DCP side up :|
00:03j`eywhat audio bits use it? oh audio over HDMI or something?
00:03povikprobably s/m1n1.hw.sio/m1n1.fw.sio/ :)
00:04nicolas17does audio over USBC-to-HDMI adapter need the same? :P
00:04povikwould be surprised if not
00:04nicolas17I should buy one of those
00:05povikAIUI, DCP does the HDMI then it's routed through the usb-c ports
00:05povikit's magic to me
00:17nicolas17povik: I read somewhere that USB-C Alternate Mode for HDMI is little supported in practice
00:17nicolas17no idea if Macs support it
00:18nicolas17instead they use displayport and the adapter converts it to HDMI
00:25povikthen it's likely displayport that's routed to usb-c
00:25* povikshould read up on the relation of hdmi, dp and usb-c
00:26povikdownside is, then it won't be magic anymore :(
00:26povikdo you know the joy of having no idea how something works?
00:26nicolas17sometimes, yes
00:27nicolas17other times it's more like "I MUST KNOW"
00:27nicolas17I learned how the .zip format works and I want to unlearn it
00:30capta1nt0ad has quit [Remote host closed the connection]
00:31capta1nt0ad has joined #asahi-dev
00:32eiln has quit [Remote host closed the connection]
00:41coailtb^ has joined #asahi-dev
01:00Dementor has quit [Remote host closed the connection]
01:01Dementor has joined #asahi-dev
01:09Dementor has quit [Ping timeout: 480 seconds]
01:15Dementor has joined #asahi-dev
01:33bpye has quit [Quit: Ping timeout (120 seconds)]
01:33bpye has joined #asahi-dev
01:39chadmedmarcan, povik: how do you feel about bumping the amp gains to the same as macos eventually? ive got a set of IRs for it and it helps with low end response at low-ish volumes enough that it wont really matter if we cant easily integrate the equal loudness plugin
01:40chadmedno clipping or melting or magic smoke has been observed as of yet
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
02:26cylm has quit [Quit: WeeChat 3.6]
02:44StupidYui has quit [Ping timeout: 480 seconds]
03:29nicolas17 has quit [Quit: Konversation terminated!]
05:13marcanchadmed: once the safety stuff is in place my intention is to set the amp gains statically to what macOS uses (unless we find we really don't need extra headroom and can go lower), and give DVC control over to the safetyu stuff.
05:17chadmedexcellent, where theyre set now really kills low volume performance. the way ive got it now with the gain set to 15 (18.5 dB) we dont even need the compressor in pipewire anymore top stop clipping which saves a boatload of cpu time and makes the equal loudness plugin slightly less necessary
05:17marcanI'm a bit confused though, how does lower gain kill *low* volume performance?
05:18marcanor do you mean low DVC volume? if so we should switch to software volume
05:18chadmedpipewires software volume control, the woofers just become far too quiet below ~45-50% at the current setting
05:19marcanbut then can't you just add gain?
05:20chadmednot dynamically, which is why i was playing around with the equal loudness filter
05:20marcanI mean a static gain in software would be equivalent except at higher volumes where it clips?
05:22marcanunrelated: people are reporting spi-hid issues with suspend and also just in general, and I still haven't fixed the "trackpad randomly dies" problem. I think it's high time to give that spi-hid driver a serious debugging & overhaul session.
05:24chadmedyeah which is what i was doing in the IRs to make up the difference, but setting it in the kernel driver to the macos value and getting rid of the gain bump from the pipewire end fixes a lot of the problems ive been tearing my hair out trying to deal with
05:24chadmedidk if it was the software side being saturated after all the filters were applied or whatever but theres now no more clipping at max volume and the software volume control has way more useable range
05:27chadmedalso re spi-hid the only showstopper ive noticed here is not being able to use the trackpad while pressing any non-modifier keys. that made playing xonotic last night quite difficult :P
05:29chadmedoh nvm thats a libinput setting...
06:38SSJ_GZ has joined #asahi-dev
06:51kettenis has quit [Ping timeout: 480 seconds]
07:09kettenis has joined #asahi-dev
07:28svenpovik: almost nothing uses HDMI altmode. It’s always DP altmode plus some DP to hdmi converter
07:29sveneven the internal MacBook screen is hooked up through a DP to hdmi converter even though it doesn’t even use type c
07:50trsohmers has quit [Ping timeout: 480 seconds]
07:51trsohmers has joined #asahi-dev
07:56svenuh. Never mind the last comment
07:57svenI meant the internal screen is hooked up via DP and the HDMI output on the mini goes through a converter
07:57* svenshouldn’t type before coffee
08:00Dcow has joined #asahi-dev
08:08Dcow has quit [Ping timeout: 480 seconds]
08:32bgb has joined #asahi-dev
08:49Dcow has joined #asahi-dev
08:50bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:50bisko has joined #asahi-dev
08:50capta1nt0ad has quit [Remote host closed the connection]
08:51capta1nt0ad has joined #asahi-dev
08:52bisko has quit []
08:54Dcow has quit [Remote host closed the connection]
09:17Dcow has joined #asahi-dev
09:26Dcow has quit [Ping timeout: 480 seconds]
09:31Dcow has joined #asahi-dev
09:35Dcow has quit [Remote host closed the connection]
09:35Dcow has joined #asahi-dev
09:52capta1nt0ad has quit [Remote host closed the connection]
09:53capta1nt0ad has joined #asahi-dev
10:02svenso chances are if audio output over the mac mini's hdmi works it might also just work over the type-c ports :)
10:03svenmaybe just needs some additional EPIC calls but i'd be surprised if it's very different
10:14capta1nt0ad has quit [Quit: Konversation terminated!]
10:25StupidYui has joined #asahi-dev
11:19mps_ is now known as mps
11:23povikjannau: you engaged in binding discussions on iommu mappings so you might know this off the top of head: how do i represent the SIO's required DATA section mappings?
11:27jannaupovik: look what I do with dcp in m1n1, src/kboot.c:dt_carveout_reserved_regions()
11:29jannaucreate a memory region in /reserved-memory and link to that region via "memory-region" in the device
11:30povikah, so the relation to a DART instance is through the device
11:30poviki was looking for iommu= property of sorts on the reserved memory node
11:30jannaulooking at the output of `dtc -I fs -O dts -o - /proc/device-tree` might help
11:30povikyeah, i should do that. thanks!
11:32jannauyes, it's through the device. the "iommu-addresses" gets a device phandle too
11:33jannausee dt_device_set_reserved_mem()
11:37jannauparsing segment-ranges in kboot.c makes more sense than the /chosen/carveout-memory-map handling for dcp
11:38povikso what happens now is the carveout-memory-map is combined with DART contents to produce the FDT data?
11:39jannaufeel free to use code or refactor reserved memory region writing of dt_carveout_reserved_regions() as you see fit
11:41jannauyes, the physical addresses from the carveout-memory-map are matched with the dart mappings to produce physical address, device address, size
11:44jannauthere are two reasons for that with dcp. 1) dart-disp0 needs to be covered as well (no segment-ranges for that) 2) text not mapped via dart through of my first high level segment-ranges parsing attempt
11:44jannaudcpext can be switched to segment-ranges parsing as soon as the code exists
11:45povikah. then we can't completely replace the carveout-memory-map logic even if we wanted
11:45povikwe still don't know how to decide on the mapping of the TEXT section based on segment-ranges
11:45povikbut maybe we can map it every time?
11:47povikor maybe it's an oversight that iboot makes the mapping on M2
11:54gladiac has joined #asahi-dev
11:57capta1nt0ad has joined #asahi-dev
12:00jannauphys and device address being equal could signal not to map text via dart
12:05jannauno, that doesn't seem to apply for sio
12:05chengsun_ has joined #asahi-dev
12:09chengsun has quit [Ping timeout: 480 seconds]
12:14bgb has quit [Ping timeout: 480 seconds]
12:20povikpatch for parsed segment-ranges in adt dumps:
12:28hir0pro has joined #asahi-dev
12:30___nick___ has joined #asahi-dev
12:30___nick___ has quit []
12:32___nick___ has joined #asahi-dev
13:03amarioguysven: btw what was less pain to bring up for you, USB (DWC3 and co, not including the stuff you're bringing up right now) or nvme
13:03amarioguy(long story i'm trying to decide on my end what to bring up first...)
13:05amarioguy(this pertains to stuff i'm doing to bring up [a certain proprietary os name here])
13:18svenusb obviously :D
13:18svennvme is like the opposite of usb
13:18sveneven the spec is readable by humans
13:19sven(Usb was more pain to be clear)
13:19svenwhile usb specs are probably harmful to anyone who reads them and then has to live with that knowledge
13:21hir0proUSB specs ought to have a warning on them like cigarette cartons
13:21svenyes please!
13:37nomnomcookie has quit [Read error: Connection reset by peer]
13:37nomnomcookie has joined #asahi-dev
13:42gladiac has quit [Quit: k thx bye]
13:45nomnomcookie has quit [Read error: Connection reset by peer]
13:45nomnomcookie has joined #asahi-dev
13:50capta1nt0ad has quit [Quit: Konversation terminated!]
13:50dsharshakov has joined #asahi-dev
13:50dsharshakov has left #asahi-dev [#asahi-dev]
13:50capta1nt0ad has joined #asahi-dev
13:50capta1nt0ad has quit []
13:51capta1nt0ad has joined #asahi-dev
13:52capta1nt0ad has quit []
13:58nomnomcookie has quit [Read error: Connection reset by peer]
13:58nomnomcookie has joined #asahi-dev
14:01capta1nt0ad has joined #asahi-dev
14:02nomnomcookie has quit [Read error: Connection reset by peer]
14:09amarioguysven: lol fair that decides it then, nvme it is :)
14:10amarioguyhonestly, i didn't even know before recently you needed to have some efuse config on hand to even bring up the ATC PHY
14:13sventhat’s the easy part
14:13sventhe hard part is as usual to get the order between all the moving components right
14:13svenfor usb you at least need that tps6598x chip and dwc3
14:14svenand reset dwc3 every single time the tps chip issues a „plug changed“ event
14:22hir0pro has quit [Quit: hir0pro]
14:46ChaosPrincessSo, the "another apple serialization format" that they use to serialize MTP firmware is CBOR and not some proprietary thing.
15:00hir0pro has joined #asahi-dev
15:05cylm has joined #asahi-dev
15:59hir0pro has quit [Quit: hir0pro]
16:22opticron has quit [Ping timeout: 480 seconds]
16:24hir0pro has joined #asahi-dev
16:33gladiac has joined #asahi-dev
16:36gladiac has quit []
17:10opticron has joined #asahi-dev
17:16Dementor has quit [Remote host closed the connection]
17:22Dementor has joined #asahi-dev
17:54poviksven: can i get the list of xnu bootargs again? O:-)
17:57jannauare you looking for "smartio_debug=0xff"?
18:23svenah, whoops. I’ll post them again tomorrow if you remind me
18:24svenor maybe web.archive.org still has the link to the .txt
18:29povikit does!
18:33djorz has joined #asahi-dev
19:37cylm has quit [Quit: WeeChat 3.6]
19:43coailtb^ has quit [Remote host closed the connection]
19:50pbsds0 has quit []
19:50pbsds0 has joined #asahi-dev
20:23onethirtyfive has joined #asahi-dev
20:28onethirtyfive has quit [Quit: WeeChat 3.7.1]
20:28onethirtyfive has joined #asahi-dev
20:34onethirtyfive has quit [Quit: WeeChat 3.7.1]
20:34onethirtyfive has joined #asahi-dev
20:57jluthra has quit [Remote host closed the connection]
20:57povikjannau: am i wrong in expecting general kernel code to set up the reserved-memory iommu mappings?
20:58jluthra has joined #asahi-dev
21:00jannaupovik: maybe, it could be that I did that only inside 'if (dart->locked)', let me check
21:01povikah, so it's dart code?
21:01povikthe dcp compatible and no-map property surprised me
21:03amarioguy-sep_panic_mbox_to
21:03jannauyes, see apple_dart_setup_resv_locked(). that is only called on locked dart
21:03amarioguyhmmmmmmmmmmmmmmmmmm
21:04povikjannau: got it
21:04jannauyou can call that unconditionally
21:04povikTODO: error handling! :p
21:05povikbut the io_pgtable_dart_setup_locked needs to remain conditioned, i suppose
21:05jannauthe .compatible is so far not used, no-map is required to prevent u-boot from fsck-ing things up
21:06jannauyes, io_pgtable_dart_setup_locked should only be called on locked darts
21:07povikshouldn't it be something other than apple,dcp since that's exactly the dcp binding?
21:07povikor is that the custom?
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:08jannauthis is going change soon but you don't need to care. make apple_dart_setup_resv_locked unconditional and I'll keep it working
21:09jannauit probably shouldn't be "apple,dcp"
21:09svenamarioguy: sep‘s panics are a bunch of numbers that look like they’re encrypted fwiw
21:11jannaupovik: maybe "apple,ascwrap-text" and "apple,ascwrap-data"?
21:11ChaosPrincessfor people who traced spi stuff before - does it send a 64-bit 0 as the first thing? the touchbar tx/rx dumps both begin with that, and idk what generates it.
21:13povikjannau: maybe even asc-specific compatibles in addition if we need special handling in future to fix something
21:13povikstill no mapping after making that call unconditional, hm
21:13povikwill try to debug a bit
21:15hir0pro has quit [Quit: hir0pro]
21:16jannaudo you already have a SIO device/driver stub?
21:17povikit gets to booting the SIO and a DART miss
21:17amarioguysven: not unexpected given it's purpose tbh tho still probably good to know
21:17jannauChaosPrincess: iirc the keyboard/trackpad starts sending data after power-on
21:18jannaudoes the devicetree node contains already a reference to the dart iommu?
21:18povikah i am not adding the memory-region prop to sio node *facepalm*
21:20ChaosPrincessjannau: for touchbar its tx/rx a 64-bit zero, then send the firmware in yet-another-apple-encoding, then it sends hid events using 'z2' protocol. i figured out how the firmware upload works, but not sure where the 64bit zero comes from
21:23povik[ 0.500180] apple-sio 236400000.sio: RTKit: Initializing (protocol version 11)
21:26bluetail has quit [Ping timeout: 480 seconds]
21:27jannauChaosPrincess: looking at old keyboard traces macos seems to do that there as well. I don't think we do that spi_hid
21:28ChaosPrincessso, thats the beginning of the trace
21:28ChaosPrincessi can just drop the first line then?
21:29ChaosPrincessjannau: if you have a kb trace, mind throwing it my way?
21:44bluetail has joined #asahi-dev
21:57gladiac has joined #asahi-dev
22:04povikpushed the kboot.c segment-ranges code to https://github.com/AsahiLinux/m1n1/pull/266
22:07thasti has quit [Remote host closed the connection]
22:09iaguis has joined #asahi-dev
22:09thasti has joined #asahi-dev
22:22jannauChaosPrincess: https://www.jannau.net/asahi/spi_keyboard_1.log only the raw SPI commincation and no SIO
22:28iaguis has quit [Quit: leaving]
22:43gff_ has joined #asahi-dev
22:43gff_ has quit [Read error: Connection reset by peer]
22:48gff has quit [Ping timeout: 480 seconds]
22:48gff_ has joined #asahi-dev
22:59Major_Biscuit has joined #asahi-dev
23:24onethirtyfive has quit [Quit: WeeChat 3.7.1]
23:31SSJ_GZ has quit [Ping timeout: 480 seconds]
23:40Major_Biscuit has quit [Ping timeout: 480 seconds]
…