#
…

2022-03-10

00:58yuyichao_ has quit [Ping timeout: 480 seconds]
01:10chadmedpovik: max volume in alsa overdrives the speakers by about double on j314s now
01:23yuyichao_ has joined #asahi-dev
01:37chadmedalso i assume it sounded "off" when you tried it because only woofer 1 L/R is actually pumping sound
01:50user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:55user982492 has joined #asahi-dev
02:00DragoonAethis has quit [Quit: hej-hej!]
02:00DragoonAethis has joined #asahi-dev
02:04hizon has joined #asahi-dev
02:05riker77_ has joined #asahi-dev
02:10riker77 has quit [Ping timeout: 480 seconds]
02:10riker77_ is now known as riker77
02:31user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:32the_real_briel[m] has joined #asahi-dev
02:37the_real_briel[m]Hey everyone! I think this project is awesome! I would love to help with this project but I don't necessarily know where to start or what prerequisite information I should work on for this kind of reverse engineering process. What kind of value do you guys think I could best provide to this project only really having university and web dev experience?
03:22kov has quit [Quit: Coyote finally caught me]
03:24PhilippvK has joined #asahi-dev
03:28phiologe has quit [Ping timeout: 480 seconds]
03:34kov has joined #asahi-dev
03:37user982492 has joined #asahi-dev
03:53WindowPain has quit [Quit: ZNC 1.8.2+deb2~bpo10+1 - https://znc.in]
03:53WindowPain has joined #asahi-dev
04:01WindowPain has quit [Quit: ZNC 1.8.2+deb2~bpo10+1 - https://znc.in]
04:01WindowPain has joined #asahi-dev
04:02emergenz[m]I don't have a M1, but a MacBookAir9,1 but I think progress towards getting Bluetooth working on 9,1 would also be valuable for M1 (and vice versa). Has anyone already looked into Bluetooth (of M1 or 9,1)? If yes, please let me know
04:02WindowPain has quit []
04:03emergenz[m]So nobody has started looking into Bluetooth, correct?
04:03WindowPain has joined #asahi-dev
04:04chadmednah bluetooth is far down the priority list at the moment
04:33Graypup_ has quit [Quit: meow]
04:33Graypup_ has joined #asahi-dev
04:50King_InuYasha has quit [Read error: Connection reset by peer]
05:10Graypup_ has quit [Quit: meow]
05:10Graypup_ has joined #asahi-dev
05:49Emantor has quit [Quit: ZNC - http://znc.in]
05:50Emantor has joined #asahi-dev
06:27chadmedsooooo turns out a bunch of the CMT LADSPA filters are written in x86 assembly...
06:28chadmedmost importantly to us, the low, high, and bandpass filters
06:32chadmedactually no theyre not, but they wont link for aarch64 in any case with bfd or lld
06:32shenki has joined #asahi-dev
06:39the_lanetly_052__ has joined #asahi-dev
06:40Jamie[m]1gotta do something custom to utilise the AMX instructions :3
06:41chadmedif i could i would just as a proof of concept lmao
06:42chadmedon a more positive note though, i now have all 6 drivers working simultaneously with some very simple alsa configuration
06:42chadmedgranted, they sound like arse, but thats what the LADSPA plugins were meant to fix
06:43chadmedmy plan was to drive them as if they were triple-driver floorstanders, because they are in essence exactly that
06:45chadmedi.e. have a high pass filter cut the crap below ~6.5k of the tweeters, have each woofer handle ~250-6.5k independently, and then sum both of them as a single channel to handle 0-250
06:46the_lanetly_052__ has quit []
06:47chadmedthis could have been done pretty simply if those plugins worked on aarch64, and then once we had that array set up as a device, hand that off for FIR/IIR correction
06:53jannauchadmed: there are debian packages for all architectures so I suppose they should build on aarch64
06:54chadmedif you try installing them, youll notice that some plugins are missing
06:54chadmedif you grab the sources and build like that, it also just doesnt build those plugins
06:54chadmedif you try forcing it to build them by using "make filter", the linker explodes
06:56Jamie[m]1hmm why does the debian package show as amd64 only for me?
06:57Jamie[m]1ah because I am on the page for the amd64 version
06:57Jamie[m]1never mind lol
06:58chadmedoh bfd also explodes on amd64
07:02Jamie[m]1i don't see any notable differences between the amd64 vs arm64 cmt.so's that would suggest one has more filters than the other
07:02chadmedyeah i just tried on my amd64 machine now, filter doesnt build by default here either
07:03chadmedand if you try it blows up
07:03Jamie[m]1both so files contain the string "High Pass Filter (One Pole)"
07:03Jamie[m]1which comes from filter.cpp
07:04Jamie[m]1so I think they must actually have filter?
07:04chadmedyeah so i wonder why those plugins dont install/ladspa cant see them
07:04chadmedthey dont show up by ID in /usr/lib/ladspa on my j314s
07:05chadmedrather, if you try to reference them by ID, ladspa has a whinge
07:08Jamie[m]1they should all be in cmt.so
07:08Jamie[m]1they're not separate plugins
07:08Jamie[m]1*not separate files
07:15marcan< Glanzmann> jannau: Yes, it works perfectly. <- perfectly as in using efifb?
07:16marcanit sounds to me like simpledrm isn't working for you at all and you're actually using efifb
07:17marcanchadmed: it should be possible to just drive each speaker as a FIR/IIR combination of L/R
07:17marcanyes, L/R because I'm pretty sure Apple does cross-processing too, for stereo width
07:17marcanno need to first set up a crossover or anything like that
07:18marcanone FIR filter can handle everything flat
07:18marcanand we can just steal those impulses from macOS
07:19Jamie[m]1anti-piracy font you wouldn't download a frequency response curve
07:20marcanyou wouldn't download it, but you would certainly sample it!
07:21marcanimpulse responses are not copyrightable :-) (the underlying response isn't anyway; the data file might be, but re-computing it isn't)
07:21Jamie[m]1cleanroom reverse-engineering is so last century. asahi linux does anechoic chamber reverse-engineering
07:21marcanactually we just run macOS in the hypervisor and send out a test signal and capture the speaker streams :p
07:21Jamie[m]1of course hehe
07:22marcanoh btw, Ultra = T6002, Studio = J375C (T6001) / J375D (T6002)
07:24gladiac has joined #asahi-dev
07:27marcanand heh, ADTs have so much garbage... those have camera sections in the product info
07:28marcanalso it looks like Ultra is just another max at 0x2000000000 in MMIO space
07:28marcanI wonder if we can literally re-organize our DTs to include the T6000 and T6001-delta subcomponent bits in includes
07:28marcanthen #include them into buses with range translation
07:28marcanand do it all that way
07:29marcanrobher: what's your take on #include in DTs within buses, for something like this where a vendor glued two SoCs together?
07:30marcanonly problem though is aliases would collide, hm
07:31marcanany ideas on how to handle this, other than writing it all out twice?
07:32marcanmaybe could have a macro around/next to aliases, which gets redefined around each include
07:32marcanto prefix things, like i2c0 -> d0_i2c0, d1_i2c0
07:35kettenismarcan: the marvell armada 7k/8k and cn9k device trees use some tricks to avoid repetition
07:35marcanalso are subdirectories allowed/preferred under arch/arm64/boot/dts? I think it might get unwieldy if we have everything flat, I'd favor top-level/platform DTs at the top level (and maybe top-level SoC/MCM includes), then a per-soc-family directory with bits and pieces, if that's reasonable
07:35kettenisbut I'm not impressed by the results
07:36marcanah, like armada-cp11x.dtsi
07:36marcanyeah, I guess that's a similar idea
07:37povikchadmed: ah... so i *did* push last night!
07:37povikseems like you are having fun
07:37povikhow can you tell the overdrive?
07:38povikalso when i said it sounded off, it was when i simply duplicated the stereo stream to all speakers
07:39povikchadmed: is it realiable on your end? because i had issues with one speaker dying off randomly
07:40povikthe configuration now is that when you open the device for 2 channels, it only drives L/R woofer 1
07:41povikthat's on purpouse, because it sounded best to me
07:41povik(in comparison to picking another pair of speakers)
07:42chadmedpovik: the clipping is extremely prominent at volumes > ~60 in alsamixer, which tells us that the amps are being driven too hard
07:42poviki didn't dare turning up the volume that high yet
07:43povikbut you are more brave than i am
07:43chadmedalso yeah something is really unstable at the moment, i can reliably poke the array directly through alsa but doing so via pulse, pipewire or jack causes it to explode (drivers start dropping out, volume control lost, etc)
07:45chadmedmarcan: oh too easy then, ill just leave the alsa config at routing the stereo signal to each driver then at the same signal level for now
07:46povik^ that's when i said it sounded off
07:46marcanalso you absolutely *can* kill Mac speakers with volume
07:46marcan... I've seen a T2 Mac have a speaker die like that, in macOS, with an EP patch
07:46povikyeah, that's why chadmed is brave
07:46povikpulling some random branch and turning up the volume :D
07:46marcan... so yeah, I hope you have AppleCare :p
07:46marcan(I'm actually putting on AppleCare on these expensive macs for that reason...)
07:47chadmedhuh, to me it sounds marginally better with everything enabled, i have non-uniform coefficients set in my ttable right now though
07:47chadmedmarcan: ive got something better than applecare, the australian consumer law :P
07:47chadmedtheyre usually really good about replacing stuff here, a couple of friends have even had liquid damaged machines replaced for free
07:51kettenismarcan: my advice would be to keep it simple; working with those armada 7k/8k device trees has not been a joy
07:51kettenisyou end up building dtbs and decompiling them to see what the macros really do
08:04marcanI don't think what I want to do would be very complicated
08:10chadmedpovik: is it left woofer 1 that drops out for you occasionally?
08:11poviki think left woofer 2, definitely one of the left woofers
08:12chadmedyeah its consistently whichever driver is mapped to 0 for me
08:12povikmapped to 0 in the DT list?
08:12poviki tried reordering them and the order didn't seem to matter, it was still left woofer
08:13chadmedi guess 0 in the dt, if thats what alsa also calls 0
08:13jannauchainload experiments/dcp.py problem on the t6001 solved, dcpep breaks if the shared memory is not zero initialized
08:13chadmedits definitely one of the left woofers
08:13chadmedi cant seem to reliably repro it with any particular actions, it just happens
08:35user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:24amw has quit [Ping timeout: 480 seconds]
09:45amw has joined #asahi-dev
10:32misteraftermath[m] has joined #asahi-dev
10:37johey has joined #asahi-dev
10:49the_lanetly_052 has joined #asahi-dev
11:15marcan power-gates = [268435998]
11:15marcan-> 0x1000021e
11:15marcanheh, so they aren't even putting both dies in PMGR, they just added a field
11:41chadmedhttps://gist.github.com/chadmed/2c772c8fdac8280cb17846388203a213 <- some notes on the speaker system in the j314s, and an asound.conf that makes them sound... okay-ish for now
12:30kettenismarcan: that u-boot nvme shutdown patch looks reasonable to me and seems to have no ill effects on my setups
12:30kettenisyou should probably just send that out, unless you expect more nvme-related tweaks
12:31j`eykettenis: I never managed to boot nvme without that patch
12:34kettenisthat's because the linux driver makes too many assumptions about the state of the device ;)
12:35kettenisbut I should add it to the asahi branch
12:36kettenisI'll probably do another round of updating and rebasing tonight or tomorrow
12:39yuyichao_ has quit [Ping timeout: 480 seconds]
12:50yuyichao_ has joined #asahi-dev
13:20limegorilla[m] has joined #asahi-dev
13:36MajorBiscuit has joined #asahi-dev
13:51robhermarcan: we generally discourage macros for constructing DT nodes, but for includes whatever works for you.
13:53robhermarcan: sub-directories are up to you, but I think would be an overkill. arch/arm/boot/dts is what is unwieldy. :(
13:59marcanrobher: I think we'd want at least some pasting or wrapping to construct alias names and phandle references, otherwise there's no way to avoid the 2x copy and paste for these socs...
14:01marcansomething like DIE##i2c0: ... or L(i2c0): ... or similar
14:01svenmarcan: you've also spent to much time with USB: is it correct that there's USB 3.x that only uses a single lane (i.e. one TX/RX pair) and USB 3.2 Gen 2x2 that uses two lanes (i.e. both TX/RX pairs)? and I can combine USB 3 with DP on the other lane on a type c port but if I want that Gen 2x2 thing I can no longer send a DP signal?
14:01marcanand then define DIE to d0_ or d1_ and include the file twice within buses that apply the MMIO offset
14:01marcansven: yes
14:02marcanalso apple gets this wrong in macOS, and ends up reserving everything for DP even when the DP version should let you run that resolution over 2 DP lanes, not 4, and then ends up downgrading USB to 2.0
14:02marcanat least on some monitors
14:03marcan(confusing thing: one USB lane (TX/RX) = two DP lanes (TX/TX))
14:03sveni hate this already :D
14:05kettenisof course they might do that because the hardware is actually broken...
14:05marcanI'd be surprised if they screwed that one up...
14:14svenat least the crossbar configuration supports modes like USB / DP and also DP / DP afaict
14:15svenbut apparently not usb / usb unless i'm still confused :/
14:21marcanrobher: also unrelated, but ideas for a /chosen property name to hold the EFI system partition PARTUUID? since we're going to have multiple, this seems like the sanest way to pass it down to the bootloader/OS... not sure if this one should be an apple,foo thing or not.
14:26robhermarcan: for things on buses, 'ranges' should help you. 'aliases' shouldn't be shared anyways. They usually should be board specific.
14:26marcanI meant labels, sorry, not aliases
14:26marcansince e.g. each die has to self-reference without colliding, and be referenceable by things outside of that file as that specific die
14:32mazas long as it doesn't look like the Armada 80x0 stuff...
14:36robhermarcan: if we can't express what's needed in dts syntax, we can always add to the syntax.
14:38marcanrobher: we'd need some kind of namespace thing, e.g. a special kind of node or a special prop within a node which causes all labels within it to be prefixed with something... and then some escape syntax to break out of that where needed
14:42svenmarcan: (or anyone else really) do you have a monitor where macos gets that wrong? or maybe a usb3 device that uses both lanes? could you run xnu with these bootargs (essentially usb mmiotrace without the hypervisor :D) then and plug it it? https://f.svpe.de/877e608ff9591ec7cd32455634816d18b927189f8bf8571230295e2b6a16e4fd_usb-debugargs.txt
14:43marcanI can test tomorrow, I think I have an NVMe thing that should be 2x2
14:43marcanthe monitor is at at friend's place, would have to test there
14:44sveni'm actually a bit more curious about the 2x2 device
14:44marcanoff to sleep, kinda exhausted today :p
14:44svenDP might even be more complex. there's references to some kind of DP phy as well
14:44svengoodnight :)
14:45svenfwiw, xnu will spam a *lot* when you enable those bootargs so make sure to store the output somewhere because it'll overflow your terminal scrollback very quickly
14:50robhermarcan: Right. Raise the question on the devicetree-compiler list.
14:51robhermarcan: Though if you just used macros for labels that would be a lot better than the Armada crap.
14:54kettenisglad to learn I'm not the only one who didn't like the armada approach
14:55mazit's totally unmaintainable. but at the same time, nobody maintains this platform.
14:55maz(will trade an mcbin for... anything)
14:56robhermacstudio?
15:17mazrobher: btw, if you could look at marcan's AICv2 series, I need an Ack from you on the binding patch (at least).
15:23the_lanetly_052 has quit [Remote host closed the connection]
15:24the_lanetly_052 has joined #asahi-dev
16:02heli0s[m] has joined #asahi-dev
16:11the_lanetly_052 has quit [Quit: Leaving]
16:53user982492 has joined #asahi-dev
17:29user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:38___nick___ has joined #asahi-dev
17:45MajorBiscuit has quit [Ping timeout: 480 seconds]
18:08user982492 has joined #asahi-dev
18:26user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:56gladiac has quit [Quit: k thx bye]
21:08___nick___ has quit [Ping timeout: 480 seconds]
23:03V has quit [Ping timeout: 480 seconds]
23:40V has joined #asahi-dev
23:44marcanOTOH, still no news on the IOMMU stuff, right sven?
23:50marcanmaz: I can respin it today with the commit message fix robher pointed out if you want (plus alyssa's nit)
…