How do I toggle headset/headphone mode manually?
This is a hardware problem, but there is an app called toggleheadset2 that has a widget that allows you to override the hardware switch, toggling headset output off/on.