Get some canned air and give the jack a short blast. Plug and unplug the headphone a dozen times and try the air blast again. If that doesn't clear it up, it usually needs service.
My Samsung tv thinks that there is a headphone in the socket, and has disabled the speakers. No headphone is in the socket, and it appears to be clear. This has also disabled a lot of the features in the sound setup, making it difficult to sort out. I have tried to plug headphones in and out a few times, but it just stays the same. Any ideas? Thanks