#
…

2022-03-12

00:55chadmed has quit [Quit: Konversation terminated!]
01:08chadmed has joined #asahi-dev
01:21chadmed has quit [Remote host closed the connection]
01:23chadmed has joined #asahi-dev
01:24hizonxx has joined #asahi-dev
01:26hizonxx has quit []
01:48yuyichao has joined #asahi-dev
02:04riker77_ has joined #asahi-dev
02:09riker77 has quit [Ping timeout: 480 seconds]
02:09riker77_ is now known as riker77
02:11dsrt^ has joined #asahi-dev
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
02:52chadmedturns out pipewire actually ignores asound.conf and opens a direct port to the hardware by default, unless you specify in its own configuration that it should use an already defined ALSA PCM as its default sink
02:53chadmedproblem with this is that it does not work with ALSA PCMs that route through LADSPA plugins, pipewire expects you to create a virtual pipewire sink to do that (again in its own config), link that to a "coupled" sink (a source-sink passthrough in pipewire) and then feed that directly to hardware
02:56chadmedand the problem with THAT is that pipewire opening direct ports to this driver somehow breaks pipewire-pulse, which is what has caused mpv and VLC to explode. the failure mode is similar to if you disable resampling in vanilla pulseaudio so im thinking pipewire is not telling pipewire-pulse to do it or something
02:59chadmedthe other shit thing is that REW or Java relies on some stuff llvmpipe cant do and so its GUI breaks on launch, which makes it basically impossible to get well-calibrated response curves for the drivers. doesnt matter anyway, since plugging in my interface to use the calibration mic makes the internal speakers unusable :)
02:59chadmedits been a really fun morning
03:02riker77_ has joined #asahi-dev
03:06riker77 has quit [Ping timeout: 480 seconds]
03:06riker77_ is now known as riker77
03:23PhilippvK has joined #asahi-dev
03:26phiologe has quit [Ping timeout: 480 seconds]
03:27PaterTemporalis has quit [Ping timeout: 480 seconds]
03:37psykosethat sounds incredibly fun indeed :)
03:50kov has quit [Quit: Coyote finally caught me]
05:17nepeat has quit [Remote host closed the connection]
05:17nepeat has joined #asahi-dev
05:18bpye has quit [Quit: Ping timeout (120 seconds)]
05:18linuxgemini has quit [Quit: Ping timeout (120 seconds)]
05:18kode54 has quit [Quit: Ping timeout (120 seconds)]
05:18KDDLB has quit [Quit: Ping timeout (120 seconds)]
05:19kode54 has joined #asahi-dev
05:19bpye has joined #asahi-dev
05:19nkaretnikov has quit [Read error: Connection reset by peer]
05:19linuxgemini has joined #asahi-dev
05:19robher has quit [Remote host closed the connection]
05:19marcankettenis: I'm working on extracting out the DTs so we can package those separately, ideally automatically from the asahi branch
05:19marcanI'll merge that compat hack into asahi for now
05:19marcanis there anything else you need DT-wise?
05:19WindowPain has quit [Remote host closed the connection]
05:20skipwich has quit [Quit: DISCONNECT]
05:20tardyp has quit [Read error: Connection reset by peer]
05:20KDDLB has joined #asahi-dev
05:20skipwich has joined #asahi-dev
05:20tardyp has joined #asahi-dev
05:20nkaretnikov has joined #asahi-dev
05:20erincandescent has quit [Quit: No Ping reply in 180 seconds.]
05:20robher has joined #asahi-dev
05:20WindowPain has joined #asahi-dev
05:21erincandescent has joined #asahi-dev
05:22marcanchadmed: hey, I once REWed through a JACK to network to ffmpeg bridge to get an impulse response of my smartphone, there's always a way :D
05:24KDDLB has quit []
05:24WindowPain has quit []
05:25KDDLB has joined #asahi-dev
05:25WindowPain has joined #asahi-dev
05:25marcanthe bus routing in that Ardour project was... interesting
05:39chadmedmarcan: that sounds... interesting... heh
05:41chadmedive got everything routing through JACK (pipewire and pulse are both happy to act as clients to it) so it doesnt fall apart when i plug my interface in, so i can now either use REW remotely by waypipe-ing Xwayland to my main machine or get a 24/96 WAV of a log sweep and just play that via aplay to each driver and use the calibration mic through another machine with known parameters
05:41marcankettenis: how are you handling AIC in the end?
05:42marcanchadmed: cool!
05:45marcanchadmed: and yeah, my standard setup these days is JACK behind everything for my main interface, though I hope to move to pure pipewire in the future
05:45marcanJACK itself has a lot of problems pipewire fixes, but pipewire also has a lot more complexity... :-)
05:46marcanchadmed: mind if I try to start some conversation on the EQ story in #pipewire?
05:47chadmedby all means
05:59Jamie[m]1is it worthwhile/annoying to fix typos in drivers? apple-admac.c says "dmaegine" in a comment
06:01chadmedi think it is, but not if its the only thing youre committing (unless theres a whole mess of em)
06:14marcanchadmed: also, you should add this song to your test list: https://open.spotify.com/track/5J6ddKggpE3BUbd9d9cFES?si=5e7b9ae1059e426b
06:15marcanjannau: that's not upstream yet, so just letting povik know is probably easiest
06:15marcanchadmed: ideally at +∞ gain (it's supposed to be a 1bit song before the lossy compression :D)
06:15marcanmight be a good speaker torture test once we have filters/safety limits
06:16marcanI might actually be willing to sacrifice one of my (AppleCare'd) laptops to that once we're reasonably confident it's *mostly* safe for normal audio...
06:18chadmedit would definitely make a good "do not try this at home" demonstration :P
06:20darkapex1 is now known as darkapex
06:37dsrt^ has quit [Remote host closed the connection]
07:07chadmedhuh ok so the crossovers and EQ i set by ear are pretty much exactly where they need to be :D
07:15marcanI really want to know wtf macOS is doing now then, if only to figure out why it sounds worse :p
07:18chadmedsounds to me like theyre expanding the mids. one thing it does better though is the tightness of the bass response. its pretty dead under linux regardless of what i do with the EQ, which makes me think theyve got some funky phasing going on to overcome standing waves set up in the chassis
07:19marcanthat wouldn't surprise me, yeah
07:20marcanwould be good to take a look at the impulses once we capture them
07:24gladiac has joined #asahi-dev
08:10tanty has quit [Remote host closed the connection]
08:11tanty has joined #asahi-dev
08:19tanty has quit []
08:23tanty has joined #asahi-dev
08:43marcanawesome!
08:44marcanfrom macOS I guess the interesting bit is going to be the group delay in the lows, though we ought to be able to work out a good solution for that with just those impulses, right?
08:45chadmedim hoping so. i want to see what happens when i apply them to the drivers as is using brutefir or something similar
08:45chadmedhopefully some magic
08:46marcanI imagine you might want to smooth out the response in the mid-highs, since otherwise you're going to end up over-correcting for a very specific position
08:47marcan(and also it's not a head model measurement, so will be slightly off from a normal listening position in that sense)
08:47bluetail[m]how is that behaving individually on each m1 machine?
08:47bluetail[m]mac mini m1 vs m1 laptop might have different acoustical properties
08:48chadmedyeah this is going to have to be a per-machine thing
08:48chadmedim just using the j314s as a proof of concept and to establish a process going forward for new machines
08:48chadmedthe hardest part is forging the path
08:49chadmedthat said i dont really have the money or time to do this for each and every new machine that comes out, as much as id love to :P
08:49bluetail[m]Do you think apple does this real-time, following a harman curve?
08:49chadmedits the only way to do it lol
08:50bluetail[m]you make it sound so obvious (laughs)
08:50chadmedaudio signals are time-dependent, theres no such thing as non-real-time DSP
08:50chadmedwell i mean, if youre driving speakers live that is
08:51chadmedof course you could apply an EQ curve to a file or something, but if the output of your filters is going to speakers, you can only really do it as the samples arrive
08:59marcanchadmed: your setup is probably better than mine, but I can run this on all the machines once we have a process and cross-check against your results for j314s
09:00marcanI've been meaning to acoustically treat this room properly anyway... might be a good excuse to finally do it soon
09:07amarioguy has joined #asahi-dev
09:08bluetail[m]Been putting a lot of cash into my room treatment and its still not good since its a old building and its a busy street. But it's so much quieter. Even simple things help. Such as https://www.thomannmusic.com/t.akustik_pet_ceiling_absorber_180_bk.htm
09:08bluetail[m]And it is easy to install. I have it in white.
09:08bluetail[m]4 screws into the ceiling, then pull on the 4 wires to lift it. Done.
09:09bluetail[m]its lightweight, and if it comes off, you aren't dead. I have other absorbers that would certainly kill me if they drop down at night
09:27marcanI don't have any problems with external noise in either direction, I just want some wall treatment to reduce reflections
09:30ChaosPrincess has joined #asahi-dev
09:39jannauoh, dcp already blanks the mac book pro display, that was not working for the HDMI display on the mini
09:42jannaumarcan: do you have a todo list for the release? if you're not working on it I can adapt the ESP uuid matching to passing the uuid in chosen
09:43marcanjannau: in u-boot you mean?
09:43marcanthat's on the list indeed
09:43marcanalso it would be useful to have two scripts: one that boots the ESP as specified in the DT, and one that explicitly does *not* and instead prioritizes USB devices
09:43marcanfor rescue purposes
09:44marcanI'm looking into the DT filtering; seems to work fine, with the state branch a re-filter only takes a minute including all the pulls/merges/mangling involved
09:44marcanso I'm going to try to turn it into a GH action so we have fresh DTs updated when asahi gets pushed
09:44jannaumy hack did both, it tried first to find the specifed partition and if that was not found it falled back to any bootable partition
09:45marcanyeah, that works fine but it'd be nice to have one that explicitly goes for USB first, then NVMe
09:45marcanso users can use that as an explicit override
09:47jannauah, so something an user would invoke manually from u-boot's command line. there might be already a boot_usb in the distro boot scripts
09:48jannauand fail if the specified esp uuid is not found
09:48j`eydoesnt it currently check USB first?
09:49j`eyoh no, nvme first
09:51kettenisthe idea is that once you've installed on nvme you don't want it accidentally boot from usb just because someone plugged in a usb stick of some sorts
09:51PaterTemporalis has joined #asahi-dev
09:52marcanI'd say the default behavior should be specific ESP -> USB (ignore other ESPs in NVMe, always, to avoid confusion)
09:52marcanand the explicitly invoked recovery script should be USB -> any ESP in NVMe
09:53marcan(if no ESP is specified in /chosen then it should just pick the first though)
09:53chadmed has quit [Read error: Connection reset by peer]
09:53kettenismarcan: fixing the aic2 issue in the OpenBSD driver in a way that works with the old DT comes kinda natural, so don't worry about tweaking the DT
09:53marcanah, ok, I thought you wanted to keep compat with old drivers
09:53chadmed has joined #asahi-dev
09:53marcanit'd be easy to do on linux too but I just want to rip off this bandaid for us :) (since I'm not promising anything yet)
09:53marcancompat hacks like that will start happening after first release if we need them
09:54kettenisI think there is only one m1 pro/max user besides me ;)
09:54kettenisa few more folks with m1
10:27mpsI'm still to idea that if USB is plugged in on boot to use it as boot device
10:28mpsif someone wants protected filesystem on nvme then FS should be encrypted
10:31marcanon modern machines you don't normally expect USB to take over boot unless you explicitly set it as such
10:31kettenismarcan: so basically what I did is that for AIC2 I use bus_space_map(9) to map the event register (since it is now separate) and for AIC1 I use bus_space_subregion(9) to carve out the event register
10:31jannaunothing prevents you to place an ESP with a specified uuid on a usb drive, the installer doesn't support that at the mement
10:32kettenisadding code for AIC2 to carve out the event register with bus_space_subregion(9) isn't a huge burden, so that's what I went with
10:32marcanor can get u-boot to read configs from the ESP and then you can override whatever there
10:33marcankettenis: yeah, I just point two iomem pointers at different or same maps, and the error cleanup code unmaps the event one if they aren't equal
10:33marcanand then I already had an offset, that's just 0 for AIC2
10:33mpsjannau: for me personally this is not preoblem, I can change and build m1n1 and u-boot but not sure for end users
10:33kettenisanyway, back to u-boot, there are several problems here:
10:34kettenisu-boot is really device-oriented; so distroboot iterates over devices trying to boot from them
10:36ketteniscurrently I don't enable persistent u-boot environment support, but when we do that the only really viable option is to store the u-boot environment in a file on "the" ESP
10:36kettenisalthough in this context ESP is probably the wrong term
10:37kettenissince this is code that doesn't know anything about EFI
10:37marcanwe could enable persistent environment, and use that to allow users to override actual boot behavior from the ESP (where "the" has to be the /chosen-specified one)
10:37kettenisit is just "a" partition with a filesystem that u-boot understabds
10:38kettenisthen there are the EFI variables, which are enabled and if you set one using bottime services, it will put them in a file on the ESP
10:39kettenismaking that pick "the" ESP will require some actual code to recognize the /chosen-specified one
10:45kov has joined #asahi-dev
10:46kettenisthe code in u-boot that picks "the" ESP lives in lib/efi_loader/efi_disk.c:efi_disk_add_dev()
10:47ketteniscurrently that picks the first one
10:47kettenisbut changing that to pick the first but override it if we find the one designated by /chosen shouldn't be too hard
10:48kettenisbut I do expect some pushback on such a change
10:56kode54I use two unifi devices that use uboot
10:57kode54/offtopic
11:25marcanok, I set up the devicetree repo but I don't think updating from a GH action is going to work, you really need the repos to already be fetched to have it finish in a reasonable time
11:25marcanso I'll have to set up some local builder or something at some point
11:25marcanI guess I'll update manually for now, at least it's all scripted
11:35amarioguy has quit [Remote host closed the connection]
11:42marcangit clone --depth=1 https://github.com/AsahiLinux/devicetrees to get a quick clone of the DT stuff, scripts/build.sh to build only the Apple devicetrees
11:43marcanright now that history does chain off to the entire kernel, but hopefully Ian will fix that at some point
11:43marcan--depth-1 works though
11:51kettenisgood enough for building the installer I'd say
11:55mpsheh, just noticed that kernel 5.17-rc7 don't have '# CONFIG_$OPTION is not set' but 'CONFIG_$OPTION=n' by default
11:56mpslooks like for all $OPTIONs
12:08mpsjannau: ah, yes, I see. thanks.
12:08tmlindfor me macbook air m1 wlan stopped working with the rc7 kernel, got brcmf_pcie_init_ringbuffers: Allocating ring buffers failed
12:09j`eytmlind: youre using a 4k kerel without the iommu patch?
12:10tmlindj`ey: ah that's probably it, i forgot to reapply after it produced some conflicts..
12:10chadmedok change of plans for the IRs -- im going to sample just L and R, with the crossovers applied and use those samples to build an IR. trying to apply 6 at once explodes ALSA and pegs a whole core
12:11chadmedi'll do that tomorrow though, now that i have a flow that works its quick and easy to do stuff
12:12chadmedapplying just two of the IRs makes a significant difference though, so we've made progress at least
12:31jannaunotchless dcp display that was simpler than expected. not correcting the physical dimensions so technically non-square pixels but the physical dimensions are not reported in wl_output
12:32jannaufbcon doesn't work though
12:49tmlindj`ey: yup that was it, thanks
12:50tmlindseeing a m1n1 issue after update though with standalone kernel after updating from about a week ago
12:52tmlindlooks like kernel cmdline is no longer getting passed? don't have debug cable to connect to a pc
12:52tmlindcommit d76f3a66318f ("m1n1.hw.DART: coalesce continuos l2 ptes") works, have not bisected
12:53jannautmlind: the format changed: use 'chosen.bootargs=...'
12:53j`eytmlind: you need to use chosen.boo..
12:53tmlindheh ok :) thanks for the fast reply
12:53j`ey0a8a593cdc1aead31ad9e1cfb0e589610a218ef5
12:53* tmlindgoes to hold the power button again
12:54j`eytmlind: btw you can use a normal USB C-A cable with m1n1
12:56tmlindj`ey: ok great, don't seem to have one right now..
13:38kettenisjannau: I'm looking at fixing the u-boot dynamic addresses
13:39kettenisis there any reasoon you put scriptaddre and pxefile_addr_r near the top of the address space?
13:53jannaukettenis: not really, I looked at other board files and thought that way they are at least of the way
13:54marcanpovik: so when lw1 borks, the overcurrent IRQ flag is set and the SAR ADC measurements are invalid
13:55kettenismy idea is to make it use the lmb stuff that's also used to do the allocation when you actually load stuff
13:55j`eykettenis: thank you for fixing that
13:58povikmarcan: are you sure the it's the overcurrent? i thought the IRQ flag was reserved
13:58marcan0x49 bit 2 is IR_OC
13:59poviklet's see
13:59povikah i was looking at something in the live registers
14:00povikdidn't catch 0x49
14:01kettenisjust need to pick some reasonable sizes for the generic load area (loadaddr) and the ramdisk area (ramdisk_addr_r)
14:01kettenisbut maybe 1G for those is a reasonable number
14:03marcanpovik: that bit is the only one that consistently predicts if it's broken or not
14:04povikcheck if apple configures OCE_RETRY, they don't
14:04povik*checked
14:05marcanhonestly this datasheet kind of sucks
14:05ketteniswe know we have at least the best part of 8G on these machines so as long as m1n1 doesn't carve it up in silly ways using 1G chunks for those should always fit
14:05marcan"Certain limitations applied. Contact TI if need to use this bit.
14:06marcanlooking at a datasheet for a similar part, these errors are latching
14:06marcanand the retry timeout is 1.5 seconds which kind of sucks
14:06marcanso the question is when does the error happen
14:07povikmarcan: this is apple's setup sequence: https://tpaste.us/zQbZ
14:07povikpage 0xfd, register 0x0d opens some hidden set of registers
14:08povikafter you write 0x0 to 0x0d the hidden registers disappear and it's back to normal
14:12povikor maybe we should contact TI... :-p
14:13kettenisif folks can give that a go it would be great
14:14j`eykettenis: thanks I will try that in a bit
14:15povikmarcan: could be i send some garbled samples at the start!
14:16povikyou should be able to test it by adding a delay before the codecs are unmuted
14:16poviki think the DMA stream and all should be set up by that time
14:18povikthere's a FIFO i tried to drain with mca_flush_adapter_fifo in mca.c
14:18povikbut i can't claim to understand it (hence why it's disabled)
14:19povikalthough if it really was a case of garbled samples, then why does it happen even at low gain (if it does)
14:24marcanoh heh, this time I got some weird noise instead of death
14:25povikbeen there
14:25povik'clicks'
14:26marcanit was more like a buzz
14:26povikthis is a mystery noise machin
14:26povik*machine
14:27j`eykettenis: booted 3/3 times. I only booted about 1/10 before, so I'd say that's fixed
14:29jannaukettenis: thanks for taking care of this, maybe use a define for kernel_comp_addr_r / kernel_comp_size
14:45marcanpovik: I'm adding debug and yeah, it seems sometimes when it first powers up it goes into overcurrent mode and auto shuts down, but only on that one channel. will keep probing...
15:11smartmobili has joined #asahi-dev
15:12smartmobili has left #asahi-dev [#asahi-dev]
15:57nametable[m] has joined #asahi-dev
16:16___nick___ has joined #asahi-dev
16:17___nick___ has quit []
16:18___nick___ has joined #asahi-dev
17:24balrog has quit [Quit: Bye]
17:25balrog has joined #asahi-dev
17:32gabuscus has quit [Ping timeout: 480 seconds]
17:36GlanzmannAbout the u-boot discussion today, having a live system is really handy, but if someone screwes up the device tree, than you need to boot to u-boot. m1n1 probably never get keyboard support (or power button press detection supprt) in order to chainload from usb instead of nvme?
17:36Glanzmanns/to u-boot/macos or 1tr/
17:37tpw_rulesi wonder if extlinux.conf support could be put in m1n1...
17:38svenI mean, you can always go to 1TR and go from there or just install a second “boot to usb stub”
17:38svenand end users really shouldn’t be messing with device trees anyway
17:38mpstpw_rules: this will need practically complete u-boot in m1n1
17:39mpsmaybe add fallback u-boot in ESP in m1n1
17:40Glanzmannsven: And hopefully the device tree is stable enough now that you get basic hardware support (screen, keyboard, nvme, wifi) to fix things
17:40mpsso have one tested that work as fallback and one for testing
17:40mpsbut have no idea how to implement this
17:41svenno guarantees about dt stability before the release except for stuff that’s been upstreamed
17:42mpsyes, for now go to 1TR and install m1n1+dtbs+u-boot which works in case of install messed u-boot in ESP
18:05balrog has quit [Quit: Bye]
18:12balrog has joined #asahi-dev
18:15marcanpovik: from the end of your init log
18:15marcan# [I2CTracer@/arm-io/i2c1] transfer: (start) 70 02 82 (stop)
18:15marcan# [I2CTracer@/arm-io/i2c1] transfer: (start) 70 02 80 (stop)
18:15marcan# [I2CTracer@/arm-io/i2c1] transfer: (start) 70 02 81 (stop)
18:15marcanI have a hunch that that's a workaround
18:15marcanany chance that it *always* does 82 -> 80 -> 81 instead of 82 -> 81?
18:15marcanbecause I can fairly reliably repro the fail by looping unbind -> rebind -> fast speaker-test 4 times, and after making it always do ACTIVE before MUTE, it seems reliable
18:16marcanpushed, along with the other fixes, to audio/testing
18:19marcanalso in today's "the kernel is a pile of race conditions and we should all switch to Rust some day", reading /sys/kernel/debug/regmap/*/registers while the regmap is being destroyed crashes the kernel
18:23ketteniswell, exposing arbitrary hardware registers through a pseudo-filesystem like that is just dumb
18:26marcanit's debugfs, it's for debugging
18:26marcanand IIRC it's gated under a .config option
18:26marcanthat much is fine
18:26marcannot locking things properly is not fine
18:41Jamie[m]1kettenis, consider: /dev/mem :P
18:48povikha! didn't know /sys/kernel/debug/regmap/*/registers
18:48povikthat's handy
18:49* povikcumbersomly using the hv for the same
19:00povikmarcan: well, can't disprove the 82 -> 80 -> 81 theory
19:00povikanother thing i will watch for next time i have macos in hv
19:28nepeat has quit [Quit: ZNC 1.8.2 - https://znc.in]
19:29nepeat has joined #asahi-dev
19:29nepeat has quit [Remote host closed the connection]
19:30nepeat has joined #asahi-dev
19:35marcanpovik: oh yeah, thought: we should remove the fallback compatibles from the amps in the DT, as a gate for making sure whatever safety stuff we come up with is merged first and nothing comes up on kernels without it
19:37poviksounds reasonable
19:37povikthough i don't know about tas2770 yet
19:38povikif we should drop that and start using tas5770
19:52kettenisas far as I can tell the chip is 100% compatible
19:56povikyeah, that's why i don't want to switch to a new compatible to gate on safeties there
19:56povikbut they may not be as important as they are with the tas2764-like part
19:58GlanzmannMaybe I should add a script that lets you modify the live system and write it back to the initrd on the usb stick.
21:05gladiac has quit [Quit: k thx bye]
21:08___nick___ has quit [Ping timeout: 480 seconds]
22:12snnw[m] has joined #asahi-dev
22:25shenki has quit [Remote host closed the connection]
23:01ChaosPrincess has quit [Remote host closed the connection]
23:28axboe has quit [Remote host closed the connection]
23:29axboe has joined #asahi-dev
…