marcan changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
ayke_ has joined #asahi-dev
seb4nihel has quit [Ping timeout: 480 seconds]
alyssa has joined #asahi-dev
princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
princesszoey has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
derzahl has quit [Remote host closed the connection]
derzahl has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
bluetail has quit [Quit: The Lounge - https://thelounge.chat]
LunaFoxgirlVT has quit [Read error: Connection reset by peer]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
ella-0_ has joined #asahi-dev
ella-0 has quit [Read error: Connection reset by peer]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
chadmed has joined #asahi-dev
LunaFoxgirlVT has joined #asahi-dev
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
nirya has quit [Quit: The Lounge - https://thelounge.chat]
LunaFoxgirlVT has quit [Quit: Leaving]
nirya has joined #asahi-dev
SSJ_GZ has joined #asahi-dev
ella-0 has joined #asahi-dev
ella-0_ has quit [Read error: Connection reset by peer]
bluetail has joined #asahi-dev
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
<chadmed> povik: been doing some testing on the userspace side, JACK also opens the secondary FE as a 32 channel device and complains about being unable to buffer stuff properly
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<chadmed> the latest ucm changes also break pipewire on the laptops, it prevents PW from being able to set profiles so it forces the device off
<chadmed> ucm stuff notwithstanding, this really doesnt look like a userspace problem to me anymore
dgb has joined #asahi-dev
dgb has quit [Quit: dgb]
chadmed has quit [Quit: Konversation terminated!]
dgb has joined #asahi-dev
duban6 has quit []
duban6 has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
chip_x has joined #asahi-dev
chipxxx has quit [Ping timeout: 480 seconds]
psykose has joined #asahi-dev
gyronaut has joined #asahi-dev
gyronaut has quit []
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thepigguy has quit [Quit: thepigguy]
<jannau> aahhhhhhh! j493 CS42L84 Jack DAC wraps around from min to max gain, asahi-wip and alsa-ucm-conf-asahi 645f6c7
dgb has quit [Quit: dgb]
___nick___ has joined #asahi-dev
___nick___ has quit []
jn has quit [Ping timeout: 484 seconds]
___nick___ has joined #asahi-dev
seb4nihel has joined #asahi-dev
chadmed has joined #asahi-dev
blazra has joined #asahi-dev
jn has joined #asahi-dev
<jannau> I guess the converted integer values get negative and due to the overflow in the signed to unsigned conversion we write 511 (the max) to the registers, probably fixed by using SOC_DOUBLE_R_S_TLV which allows us to specify a minimum
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
blazra has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
blazra has joined #asahi-dev
r0ni has joined #asahi-dev
chip_x has quit []
<jannau> no, the problem seems to be in alsa code before the volume write function, maybe the issue is the alsa uses the register values directly, the control has just the LSB regs
chadmed has quit [Quit: Konversation terminated!]
<jannau> progression of volume values is 283, 200, 511. so it gets bad after LSB increases despite decreasing the volume
chadmed has joined #asahi-dev
<chadmed> ok my last ditch hail marry attempt to fix the 32 channel thing failed so im officially out of ideas on that front
<chadmed> s/marry/mary
povik has joined #asahi-dev
<jannau> no, it's the mute flag in DECLARE_TLV_DB_SCALE. single character fix
<povik> chadmed: noted
<povik> jannau: i think we still want the mute flag, but that then means the minimum is off, no?
<povik> (i was just looking up this thread on register/control value confusion in ASoC, but that does not seem relevant in the end vvv )
<jannau> povik: with the mute flag I see a wraparound from 0 (-156 dB) to 100 (-0.5 dB) in alsamixer
<jannau> seems to affect pipewire volumes controls as well. I first triggered it kde balnce controls
<povik> huh
kov has quit [Quit: Coyote finally caught me]
<povik> that is all wrong. doesn't make much sense to have -156 dB at the low end, and the maximum should be 0 dB
<povik> i thought i put this in some reasonable shape but apparently didn't
<jannau> it has a TODO comment
<jannau> without mute it goes down to -256.0 and then jumps up to -120.0
<jannau> the actual values look reasonable for a non-linear 0-100 scale. I don't think anyone will hear a difference between -156.0 and -256.0 dB gain
<jannau> only question is if it makes sense that alsamixer uses non-linear scaling on top
gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
gabuscus has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<jannau> doesn't fix the kde audio settings balance issue. issue there could be even more an user space issue
<chadmed> is this just with the latest ucm stuff?
<jannau> modifying the volume of a single channel modifies first both channels before setting both to the intended values
<jannau> yes, this is with the latest ucm
<chadmed> yeah something funky going on with that
<chadmed> it just forces pipewire to ignore the entire card for me
<chadmed> device is forced into "Off" and i cant select any other profile
<povik> chadmed: send logs
<povik> i think i must have lost a commit fixing the volume scale
<povik> since i figured out it's a signed integer field but the code in asahi-wip doesn't reflect that
<povik> chadmed: is it 'dead' even with headphones plugged in?
<chadmed> a profile called n/a appears which lets me use my headset mic lmao
<chadmed> hold on ill snip a pipewire log
<jannau> yeah, I have "n/a" as profile for the headphones as well but headphone out works
<chadmed> i dont get any sinks, just the mic
<povik> jannau: you running pipewire also?
<povik> the reference distro by default ships pulseaudio in the desktop environment, right?
<jannau> speakers disabled here, if I unplug the headphone it switches the profile to "Off" and displays no output profiles
<jannau> yes, using pipewire
<chadmed> asahi ships pipewire
<povik> ah!
<chadmed> iirc
<povik> anyway i tested the asahi ucm tip against the reference distro, with speakers disabled
<povik> all was well
<jannau> at some point asahi shipped pulseaudio. I explicitly installed pipewire
<chadmed> i dont recall ever having pulse on the asahi desktop image but maybe i just got rid of it really early on?
<chadmed> JACK works with the ucm stuff in place, i can send vlc's JACK output module to the sink and it comes out of my headphones
r0ni has quit [Quit: Leaving]
<chadmed> the second FE still suffers from the 32 channel thing
<jannau> reference distro uses pulse
<povik> i am not any wiser from the pipewire logs...
<povik> jannau: thought so
<chadmed> yeah the pw log doesnt really show much, it opens the device and then just closes it...
<marcan> plan is to switch to PW once all the speaker EQ/safety/etc magic is in
<povik> chadmed: can you increase the verbosity level?
<povik> we really should figure out what's happening there making pipewire reject the ucm profiles
<povik> but i don't see any mentions of ucm apart from
<povik> [I][03648.728076] spa.alsa | [ alsa-pcm.c: 550 spa_alsa_open()] 0xaaab550bb538: ALSA device open '_ucm0001.hw:J314,0' capture
<povik> which would suggest it *does* read it
<chadmed> the next loglevel up makes over 100k lines..
<chadmed> debugging pw is an absolute nightmare lmao
<povik> i will take it over 0k lines, upload it please somewhere if you can
<povik> ha, found the lost commit!
<chadmed> yeah im trying, its a bit slow to paste :P
<povik> at least a grep of dangling commits found it, will take a moment to carve it out
<povik> it's a lost stash, not sure how i managed that *facepalm*
chadmed has quit [Quit: Konversation terminated!]
<povik> here's the volume control fix together with some mic-detection patches on top of asahi-wip
<povik> jannau: ^
<povik> doing a test build now
<povik> huh
<povik> drivers/iommu/io-pgtable-dart.c: In function ‘__dart_alloc_pages’:
<povik> drivers/iommu/io-pgtable-dart.c:112:17: error: unused variable ‘dev’ [-Werror=unused-variable]
<povik> 112 | struct device *dev = cfg->iommu_dev;
<povik> | ^~~
<povik> probably known...
<povik> chadmed: it's as if it doesn't read anything besides the headset mic from the profiles. only idea i have at the moment, is that it fails if the no. of channels isn't specified for a device
<povik> because that's how the mic differs from the others
<povik> you can try inserting PlaybackChannels here
<povik> there's no formal requirement to specify the no. of channels AFAIK, and pulseaudio assumes stereo if unspecified
<povik> it sucks we have to probe the behavior of different sound servers like this
<jannau> povik: known and fixed in the version merged for 6.1
<povik> :)
<jannau> povik: headset detection didn't work on boot, I had to replug the headset
<jannau> behavior in alsamixer is now good, muting works
<povik> ayy!
<povik> will see about the replug
<jannau> the kde balance behavior might be intentional. it seems to adjust both channels and the resets unmodified channel. with the fixed volume scale it's much better
<jannau> user experience seems to still bad due to slow volume updates of the driver
<jannau> did you check if the i2c irq support improves this?
<povik> ah, there's two causes for that reinforce each other: the slow i2c driver and no regcache in the codec driver
<povik> it for sure does improve it, because otherwise all transactions take some number of milliseconds
<povik> s/that/that that/
<povik> we should pick it up, no? last version had merely formal issues i think
thelounge7571340 has joined #asahi-dev
chadmed has joined #asahi-dev
<jannau> yes, I was thinking the same
<marcan> yeah, we should
thelounge7571340 has quit [Remote host closed the connection]
<marcan> I'm thinking tomorrow I'm going to rewrite cpufreq one more time and then do another kernel rebase/update dance
<marcan> anything else I should pick up?
r0ni has joined #asahi-dev
<jannau> povik: plug/mic detection is logged during boot so the driver might just lose the state?
<povik> marcan: i will prepare a batch. i can throw the amarioguy's patch in
<marcan> sure :)
<povik> jannau: it does report it detected the mic?
<marcan> on my side I have the m1 max studio hub thing
<jannau> marcan: bluetooth v3 to get rid of the revert which broke bluetooth
<jannau> there is the keyboard backlight PR
<marcan> noted
<marcan> (bbl, dinner; will catch up on anything else when I get back)
<jannau> povik: please include the cs42l42 compatible removal, I will close my PR as the m1 ultra cpufreq dt fix won't make sense if marcan rewrites cpufreq
<sven> hm, Bluetooth v3 is still in patchwork as “new” and with a few more other series in front of it :(
kov has joined #asahi-dev
<jannau> povik: yes, plug and mic are detected on initial driver load
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
<jannau> yes, the i2c irq patch makes the volume control much faster. thanks amarioguy
chadmed has quit [Quit: Konversation terminated!]
<jannau> povik: plug detection worked now
<ChaosPrincess> btw, can someone review the kb pwm pull request? thanks in advance https://github.com/AsahiLinux/linux/pull/57
chadmed has joined #asahi-dev
<jannau> i.e. audio worked without replug
<chadmed> interesting, that HSBIAS pin disable results in a null pointer deref on j314
Core2080 has joined #asahi-dev
<jannau> povik: do you know if it is expected that alsamixer uses 2 write ioctls to update the DAC volume?
adryzz has quit [Ping timeout: 480 seconds]
<jannau> ChaosPrincess: I'm looking and will test on j493
<ChaosPrincess> thats the m2, right?
<jannau> yes, m2 macbook pro 13"
Core9066 has joined #asahi-dev
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
<chadmed> nvm that was a dtb issue, the jack works with ucm and pipewire with the branch you linked povik
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
<chadmed> ok no nvm kernel null pointer if speakers are enabled???
<chadmed> how fragile is asoc...
chadmed has quit []
<povik> chadmed: that will be a bug in my driver
<povik> if speakers are enabled, it takes longer to probe the sound card, hence the jack detection happens before the codec is bound to a sound card
<povik> but if it doesn't have a sound card, it doesn't have a dapm reference
<povik> that will probably be it
chadmed has joined #asahi-dev
<povik> jannau: no idea, makes sense to me if the ioctl is limited to updating one channel at a time
chadmed has quit []
<jannau> povik: the ioctl argument is struct snd_ctl_elem_value so it should be able to set channels values atomically
<povik> yeah, that's weird then
<povik> maybe it does a read after the write?
<povik> it probably does that, otherwise it wouldn't have the wraparound from earlier before the fix
<amarioguy> povik: alright lemme send you an updated version of my patch today, need to add the reg_imask write in the IRQ handler as pointed out in the v3 mailing list thread
<amarioguy> jannau: no problem :)
<jannau> it does a read after a write but for both channels. I added a debug printk in the generic ioctl handler
* povik goes to visit alsamixer source
refi64 has quit [Quit: The Lounge - https://thelounge.chat]
<povik> that's it maybe?
refi64 has joined #asahi-dev
espo has quit [Quit: espo]
<povik> so it looks like a limitation of alsalib
<jannau> looks like it
<povik> one channel at a time
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<amarioguy> i'll send over the revised patch when i can, do you need the email commit description too or just the diff?
amarioguy has quit [Quit: Leaving]
<povik> amarioguy: i need a patch i can give to git am, as long as it has a sensible patch title it's good
amarioguy has joined #asahi-dev
adryzz has joined #asahi-dev
Core2080 has quit [Read error: Connection reset by peer]
<jannau> ChaosPrincess: done
<amarioguy> povik: alright i'll send the .patch then, gimme a sec
<ChaosPrincess> ty
<sven> jannau: huh, so devm_clk_* helpers finally got merged?
<sven> in may already. fun!
<sven> i know that there have been various patch series trying to add devm_clk_* since a few years ago already that all didn't go anywhere for various reason
<sven> urgh, looks like I'll have to implement a stripped down version of OSSerialize for dcp :<
<povik> what memcpy variety should i be using for copying from/to mmio regions?
<sven> there's memcpy_fromio/toio which may or may not do what you want
<sven> iirc they use readb/writeb until the address is aligned for readq/writeq
<povik> i was wondering if those are the right ones. i guess i won't find a relaxed version
amarioguy has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
King_InuYasha has joined #asahi-dev
* King_InuYasha waves
<King_InuYasha> marcan: gentle(ish) ping on https://github.com/AsahiLinux/asahi-scripts/pulls
<King_InuYasha> at least PR10 and PR11 need to be merged so I can rebase PR9 on it
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<marcan> yup, tomorrow evening when I'm in sweep mode :)
<marcan> (trying to get some stuff organized today, only having a modicum of success...)
amarioguy has quit [Ping timeout: 480 seconds]
seb4nihel has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
blazra has quit [Remote host closed the connection]
blazra has joined #asahi-dev
<alyssa> sven: sounds like you're having fun
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<sven> not really, I got to the point where a new epic service starts and now need to grab fields from a OSSerialzed blob :(
amateurece has joined #asahi-dev
amarioguy has quit [Ping timeout: 480 seconds]
<alyssa> woof
amateurece has left #asahi-dev [#asahi-dev]
derzahl has quit [Remote host closed the connection]
derzahl has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
amarioguy has joined #asahi-dev
<amarioguy> povik: patch link here
<amarioguy> tested-by tag is because the change here from v3->v4 was also in v1 of the patch (which was tested by the same person)
<amarioguy> (v2 was also tested by that person and v2->v3 was whitespace things only)
derzahl has quit [Remote host closed the connection]
<amarioguy> didn't add a commit desc, i can reupload with one if you want
derzahl has joined #asahi-dev
<povik> but v1->v4 isn't whitespace-only, no?
<amarioguy> nope
<povik> in that case i don't think it's fair to use the tag
<povik> since this is a combination of changes that's been untested by that person
<povik> it's all the same to me for picking it up in my branch, but for submission to upstream you need to be careful
<amarioguy> the only change between v3->v4 is re-adding a line that was removed in v2
<amarioguy> that exact same line verbatim was re-added
<amarioguy> as turns out it was needed
<povik> yes, but not with the other lines staying the same :p
<povik> s/:p/;)/
<povik> you see my point?
<amarioguy> okay fair enough
<amarioguy> you can remove that tag or i can reupload
<povik> i will remove it on my end, no worries
<amarioguy> again no commit desc, i can add one if you want
derzahl has quit [Remote host closed the connection]
derzahl has joined #asahi-dev
<povik> nah it's fine
<povik> thanks for sending the patch
<povik> also well done on seeing it to the end. seems like it will be picked up upstream next submission
<amarioguy> no problem :) happy to help the project however i can
amarioguy has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
derzahl has quit [Remote host closed the connection]
derzahl has joined #asahi-dev
tobhe has quit [Remote host closed the connection]
gladiac has joined #asahi-dev
tobhe has joined #asahi-dev
amarioguy has quit [Ping timeout: 480 seconds]
seb4nihel has joined #asahi-dev
dgb has joined #asahi-dev
gladiac has quit [Quit: k thx bye]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
amarioguy has joined #asahi-dev
___nick___ has quit [Ping timeout: 480 seconds]
compassion has quit [Read error: No route to host]
compassion has joined #asahi-dev
compassion has quit [Read error: No route to host]
compassion has joined #asahi-dev
compassion9 has joined #asahi-dev
compassion has quit [Ping timeout: 480 seconds]
compassion9 is now known as compassion
spok has joined #asahi-dev
spok has left #asahi-dev [#asahi-dev]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
compassion3 has joined #asahi-dev
compassion has quit [Ping timeout: 480 seconds]
compassion3 is now known as compassion
opticron has quit [Ping timeout: 480 seconds]
chipxxx has joined #asahi-dev
kensan has joined #asahi-dev
amarioguy has quit [Ping timeout: 480 seconds]
SSJ_GZ has quit [Ping timeout: 480 seconds]
seb4nihel has quit [Quit: Leaving]
kensan_ has joined #asahi-dev
amarioguy has joined #asahi-dev
opticron has joined #asahi-dev
kensan has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
kensan_ is now known as kensan
jakebot6022 has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi-dev
jakebot6022 has joined #asahi-dev
Dcow has joined #asahi-dev
derzahl has quit [Remote host closed the connection]
Dcow has quit [Remote host closed the connection]
pthariensflame has joined #asahi-dev
derzahl has joined #asahi-dev
pthariensflame has quit []
pthariensflame has joined #asahi-dev
pthariensflame has quit []
kensan has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
derzahl has quit [Quit: auf wiedersehen]
derzahl has joined #asahi-dev