Sounds like your system has the headphone automute reversed. I'd need to know what version of alsa-driver you are running, what your system info is, and your audio configuration. Fortunately, all this info is gathered by this
script. Please post the link it generates, and I can look into this for you.