I found that I didn't have much lint in the headphone jack, but the inside of mine was dirty and not making good contact.
Here's what worked for me:
1. Turn off your phone
2. find a q-tip and remove+discard some of the cotton so the q-tip is small enough to fit snugly down into the headphone...