ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: | Wiki: | Logs:
flying_sausages has quit []
flying_sausages has joined #asahi-dev
Droop has quit []
Droop has joined #asahi-dev
faruk has quit [Quit: Textual IRC Client:]
systwi has joined #asahi-dev
ah- has joined #asahi-dev
regalramp has quit [Remote host closed the connection]
regalramp has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
mini0n has quit [Quit: Leaving]
pthariensflame has joined #asahi-dev
Stary has quit [Ping timeout: 480 seconds]
chadmed_ has quit [Remote host closed the connection]
Stary has joined #asahi-dev
pthariensflame has quit [Quit: Textual IRC Client:]
Stary has quit [Ping timeout: 480 seconds]
Stary has joined #asahi-dev
leah2 has quit [Ping timeout: 480 seconds]
regalramp has quit [Ping timeout: 480 seconds]
SSJ_GZ has joined #asahi-dev
<chadmed> the touchpad seems to generate a heck of a lot of interrupts, the kernel wakes up multiple cores to deal with them
<chadmed> power use goes from like 5 W to like 15 W just wiggling the cursor around
<chadmed> ik some of that is going to be redrawing the screen but it still seems very high, and the irq thread reports over 4% cpu utilisation
hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tim has joined #asahi-dev
tim has quit [Remote host closed the connection]
leah2 has joined #asahi-dev
SSJ_GZ has quit [Ping timeout: 480 seconds]
kit_ty_kate has quit [Quit: WeeChat 3.6]
bps2 has joined #asahi-dev
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
bps2 has quit [Ping timeout: 480 seconds]
bcrumb has joined #asahi-dev
bcrumb has quit []
jeffmiw has joined #asahi-dev
<marcan> IIRC the codecs use the audio clock as their internal clock when active, so the audio clock being screwed up would explain the i2c bus getting jammed
<marcan> this all points towards clocking issues in general
<marcan> povik: ^
jeffmiw has quit [Quit: Konversation terminated!]
<marcan> I'm going to add a bit more logging to i2c after the unjam fix, in case it's useful to debug. That should at least log jams (and other error conditions) before the start of the next transaction, even if unjam succeeded.
<marcan> povik, chadmed: listening to the distortion, this sounds exactly like terribad resampling/aliasing
hertz has joined #asahi-dev
<chadmed> does the codec have resampling facilities?
<chadmed> cs42l84 2-004b: PLL failed to lock: -110
<chadmed> uh oh
<jannau> cs42l42 has sample rate converters
<chadmed> mps reported that switching the muxes and then switching them back fixed it, but i cant repro that
<chadmed> it just causes the PLL to desync...
<jannau> I don't see "PLL failed to lock" but PLL_LOCK_STATUS reads back 0x30 instead of 0x10 witj
mkurz has quit [Quit: Leaving]
<jannau> I can't repro "fixing" the issue by switching headphone playback mux either, obvious difference is that we're using pipewire while mps uses plain alsa
<marcan> took a capture, I see every Nth sample ish getting replaced by zero, where N is circa 8 (might be more than one sample, hard to tell in analog)
<marcan> the resulting aliasing seems to be slightly jittery, which suggests a PLL issue yeah
bps2 has joined #asahi-dev
<marcan> jannau: 0x20 is the error flag
<marcan> fixed it.
<marcan> povik: I don't think configuring the PLL in hw setup, then just turning it on on unmute is legit
<marcan> we need to configure the PLL when the refclk is up
<marcan> or maybe the problem is just enabling it early, let's see
<marcan> yeah I think that's it
<marcan> jannau, chadmed, povik: fix in bits/070-audio and asahi-6.2-rc3-4, doing an arch build now
<marcan> I'm guessing something about the sequence of operations changed in 6.2 and that's what broke it
<mps> to explain what I found: starting playing sound and then change headphone playback mux to secondary and back to primary fixes distortion
<mps> but playing another sound I need to repeat procedure
<mps> and sometimes even have to repeat it when pause sound and then play again, same mpv instance
<marcan> mps: I fixed it, no more explanations necessary
<mps> marcan: nice \o/
bcrumb has joined #asahi-dev
<mps> it is asahi-6.2-rc3-4, lets build it
<marcan> cs42l42 doesn't have the same bug, but I can imagine some codepaths where it would go wrong. I'm going to add a defensive patch.
chadmed_ has joined #asahi-dev
<marcan> as for what happened: the PLL was running unlocked/too fast, by a factor of 1/8 or 1/4 or thereabouts. there's probably an 8-sample elastic buffer between the input sample data (clocked by the input clock) and the core.
<marcan> since the core was running too fast, the elastic buffer keeps underrunning and that creates 0-samples on the output
<marcan> since this happens every 8 input samples, the overall playback rate is ~correct for f << 48kHz/8 = 6kHz -> 0-3kHz, which means audio is recognizably the right pitch
<marcan> but everything above that is a giant mess of aliasing
<mps> to confirm: just tested, no more sound distortion
<mps> on m1pro j316. thanks
<povik> marcan: i would be very surprised if the timing of configuring the pll mattered as long as you don't enable it
<povik> there's a mux for clock selection after the pll, which i guess helped cover the bug until now
<marcan> yeah it was just the early enable that was breaking it
<povik> right, that was an oversight, thanks for the fix
<povik> still weird that i didn't see anything relevant in the asoc diff of the two tags
<povik> but i can live with leaving that unexplained
<marcan> could just be a random timing difference
<marcan> kernels are weird things
<povik> i guess
jeffmiw has joined #asahi-dev
<jeffmiw> it seems I played a bit too much with the devil: running out of space on my asahi partition, I resized it from parted and on the next reboot my mba m1 is not booting at all, not even in recovery mode :)
<jeffmiw> it seems I'm going to play with idevicerestore now ...
<jeffmiw> anyone went throught this already ?
bcrumb has quit [Quit: WeeChat 3.7.1]
<marcan> it should work, modulo you need a bunch of git versions
<marcan> (usbmuxd, libimobiledevice, idevicerestore)
<marcan> jeffmiw: how did you make space for resizing the partition in the first place? parted doesn't know how to resize APFS...
<jeffmiw> ok, thanks.
bps2 has quit [Ping timeout: 480 seconds]
<jeffmiw> well I had one 10GB Asahi minimal partition just after my asahi desktop partition and then free space, so I deleted the 3 "10GB asahi minimal partitions" and then did a resizepartition
<marcan> you didn't touch the system recovery partition at the end?
<jeffmiw> all worked well even with the resized partitions beeing online :)
<jeffmiw> no I did not
<marcan> best guess, the empty partition slots broke it (macOS never does that)
<marcan> what happens on boot now?
<jeffmiw> nothing, no sound, nothing on screen
<marcan> no logo even?
<jeffmiw> no logo
<marcan> that sounds very, very broken...
<marcan> I'm not even sure that is supposed to happen if you just screw up the SSD
<marcan> tried the fallback rOS boot gesture?
<jeffmiw> yeah ... I'll see if I can get into DFU mode
<marcan> (tap-release-tapandhold power, relatively quickly)
SSJ_GZ has joined #asahi-dev
<jeffmiw> did not try this one
<jeffmiw> it is then supposed to boot in recovery ?
<marcan> yes
<jeffmiw> not doing anything either
<jeffmiw> when I did the partition change, I knew there were some risks but I was at worst expecting to get a "no disk found" kind of boot error icon ... so as you said it seems very very broken ...
<jeffmiw> and my onther mac is an old mba 2012 on which the apple configurator from the store won't complains because of the too old macos vesion... when murhpy is in :)
cylm has joined #asahi-dev
<ChaosPrincess> - you can use that to install new enough macos to make apple configurator run
<jeffmiw> humm the apple app store said it needs macOS 12.4, I have Catalina on my MBA 2012 already (10.15.7)
<ChaosPrincess> welp, guess they updated it
<marcan> povik: the remaining errors I see for cs42l83 on startup are I2C NACKs (-6). just pushed a patch so it'll print xfsta, the bottom byte of which is the byte which caused the NACK.
<marcan> I *think* the counting is such that start/repeat-start each count as 1 byte, separate from the address byte, but I'm not 100% sure
<marcan> also not sure if the NACKed byte counts for the increment or not, the datasheet is unclear
bps2 has joined #asahi-dev
derzahl has quit [Remote host closed the connection]
<povik> ok, didn't know there were any nacks there, i will keep an eye then
Tramtrist has quit [Remote host closed the connection]
<marcan> it works though, tested my M1 MBA through suspend/resume etc without issue
<marcan> getting to the point where I'd like to ship 6.2, do we have any other known regressions?
Tramtrist has joined #asahi-dev
amarioguy has joined #asahi-dev
<ChaosPrincess> maybe wait until 6.2 is shipped as a release and not rcs?
<ChaosPrincess> also, is there a way to decode the interrupt specs from ADT? as in level/edge, high/low ?
<sven> don’t think it makes sense right now to wait for non-rcs
<sven> there’s still quite a lot of bleeding edge downstream drivers in those kernels anyway
<sven> in unrelated and entirely unsurprising news the usb curse seems to extend to thunderbolt as well
<sven> i saw the pcie port come up once and show the ethernet adapter but can’t reproduce that anymore
balor has quit [Quit: balor]
balor has joined #asahi-dev
bcrumb has joined #asahi-dev
<povik> marcan: the defensive cs42l42 patch isn't necessary since stream_use guards against reconfiguring with unmuted stream
bcrumb has quit [Quit: WeeChat 3.7.1]
mini0n has joined #asahi-dev
faruk has joined #asahi-dev
faruk has quit [Quit: Textual IRC Client:]
hightower2 has joined #asahi-dev
bluetail8 has joined #asahi-dev
faruk has joined #asahi-dev
landscape15 has joined #asahi-dev
bluetail has quit [Ping timeout: 480 seconds]
bluetail8 is now known as bluetail
faruk has quit [Quit: Textual IRC Client:]
landscape15 has quit [Quit: WeeChat 3.8]
DarkShadow4444 has quit [Quit: ZNC -]
hotbbqsauce has joined #asahi-dev
hotbbqsauce has quit []
DarkShadow4444 has joined #asahi-dev
DarkShadow4444 has quit [Remote host closed the connection]
DarkShadow4444 has joined #asahi-dev
<Cyrinux> audio jack is fix also on m2 air with last edge
dg_ has joined #asahi-dev
<dg_> Error: PageSize configuation is wrong: configured with 4096, but got 16384
dg_ has quit []
m1nion has joined #asahi-dev
mini0n has quit [Ping timeout: 480 seconds]
bps2 has quit [Ping timeout: 480 seconds]
tim has joined #asahi-dev
tim is now known as Guest1427
zkrx has quit [Remote host closed the connection]
zkrx has joined #asahi-dev
dsharshakov has joined #asahi-dev
<dsharshakov> What are the mic locations on newer MacBooks? I'm thinking of more processing algorithms (beamforming) for PipeWire and want to know what array shapes other than stereo are possible. I mean using several mics for noise reduction. Iirc T2 era ones has 3 mics located under the keyboard
<dsharshakov> I am inclined to believe AOP has some workings for that and may produce already filtered data
<dsharshakov> povik: I've sorta lost track of works on internal mics. I remember you first showcased AOP-based capture from m1n1, but later started studying LEAP assembly to bypass AOP. Reading logs I couldn't find what was wrong with AOP (with it being the intended path macOS uses)
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
<ChaosPrincess> dsharshakov: they are about to the right of delete key
<kettenis> that has proper iommu support and enables the PCI USB controller
<dsharshakov> ChaosPrincess: alright, what shape they form? How many?
<ChaosPrincess> 3, roughly l shaped
<dsharshakov> Likely what's necessary is just start the capture in such a mode we'll later use (be it AOP or LEAP or sth else) and moving a finger around
<kettenis> tests on the iMac and Mac Studio are welcome since I don't know how this interacts with the firmware-less controllers
<dsharshakov> So they form an L with a line parallel to the laptop edge? That seems like quite a nice setup to beamform. Can be used either as stereo with beam directed a bit left, thus passing through the user's likely location, or three together (better accuracy)
<dsharshakov> didn't it change in recent series?
bcrumb has joined #asahi-dev
bcrumb has quit []
bcrumb has joined #asahi-dev
dsharshakov has quit [Remote host closed the connection]
bcrumb has quit [Quit: WeeChat 3.7.1]
bcrumb has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.7.1]
SSJ_GZ has quit []
bluetail has quit [Quit: The Lounge -]
bluetail has joined #asahi-dev
bluetail has quit [Quit: The Lounge -]
___nick___ has quit [Ping timeout: 480 seconds]
bluetail has joined #asahi-dev
balor has quit [Quit: balor]
balor has joined #asahi-dev
krbtgt has joined #asahi-dev
Guest1427 has quit [Quit: Guest1427]
zshroot has joined #asahi-dev
zshroot has left #asahi-dev [#asahi-dev]
bps2 has joined #asahi-dev
sikkiladho has joined #asahi-dev
Dementor has quit [Remote host closed the connection]
Dementor has joined #asahi-dev
bps2 has quit [Ping timeout: 480 seconds]
<ChaosPrincess> super early draft of the touchbar digitizer driver
jeffmiw has quit [Remote host closed the connection]
<ChaosPrincess> not remotely ready for merge, but i wouldn't mind if someone would give a look and check if i am not doing something extra dumb
<jannau> ChaosPrincess: the touch data looks like it uses the same format as the touchpad, see struct tp_finger in drivers/hid/hid-magicmouse.c
<ChaosPrincess> it does not
<jannau> the finger data
<ChaosPrincess> oh
<ChaosPrincess> actually, yea, looks simiar-ish
<jannau> not sure how much that helps though
<ChaosPrincess> well, we can check crcs i guess
<ChaosPrincess> but i mapped out the rest w/o looking at that structure
<ChaosPrincess> idk if rel_x and rel_y are relevant, since its a touchscreen
yrlf has quit [Quit: The Lounge -]
irth has joined #asahi-dev
m1nion has quit []
sikkiladho has quit []