If a restart or reset don't work, you've probably got dust or debris in the headphone jack. This is common. Try plugging and up-pluggin the jack a few (lot of) times. You can also try canned air, but be very cautions. Come at it side ways and for brief bursts. Canned air comes out cold, and if you blast away at the jack directly or for longer than a second you'll end up with water condensating on/in the jack {Bad}.
May people find this simply goes away after a while. It did the one time it happened to my iPhone. Since then I've been careful not to carry it exposed when mowing the lawn. Gopher holes make lots of dust when you lazily drive over them, instead of getting off the mower (like you are supposed to) and removing the dirt.
I do not recommend shoving Q-tips or other objects down the jack to try and clean it. You are more likely to add debris, or pack what's there in.
If nothing works and it does not self correct in a few days, you may have to talk to Apple. I don't know if they will cover it under warranty or not. They definitely will not cover water damage, which is why I advice extreme caution with the canned air, if used.
-------------------------------------------------------
Restart: Hold down the power button until the power off slider appears. Slide it off. When the iPad finishes shutting down, hold down the power button again until the Apple logo appears. Apple recommends you restart the iPad at least once a month.
and then a reset if that does not work.
Reset: Hold down the power and home buttons until the Apple logo appears. The iPad will reboot. This usually takes a bit longer than a restart.