2022-08-19
00:04megatradeusa[m] has quit [autokilled: Spambot. Mail support@oftc.net if you think this is in error. (2022-08-19 00:04:06)]
00:16surge9n has joined #asahi-dev
00:24surge9n has quit [Ping timeout: 480 seconds]
00:50surge9n has joined #asahi-dev
00:54jluthra has quit [Remote host closed the connection]
00:55jluthra has joined #asahi-dev
00:58surge9n has quit [Ping timeout: 480 seconds]
01:23surge9n has joined #asahi-dev
01:32surge9n has quit [Ping timeout: 480 seconds]
01:38off^ has joined #asahi-dev
01:42derzahl has quit [Remote host closed the connection]
01:54surge9n has joined #asahi-dev
02:02surge9n has quit [Ping timeout: 480 seconds]
02:43surge9n has joined #asahi-dev
02:51surge9n has quit [Ping timeout: 480 seconds]
02:51amarioguy has quit [Remote host closed the connection]
03:15surge9n has joined #asahi-dev
03:20pyropeter2 has joined #asahi-dev
03:22pyropeter1 has quit [Ping timeout: 480 seconds]
03:23surge9n has quit [Ping timeout: 480 seconds]
03:50surge9n has joined #asahi-dev
03:58surge9n has quit [Ping timeout: 480 seconds]
04:22surge9n has joined #asahi-dev
04:30surge9n has quit [Ping timeout: 480 seconds]
04:53surge9n has joined #asahi-dev
05:01surge9n has quit [Ping timeout: 480 seconds]
05:07systwi has quit [Ping timeout: 480 seconds]
05:25surge9n has joined #asahi-dev
05:33surge9n has quit [Ping timeout: 480 seconds]
05:52isoriano has joined #asahi-dev
05:58surge9n has joined #asahi-dev
06:06surge9n has quit [Ping timeout: 480 seconds]
06:19the_lanetly_052 has joined #asahi-dev
06:26MajorBiscuit has joined #asahi-dev
06:33surge9n has joined #asahi-dev
06:42surge9n has quit [Ping timeout: 480 seconds]
06:55uniq has joined #asahi-dev
06:59systwi has joined #asahi-dev
07:05surge9n has joined #asahi-dev
07:06uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:13surge9n has quit [Ping timeout: 480 seconds]
07:20uniq has joined #asahi-dev
07:22jannaubefore trying to get it work for dcpext I would start with skipping the display initialization in m1n1 and see that dcp.py can bring up the display in that case
07:38surge9n has joined #asahi-dev
07:39dmmcf has joined #asahi-dev
07:44isoriano has quit [Remote host closed the connection]
07:46surge9n has quit [Ping timeout: 480 seconds]
07:48pjakobsson has quit [Remote host closed the connection]
08:02dmmcf has quit [Quit: dmmcf]
08:04Race has joined #asahi-dev
08:06uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:14surge9n has joined #asahi-dev
08:18gladiac has quit [Quit: k thx bye]
08:22surge9n has quit [Ping timeout: 480 seconds]
08:39uniq has joined #asahi-dev
08:46Major_Biscuit has joined #asahi-dev
08:46the_lanetly_052 has quit [Ping timeout: 480 seconds]
08:47surge9n has joined #asahi-dev
08:48MajorBiscuit has quit [Ping timeout: 480 seconds]
08:53MajorBiscuit has joined #asahi-dev
08:55surge9n has quit [Ping timeout: 480 seconds]
08:55Major_Biscuit has quit [Ping timeout: 480 seconds]
09:17uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:21surge9n has joined #asahi-dev
09:29the_lanetly_052 has joined #asahi-dev
09:29surge9n has quit [Ping timeout: 480 seconds]
09:44DmitrySharshakov[m]povik: I think my WirePlumber MR for supporting complex audio is now a PoC: https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/412 . It's still not reviewable for upstreaming as might integrate poorly with other policies, but I'd like to see some design review from you and chadmed as people who have came up with the concept.
09:44DmitrySharshakov[m]note 1: you might need git-compiled PipeWire, at least if you unload the DSP chain
09:44DmitrySharshakov[m]note 2: ping me when you check out amps HPF
09:45DmitrySharshakov[m]I want to get a review from usage in a real case. If necessary, I can help adapting existing configs to be loaded by my policy module
09:49Ariadne has joined #asahi-dev
09:49DmitrySharshakov[m]Great! Do you also have a mpb with 6-way sound (software crossover necessary)?
09:53surge9n has joined #asahi-dev
09:53DmitrySharshakov[m]awesome :) then it's suitable for testing, let's start with kernel amp settings for protection and then set something up. I could do a draft of config based on asahi-audio repo files and send to you to test. What's your laptop model?
09:53DmitrySharshakov[m]and I guess I'll also need pw-dump for it (can be done on any PW version)
09:56DmitrySharshakov[m]unrelated question: why aren't there any Apple Silicon hardware info dumps on something like linux-hardware.org? I guess such things should get published for acknowledging people on how is all the stuff exposed to software
09:58DmitrySharshakov[m]Essentially I need pw-dump info for speakers and mics (are they supported with WIP drivers?) locations i.e. how are they labeled by PipeWire's ALSA plugin
09:58DmitrySharshakov[m]But whole paste of it could be decent as well
09:59dottedmagDmitrySharshakov[m]: probably because nobody bothered to submit this information? There are just over 150K entries in that DB, which is miniscule compared to the amount of installed Linux machines.
10:00DmitrySharshakov[m]povik: IIRC `s` suffix is M1 Pro and `c` suffix is M1 Max version
10:00povikas i see it it's still subject to change, but it will give you something to work with anyway
10:01surge9n has quit [Ping timeout: 480 seconds]
10:01DmitrySharshakov[m]povik: Yes, you can change those detection preferences later as the driver changes, it's just for me to prepare stuff for you to test
10:03povikDmitrySharshakov[m]: in a hour or two i should have linux booted up on the machine and i will send you the dump
10:03DmitrySharshakov[m]povik: Isn't `admac` driver for capturing from it as a part of its functions? What's the roadblocker for internal mic and how is it wired up inside?
10:03DmitrySharshakov[m]povik: That's alright, no need to hurry. Thanks!
10:06povikwhile for the speakers and jack you use ADMAC in conjunction with MCA, for the mic you need to involve some other peripherals, which are orchestrated by the AOP coprocessor, at least as macos does it
10:08DmitrySharshakov[m]Ah, I've seen a piece of info about some secure disable FPGA which gates the mic access away from SoC. Is MCA something like an I2S port for passing sound data to codec?
10:19surge9n has joined #asahi-dev
10:25chadmedDmitrySharshakov[m]: how does policy-dsp automatically attach itself to a "supported" sink, how does it know which devices are supported, and how does it know which filters to apply to which streams
10:25DmitrySharshakov[m]see details under testing section
10:26chadmedso my next question is do we have to hard code device names into lua scripts for every single supported device
10:27DmitrySharshakov[m]There're rules it uses to bind to nodes based on their and parent devices' properties. Then profile might be switched and filter chain loads (another rule added by such a config hides streams from user)
10:27DmitrySharshakov[m]chadmed: No. Those are not scripts but generic WirePlumber configs
10:28chadmedyeah but if im reading this correctly, it looks for a node specifically called alsa_output.pci-0000_03_00.6.analog-stereo then applies a specific filter chain to it
10:28DmitrySharshakov[m]So we just put a similar file in /usr/share/.../policy.lua.d/51-macaudio.lua and those rules get imported
10:29chadmedright so we go back to my initial question from a couple of days ago, how does this fix the problem long term
10:29DmitrySharshakov[m]chadmed: Precisely this. It can (optionally) also check props of device node belongs to, in case that's important. I'll write a testing j314 config when povik (or you) sends me pw-dump
10:30DmitrySharshakov[m]chadmed: That is a universal format of config, you can have a lot of them and they won't bind to unknown hardware. This should be upstreamable (you just store a ton of those configs in a special dir and WP takes care of loading them as they are needed)
10:31chadmedright yeah cool, im totally fine with doing it like this btw i think i just misunderstood what problem you were trying to solve
10:32DmitrySharshakov[m]What kind of a long-term problem exists? This solves both discovery issue and ones related to exposing nodes (this config can hide underlying ALSA devices as good that no app other than wireplumber could even think there's something special going on, just a stereo sink)
10:33DmitrySharshakov[m]I might have misunderstood the problem you need to solve - if so, I'd like to know and improve stuff :)
10:33chadmedthe problem of doing it seamlessly without having to fall back on scripts like this. ideally, PW should just be able to go "this is an xyz device, i will load the DSP from this folder" completely automatically
10:33chadmedlike i said i am totally cool with shipping a script since it solves our problem as it stands right now, but personally i think if we standardise on such an architecture it quickly becomes extremely inefficient
10:34chadmedi can just imagine a UCM2-like package, and WP having to recurse over hundreds of lua scripts every time it starts or a device is connected to find the right one
10:34uniq has joined #asahi-dev
10:34DmitrySharshakov[m]And yes, I also added `"device.api":"dsp"` and `"node.virtual":false` props. They're necessary for node to look like a hardware node to PA clients, since some are quite picky like Plasma applet
10:35chadmedmy ideal architecture would be a very well defined directory structure such that when PW detects a device, it can just look in one single place (e.g. /usr/share/pipewire/devices/${device_id}) and read only a single manifest that tells it what to do for that specific device
10:36chadmedrather than have wireplumber look through n scripts looking for one with the correct matches = {}
10:37chadmedwell yeah, i think i even said in the original issue i imagine it being basically exactly like UCM but actually good
10:37uniq has quit []
10:38DmitrySharshakov[m]<chadmed> "the problem of doing it seamless..." <- "scripts like this" - if you mean policy script, it should fly into upstream WP and just be a part of its code. To add a device you add a config like I described in testing section, which is essentially just a serialized object, not any program.
10:38DmitrySharshakov[m]`/usr/share/pipewire/devices/${device_id}` seems great, well essentially the same since you cannot easily have a simple device ID (it might be necessary to filter by address, nickname etc, not a VID/PID pair). So I guess it would be hard to avoid searching the config in memory
10:40chadmedsure, but what i mean is that upstream, WP just has some very basic logic that goes "ah a new device that is called xyz. is there a folder called /usr/share/pipewire/devices/acmecorp/xyz? yes? read the script in that folder. no? expose the sink like normal"
10:40DmitrySharshakov[m]Well, for now I search for nodes by a custom interest descriptor. Config can bind to either node name, node nickname (aka user-readable name), node name + device path
10:42chadmedso i think this proposal is very close but to do it the sustainable and maintainable way will probably require some deeper changes to wireplumber
10:44DmitrySharshakov[m]chadmed: It could be great if we implement a way to serialize names like this. So yes, for higher efficiency we could create such a structure
10:44DmitrySharshakov[m]povik: It can with some extra C APIs
10:45chadmedif policy-dsp can be made to source a further script off a dynamically defined location on disk then yeah it absolutely could
10:46DmitrySharshakov[m]But I'm not sure if searching through, say, 1000 configurations for audio devices each time one is plugged in should be a real trouble.
10:46chadmedwell it shouldnt be for these computers but the whole idea is to keep things upstreamable and maintainable
10:47chadmedPW and WP are used in the embedded space, and while you could say "but theyll rip out whatever they dont need anyway" you cant make assumptions like that about other peoples setups
10:47DmitrySharshakov[m]So maybe we'd be better with a more versatile and flexible selector mechanism, which will only improve maintainability
10:47chadmedyeah thats my only suggestion, we just need functionality that can make WP go to the correct place and load a policy from there without just guessing until it stumbles on the right one
10:48chadmedthat way the upstream burden is greatly reduced and vendors can package up their own DSP suites and be sure that they can just dump them in a known location and it will work for the user
10:51DmitrySharshakov[m]For a typical ALSA node these properties can be considered being important for identification: alsa.driver_name, alsa.id, alsa.long_card_name, alsa.name, alsa.subdevice_name, api.alsa.card.longname (especially if a specific device like laptop is being looked for), api.alsa.path, node.description, node.name, node.nick (the only truly identifying thing for HDMI audio devices)
10:52DmitrySharshakov[m]Won't you mind if we continue discussing selectors on PipeWire Matrix channel, as this is not directly related to Asahi Linux? Let's keep audio messages here to stuff like pw-dump and a config example I'll write on it
10:53DmitrySharshakov[m]I guess so
10:53DmitrySharshakov[m]Join us on IRC at #pipewire on OFTC. -- it is
10:54DmitrySharshakov[m]Pls drop dump by here
10:55chadmed_ has joined #asahi-dev
10:56chadmed_just to keep the log complete, pw-dump: https://gist.github.com/chadmed/3f07a81a6cd253e4dc040cdc21256ac4
10:57DmitrySharshakov[m]Awesome, will implement a new-style config for it
11:25DmitrySharshakov[m]povik: I think the kernel driver should fetch machine name and set device name to, say `MacBook J314 Internal Speakers` not J314/6 which doesn't help to detect whether we need J314 or J316 filters.
11:51chadmed_ has quit [Quit: Konversation terminated!]
12:14DmitrySharshakov[m]povik: chadmed: https://tpaste.us/vyzo I guess this should work with MR 412 config style as of now. Put it somewhere for WP to find in the same order as `src/config/policy.lua.d/51-dsp-config.lua` (at least for in-tree). Keep in mind this is completely untested and I just reformatted the config with the best effort. Please be careful while testing
12:17DmitrySharshakov[m]Well yes. Now we can do this if we're fine with only like 2 degrees of freedom for selectors
12:18chadmedill test this at some point btw its getting late here now and ive got a massive stack of latex to write for next week over this weekend...
12:19DmitrySharshakov[m]Could I resend your message
12:19DmitrySharshakov[m](`put device names underneath their driver in the directory structure`) to #pipewire:matrix.org &
12:19DmitrySharshakov[m]s/&/?/
12:25pg12_ has quit []
12:25pg12 has joined #asahi-dev
12:25leitao has joined #asahi-dev
12:33amarioguy has joined #asahi-dev
12:45benpokke[m] has joined #asahi-dev
13:09isoriano has joined #asahi-dev
13:29benpokke[m] has left #asahi-dev [#asahi-dev]
13:30benpokke[m] has joined #asahi-dev
13:37pjakobsson has joined #asahi-dev
13:45off^ has quit [Remote host closed the connection]
13:47DmitrySharshakov[m]was there any success or my guesses were wrong and my config didn't work out?
14:08AdryzzOLEDEdition[m]1 is now known as AdryzzOLEDEdition[m]11
14:08j`eyhttps://cdn.asahilinux.org/aarch64/asahi/ is the rest, and I think markan just builds them on his machine
14:09FoxboronMessing/working on (proper) build infrastructure for Arch and contemplating how this could *maybe* be used by different porting efforts
14:10Foxboronhttps://buildbot.pkgbuild.com/#/builders/49/builds/1 <- probably the interesting link really
14:19isoriano has quit [Remote host closed the connection]
14:35isoriano has joined #asahi-dev
15:03benpokke[m] is now known as renheris[m]
15:22michael5050[m] has joined #asahi-dev
15:22jeksskenis[m] has joined #asahi-dev
15:41pjakobsson has quit [Remote host closed the connection]
15:42Race has quit [Ping timeout: 480 seconds]
16:21Glanzmann has joined #asahi-dev
16:24princesszoey has joined #asahi-dev
16:28isoriano has quit [Remote host closed the connection]
16:30isoriano has joined #asahi-dev
16:48MajorBiscuit has quit [Ping timeout: 480 seconds]
17:05mia_ has joined #asahi-dev
17:22surge9n has quit [Ping timeout: 480 seconds]
17:22benpouls_ has joined #asahi-dev
17:25benpoul__ has joined #asahi-dev
17:27___nick___ has joined #asahi-dev
17:27___nick___ has quit []
17:29atteniemi[m] has joined #asahi-dev
17:29benpoulson has quit [Ping timeout: 480 seconds]
17:29___nick___ has joined #asahi-dev
17:32benpouls_ has quit [Ping timeout: 480 seconds]
17:45surge9n has joined #asahi-dev
17:53surge9n has quit [Ping timeout: 480 seconds]
18:17surge9n has joined #asahi-dev
18:21mia_ has quit [Remote host closed the connection]
18:21mia_ has joined #asahi-dev
18:24benpoul__ has quit [Ping timeout: 480 seconds]
18:25surge9n has quit [Ping timeout: 480 seconds]
18:29mia_ has quit [Ping timeout: 480 seconds]
18:35benpoulson has joined #asahi-dev
18:43benpoulson has quit [Ping timeout: 480 seconds]
18:46mia_ has joined #asahi-dev
18:48mia_ has quit [Remote host closed the connection]
18:48mia_ has joined #asahi-dev
18:49surge9n has joined #asahi-dev
18:50bisko has quit [Ping timeout: 480 seconds]
18:52balrog has quit [Quit: Bye]
18:57surge9n has quit [Ping timeout: 480 seconds]
19:02balrog has joined #asahi-dev
19:05bisko has joined #asahi-dev
19:11benpoulson has joined #asahi-dev
19:19benpoulson has quit [Ping timeout: 480 seconds]
19:20leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:21surge9n has joined #asahi-dev
19:30surge9n has quit [Ping timeout: 480 seconds]
19:35the_lanetly_052 has quit [Ping timeout: 480 seconds]
19:55jackhill has joined #asahi-dev
19:55jackhill has quit []
19:57jackhill has joined #asahi-dev
19:57surge9n has joined #asahi-dev
19:57jackhill has quit []
19:58jackhill has joined #asahi-dev
20:00Phorous has quit [Remote host closed the connection]
20:05surge9n has quit [Ping timeout: 480 seconds]
20:08___nick___ has quit [Ping timeout: 480 seconds]
20:18nicolas17 has joined #asahi-dev
20:25amarioguyalright so i've made further changes to the i2c driver and while asahi linux boots according to the feedback i got last time, i get a kernel oops fairly early on and the boot process is *slow* like many minutes and i'm not even at login screen (i'm suspecting a major interrupt storm)
20:25amarioguy(the best part is that rcu-torture is casually reminding me that it's starting/ending an episode all the time lol)
20:28benpoulson has joined #asahi-dev
20:28surge9n has joined #asahi-dev
20:29amarioguy(changes here, it's the latest commit - https://github.com/amarioguy/linux/tree/pasemi-i2c-changes)
20:30mia_ has quit []
20:31benpoulson has quit [Remote host closed the connection]
20:32bronson has joined #asahi-dev
20:38benpoulson has joined #asahi-dev
20:44bronson has quit [Quit: Page closed]
21:07amarioguyah lemme try the other way around - i assumed IMASK worked the same as SMSTA where 1 = masked/disabled and 0 = unmasked/enabled
21:11nicolas17 has quit [Ping timeout: 480 seconds]
21:11poviksven: hm? i don't understand that. how could any transaction occur before the controller's probed?
21:13svenbut I think the lock isn’t required here because no irq will be raised anyway before he sets use_irq to 1
21:20amarioguya bit to take in, and yea looked at the past comments, i mistakenly added the lock to the wrong place
21:22sventhe irq wont fire before it hits the if (irq_enabled) path then such that you can safely request it
21:49benpoulson has quit [Remote host closed the connection]
21:59benpoulson has joined #asahi-dev
22:07benpoulson has quit [Remote host closed the connection]
22:13benpoulson has joined #asahi-dev
22:14benpoulson has quit [Remote host closed the connection]
22:35Race has joined #asahi-dev
22:44amarioguybtw as a side note sometimes m1n1 won't be able to vector to the next stage when running run_guest_kernel.sh
22:44amarioguyit gets stuck on "vectoring to next stage" occasionally without actually jumping to the kernel
22:47benpoulson has joined #asahi-dev
22:52MajorBiscuit has joined #asahi-dev
22:57amarioguyhmm still encountering lockups (i had panics but that was solved by casting smbus to a void pointer in the request_irq call, i accidentally had a pointer to a pointer which caused issues)
22:57amarioguyone CPU seems to be deadlocked and i think there's a chance there's still a null pointer dereference somewhere
22:58amarioguyi can send a kernel log here if needed, i can also push my changes for further review)
23:12surge9n has quit [Ping timeout: 480 seconds]
23:22amarioguyhttps://github.com/amarioguy/linux/tree/pasemi-i2c-changes - it's the latest 3 commits this time
23:26amarioguythat's part of the sound code which is bizarre (note that i did enable maximum debugging due to the panic issues i was facing earlier, and i've been booting with the debug arg so idk if that's why that's coming up)
23:26amarioguythough fwiw the lockups were occurring with standard loglevels but still never touched the sound code
23:29poviki think looking at 'alsa_card_mtpav_init' it's just another of those things you find out kernel runs every time
23:35surge9n has joined #asahi-dev
23:43benpoulson has quit [Remote host closed the connection]
23:43surge9n has quit [Ping timeout: 480 seconds]
23:48akspecs has joined #asahi-dev