Closed chadmed closed 1 month ago
Something I have considered is getting rid of the detection entirely on tip sense and just using it to "arm" ring sense by unmasking ring sense interrupts, then only doing detection on ring sense. This will avoid having to run detection twice on dodgy connections.
pulled manually into asahi-6.11.2-1
Supersedes #328 and serves the same purpose. If users are unfortunate with their timing when inserting a 3.5mm jack, the trigger-happy tip sense line on these machines will misdetect the thing they're plugging in. We can use ring sense to force re-detection if and only if tip sense doesn't change, but the ring sense line detects a change in plug state. Typically, this will only occur in cases where we have finished handling the tip sense IRQ before the plug was fully seated.