An ACPI handler, auto disable Speaker when headset plugin, enable Speaker when headset removed.
###Archlinux User
makepkg -si
###Other Linux User Install acpid alsa-utils, then
cp headset_hotplug /etc/acpi/events/
cp headset_hotplug.sh /etc/acpi/actions/