Its not a software issue.
Here's what i did to fix mine:
http://www.luckow.com/iphone/
I left more on the q-tip to get a tighter fit in the jack while cleaning.
Use a flash light and a toothpick to gently scrape the thick gunk out of it, clean it until it looks as if it were new and that will fix the problem. Also put a plug in the jack or get a case that covers it to keep the dirt out of it. I used a an old headphone jack with the cord cut off and three rings of the tip of the jack removed (or you won't have sound with it in there:)