#asahi-dev · 2022-08-20 05:04
chadmedits all good now im totaally happy with that#asahi-dev · 2022-08-20 05:04
chadmedyeah yeah its all clicked to me now, i didnt notice the beauty in that last line of the filter chain #asahi-dev · 2022-08-20 05:03
chadmed"ucm but not utterly useless garbage" is my preferred way#asahi-dev · 2022-08-20 05:02
chadmedthen the only question in flight is what upstream would be okay with WP actually doing#asahi-dev · 2022-08-20 05:02
chadmedthen yeah id just give the final sink a nice node.nick, everything else is fine #asahi-dev · 2022-08-20 05:01
chadmedyeah yeah i get it now, all good#asahi-dev · 2022-08-20 05:01
chadmedohhhh yeah ok i see what youve done there#asahi-dev · 2022-08-20 04:59
chadmedi.e. DEs and their pipewire/pulseaudio integrations need to be able to see it so that users can set the volume etc#asahi-dev · 2022-08-20 04:59
chadmedwe dont want to hide the virtual sink since this is the one we _want_ applications to be able to connect to and configure#asahi-dev · 2022-08-20 04:58
chadmedyeah 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#asahi-dev · 2022-08-20 04:54
chadmedapplications need to be able to see the DSP sink and not the HW#asahi-dev · 2022-08-20 04:54
chadmedalso you need to hide the hardware sink, not the dsp output#asahi-dev · 2022-08-20 04:52
chadmedjust specify a node.nick for the virtual sink instead #asahi-dev · 2022-08-20 04:52
chadmedfwiw 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#asahi-dev · 2022-08-20 00:48
chadmedDmitrySharshakov[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 #asahi-dev · 2022-08-19 12:20
chadmedoh yeah thats fine#asahi-dev · 2022-08-19 12:18
chadmedill 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...#asahi-dev · 2022-08-19 12:17
chadmedyeah#asahi-dev · 2022-08-19 12:16
chadmedput device names underneath their driver in the directory structure#asahi-dev · 2022-08-19 12:16
chadmedalso lmao i just remembered my initial proposal fixed the duplicate name problem anyway#asahi-dev · 2022-08-19 10:57
chadmedbrilliant#asahi-dev · 2022-08-19 10:53
chadmedis that bridged to the irc channel? #asahi-dev · 2022-08-19 10:49
chadmedill get that pw-dump for you in just a second #asahi-dev · 2022-08-19 10:48
chadmedthat 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#asahi-dev · 2022-08-19 10:47
chadmedyeah 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#asahi-dev · 2022-08-19 10:47
chadmedPW 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#asahi-dev · 2022-08-19 10:46
chadmedwell it shouldnt be for these computers but the whole idea is to keep things upstreamable and maintainable#asahi-dev · 2022-08-19 10:45
chadmedif policy-dsp can be made to source a further script off a dynamically defined location on disk then yeah it absolutely could#asahi-dev · 2022-08-19 10:42
chadmedso i think this proposal is very close but to do it the sustainable and maintainable way will probably require some deeper changes to wireplumber#asahi-dev · 2022-08-19 10:40
chadmedsure, 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"#asahi-dev · 2022-08-19 10:37
chadmedwell yeah, i think i even said in the original issue i imagine it being basically exactly like UCM but actually good#asahi-dev · 2022-08-19 10:36
chadmedrather than have wireplumber look through n scripts looking for one with the correct matches = {} #asahi-dev · 2022-08-19 10:35
chadmedmy 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#asahi-dev · 2022-08-19 10:34
chadmedi 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#asahi-dev · 2022-08-19 10:33
chadmedlike 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#asahi-dev · 2022-08-19 10:33
chadmedthe 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#asahi-dev · 2022-08-19 10:31
chadmedright yeah cool, im totally fine with doing it like this btw i think i just misunderstood what problem you were trying to solve#asahi-dev · 2022-08-19 10:29
chadmedright so we go back to my initial question from a couple of days ago, how does this fix the problem long term#asahi-dev · 2022-08-19 10:28
chadmedyeah 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#asahi-dev · 2022-08-19 10:26
chadmedso my next question is do we have to hard code device names into lua scripts for every single supported device#asahi-dev · 2022-08-19 10:26
chadmedyeah cool thats what i thought#asahi-dev · 2022-08-19 10:25
chadmed(sorry if this is meant to be obvious btw, reading lua gives me a splitting headache) #asahi-dev · 2022-08-19 10:25
chadmedDmitrySharshakov[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#asahi-dev · 2022-08-16 09:25
chadmedthe driver exposes a human readable device name to the userspace api#asahi-dev · 2022-08-16 09:24
chadmedwhich is why my script installs the DSP to /usr/share/pipewire/devices/apple/*, to demonstrate how such a directory structure might look. the actual config fragment is just to mask the fact that PW cannot yet do this automatically without user intervention#asahi-dev · 2022-08-16 09:23
chadmedideally for the long term, WP/PW would just automatically check some standardised directory structure for DSPs matching some standardised naming scheme, much like linux-firmware, without the need for having to ship lua scripts on a per device basis#asahi-dev · 2022-08-16 09:22
chadmedmoving that into WP and lua scripts just kicks the can down the road#asahi-dev · 2022-08-16 09:22
chadmedyeah but what im saying is we still have to ship and install some sort of script and the DSP, which is exactly what we're doing now#asahi-dev · 2022-08-16 09:20
chadmedexcept maybe the "dont load if the hardware isnt there" bit#asahi-dev · 2022-08-16 09:20
chadmedand if we were satisfied with shipping lua scripts we would just keep doing what we're doing now because it achieves the exact same thing