In response to everyone on this thread, perhaps reading of my experience will assist you.
I upgraded to Lion about a week ago and had full use of both the headphone jack and internal speakers. Yesterday, I ran disk utility on the new recovery partition that Lion creates during installation (restart and hold Command-R). I verified my startup disk and repaired permissions. While doing this I had my speakers plugged in to my headphone jack.
I noticed about an hour later that the headphone jack output worked fine but when unplugged, I got no audio from the internal speakers. I could see the red light for the optical audio inside the headpone jack and when i tried to change the volume level the volume controls were locked, such as they would be if I was using the optical audio capabilities of the computer.
This expereicnce led me here and other places on the web, but no solution was found. Today, just for the heck of it, I restarted to the Lion recovery partition and ran disk utility again, this time with nothing plugged in the headhhone jack, and viola!, my internal speakers work again!
So if this issue remains unresolved for any of you, startup to the recovery partition and try some things! Perhaps it will fix the issue as it has for me. Well it started the problem as well, but that is another thread...