mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
8aacf5c823
The boot-time probe read a legacy /sys/class/gpio number that mainline kernels never expose, so the initial audio path was always the speaker guess and a reboot with headphones plugged started routed wrong. Query the actual EV_SW/SW_HEADPHONE_INSERT bit through evtest --query (exit 10 = bit set; on these boards the switch is inverted, value 0 means inserted) with the legacy gpio node as fallback, make an empty "$2" follow the detected state instead of forcing speakers, and bail out before the event loop when the board has no jack input device at all (evtest on an empty path just dies and burns service restarts). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>