This Might be a similar issue I just fixed in my laptop give it a try, here are the details of the fix:
Sound not coming out of speakers, only headphones, on laptop FIXED.
The speakers on my laptop Dell Studio XPS 1640 were not working after experimenting with several modules and models, I decided to give it a try on Windows (should've tried it sooner, try it first if you are doing double boot), I was expecting them to work but they did not, which meant it was a problem in the hardware not the codecs, module or model.
The codec of my sound card is using on Ubuntu 11.10 is 'STAC92HD73', I added the following option to my alsa-base.conf file and rebooted.
#add this at the end of /etc/modprobe.d/alsa-base.conf
options snd-hda-intel model=no-jd
After reboot sound is coming out from both laptop speakers and headphone jacks (at the same time, but no biggie just go to sound settings and select 'analog headphones' for output when only listening to headphones, also make sure analog speakers is selected for output after reboot), it seems the headphone jack-detection broke and that is why sound was not comming out of the speakers. Adding the no-jd (no jack detection) fixed the issue.
Hope this helps, it was driving me nuts for the last two weeks.