Sound not working, dummy output

Crackling, poor quality, no sound and only pulseaudio dummy listed  


First find out which sound card you are using:
cat /proc/asound/card0/codec* | grep Codec

Look up your model here:
zless /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz

Or visit:
http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt

Edit the following file:
vim /etc/modprobe.d/alsa-base.conf

Add the following line at the end:
options snd-hda-intel model=[PUT YOUR MODEL HERE]

Finally run:
sudo alsa force-reload


Still no audio?

Run the following:
sudo apt-get remove --purge alsa-base
sudo apt-get remove --purge pulseaudio
sudo apt-get install alsa-base
sudo apt-get install pulseaudio

NOTE: If you're running Xubuntu, you may need to install the following, after removing/purging packages:
xubuntu-desktop ubuntu-desktop

REBOOT!