Take a paperclip, straighten it, and then insert in earphone jack. See if there's lint etc built up in there. Loosen gently then tap upside down on table.
A friend of mine's iphone jack wasn't working and it turned out it was chock full of lint. He's a guy and keeps it in his pocket.