2023-04-23
00:15bps has joined #asahi-dev
00:21chadmedhm literally just having DCP out of shutdown slaughters idle power time, tty or desktop doesnt matter
00:25bps has quit [Ping timeout: 480 seconds]
00:26chadmedonly thing i can think of is that 1hz mode that comes with VRR, macos very aggressively uses that
00:27chadmedyou can notice it sometimes even using it with things that should be interactive, the apple music app for example has animated "now playing" graphics that give away the 1hz mode unless youre wiggling the cursor
01:10compassion has quit [Quit: lounge quit]
01:18cylm_ has quit [Ping timeout: 480 seconds]
01:23compassion has joined #asahi-dev
02:00gabuscus has quit []
02:11pthariensflame has joined #asahi-dev
02:13gabuscus has joined #asahi-dev
02:16abd has quit [Ping timeout: 480 seconds]
02:30pthariensflame has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:48tobhe_ has joined #asahi-dev
02:53tobhe has quit [Ping timeout: 480 seconds]
02:55Z750 has quit [Quit: bye]
02:56Z750 has joined #asahi-dev
03:14chadmed has quit [Remote host closed the connection]
03:48chadmed has joined #asahi-dev
04:17hanss has joined #asahi-dev
04:24hanss has quit [Quit: WeeChat 3.8]
06:08JSkilton has joined #asahi-dev
06:09JSkiltonMrs. Skilton gets her holes filled and satisified by Rush's Geddy Lee. Later, Geddy meets Jean Pierre Manikariza, her husband, and gets filled by his big black cock! Read all about it! https://pastebin.com/1ExdrDQA
06:12JSkilton was banned on #asahi-dev by ChanServ [*!*@149.19.169.187]
06:12JSkilton was kicked from #asahi-dev by ChanServ [You are not permitted on this channel]
06:13JSkilton has quit [Remote host closed the connection]
07:03nsklaus has joined #asahi-dev
07:38Retr0id has joined #asahi-dev
07:57elvishjerricco has quit [Read error: No route to host]
07:58knedlik has joined #asahi-dev
07:58elvishjerricco has joined #asahi-dev
08:01elvishjerricco has quit [Read error: No route to host]
08:02elvishjerricco has joined #asahi-dev
08:10elvishjerricco has quit [Ping timeout: 480 seconds]
08:20elvishjerricco has joined #asahi-dev
08:42knedlikI'm still failing to grasp how LV2 works... LADSPA is no different. Is there perhaps something else I could help with that's a bit easier for your regular software dev?
08:43marcanhonestly, of all the things we need to do, "write an LV2 plugin" is probably the most "regular software dev" task we have...
08:46knedlikI'm perfectly capable (atleast seemed like it so far) of making low-level stuff - I find it fun even. The problem with the LV2 plugin is the very niche SDK that's just hard to grasp for me
08:55knedlikRust has some uniqueness of it's own, but better than taking hours to finally compile without errors only to segfault
09:00chadmedKnedlik: if it helps, we dont really care about a gui for the plugin at this stage since i can manipulate its ports/controls directly
09:34knedlik has quit [Remote host closed the connection]
09:48chadmedsince we're interested only in boosting, the "min" should be 0 dB, at which level the plugin will not alter the amplitude of any part of its input signal
09:58___nick___ has joined #asahi-dev
09:58knedlik has joined #asahi-dev
09:58___nick___ has quit []
09:59knedlikGot it. Do I understand the algo right that we leave the bass be and then boost the harmonics?
10:00___nick___ has joined #asahi-dev
10:13knedlikAlso the stuff we boost is stuff that meets the condition frequency <= frequencyThreshold by the gain input?
10:16chadmedi recommend using Carla to test it, just point it to the directory youve built the plugiin in and it should pick it up as an LV2 plugin
10:18jannaumarcan: aided by added verification in the dcp firmware with syslog error prints. after I got the size right it complaining about a surface with size 0x0 at 1920x1080
10:26knedlikchadmed: You wrote in the Yaks page that the bass tones need to be cut out - if the fundamental was say 100hz, which frequencies do we alter and in what way?
10:28chadmedaiui the effect does not rely on the fundamental being subtracted, we just need to do it in our specific case because the fundamentals overload the tiny little woofers
10:28chadmedso bc we want this to be a general effect and end up as part of LSP we dont want to do machine-specific stuff
10:29chadmedno no leave those alone, we just want to boost the harmonics of the frequencies under the threshold
10:30knedlikSo let's return to the 100hz example - which frequencies do I boost if the threshold was for example 230hz?
10:34chadmedits ok i have the pdfs, but my webzone is ipv6 only for the time being because i have many better things to spend my day on than being on hold with my isp
10:35marcanKnedlik: you don't boost any frequencies, what you do is apply a nonlinearity to the filtered bass signal and then bandpass only the high band out
10:35marcanwhat you are doing is generating harmonics, removing the fundamental, and adding that to the original signal
10:36marcanand that "full wave integrator" from the original link looks a bit dodgy to me, you will want to experiment with different algorithms for the nonlinearity
10:36chadmedalso keep in mind that we dont want _all_ the harmonics, because this can ruin the effect
10:37marcanwe might want to apply some basic EQ to the output yes, e.g. to shape away the very high harmonics
10:37marcanthere are many algorithms for creating harmonics, "saturation" is one keyword to look for
10:38marcandepending on the harmonic generation algorithm you use, that will probably also have knobs
10:38chadmedthe front end of the plugin should split the incoming stereo signal into high and low, with the high passing straight through to the back end
10:40marcanalso, be careful with the band split. if you are adding the signals back later, you need to make sure to avoid phase cancellation.
10:40marcanif you are just splitting once, then I think just calculating a highpass and then the lowpass as original - highpass should be fine (for obvious reasons)
10:40marcanbut if you try a discrete highpass/lowpass with typical minimum-phase algorithms, you will run into nasty cancellation at the crossover IIRC
10:51chadmedthere are a ton of tricks and dark evil magic you can do to make it sound much better than a basic implementation but we're not bothing with that
10:52chadmedgiven how much cpu time coreaudio can use i think apple might be doing it, but as i have mentioned before apple are trying way too hard
10:55chadmedits why i dont really bother with fastidious and meticulous measurement beyond collecting a baseline
10:56chadmedi could spend hours crunching numbers and plugging TSPs into various formulae to get that frequency response curve absolutely and totally flat
10:56chadmedbut thats not fun and not even materially better than just doing it by ear if you know what to listen for
10:57chadmedyou can treat the algorithm you build as a black box if youd like, but exposing any tunable parameters to the plugin host would be useful too
10:59knedlikSounds good. Any idea if lv2 already has implementations for stuff like the crossover filter?
10:59chadmedplugins dont really talk to each other in that way since thats the job of the plugin host
11:02marcanOTOH it is perfectly fine to prototype all this by chaining together a pile of existing plugins
11:03marcane.g. some LSP EQ in linear phase mode to split the bands, simple mixer to mono, calf saturator or something fancier for harmonics, some gain and mix in again should be doable without writing any code
11:04marcanTBH I bet FabFilter Saturn all on its own can do a decent bass enhancer like this with the right settings, since it has multiband processing built in
11:08chadmedKnedlik: the problem with chaning, the fact that LSP doesnt have a harmonics generator notwithstanding, is the plugin host (pipewire) has a fixed amount of housekeeping to do with each plugin
11:08chadmedwe cant have people burning half a cpu core on DSP just trying to play a cruddy mp3 or youtube video
11:16roxfan2 has joined #asahi-dev
11:20roxfan has quit [Ping timeout: 480 seconds]
11:24chadmedfair enough, signal processing is really hard to wrap your head around at a fundamental level
11:27knedlikI'll still need to look that up, but sounds a lot better than biquad transfer coefficients haha
11:28chadmedthe hardware supports it and i _think_ we know mostly what needs to be added to the driver to make it work
11:29knedlikI can give that a try, what file or folder should I look in? Also as you say you have an idea, is that written down somewhere?
11:30chadmedjannau might have a better idea of what exactly needs to be done, but the gist of it aiui is that the hardware timestamps frames (expected) but we dont handle it in the driver and dont tell the drm subsystem that we can do VRR
11:30jannauchadmed: have you tried how much of the "dcp" power use is the backlight at minimal brightness? use the gpio for the backlight to turn it off. I hope it's minimal though
11:31chadmedthe backlight power draw is negligible, the test i ran with the partial boot (dcp shut down, screen on) confirmed that
11:33jannauKnedlik: you have to look drivers/gpu/drm/apple, especially the iomfb* files. that is the part which communicates with the display coprocessor
11:34knedlikWould this be one of the things I need a 2nd puter for? No prob if yes, going home in a few anyway
11:36jannauyes, you would need a second computer for it. I have an idea what the timestamps are but it will be certainly helpful to check what macOS does with our hypervisor and tracing for dcp in m1n1:proxyclient/hv/trace_dcp.py
11:38jannauKnedlik: do you have by any chance a 13" macbook pro? if yes the touchbar daemon might be a good project
11:41ChaosPrincessKnedlik: grab asahi-wip, merge those two, https://github.com/AsahiLinux/linux/pull/102 https://github.com/AsahiLinux/linux/pull/137 - this will turn the touchbar into the second screen. write something that grabs the touchscreen digitizer and the screen, show f-keys, process touches and send them as keyboard events
11:43jannauif your comfortable or motivated with writing rust you want to use https://github.com/Smithay/drm-rs for the display
11:45ChaosPrincessasahi
11:52jannauKnedlik: if you have a m2 based macbook pro you also need to update m1n1 for the touchscreen
12:00knedlik has quit [Remote host closed the connection]
12:07stickytoffee has joined #asahi-dev
12:25kesslerdupont has joined #asahi-dev
12:32kesslerdupontknedlik, I was reading the logs and saw your messages. I can try and help you with the audio stuff if you still haven't figured it out
12:36kesslerdupont has quit [Quit: Lost terminal]
12:38kesslerdupont has joined #asahi-dev
13:34bcrumb has joined #asahi-dev
13:37bcrumb has quit []
13:39bcrumb has joined #asahi-dev
13:41bcrumb has quit []
13:43kesslerdupont has quit [Quit: leaving]
14:03knedlik has joined #asahi-dev
14:08ChaosPrincessclone the kernel repo, checkout asahi-wip and then merge the branches i linked
14:11ChaosPrincessfor screen - start kde with wayland and you will see it
14:23knedlikjannau: I'm unsure how to do that, I never really worked with PKGBUILDs more than running them
14:30jannauI'm not sure how well the touchbar PRs rebase against the asahi-6.2-11 kernel so cloning the the asahi kernel tree and the two branches https://github.com/WhatAmISupposedToPutHere/linux would probably a good first step
14:32ChaosPrincessKnedlik: git clone https://github.com/AsahiLinux/linux.git; cd linux; git cd asahi-wip; git remote add what https://github.com/WhatAmISupposedToPutHere/linux; git fetch -a what; git merge what/adp what/z2-touchscreen
14:33ChaosPrincesssorry, no idea how arch people do it, i dont run arch :P
14:35jannauKnedlik: https://paste.debian.net/1278203/ with touchbar_display.patch and touchbar_touchscreen.patch being the changes from the pull request
14:36ChaosPrincessgit diff from to >sth.patch
14:39jannauhttps://github.com/AsahiLinux/linux/pull/102.patch https://github.com/AsahiLinux/linux/pull/137.patch but I'm not sure if those apply against asahi-6.2-11 used in the PKGBUILD
14:43knedlikI'm not sure what you're going for? The .patch links are invalid, or empty at the very least
14:52knedlik has quit [Remote host closed the connection]
14:58knedlik has joined #asahi-dev
15:01knedlik_ has joined #asahi-dev
15:02knedlik has quit [Remote host closed the connection]
15:04knedlik_ is now known as knedlik
15:04knedlik is now known as Knedlik
15:08Knedlik has quit [Quit: Konversation terminated!]
15:50cylm has joined #asahi-dev
15:53nepeat has quit [Quit: ZNC - https://znc.in]
16:04nepeat has joined #asahi-dev
16:07___nick___ has quit [Remote host closed the connection]
16:54nepeat has quit [Quit: ZNC - https://znc.in]
17:21marcanchadmed: fwiw I played around prototyping this with Saturn and with Calf Saturator (which is pretty crappy but sort of works) with EQs around them for band splitting and it does work, though I need to test it on the real speakers (I was testing on my headphones with a sharp highpass to emulate the bad speaker response)
17:21marcandefinite is going to need a lot of tweaking to get it to sound good on several kinds of material though
17:21marcanit's tricky getting the cutoff frequencies right and the right response for the bass boost signal
17:24marcanand if you overdo it you get a mess of intermodulation products which doesn't sound any good
17:36cylm has quit [Quit: WeeChat 3.6]
17:49nepeat has joined #asahi-dev
17:51nepeat has quit []
17:53nepeat has joined #asahi-dev
18:02abd has joined #asahi-dev
18:54abd has quit [Ping timeout: 480 seconds]
19:48Dementor has quit [Remote host closed the connection]
19:49Dementor has joined #asahi-dev
20:46pthariensflame has joined #asahi-dev
20:47hxliew has quit []
20:47pthariensflame has quit []
20:49hxliew has joined #asahi-dev
21:18user982492 has joined #asahi-dev
21:38cy8aerI wonder what would be better: adjust the sound on a lower level or adjust it at user space e.g. with easy effects: If you pre-adjust you may have problems with additional adjustments at the user level? IMHO the sound never gets better with more sound filtering or frequency dependant compressing with many stages.
21:57user982492_ has joined #asahi-dev
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi-dev
22:02user982492 has quit [Ping timeout: 480 seconds]
22:23abd has joined #asahi-dev
22:36chadmed_ has joined #asahi-dev
22:38chadmed_also youre literally just wrong about the sound never getting better with filtering, these machines being proof right in front of you
22:40chadmed_marcan: i did fear that, like i said im all but certain apple are doing timbre matching and other tricks to get it passable and even then its unconvincing at times :/
22:41chadmed_we'll give it a go and if it ends up being more trouble than its worth... well we have a pretty passable solution at the moment, we just have to be careful about how loud we let it go
22:42ChaosPrincess has quit [Quit: WeeChat 3.8]
22:43ChaosPrincess has joined #asahi-dev
22:45chadmed_access to the hardware, you probably dont and theres probably some DSP happening in the background
22:46chadmed_so people with laptops are probably applying their own effects over whatever the OEM has happening in firmware anyway
22:46chadmed_likewise people who put effects on their xxxtreme ultra gaming rgb 666 headshot predator pro x headsets
22:47chadmed_they actually sound like shit if you disable the oem filtering, hell most of them sound pretty terrible even _with_ it
22:50chadmed_what we're doing in pipewire is not fancy or flashy or trying to replace what users expect to be able to do on a desktop machine, what we're doing is abstracting away machine-specific nuances so that the _rest_ of userspace sees a proper stereo output
22:58kesslerdupont has joined #asahi-dev
23:18kesslerdupontchadmed: it is reassuring to hear that the goal is to have a flat response and not to make everything bass boosted because I want to be able to hear things as they are supposed to sound
23:22chadmed_kesslerdupont: that was always the goal, ive never been happy with how macos handles the speakers
23:22chadmed_yeah its fancy and it sounds "good" but an exaggerated harman curve is not really what people buying a "pro" machine are after is it
23:38chadmed_plus as has been pointed out, keeping it relatively neutral lets people apply colour to their own personal taste
23:39chadmed_obviously we're not going for a _fully_ reference sound because its just not possible but its close, with just a tinge of warmth to make it more natural and comfortable to listen to
23:46abd has quit [Remote host closed the connection]
23:59chadmed_ has quit [Remote host closed the connection]