some have hp jack as INout, allow that too
fall back to internal/fixed output if speakers are not available
A small program to track whether headphones are connected to jack or not, and switch between speaker and headphones output accordingly.
It tries to remember the last volume. There are arguments to pass "safe" volumes for both speaker and headphones.
Prerequisites: 9front, Intel HDA.