2022-08-20
00:09surge9n has joined #asahi-dev
00:16MajorBiscuit has quit [Quit: WeeChat 3.5]
00:17surge9n has quit [Ping timeout: 480 seconds]
00:32amarioguypovik: turns out that was the change we needed all along lol, we boot to userspace and the irq path seems to work without a hitch
00:36amarioguyonly thing i'm not sure on at this point is where we want the init_completion call, right now i put it in the pasemi_platform_i2c_probe func after common probe is called, but otherwise assuming we don't see further issues seems like the bulk of the patch is done
00:37amarioguystill need to run all the other things though like getmaintainers and all (btw for anyone who needs to review it's on the same page as before)
00:37benpoulson has joined #asahi-dev
00:42surge9n has joined #asahi-dev
00:48chadmedDmitrySharshakov[m]: i think you misunderstood. i meant that i wont be able to test your changes until some time after next week as i am busy with real life stuff. i cant even pretend to be doing work when doing asahi stuff because my real life duties arent even tangentially related :P
00:51surge9n has quit [Ping timeout: 480 seconds]
00:55jluthra has quit [Remote host closed the connection]
00:55jluthra has joined #asahi-dev
01:06DarkShadow44 has quit [Quit: ZNC - https://znc.in]
01:06DarkShadow44 has joined #asahi-dev
01:16surge9n has joined #asahi-dev
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi-dev
01:22ethantwardy[m] has joined #asahi-dev
01:23benpouls_ has joined #asahi-dev
01:24surge9n has quit [Ping timeout: 480 seconds]
01:30benpoulson has quit [Ping timeout: 480 seconds]
01:39benpouls_ has quit [Remote host closed the connection]
01:52surge9n has joined #asahi-dev
02:00surge9n has quit [Ping timeout: 480 seconds]
02:03benpoulson has joined #asahi-dev
02:04derzahl has joined #asahi-dev
02:19benpoulson has quit [Ping timeout: 480 seconds]
02:30dmmcf has joined #asahi-dev
02:38surge9n has joined #asahi-dev
02:39dmmcf has quit [Quit: dmmcf]
02:43amarioguy has quit [Remote host closed the connection]
02:43amarioguy has joined #asahi-dev
02:46surge9n has quit [Ping timeout: 480 seconds]
03:11surge9n has joined #asahi-dev
03:18pyropeter3 has joined #asahi-dev
03:19surge9n has quit [Ping timeout: 480 seconds]
03:20pyropeter2 has quit [Ping timeout: 480 seconds]
03:44surge9n has joined #asahi-dev
03:52surge9n has quit [Ping timeout: 480 seconds]
04:15dmmcf has joined #asahi-dev
04:18surge9n has joined #asahi-dev
04:26surge9n has quit [Ping timeout: 480 seconds]
04:49DmitrySharshakov[m]<chadmed> "Dmitry Sharshakov: i think you..." <- Alright, I understood you. Maybe povik has an opportunity to see that
04:51surge9n has joined #asahi-dev
04:52chadmedfwiw that policy looks like itll work fine but in the filter chain json i probably wouldnt specify node.name manually if you can avoid it, let pw sort that out itself
04:57DmitrySharshakov[m]<chadmed> "fwiw that policy looks like itll..." <- On PW chat room I got answer that it'd be better to use autoconnect rather than wiring up from my script. I would also prefer manual immutable routing, let's sort this out later in the MR life cycle
04:57DmitrySharshakov[m]chadmed: I hide both
04:58chadmedyeah autoconnect is fine, i just mean in the filter chain you have given the virtual sink a node.name of audio_output.platform-audio.analog-stereo which i think may be confusing to some
04:58DmitrySharshakov[m]I can hide sink, device (to avoid people messing with profiles in pavucontrol) and stream (like output of the chain in case of speakers)
04:59chadmedwe dont want to hide the virtual sink since this is the one we _want_ applications to be able to connect to and configure
04:59surge9n has quit [Ping timeout: 480 seconds]
04:59chadmedi.e. DEs and their pipewire/pulseaudio integrations need to be able to see it so that users can set the volume etc
05:00DmitrySharshakov[m]chadmed: Hmm, alright
05:00DmitrySharshakov[m]That's more up to the config file, and one I sent to you is experimental yet, just to test things in a real case
05:00DmitrySharshakov[m]chadmed: We don't hide it. Virtual = false means it appears as a hw sink
05:01DmitrySharshakov[m]Api = dsp is for the same thing, since else Plasma PA settings applet doesn't see the device
05:03DmitrySharshakov[m]chadmed: So if I have say builtin audio, wp will add a virtual sink. There're extra parts we don't want user or stuff like EasyEffects to interact with: real sink, real device and a stream from virtual sink to real sink. Hide those from everybody except WP (and while testing also allow helvum)
05:03DmitrySharshakov[m]chadmed: Like the mechanism of discovery
05:04chadmedyeah yeah its all clicked to me now, i didnt notice the beauty in that last line of the filter chain
05:04DmitrySharshakov[m]chadmed: Yes I proposed we should have an API to read files from WirePlumber scripts
05:06DmitrySharshakov[m]While George, one of the maintainers, is on his vacation, we'll have to stick with my current approach. Then, if he's fine with the fact WP scripts will be able to read FS under WP config dirs, then I'll implement it the way you proposed as I now agree it should be almost 100% descriptive
05:23surge9n has joined #asahi-dev
05:28DmitrySharshakov[m]I opened a proposal for nobody to forget about this: localhost:7474
05:28DmitrySharshakov[m]s/localhost:7474/https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/336/
05:28dmmcf has quit [Quit: dmmcf]
05:29DmitrySharshakov[m]I'd wait for comments and concept approval from maintainers and then probably implement some functions for filesystem access
05:30dmmcf has joined #asahi-dev
05:31dmmcf has quit []
05:31surge9n has quit [Ping timeout: 480 seconds]
05:34dmmcf has joined #asahi-dev
05:35dmmcf has quit []
05:39dmmcf has joined #asahi-dev
05:48systwi_ has joined #asahi-dev
05:52systwi has quit [Ping timeout: 480 seconds]
05:58surge9n has joined #asahi-dev
06:06surge9n has quit [Ping timeout: 480 seconds]
06:10surge9n has joined #asahi-dev
06:19surge9n has quit [Ping timeout: 480 seconds]
06:44surge9n has joined #asahi-dev
06:50benpoulson has joined #asahi-dev
06:52surge9n has quit [Ping timeout: 480 seconds]
06:58benpoulson has quit [Ping timeout: 480 seconds]
07:02DmitrySharshakov[m]povik: based on https://github.com/chadmed/asahi-audio/blob/main/test_notes/j31x.md?plain=1#L9-L12 it appears to be decent to apply 50 or 100 Hz filter (DC_BLK0 -> HPF_FREQ_PB) in hardware for (sub)woofers, so that vibration is filtered out + DC protection active. as well as 800 Hz for tweeters as it's planned. This could 1. make us able to drop the lower part of woofer FIR filter. 2. People who want raw ALSA can just play sound
07:02DmitrySharshakov[m]on woofers via some sort of custom channelmap.
07:09dmmcf has quit [Quit: dmmcf]
07:11the_lanetly_052 has joined #asahi-dev
07:18surge9n has joined #asahi-dev
07:19dmmcf has joined #asahi-dev
07:23chadmedsounds better at low to moderate volumes and doesnt compromise clarity at all. theres still a teeny bit of boxiness around 400-600hz but ill play around with that when i have the time
07:24DmitrySharshakov[m]Yes, but hardware filter removing DC and vibration frequencies can still improve things. Is 100 or 50 Hz appropriate?
07:26surge9n has quit [Ping timeout: 480 seconds]
07:30chadmed50Hz would make more sense to me, the drivers are still pretty good down to about 70Hz so i dont really want to cut off that real nice low end that gives them their fullness
07:31chadmedbut i would just not cut anything out and let the DSP take care of it because that gives us finer grained control over their profile
07:31DmitrySharshakov[m]Yes, so it'd be great to test 800 Hz cutoff for tweeters and 50 Hz for other 4 speakers.
07:31chadmedimo the hardware/kernel should only be concerned with stopping people from melting their laptops and nothing else
07:31DmitrySharshakov[m]chadmed: Maybe 2 Hz then&
07:31DmitrySharshakov[m]> <@_oftc_chadmed:matrix.org> but i would just not cut anything out and let the DSP take care of it because that gives us finer grained control over their profile
07:31DmitrySharshakov[m] * Maybe 2 Hz then?
07:32chadmedanything below 20hz is noise and id expect the codec to high pass on that regardless of what we tell it to do
07:33DmitrySharshakov[m]See 8.9.8 in https://www.ti.com/lit/ds/symlink/tas2764.pdf . There're options: no, 2 hz, 50, 100, 200, 400, 800
07:34DmitrySharshakov[m]It's a coarse-grained mechanism which evolved from DC protection. Not really an equalizer or something like that. marcan first found it as a measure to protect tweeters from low frequencies at kernel level
07:50surge9n has joined #asahi-dev
07:59surge9n has quit [Ping timeout: 480 seconds]
08:22surge9n has joined #asahi-dev
08:35dmmcf has quit [Quit: dmmcf]
08:49isoriano has quit [Remote host closed the connection]
08:53MajorBiscuit has joined #asahi-dev
09:02chadmedyeah right, so id set it to 2hz on the woofers and let the DSP handle everything else then
09:08DmitrySharshakov[m]Alright
09:12DmitrySharshakov[m]I have also read some materials on IV sense. That's mostly for cases of overdriving mobile microspeakers. So a speaker like a phone one can be operated on power higher than the rated one while being monitored and corrected with IV sense enabled amp. I guess that's not necessary nor suitable for MacBook pro level audio, since such an overdrive will reduce the quality and tone reproduction, plus I guess builtin speakers are not of
09:12DmitrySharshakov[m]"microspeaker" class so they should not need such a drive mode
09:13DmitrySharshakov[m]How is volume with caps in place? How does it compare to macOS defaults?
09:18DmitrySharshakov[m]Yes but should keep things safe I guess. Low volume does no harm typically
09:18DmitrySharshakov[m]Is the volume loud enough with caps?
09:20DmitrySharshakov[m]Is there any progress from yesterday (like testing WP changes and kernel driver)? Is there a decent way of marking the device as either J314 or J316 (probably DT prop on audio node could help)
09:24povikso far i have written in -3 dB cap below macOS values, still very loud, but that was mostly arbitrary while i am focusing on other issues
09:24povikif you mean the j314/316 distinction, which is currently lost, that is just matter of modifying the model= property
09:24DmitrySharshakov[m]Like if it should be named `MacBook Pro J314 Internal Speakers` or J316
09:25DmitrySharshakov[m]Alright
09:25povikhttps://github.com/AsahiLinux/linux/blob/asahi/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi#L332
09:25DmitrySharshakov[m]`-3 dB cap below macOS values` is that about HFP or common volume cap?
09:26DmitrySharshakov[m]Alright
09:26povikthe HFP i will lock on the highest setting for the tweeters, on the woofers i will let them be set from userspace
09:26DmitrySharshakov[m]Is HPF 'sharp' enough to cut low frequencies off btw?
09:27DmitrySharshakov[m]What about 2 Hz 'DC protection' mode?
09:30DmitrySharshakov[m]Well, 50 Hz might be too high, but since we can why not enable 2 Hz cutoff? It will protect from DC bias
09:30DmitrySharshakov[m]2-50 Hz should do no damage to woofers I guess, so it should be safe to keep those 'convenience' things to userspace
09:32DmitrySharshakov[m]Ah, alright, wasn't sure if it was enabled by default
09:34chadmedDmitrySharshakov[m]: yeah the idea is the kernel driver passes off a device with a "here is 6 codecs, nothing you do could ever blow them up" and the rest should be entirely up to us
09:34chadmedsound quality, "niceties" like filtering out subsonic frequencies etc is not the job of the kernel
09:35chadmedi already have an aggressive rolloff under 20hz in the DSP and it works absolutely fine, the codec should only do DC protection and the 800hz HPF on the tweeters because those are safety guarantees
09:36DmitrySharshakov[m]chadmed: Exactly. So 2Hz for woofers, 800 to tweeters and we're safe. Then WirePlumber should do the "niceties" and automatic stuff
09:38DmitrySharshakov[m]So then I'm awaiting for initial testing/review for my WirePlumber MR and maintainers' response on the file access thing to improve further
10:19benpoulson has joined #asahi-dev
10:27benpoulson has quit [Ping timeout: 480 seconds]
10:38chadmedbut im not so sure, it can repro it continuously by unloading and loading snd-soc-apple-silicon
10:39poviknot sure that can happen. by that point we have requested admac channels so i would assume it's been fully probed
10:40marcandoes anyone have the pkg file for grub-2.06.r261.g2f4430cc0-1 lying around? I'm pretty sure yesterday's update broke stuff... (still boots, but the unicode menu is very borked)
10:42marcanI *think* it's throwing up an out of memory followed by "no suitable video mode found", so I'm going to guess something about the hidpi screen breaks it...
10:50chadmed_ has joined #asahi-dev
10:52chadmed_ has quit []
10:52gabuscus has quit [Ping timeout: 480 seconds]
11:05bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:26chadmed_ has joined #asahi-dev
11:26chadmed_ has quit []
11:32chadmed_ has joined #asahi-dev
11:33chadmed_ has quit []
11:36chadmed_ has joined #asahi-dev
11:36chadmed_[ 101.348516] Failed to set up IOMMU for device 39b400000.dma-controller; retaining platform DMA ops
11:38chadmed_ has quit []
11:56chadmedyeah at this point i just want to confirm if its something on my end and im just going insane or something
11:59chadmed_ has joined #asahi-dev
12:01kazukih[m]Everything? Including the firmware?
12:02isoriano has joined #asahi-dev
12:03chadmed_ has quit [Remote host closed the connection]
12:04kazukih[m]Hm, doesn't firmware loading break if you inline modules unless the firmware is also inlined as well?
12:06kazukih[m]Huh weird, last time I inlined everything graphics/wifi/bt broke
12:06kazukih[m]Which was fixed by inlining the firmware
12:06chadmed_ has joined #asahi-dev
12:11kazukih[m]I see, thanks
12:11kazukih[m]marcan: I meant on my Intel machine
12:15gabuscus has joined #asahi-dev
12:15gabuscus has quit []
12:15gabuscus has joined #asahi-dev
12:20gabuscus has quit []
12:23chadmed_ has quit [Quit: Konversation terminated!]
12:25gabuscus has joined #asahi-dev
12:26gabuscus has quit []
12:55chengsun has quit [Quit: Quit]
12:58chengsun has joined #asahi-dev
12:59gabuscus has joined #asahi-dev
13:03gabuscus has quit []
13:06benpoulson has joined #asahi-dev
13:06gabuscus has joined #asahi-dev
13:14benpoulson has quit [Ping timeout: 480 seconds]
13:47gladiac has joined #asahi-dev
14:07gladiac has quit [Quit: k thx bye]
14:43bisko has joined #asahi-dev
14:45qcyrdqcpzg[m] has joined #asahi-dev
14:47amarioguysven - figured i'd give a status update, we boot to userspace successfully now without issue after fixing the enable/disable bits, some minor pointer issues and not being an idiot and forgetting to init the completion for the first time (that last one hung me up for some time lol)
14:47amarioguyhttps://github.com/amarioguy/linux/commit/5731e5bbfadb293652dc7b64ad32d7a9e4c16867 i put init_completion in the platform probe for now is that fine
14:48amarioguydon't mean to ping you too much btw, just making sure things are good before i start preparing things for upstreaming
14:49bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:51amarioguyalright perfect, lemme get a clean tree, get the patches ready, i'll cc you on the emails once they're done
14:55povikbtw does everyone contributing to kernel eventually write their own little helper scripts for series prep?
14:57jannauI started using patman from u-boot (tools/patman/patman) which is nice since it uses annotations in the commits itself
15:52leitao has joined #asahi-dev
15:52leitao has quit []
15:54leitao has joined #asahi-dev
16:01Race has quit [Ping timeout: 480 seconds]
16:05leitao has quit [Ping timeout: 480 seconds]
16:13benpoulson has joined #asahi-dev
16:21benpoulson has quit [Ping timeout: 480 seconds]
17:18MajorBiscuit has quit [Ping timeout: 480 seconds]
17:21leitao has joined #asahi-dev
17:21marcanjust pushed updates to -dev to get rid of kernel image compression and make update-m1n1 work with different ESP mount styles
17:23marcanI guess "vmlinuz" is a lie at this point, not sure if that should be something else, but shrug
17:23whynothugoOh, nice. I've been using systemd-boot, but have been manually decompressing during installation till now.
17:26leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:29marcanneed to see if kettenis would take patches to improve the u-boot console, because that is *very* broken right now
17:29jannaudoes anyone uses uncompressed images on x86? handling is easier there due to self decompression code
17:30marcangraphic drawing characters confuse it, it has terminal size confusion / scrolling issues (grub without gfx mode ran into this too), and also the keyboard is flaky at least on my m1pro
17:32whynothugoI was going to point out that `bootctl status` is a reliable way to find the ESP mountpoint, but `--json` doesn't work.
17:34whynothugoAny thoughts on tow-boot marcan? It usually targets phones a bit more, but might not be terrible here.
17:43gabuscus has quit [Ping timeout: 480 seconds]
17:45whynothugoIt does work somewhat as a staging for upstreaming to u-boot in some aspects.
17:45whynothugoBut I guess it's a stretch for this case.
17:47jannauwe do not really have problems getting things into u-boot upstream and we have our own fork anyway
17:48gabuscus has joined #asahi-dev
17:48jannauI still need a see if there's a nicer way to handle the blessed ESP than the way we do it currently
17:48tpw_rulessystemd-boot has always worked okay for me on nixos fwiw, but yeah the graphic characters do show up funny
17:57tpw_rulesexcept for the blessed ESP, doesn't tow-boot fit the "just install UEFI" model pretty well?
18:09marcanwhat does it offer over regular u-boot? the website makes it sound like it's intended to be "board firmware".
18:33tpw_rulesyes, that's the point. it's intended to be a standard firmware experience like UEFI firmware is on x86 systems. the big things it offers are a consistent UX and graphical device selection
18:35tpw_rulesi don't know if it's ultimately feasible for reasons like the ESP being married to the macos stub, but it seems like an ideal thing for the "just give me UEFI pls" option in the asahi installer
18:36tpw_rulesand the eventual "asahi isn't a distro" target. though maybe you always intended to offer a unified installer
18:38the_lanetly_052 has quit [Ping timeout: 480 seconds]
18:56povikhere: https://github.com/povik/linux/blob/bits-update/070-audio/sound/soc/apple/macaudio.c#L717
19:11DmitrySharshakov[m]Looks great! Why 400 Hz as corner frequency? Tweeters are intended for 2 kHz+ playback, so setting corner to 800 Hz effectively cuts off more. Or is 400 fine as well and you gave more freedom to userspace without introducing safety risks?
19:39DmitrySharshakov[m]Cool. I hope the WP config snippet I sent does work properly.
19:41DmitrySharshakov[m]Getting everything rebased on top of 6.0 etc?
19:48amarioguywell it's on lore, with the right names and all (though the lack of email addrs may be because i use outlook)
19:48povikthere it is: https://lore.kernel.org/linux-i2c/MN2PR01MB535838492432C910F2381F929F6F9@MN2PR01MB5358.prod.exchangelabs.com/T/#u
19:48amarioguymy bad, if i get a response i'll cc it (i just used the output of get_maintainers to stay safe, i'll remember to cc that moving forward)
20:06amarioguyright, i'll note that moving forward, i did test in torvalds's tree and it worked just to be sure
20:10isoriano has quit [Quit: Leaving]
20:36gabuscus has quit [Ping timeout: 480 seconds]
20:39gabuscus has joined #asahi-dev
20:53benpoulson has joined #asahi-dev
21:01benpoulson has quit [Ping timeout: 480 seconds]
21:21benpoulson has joined #asahi-dev
22:14povik has quit [Ping timeout: 480 seconds]
22:16c10l has quit [Quit: Ping timeout (120 seconds)]
22:16c10l has joined #asahi-dev
22:39povik has joined #asahi-dev
23:21digidev[m] has joined #asahi-dev
23:38Race has joined #asahi-dev