Before you get the toggle app try cleaning. For me this turned out to be a hardware issue.
Take a q tip and tear off most of the cotton.
The remaining stick with a little bit of cotton attached should fit perfectly in the headphone jack.
Slide that into the jack and twist back and forth...