my problem was the same. I had sound with the laptop speaker (dell inspiron 1300), but not the headphone.
it was strangely solved simply by 'invoking' the alsamixer via the command line (put 'alsamixer' without quotes in the terminal and an alsamixer popped up). I planned on trying a solution previously mentioned in the last reply in this thread, but it was not necessary because I tried to see if the sound worked and to my surprise, it did.
thanks to Rig'dzin Dorje. even though my solution was not exactly what he prescribed, I never would have stumbled upon it if he would not have posted his suggestion.