ChanServ 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
<chadmed> i should check in on the pipewire situation re auto-selecting appropriate configurations
<chadmed> otherwise its going to be a nightmare to package up all the userspace audio stuff
<chadmed> ok so theres been zero real progress excellent
<chadmed> time to hack up a concept
barrowsx has joined #asahi-dev
bgb has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
barrowsx has quit [Quit: barrowsx]
gabuscus has quit []
brolin has quit [Ping timeout: 480 seconds]
barrowsx has joined #asahi-dev
bps has joined #asahi-dev
gabuscus has joined #asahi-dev
brolin has joined #asahi-dev
bps has quit [Ping timeout: 480 seconds]
brolin has quit [Ping timeout: 480 seconds]
barrowsx has quit [Quit: barrowsx]
derzahl has quit [Ping timeout: 480 seconds]
derzahl has joined #asahi-dev
dsharshakov has joined #asahi-dev
<dsharshakov> IDENTIFY
<dsharshakov> sorry
<dsharshakov> Hello chadmed! Yes, I've submitted a draft for permissions refactor, but it's utterly broken and WirePlumber masters don't have time to fix that
<chadmed> yeah i noticed that, i think thats the least important thing in the scheme of things
<dsharshakov> However, I'm thinking of doing a simple "Load and route chain once device is discovered"
<chadmed> i was going to test the rest of your patches today but i went down a config parsing rabbit hole that led nowhere instead :P
<dsharshakov> Yeah, now we have lower layers as an idiot protection, thus ones picking wrong sink wont make machine go boom boom
<dsharshakov> Well, we want it for WP 0.4 probably, yea? Not waiting for 0.5
<dsharshakov> Let me open g.fd.o, I have a draft branch I can remove permissions stuff (racy) from and rebase to some commit fresher than 1yr ago
<dsharshakov> will rebase and push to a sideways branch
<chadmed> i dont think theres any particular rush (at least not on my end) so if upstream needs more time then thats no big deal
<chadmed> we have the benefit of being able to simply not release anything until its actually ready
<dsharshakov> WP people tell me to do that for 0.5 but unsure when is that released
<dsharshakov> It should be loading fine once I toss out permissions
<chadmed> if it comes to it we carry some trivial patches downstream until 0.5 is released
<dsharshakov> But I'm mainly developing on PipeWire (DSP libs, modules etc), WirePlumber is a bit hard to me
<chadmed> but like i said we can simply not release speaker support until all this stuff is in a healthy place
<chadmed> yeah i was trying to avoid WP today but it seems like thats where they really want this stuff to go
<dsharshakov> we can start with !412 rebased since it should be safe to mess with PW in any way, yes?
<dsharshakov> Yes, we shouldn't hack a filter into ALSA plugin (the thing PW uses to output to ALSA). No other way other than module-filter-chain
<chadmed> oh no i dont mean to do that
<chadmed> my idea today was to try load a config fragment when the node is registered, using alsa.driver_name and alsa.card_name as the keys to find the right config file
<chadmed> but it doesnt like loading configs before all nodes have been registered and the context loaded
<chadmed> and i have no desire to try and rearchitect the entire startup process :P
<dsharshakov> Well, my WIP does the same I believe?
<dsharshakov> ah, I load the config at startup anyway, yes
<dsharshakov> We can't read files from Lua, at least in 0.4
<dsharshakov> Maybe you or m_arcan can contact gkiagia (at Collabora, doing most WirePlumber work) to review and help with my permissions WIP to make a proper solution move forward
<chadmed> yeah but from WP, i was trying to do this in pw_impl_node_register
<chadmed> which is evidently not the right place to do it
<dsharshakov> oh, no way. session manager exists for that)
<chadmed> yeah i just wanted to see what would happen
<dsharshakov> yes, PW is just a framework session manager assembles into the desired config
<chadmed> i think for now we just progress without the permissions stuff since we have the daemon set up in a way that should make all safety concerns go away
<chadmed> so if the user wants to select the wrong sink then at least its not going to explode the machine
<dsharshakov> yes
<chadmed> its a nice UX thing tho so we should absolutely revisit it at some point
<dsharshakov> yes, please do. I know they're busy, but 0.5 work is being really slow...
<chadmed> everything's been slow lately on most fronts everywhere
<chadmed> ill ping upstream at some point this week maybe and see whats going on
<dsharshakov> `everything's been slow lately on most fronts everywhere` <-- why so? Seems everyone in Asahi is also busy
<dsharshakov> not tested at all, busy rn
<dsharshakov> Use description from https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/412 to get started on configs. I'm unsure whether all of that is up to date enough...
<chadmed> so when i install i just take that policy lua and copy the filter chain into it and fix the match statement?
<dsharshakov> I suppose I gave you an appropriately formatted config for J314, but that probably changed
<dsharshakov> paste example from descr
<dsharshakov> yes, then change matchers and insert an inlined FC description
<chadmed> beautiful
<dsharshakov> Drop `-- Used to hide streams` section, however, shouldn't do anything bad
<dsharshakov> leave this essentially: table.insert (dsp_policy.policy.rules, { matches = { { { "media.class", "matches", "*/Sink" }, { "node.name", "=", "alsa_output.pci-0000_03_00.6.analog-stereo" } }, }, device_matches = { { { "device.name", "=", "alsa_card.pci-0000_03_00.6" } }, }, filter_chain = '{"media.name":"My DSP Speakers 2", "capture.props":{"node.virtual":false, "audio.channels":2,
<dsharshakov> err, https://tpaste.us/a16o
<dsharshakov> Ping me if you need help with PW/WP, I am watching the IRC logs. May be busy, but will try to help as I can
dsharshakov has quit [Quit: Page closed]
<chadmed> ack, just wrangling the filter chain into json right now
dsharshakov has joined #asahi-dev
<dsharshakov> SPA JSON (the permissive type PW uses)s is fine, just remove newlines
dsharshakov has quit [Remote host closed the connection]
gladiac has quit [Quit: k thx bye]
<chadmed> [string "99-asahi.lua"]:1: attempt to index a nil value (global 'dsp_policy')
<chadmed> have i built wp wrong or something?
dsharshakov has joined #asahi-dev
<dsharshakov> Yes, and I wasn't able to deduce the reason for filter chain rate switch bug (#2969 iirc) However, there's a reliable reproducer at the issue now. Please don't add more allowed rates or make the speaker output only support 48000 using PW props for now.
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi-dev
<dsharshakov> Wim said that didn't reproduce for him, but described method leads to clicks (audio interleaved with 0s) in almost 100% for me
<chadmed> i have no intention to add more rates so thats fine
<dsharshakov> In some weeks I might be able to dedicate time to that
<chadmed> anyway what do i need to do to get this to install correctly? the only options i added were -Dlibdir and -Dprefix because gentoo
<dsharshakov> What did you ask multirate convolver for?
<dsharshakov> I build WP together with PW
<dsharshakov> But you can probably use your ordinary opts as you install WP on Gentoo, but give my branch as a source
nicolas17 has quit [Quit: Konversation terminated!]
<chadmed> we have multiple rates because the resampling produced low quality, i have no intention to add more rates than we currently have (44, 48, 96, 192) because nothing else matters for desktop audio
<dsharshakov> For dev setup I checkout PW, run meson and it pulls WP and builds it. Then I can change wireplumber subproject (e.g. roll its git rev) and re-run ninja in PW dir
<dsharshakov> `44, 48, 96, 192` <-- switching from 48k to 96k is affected in some cases. Let's stick to 48000 as a balanced option for non-pro tasks and then attempt to squash the bug. It lies somewhere in the graph management
<chadmed> fwiw i have not noticed that ever on this machine
<dsharshakov> well, weird. my system is a typical AMD laptop, no hardware specifics (Bluetooth also seems to be affected)
<dsharshakov> Even if you try to pause, wait and play a 96k track in Elisa?
<dsharshakov> That (as described) is a solid reproducer
<chadmed> yeah its all fine, going between 48k firefox and 96k other media
<dsharshakov> that didn't repro for me. Anyway, better keep that topic in https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2969 since that's not hw specific
<dsharshakov> We can switch to oftc-pipewire if you'd like, since we're pretty far from hw specials anyway
<dsharshakov> PW is available on matrix as well
dsharshakov has quit [Quit: Page closed]
derzahl has quit [Ping timeout: 480 seconds]
mkurz has quit [Ping timeout: 480 seconds]
gladiac has joined #asahi-dev
gladiac has quit [Quit: k thx bye]
gladiac has joined #asahi-dev
blazra has quit [Quit: The Lounge - https://thelounge.chat]
blazra has joined #asahi-dev
jeisom has quit [Quit: Leaving]
___nick___ has joined #asahi-dev
___nick___ has quit []
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi-dev
___nick___ has joined #asahi-dev
nsklaus has joined #asahi-dev
roxfan has quit [Ping timeout: 480 seconds]
gladiac has quit [Quit: k thx bye]
<marcan> peer-pipe-cfg
<marcan> dispext%d: peer pipe dispext%d, max pixel width %d, max pixel rate %d
<marcan> Got peer ID %d
<marcan> sven, jannau: from latest DCP firmware ^^
<marcan> that wasn't there before... DisplayPort MST support ganging up two dispexts (at a layer above the crossbar)?
<marcan> it would make sense that dispext is in charge of the DP protocol so MST is implemented with a side channel with another dispext, while the dual pipe thing is for Thunderbolt only which uses discrete DP tunneled SST streams for multimonitor use cases.
<marcan> wild guess though, it could also just be a tiling thing (but I thought we decided that was done with a single dispext)
roxfan has joined #asahi-dev
gladiac has joined #asahi-dev
bps has joined #asahi-dev
<jannau> what do you mean by latest firmware? 13.3 or 13.4? I suspect based on strings in the 13.3 kext (and on how apple advertises the feature) that 8k hdmi mode might need 2 dcp(ext)s
<jannau> search for mainUFP / peerUFP
<marcan> 13.2 actually, but yeah that also makes sense
<jannau> no 8k or hdmi 2.1 display here so I haven't tried
<marcan> jannau: strings suggest the peering stuff is for atc, HDMI should be on lpdp no?
<marcan> ah not on the MBPs at least, but then I wonder how that works over a single ATC...
<jannau> I think I say it in some messages mentioned with HDMI
<jannau> thinking of it it could be simply some cleanup of how they handle dual displays over thunderbolt and/or thunderbolt+dp-altmode
<marcan> yeah, could be
<marcan> is tb+altmode a thing? like 2 lanes for TB 2 for DP?
<jannau> I'm not sure
<jannau> probably not what I was seeing with my thunderbolt hub. 2 displays only worked when one of them was a downstream thunderbolt display. for any combination of 2 hdmi/dp/usb-c downstream displays it always used DP MST
<jannau> but thinking of it the hub shouldn't use dp-altmode towards the mac
<marcan> yeah
jonny1996 has joined #asahi-dev
jonny1996 has quit [Ping timeout: 480 seconds]
<sven> tb altmode with two lanes tb and two lanes DP isn’t a thing afaik
<sven> if you enter tb altmode or usb4 mode you have to tunnel everything else
<sven> that string could also “just” be a more generic multi stream display handling across multiple dcpext. That would be very weird though
<sven> *multi stream tiling displays
<sven> At which layer is MST done in DP? Atcphy has some very low level PHY setting for DP but I think most of the protocol is handled inside DCP
<marcan> it's higher layer, yeah
<marcan> some packet thing
<sven> yeah, then I guess they could implement it all inside dcpext
<sven> I think atc just passes through whatever dcpext spits out
<sven> either through the actual PHY or through one of the two DPIN tbt tunnels
<sven> Iirc atcphy is just setting up the lane mode and clocks and stuff like that
bps has quit [Ping timeout: 480 seconds]
amarioguy has quit [Quit: Leaving]
bps has joined #asahi-dev
bgb has quit [Ping timeout: 480 seconds]
bps has quit [Ping timeout: 480 seconds]
derzahl has joined #asahi-dev
lewurm- has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
lewurm`` has joined #asahi-dev
rustycrates has quit [Quit: Connection closed for inactivity]
bps has joined #asahi-dev
stipa has joined #asahi-dev
bps has quit [Ping timeout: 480 seconds]
stipa has quit [Remote host closed the connection]
stipa has joined #asahi-dev
brolin has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
kleist has joined #asahi-dev
kleist has quit [Remote host closed the connection]
brolin has joined #asahi-dev
i509vcb has joined #asahi-dev
mkurz has joined #asahi-dev
___nick___ has quit [Ping timeout: 480 seconds]
gladiac has quit [Quit: k thx bye]
Deroy2112 has joined #asahi-dev
Deroy2112 has quit [Remote host closed the connection]
mkurz has quit [Read error: Connection reset by peer]
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi-dev