[ubuntu] Audio not working for speakers, but works for heaphones

view story

http://ubuntuforums.org – hey guys I have Ubuntu 12.04 64bit, and I've been having speaker issues for a while, some times my speakers would make all my sounds sound high pitch and ringy. hard to explain, like the sound you hear when a gba game gets removed when a game is playing... any way, later on I started getting a constant clicking sound that would repad about every 9 seconds coming from the speakers and from headphones inf plugged in. but then recently in the middle of a youtube video my speakers just stopped. SO I restarted my pc, and they would still not work, I plugged in some headphones, and they worked (Hardware)