#
#asahi-dev · 2023-01-15 13:15
marcanwe need to configure the PLL when the refclk is up
#asahi-dev · 2023-01-15 13:15
marcanpovik: I don't think configuring the PLL in hw setup, then just turning it on on unmute is legit
#asahi-dev · 2023-01-15 13:15
marcanfixed it.
#asahi-dev · 2023-01-15 13:02
marcanjannau: 0x20 is the error flag
#asahi-dev · 2023-01-15 12:22
marcanthe resulting aliasing seems to be slightly jittery, which suggests a PLL issue yeah
#asahi-dev · 2023-01-15 12:22
marcantook 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)
#asahi-dev · 2023-01-15 12:18
jannauI 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
#asahi-dev · 2023-01-15 12:16
jannauI don't see "PLL failed to lock" but PLL_LOCK_STATUS reads back 0x30 instead of 0x10 witj trace_codecs.py
#asahi-dev · 2023-01-15 12:16
chadmedit just causes the PLL to desync...
#asahi-dev · 2023-01-15 12:14
chadmedmps reported that switching the muxes and then switching them back fixed it, but i cant repro that
#asahi-dev · 2023-01-15 12:11
jannaucs42l42 has sample rate converters
#asahi-dev · 2023-01-15 12:09
chadmeduh oh
#asahi-dev · 2023-01-15 12:09
chadmedcs42l84 2-004b: PLL failed to lock: -110
#asahi-dev · 2023-01-15 12:03
chadmeddoes the codec have resampling facilities?
#asahi-dev · 2023-01-15 11:59
marcanpovik, chadmed: listening to the distortion, this sounds exactly like terribad resampling/aliasing
#asahi-dev · 2023-01-15 11:32
marcanI'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.
#asahi-dev · 2023-01-15 11:23
marcanpovik: ^
#asahi-dev · 2023-01-15 11:22
marcanthis all points towards clocking issues in general
#asahi-dev · 2023-01-15 11:22
marcanIIRC 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
#asahi-dev · 2023-01-15 07:42
chadmedik 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
#asahi-dev · 2023-01-15 07:40
chadmedpower use goes from like 5 W to like 15 W just wiggling the cursor around
#asahi-dev · 2023-01-15 07:39
chadmedthe touchpad seems to generate a heck of a lot of interrupts, the kernel wakes up multiple cores to deal with them
#asahi-dev · 2023-01-14 23:59
chadmedeh it will be fixed eventually with proper shared gpio but thats 100% not something ill even pretend to be able to do
#asahi-dev · 2023-01-14 23:58
chadmedodd that it changed. seems to still not work for mps though
#asahi-dev · 2023-01-14 22:12
joskechadmed: well the base kernel is different. On top of asahi branch it still doesn't work. On top of asahi-wip it does.
#asahi-dev · 2023-01-14 21:29
chadmed_well no i dont wonder, its a janky hack :P
#asahi-dev · 2023-01-14 21:29
chadmed_joske: i wonder why its unreliable...
#asahi-dev · 2023-01-14 20:37
joskeeven when not playing sound before suspending!
#asahi-dev · 2023-01-14 20:33
joskesame commits didn't work back then
#asahi-dev · 2023-01-14 20:32
joskeM1 MBA
#asahi-dev · 2023-01-14 20:32
joskechadmed: your snd-pm-v2 latest version applies cleanly to asahi-wip and R channel is working after resume!
#asahi-dev · 2023-01-14 19:05
poviksurprising there isn't any similar issue with the cs42l42 driver since the structure with regards to clocking is roughly the same
#asahi-dev · 2023-01-14 18:38
povikand 0x20 could be 'not locked' instead
#asahi-dev · 2023-01-14 18:38
povikjannau: the 0x10 could be a wrong guess from earlier
#asahi-dev · 2023-01-14 18:36
povikunlike in stories some might be misleading :(
#asahi-dev · 2023-01-14 18:36
povikno shortage of clues!
#asahi-dev · 2023-01-14 18:36
j`ey(from glanzmann too)
#asahi-dev · 2023-01-14 18:35
j`eypovik: there's also this i2c-apple 23501c000.i2c: Bus stuck, status 0x13090100, https://pbot.rmdir.de/UppmruSWPIzAMsOUMpCtag
#asahi-dev · 2023-01-14 18:35
jannaus/is //
#asahi-dev · 2023-01-14 18:35
jannau0x20 is appears in the broken v6.2-rc* builds
#asahi-dev · 2023-01-14 18:35
povikhuh
#asahi-dev · 2023-01-14 18:35
jannauno, 0x10 is the locked bit
#asahi-dev · 2023-01-14 18:34
poviklet's check
#asahi-dev · 2023-01-14 18:34
povik0x20 will most likely be the locked flag in the pll status register
#asahi-dev · 2023-01-14 18:34
povikright, i guess something changed in sequencing of calls causing a clock misconfiguration
#asahi-dev · 2023-01-14 18:32
jannaumps said switching the headphone playback mux to secondary and back to primary fixes the distortion (without pipewire/pulseaudio). on j375 with pipewire running that doesn't fix the distortion
#asahi-dev · 2023-01-14 18:30
jannauand "REG: R.8 PLL_LOCK_STATUS = 0x30" instead of 0x10
#asahi-dev · 2023-01-14 18:29
jannauonly difference I see in a codec trace is a couple of additional "REG: W.8 CCM_CTRL1 = 0x0 (MCLK_SRC=0(RCO), MCLK_FREQ=0(F_12MHZ))" writes
#asahi-dev · 2023-01-14 18:29
povikthanks
#asahi-dev · 2023-01-14 18:29
povikhuh

plus ›