If you recently installed Ubuntu or an Ubuntu based distribution and have no sound, you are sure your sound card has been detected, you have tried all the other volume settings you can think off, install pavucontrol from the terminal.
Pavucontrol is a volume control for PulseAudio. Pavucontrol has helped me on quite a few occasions to restore my sound after installing a new distribution
To install pavucontrol open your terminal and enter the following command
sudo apt-get install pavucontrol
After installation launch pavucontrol from the terminal or from your distribution programs menu
pavucontrol
Select the Configuration tab, and then from the Built-in audio drop down menu, select the device from the list.
However for some reason pavucontrol does not save my changes, so I need to keep going back to pavucontrol everytime I restart my machine to select the device all over again.