#asahi-dev · 2023-08-14 11:38
povikok, now i get it :)#asahi-dev · 2023-08-14 11:37
chadmedin fact it was one of the first things i did under the assumption that the loudness compensator could be controlled from pipewire#asahi-dev · 2023-08-14 11:37
chadmedlike i said ive mocked this up in carla and it all works#asahi-dev · 2023-08-14 11:37
chadmedyeah thats the idea#asahi-dev · 2023-08-14 11:36
povikso the change here is that you don't enhance the basses as hard at max volume, if you tune it differently and introduce the equal loudness compensation, is that right?#asahi-dev · 2023-08-14 11:36
chadmedso nothing will ever be boosted relative to whatever we specify at max volume#asahi-dev · 2023-08-14 11:35
chadmedit just pulls the mids down faster than it does treble and bass, based on iso 226:2003 curves#asahi-dev · 2023-08-14 11:35
chadmedit never actually boosts anything, it only attenuates#asahi-dev · 2023-08-14 11:34
chadmedno because the equal loudness compensation would do nothing at max volume, and then do its compensation as we turn the volume down#asahi-dev · 2023-08-14 11:34
povikok, but if you introduce the equal loudness compensation, wouldn't you effectively get what you started out with, that caused the clipping noise?#asahi-dev · 2023-08-14 11:34
chadmedbit of an unfortunate double-whammy with where the human ear's sensitivity peaks and how these speakers behave#asahi-dev · 2023-08-14 11:34
chadmedso all you get is honky mids#asahi-dev · 2023-08-14 11:34
chadmedyeah, without equal loudness compensation you get aggressive rolloff in the bass and treble #asahi-dev · 2023-08-14 11:33
povikso it would sound off?#asahi-dev · 2023-08-14 11:33
povikso if you tune it to sound "right" at max volume, the bass would be attenuated at normal volumes?#asahi-dev · 2023-08-14 11:33
chadmedthat might just be the compressor not being quite right though#asahi-dev · 2023-08-14 11:33
chadmedthe part im kind of at a loss to explain is that if i push the volume *past* where this noise becomes audible, it goes away for a bit until i push hard enough to get overexcursion#asahi-dev · 2023-08-14 11:31
chadmedwe avoid clipping by simply making it impossible at max volume#asahi-dev · 2023-08-14 11:31
povikah i see#asahi-dev · 2023-08-14 11:31
chadmedif i tune the graph (bass enhancement, compressor, etc) for sounding "right" at max volume then none of this matters#asahi-dev · 2023-08-14 11:31
chadmedwhich is why im pretty sure its just digital clipping inside the codecs once the volume going in goes up past a certain amount#asahi-dev · 2023-08-14 11:30
chadmedwhat im doing atm is driving the bass "enhancement" harder than it neds to be driven so that it sounds right at normal volumes#asahi-dev · 2023-08-14 11:28
povikbut if the popping is introduced in the codecs what can you do in the processing to work around it?#asahi-dev · 2023-08-14 11:28
poviki would understand if the popping noise was introduced in some processing stage that you would work around it by rearranging the graph#asahi-dev · 2023-08-14 11:25
chadmedbut hopefully we can find a way forward: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3434 (cc dsharshakov) #asahi-dev · 2023-08-14 11:24
chadmedi mocked this up in carla so i know it can be done, and is what youd usually do. everything ive been doing lately has been desperately trying to work around this because we cant control the loudness compensator at runtime#asahi-dev · 2023-08-14 11:24
chadmedpovik: we tune at full volume such that the clicks do not happen (this is possible ive already tried it) then use the equal loudness plugin to keep that sonic profile across the volume range#asahi-dev · 2023-08-14 11:22
povikmight be worth the try playing around with that#asahi-dev · 2023-08-14 11:22
povikyou either need to supply it at boot, or you can change it at runtime then use the reset_codecs.sh script from macaudio-userutils#asahi-dev · 2023-08-14 11:21
povikit's controlled with a bitmask in an `apple_quirks` parameter on the tas2764 module#asahi-dev · 2023-08-14 11:21
povikhttps://github.com/AsahiLinux/linux/blob/sound/ivsense-improvements/sound/soc/codecs/tas2764-quirks.h#asahi-dev · 2023-08-14 11:21
povikin the ivsense branches the linux driver can mimick the apple quirks#asahi-dev · 2023-08-14 11:20
povikfwiw apple configures some undocumented registers on the codec, we don't know to what end#asahi-dev · 2023-08-14 11:17
povikhow does making it sound good at full volume work around the clicks if we don't know what causes them?#asahi-dev · 2023-08-14 11:13
chadmednope#asahi-dev · 2023-08-14 11:13
povikhm, no faults reported from the codec? (in dmesg)#asahi-dev · 2023-08-14 11:12
chadmedits ~the same pop/click that is audible when you abrubptly mute/pause a stream sometimes, but much louder#asahi-dev · 2023-08-14 11:12
chadmedpovik: its not overexcursion, it sounds almost like clipping artefacts but the signal is nowhere near being saturated#asahi-dev · 2023-08-14 11:11
povikchadmed: elaborate on the popping noise, i don't understand#asahi-dev · 2023-08-14 10:36
dsharshakovthat should go to pipewire/pipewire, not WP#asahi-dev · 2023-08-14 10:35
dsharshakovchadmed: could you please open a new issue for that? It'd be more convenient to discuss implementation details there#asahi-dev · 2023-08-14 10:30
chadmedso close to greatness... #asahi-dev · 2023-08-14 10:30
chadmedthat popping noise is back and i think its just a limitation of the codecs that we have to work around by making the speakers sound good at full volume and then using the equal loudness plugin to maintain a consistent profile when the user turns the volume down#asahi-dev · 2023-08-14 10:29
chadmedif we can make pipewire present the volume knob of the lsp equal loudness plugin as _the_ volume then we're home free#asahi-dev · 2023-08-14 10:28
chadmedbut it currently has to be done manually#asahi-dev · 2023-08-14 10:28
chadmedpipewire filter graphs can change their parameters at runtime #asahi-dev · 2023-08-14 10:28
chadmedok so final piece of the puzzle for the speakers is going to be _somehow_ convincing pipewire to tie the volume knob of a sink to a parameter in a filter chain #asahi-dev · 2023-08-14 09:35
eilnI'll just patch adt to match the sio struct. I have to add another range for the firmware heap anyway#asahi-dev · 2023-08-14 09:29
povikno we haven't#asahi-dev · 2023-08-14 09:27
povikhaven't we merged that yet?