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_>
oh man the cs42l42 is a bit of a beast
pb17 has quit [Ping timeout: 480 seconds]
KxCORP5894000345 has quit [Quit: Bye!]
KxCORP5894000345 has joined #asahi-dev
pb17 has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
BlueMatt_ has joined #asahi-dev
BlueMatt has quit [Ping timeout: 480 seconds]
tobhe_ has joined #asahi-dev
tobhe has quit [Ping timeout: 480 seconds]
<chadmed_>
hm we're not setting the cs42l42 tip sense debounce or anything in the DT
<chadmed_>
i wonder if folks' spurious headset misdetections are related
<chadmed_>
the fallback values in the driver are quite slow, but maybe we need slower
<chadmed_>
or worse yet, more msleep()s....
pb17 has quit [Ping timeout: 480 seconds]
<chadmed_>
you can reliably cause it to misdetect a headset by getting the plug timing juuuust wrong
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
nora_ has joined #asahi-dev
nora has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
JayBeeFOSS has quit [Remote host closed the connection]
JayBeeFOSS has joined #asahi-dev
hspak4163271446 has joined #asahi-dev
hspak4163271446 has quit []
hspak4163271446 has joined #asahi-dev
hspak4163271446 has quit []
hspak4163271446 has joined #asahi-dev
hspak4163271446 has quit []
hspak4163271446 has joined #asahi-dev
hspak4163271446 has quit []
hspak has joined #asahi-dev
midou has quit [Ping timeout: 480 seconds]
<LarstiQ>
how sensitive is getting that juuuust wrong?
pb17 has quit [Ping timeout: 480 seconds]
midou has joined #asahi-dev
balrog has quit [Ping timeout: 480 seconds]
balrog has joined #asahi-dev
alih has quit []
<chadmed_>
LarstiQ: theres enough room for error that people will hit it
<chadmed_>
unfortunately making the debounce time longer on the actual tip sense doesnt help
<chadmed_>
the issue is between the tip sense interrupt and starting the detection routine
<chadmed_>
unfortunately i think the pc as a platform has mostly the right idea here
<chadmed_>
most of the realtek codecs etc will wait a very, very long time between the plug event and actually trying to figure out what type of thing you plugged in
pb17 has joined #asahi-dev
<chadmed_>
yeah msleep()s it is -.-
<leio>
oh! must be why sometimes randomly my microphone on studio doesn't work
<chadmed_>
yeah if the hotplug detect runs and returns before youve pushed the plug in all the way youre stuffed and you have to replug it
<chadmed_>
im thinking of just adding a 1 to 2 second delay in the IRQ thread
<chadmed_>
if the tip sense interrupt has fired, wait a bit before detecting
<leio>
I just shrugged it off as "I should finally upgrade pipewire stack" instead of doing the replugging dance like hdmi of past
<chadmed_>
sensible assumption, i didnt expect the driver to just let this whole thing go as fast as possible :p
<chadmed_>
users cannot plug things in within ~500ns
<leio>
I remember how this thing worked in Windows, where you just get a popup each time to ask you if you plugged in headphones or headsert
<chadmed_>
hasnt worked like that in a very long time, they have headset detection now
<chadmed_>
the process just takes longer to reduce the instance of this occurring
<chadmed_>
youll notice that on PCs, there is a delay between plugging anything into the sound card and it registering in userspace
<chadmed_>
whereas stuff you plug into the jack on these machines just appears almost instantly
<chadmed_>
thats the issue here
<leio>
could it re-sense a couple of times for 5 seconds or something? Like get sound coming and add microphone a second later if it gets pushed in slow?
<chadmed_>
if this ends up not being materially more reliable then ill try something like that but i dont want to get too fancy
<leio>
was an idea on how to make it appear ASAP, like a backing off sensing delay
pb17 has quit [Ping timeout: 480 seconds]
<chadmed_>
hey that actually works
pb17 has joined #asahi-dev
<chadmed_>
mm i still think it makes more sense to just wait once
<chadmed_>
only because theres no real way to suppress the second run through the detection logic if it's "not needed"
<chadmed_>
by the time we run it again the tip sense interrupt has been cleared and doesnt come back again until the falling edge of the tip sense switch (when we unplug the jack)
<chadmed_>
i think just giving users 1.5 seconds to plug the thing in fully (like every single other platform seems to do) is good enough
___nick___ has joined #asahi-dev
sand4rt has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
dcavalca85 has quit []
pb17 has joined #asahi-dev
jakki_ has joined #asahi-dev
jakki_ has quit []
___nick___ has quit []
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
sand4rt has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
zumi has joined #asahi-dev
john-cabaj has quit [Quit: john-cabaj]
john-cabaj has joined #asahi-dev
sand4rt has joined #asahi-dev
sand4rt has quit [Ping timeout: 480 seconds]
patrickm has quit [Ping timeout: 480 seconds]
sand4rt has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
m42uko has joined #asahi-dev
patrickm has joined #asahi-dev
opticron has quit [Read error: Connection reset by peer]
opticron has joined #asahi-dev
pb17 has joined #asahi-dev
mab has joined #asahi-dev
mab is now known as Guest4805
Guest4805 has quit []
mab_ has joined #asahi-dev
sand4rt has quit [Ping timeout: 480 seconds]
john-cabaj has quit [Ping timeout: 480 seconds]
sand4rt has joined #asahi-dev
mab_ has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]
mab_ has joined #asahi-dev
pr0vctr has joined #asahi-dev
mab_ has quit []
sand4rt has quit [Quit: WeeChat 4.4.2]
sand4rt has joined #asahi-dev
pr0vctr has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]