Blow in the headphone jack really hard. Dust or particulate matter could be stuck which confuses the device into thinking there are headphones connected.
open