#
…

2022-10-16

00:16ayke_ has joined #asahi-dev
00:27seb4nihel has quit [Ping timeout: 480 seconds]
00:37alyssa has joined #asahi-dev
00:37princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
00:38princesszoey has joined #asahi-dev
00:59thelounge7571340 has joined #asahi-dev
00:59thelounge7571340 has quit [Remote host closed the connection]
01:37derzahl has quit [Remote host closed the connection]
01:39derzahl has joined #asahi-dev
02:03thelounge7571340 has joined #asahi-dev
02:03thelounge7571340 has quit [Remote host closed the connection]
02:51bluetail has quit [Quit: The Lounge - https://thelounge.chat]
02:53LunaFoxgirlVT has quit [Read error: Connection reset by peer]
03:07thelounge7571340 has joined #asahi-dev
03:07thelounge7571340 has quit [Remote host closed the connection]
03:30ella-0_ has joined #asahi-dev
03:33ella-0 has quit [Read error: Connection reset by peer]
04:08thelounge7571340 has joined #asahi-dev
04:09thelounge7571340 has quit [Remote host closed the connection]
04:22chadmed has joined #asahi-dev
04:46LunaFoxgirlVT has joined #asahi-dev
05:04chadmed has quit [Quit: Konversation terminated!]
05:05chadmed has joined #asahi-dev
05:06chadmed has quit []
05:07chadmed has joined #asahi-dev
05:08chadmed has quit []
05:08chadmed has joined #asahi-dev
05:11thelounge7571340 has joined #asahi-dev
05:12thelounge7571340 has quit [Remote host closed the connection]
05:26chadmed has quit [Quit: Konversation terminated!]
05:27chadmed has joined #asahi-dev
05:40nirya has quit [Quit: The Lounge - https://thelounge.chat]
05:40LunaFoxgirlVT has quit [Quit: Leaving]
05:40nirya has joined #asahi-dev
05:56SSJ_GZ has joined #asahi-dev
05:58ella-0 has joined #asahi-dev
05:59ella-0_ has quit [Read error: Connection reset by peer]
06:07bluetail has joined #asahi-dev
06:13chadmed has quit [Quit: Konversation terminated!]
06:14chadmed has joined #asahi-dev
06:15chadmedpovik: 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
06:15thelounge7571340 has joined #asahi-dev
06:16thelounge7571340 has quit [Remote host closed the connection]
06:16chadmedthe latest ucm changes also break pipewire on the laptops, it prevents PW from being able to set profiles so it forces the device off
06:17chadmeducm stuff notwithstanding, this really doesnt look like a userspace problem to me anymore
06:23dgb has joined #asahi-dev
06:27dgb has quit [Quit: dgb]
06:31chadmed has quit [Quit: Konversation terminated!]
06:38dgb has joined #asahi-dev
07:00duban6 has quit []
07:04duban6 has joined #asahi-dev
07:18thelounge7571340 has joined #asahi-dev
07:18thelounge7571340 has quit [Remote host closed the connection]
07:24chip_x has joined #asahi-dev
07:30chipxxx has quit [Ping timeout: 480 seconds]
07:49psykose has joined #asahi-dev
08:14gyronaut has joined #asahi-dev
08:16gyronaut has quit []
08:21thelounge7571340 has joined #asahi-dev
08:22thelounge7571340 has quit [Remote host closed the connection]
08:22thepigguy has quit [Quit: thepigguy]
08:47jannauaahhhhhhh! j493 CS42L84 Jack DAC wraps around from min to max gain, asahi-wip and alsa-ucm-conf-asahi 645f6c7
08:51dgb has quit [Quit: dgb]
09:00___nick___ has joined #asahi-dev
09:02___nick___ has quit []
09:04jn has quit [Ping timeout: 484 seconds]
09:04___nick___ has joined #asahi-dev
09:06seb4nihel has joined #asahi-dev
09:06chadmed has joined #asahi-dev
09:25blazra has joined #asahi-dev
09:34jn has joined #asahi-dev
09:39jannauI 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
09:40thelounge7571340 has joined #asahi-dev
09:40thelounge7571340 has quit [Remote host closed the connection]
09:41blazra has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
09:42blazra has joined #asahi-dev
09:49r0ni has joined #asahi-dev
09:56chip_x has quit []
10:01jannauno, 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
10:03chadmed has quit [Quit: Konversation terminated!]
10:04jannauprogression of volume values is 283, 200, 511. so it gets bad after LSB increases despite decreasing the volume
10:05chadmed has joined #asahi-dev
10:05chadmedok my last ditch hail marry attempt to fix the 32 channel thing failed so im officially out of ideas on that front
10:05chadmeds/marry/mary
10:26povik has joined #asahi-dev
10:30jannauno, it's the mute flag in DECLARE_TLV_DB_SCALE. single character fix
10:34povikchadmed: noted
10:34povikjannau: i think we still want the mute flag, but that then means the minimum is off, no?
10:35povik(i was just looking up this thread on register/control value confusion in ASoC, but that does not seem relevant in the end vvv )
10:37jannaupovik: with the mute flag I see a wraparound from 0 (-156 dB) to 100 (-0.5 dB) in alsamixer
10:38jannauseems to affect pipewire volumes controls as well. I first triggered it kde balnce controls
10:40kov has quit [Quit: Coyote finally caught me]
10:43povikthat is all wrong. doesn't make much sense to have -156 dB at the low end, and the maximum should be 0 dB
10:43poviki thought i put this in some reasonable shape but apparently didn't
10:44jannauit has a TODO comment
10:46jannauwithout mute it goes down to -256.0 and then jumps up to -120.0
10:48jannauthe 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
10:51jannauonly question is if it makes sense that alsamixer uses non-linear scaling on top
10:53gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
10:53gabuscus has joined #asahi-dev
10:55thelounge7571340 has joined #asahi-dev
10:55thelounge7571340 has quit [Remote host closed the connection]
10:59jannaudoesn't fix the kde audio settings balance issue. issue there could be even more an user space issue
11:00chadmedis this just with the latest ucm stuff?
11:01jannaumodifying the volume of a single channel modifies first both channels before setting both to the intended values
11:01jannauyes, this is with the latest ucm
11:02chadmedyeah something funky going on with that
11:02chadmedit just forces pipewire to ignore the entire card for me
11:02chadmeddevice is forced into "Off" and i cant select any other profile
11:04povikchadmed: send logs
11:04poviki think i must have lost a commit fixing the volume scale
11:04poviksince i figured out it's a signed integer field but the code in asahi-wip doesn't reflect that
11:06povikchadmed: is it 'dead' even with headphones plugged in?
11:06chadmeda profile called n/a appears which lets me use my headset mic lmao
11:06chadmedhold on ill snip a pipewire log
11:08jannauyeah, I have "n/a" as profile for the headphones as well but headphone out works
11:08chadmedi dont get any sinks, just the mic
11:09povikjannau: you running pipewire also?
11:10povikthe reference distro by default ships pulseaudio in the desktop environment, right?
11:10jannauspeakers disabled here, if I unplug the headphone it switches the profile to "Off" and displays no output profiles
11:10jannauyes, using pipewire
11:10chadmedasahi ships pipewire
11:11povikanyway i tested the asahi ucm tip against the reference distro, with speakers disabled
11:11povikall was well
11:11jannauat some point asahi shipped pulseaudio. I explicitly installed pipewire
11:11chadmedi dont recall ever having pulse on the asahi desktop image but maybe i just got rid of it really early on?
11:14chadmedJACK 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
11:15r0ni has quit [Quit: Leaving]
11:15chadmedthe second FE still suffers from the 32 channel thing
11:20jannaureference distro uses pulse
11:20poviki am not any wiser from the pipewire logs...
11:20povikjannau: thought so
11:21chadmedyeah the pw log doesnt really show much, it opens the device and then just closes it...
11:21marcanplan is to switch to PW once all the speaker EQ/safety/etc magic is in
11:22povikchadmed: can you increase the verbosity level?
11:22povikwe really should figure out what's happening there making pipewire reject the ucm profiles
11:22povikbut i don't see any mentions of ucm apart from
11:22povik[I][03648.728076] spa.alsa | [ alsa-pcm.c: 550 spa_alsa_open()] 0xaaab550bb538: ALSA device open '_ucm0001.hw:J314,0' capture
11:22povikwhich would suggest it *does* read it
11:24chadmedthe next loglevel up makes over 100k lines..
11:25chadmeddebugging pw is an absolute nightmare lmao
11:25poviki will take it over 0k lines, upload it please somewhere if you can
11:25povikha, found the lost commit!
11:26chadmedyeah im trying, its a bit slow to paste :P
11:27povikat least a grep of dangling commits found it, will take a moment to carve it out
11:28povikit's a lost stash, not sure how i managed that *facepalm*
11:36chadmed has quit [Quit: Konversation terminated!]
11:38povikhere's the volume control fix together with some mic-detection patches on top of asahi-wip
11:38povikjannau: ^
11:39povikdoing a test build now
11:39povikdrivers/iommu/io-pgtable-dart.c: In function ‘__dart_alloc_pages’:
11:39povikdrivers/iommu/io-pgtable-dart.c:112:17: error: unused variable ‘dev’ [-Werror=unused-variable]
11:39povik 112 | struct device *dev = cfg->iommu_dev;
11:39povikprobably known...
11:45povikchadmed: 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
11:45povikbecause that's how the mic differs from the others
11:46povikyou can try inserting PlaybackChannels here
11:47povikthere's no formal requirement to specify the no. of channels AFAIK, and pulseaudio assumes stereo if unspecified
11:48povikit sucks we have to probe the behavior of different sound servers like this
11:48jannaupovik: known and fixed in the version merged for 6.1
11:49jannaupovik: headset detection didn't work on boot, I had to replug the headset
11:50jannaubehavior in alsamixer is now good, muting works
11:51povikwill see about the replug
11:53jannauthe 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
11:54jannauuser experience seems to still bad due to slow volume updates of the driver
11:55jannaudid you check if the i2c irq support improves this?
11:55povikah, there's two causes for that reinforce each other: the slow i2c driver and no regcache in the codec driver
11:55povikit for sure does improve it, because otherwise all transactions take some number of milliseconds
11:56poviks/that/that that/
11:57povikwe should pick it up, no? last version had merely formal issues i think
11:58thelounge7571340 has joined #asahi-dev
11:58chadmed has joined #asahi-dev
11:58jannauyes, I was thinking the same
11:59marcanyeah, we should
11:59thelounge7571340 has quit [Remote host closed the connection]
11:59marcanI'm thinking tomorrow I'm going to rewrite cpufreq one more time and then do another kernel rebase/update dance
11:59marcananything else I should pick up?
12:00r0ni has joined #asahi-dev
12:01jannaupovik: plug/mic detection is logged during boot so the driver might just lose the state?
12:01povikmarcan: i will prepare a batch. i can throw the amarioguy's patch in
12:02povikjannau: it does report it detected the mic?
12:02marcanon my side I have the m1 max studio hub thing
12:02jannaumarcan: bluetooth v3 to get rid of the revert which broke bluetooth
12:02jannauthere is the keyboard backlight PR
12:03marcan(bbl, dinner; will catch up on anything else when I get back)
12:05jannaupovik: 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
12:05svenhm, Bluetooth v3 is still in patchwork as “new” and with a few more other series in front of it :(
12:11kov has joined #asahi-dev
12:13jannaupovik: yes, plug and mic are detected on initial driver load
12:21chadmed has quit [Quit: Konversation terminated!]
12:22chadmed has joined #asahi-dev
12:32jannauyes, the i2c irq patch makes the volume control much faster. thanks amarioguy
12:32chadmed has quit [Quit: Konversation terminated!]
12:32jannaupovik: plug detection worked now
12:33ChaosPrincessbtw, can someone review the kb pwm pull request? thanks in advance https://github.com/AsahiLinux/linux/pull/57
12:34chadmed has joined #asahi-dev
12:34jannaui.e. audio worked without replug
12:35chadmedinteresting, that HSBIAS pin disable results in a null pointer deref on j314
12:35Core2080 has joined #asahi-dev
12:36jannaupovik: do you know if it is expected that alsamixer uses 2 write ioctls to update the DAC volume?
12:37adryzz has quit [Ping timeout: 480 seconds]
12:38jannauChaosPrincess: I'm looking and will test on j493
12:38ChaosPrincessthats the m2, right?
12:38jannauyes, m2 macbook pro 13"
12:43Core9066 has joined #asahi-dev
12:44chadmed has quit [Quit: Konversation terminated!]
12:45chadmed has joined #asahi-dev
12:47chadmednvm that was a dtb issue, the jack works with ucm and pipewire with the branch you linked povik
12:50chadmed has quit []
12:51chadmed has joined #asahi-dev
12:52chadmed has quit []
12:53chadmed has joined #asahi-dev
12:53chadmedok no nvm kernel null pointer if speakers are enabled???
12:54chadmedhow fragile is asoc...
12:55chadmed has quit []
12:56povikchadmed: that will be a bug in my driver
12:56povikif 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
12:56povikbut if it doesn't have a sound card, it doesn't have a dapm reference
12:56povikthat will probably be it
12:57chadmed has joined #asahi-dev
12:58povikjannau: no idea, makes sense to me if the ioctl is limited to updating one channel at a time
13:00chadmed has quit []
13:01jannaupovik: the ioctl argument is struct snd_ctl_elem_value so it should be able to set channels values atomically
13:03povikyeah, that's weird then
13:03povikmaybe it does a read after the write?
13:04povikit probably does that, otherwise it wouldn't have the wraparound from earlier before the fix
13:04amarioguypovik: 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
13:04amarioguyjannau: no problem :)
13:05jannauit does a read after a write but for both channels. I added a debug printk in the generic ioctl handler
13:08* povikgoes to visit alsamixer source
13:10refi64 has quit [Quit: The Lounge - https://thelounge.chat]
13:10povikthat's it maybe?
13:11refi64 has joined #asahi-dev
13:12espo has quit [Quit: espo]
13:13povikso it looks like a limitation of alsalib
13:13jannaulooks like it
13:13povikone channel at a time
13:14thelounge7571340 has joined #asahi-dev
13:15thelounge7571340 has quit [Remote host closed the connection]
13:20amarioguyi'll send over the revised patch when i can, do you need the email commit description too or just the diff?
13:20amarioguy has quit [Quit: Leaving]
13:25povikamarioguy: i need a patch i can give to git am, as long as it has a sensible patch title it's good
13:35amarioguy has joined #asahi-dev
13:37adryzz has joined #asahi-dev
13:37Core2080 has quit [Read error: Connection reset by peer]
13:43jannauChaosPrincess: done
13:45amarioguypovik: alright i'll send the .patch then, gimme a sec
13:46svenjannau: huh, so devm_clk_* helpers finally got merged?
13:46svenin may already. fun!
13:47sveni 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
13:55svenurgh, looks like I'll have to implement a stripped down version of OSSerialize for dcp :<
13:59povikwhat memcpy variety should i be using for copying from/to mmio regions?
13:59sventhere's memcpy_fromio/toio which may or may not do what you want
14:00sveniirc they use readb/writeb until the address is aligned for readq/writeq
14:04poviki was wondering if those are the right ones. i guess i won't find a relaxed version
14:10amarioguy has quit [Ping timeout: 480 seconds]
14:15amarioguy has joined #asahi-dev
14:18thelounge7571340 has joined #asahi-dev
14:19thelounge7571340 has quit [Remote host closed the connection]
14:44King_InuYasha has joined #asahi-dev
14:50King_InuYashaat least PR10 and PR11 need to be merged so I can rebase PR9 on it
15:21thelounge7571340 has joined #asahi-dev
15:21thelounge7571340 has quit [Remote host closed the connection]
15:30marcanyup, tomorrow evening when I'm in sweep mode :)
15:30marcan(trying to get some stuff organized today, only having a modicum of success...)
15:37amarioguy has quit [Ping timeout: 480 seconds]
15:39seb4nihel has quit [Ping timeout: 480 seconds]
15:43amarioguy has joined #asahi-dev
16:18blazra has quit [Remote host closed the connection]
16:20blazra has joined #asahi-dev
16:22alyssasven: sounds like you're having fun
16:24thelounge7571340 has joined #asahi-dev
16:24thelounge7571340 has quit [Remote host closed the connection]
16:31svennot really, I got to the point where a new epic service starts and now need to grab fields from a OSSerialzed blob :(
16:40amateurece has joined #asahi-dev
16:43amarioguy has quit [Ping timeout: 480 seconds]
17:09amateurece has left #asahi-dev [#asahi-dev]
17:21derzahl has quit [Remote host closed the connection]
17:27derzahl has joined #asahi-dev
17:28thelounge7571340 has joined #asahi-dev
17:28thelounge7571340 has quit [Remote host closed the connection]
17:51amarioguy has joined #asahi-dev
17:51amarioguypovik: patch link here
17:52amarioguytested-by tag is because the change here from v3->v4 was also in v1 of the patch (which was tested by the same person)
17:53amarioguy(v2 was also tested by that person and v2->v3 was whitespace things only)
17:53derzahl has quit [Remote host closed the connection]
17:53amarioguydidn't add a commit desc, i can reupload with one if you want
17:54derzahl has joined #asahi-dev
17:56povikbut v1->v4 isn't whitespace-only, no?
17:56povikin that case i don't think it's fair to use the tag
17:56poviksince this is a combination of changes that's been untested by that person
17:57povikit's all the same to me for picking it up in my branch, but for submission to upstream you need to be careful
17:57amarioguythe only change between v3->v4 is re-adding a line that was removed in v2
17:57amarioguythat exact same line verbatim was re-added
17:57amarioguyas turns out it was needed
17:57povikyes, but not with the other lines staying the same :p
17:57poviks/:p/;)/
17:57povikyou see my point?
17:57amarioguyokay fair enough
17:58amarioguyyou can remove that tag or i can reupload
17:58poviki will remove it on my end, no worries
17:59amarioguyagain no commit desc, i can add one if you want
18:01derzahl has quit [Remote host closed the connection]
18:03derzahl has joined #asahi-dev
18:03poviknah it's fine
18:03povikthanks for sending the patch
18:04povikalso well done on seeing it to the end. seems like it will be picked up upstream next submission
18:04amarioguyno problem :) happy to help the project however i can
18:12amarioguy has quit [Ping timeout: 480 seconds]
18:26amarioguy has joined #asahi-dev
18:29thelounge7571340 has joined #asahi-dev
18:30thelounge7571340 has quit [Remote host closed the connection]
18:33derzahl has quit [Remote host closed the connection]
18:35derzahl has joined #asahi-dev
18:48tobhe has quit [Remote host closed the connection]
18:49gladiac has joined #asahi-dev
18:54tobhe has joined #asahi-dev
19:04amarioguy has quit [Ping timeout: 480 seconds]
19:13seb4nihel has joined #asahi-dev
19:17dgb has joined #asahi-dev
19:27gladiac has quit [Quit: k thx bye]
19:33thelounge7571340 has joined #asahi-dev
19:33thelounge7571340 has quit [Remote host closed the connection]
19:38jluthra has quit [Remote host closed the connection]
19:38jluthra has joined #asahi-dev
20:00amarioguy has joined #asahi-dev
20:07___nick___ has quit [Ping timeout: 480 seconds]
20:08compassion has quit [Read error: No route to host]
20:13compassion has joined #asahi-dev
20:23compassion has quit [Read error: No route to host]
20:23compassion has joined #asahi-dev
20:29compassion9 has joined #asahi-dev
20:34compassion has quit [Ping timeout: 480 seconds]
20:34compassion9 is now known as compassion
20:36spok has joined #asahi-dev
20:37spok has left #asahi-dev [#asahi-dev]
20:42thelounge7571340 has joined #asahi-dev
20:42thelounge7571340 has quit [Remote host closed the connection]
20:44compassion3 has joined #asahi-dev
20:44compassion has quit [Ping timeout: 480 seconds]
20:44compassion3 is now known as compassion
20:57opticron has quit [Ping timeout: 480 seconds]
21:08chipxxx has joined #asahi-dev
21:08kensan has joined #asahi-dev
21:26amarioguy has quit [Ping timeout: 480 seconds]
21:33SSJ_GZ has quit [Ping timeout: 480 seconds]
21:46seb4nihel has quit [Quit: Leaving]
21:48kensan_ has joined #asahi-dev
21:50amarioguy has joined #asahi-dev
21:52opticron has joined #asahi-dev
21:54kensan has quit [Ping timeout: 480 seconds]
21:54thelounge7571340 has joined #asahi-dev
21:55thelounge7571340 has quit [Remote host closed the connection]
21:56kensan_ is now known as kensan
21:56jakebot6022 has quit [Quit: The Lounge - https://thelounge.chat]
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi-dev
22:01jakebot6022 has joined #asahi-dev
22:10Dcow has joined #asahi-dev
22:14derzahl has quit [Remote host closed the connection]
22:19Dcow has quit [Remote host closed the connection]
22:46pthariensflame has joined #asahi-dev
22:47derzahl has joined #asahi-dev
22:48pthariensflame has quit []
22:51pthariensflame has joined #asahi-dev
22:52pthariensflame has quit []
22:54kensan has quit [Ping timeout: 480 seconds]
23:15thelounge7571340 has joined #asahi-dev
23:16thelounge7571340 has quit [Remote host closed the connection]
23:19derzahl has quit [Quit: auf wiedersehen]
23:19derzahl has joined #asahi-dev
…