I bought myself a new HP Pavilion dv5 notebook because my old Lenovo broke. It's a bit too shiny for my taste but anyway. Installing the new Ubuntu was a breeze. After installing I noticed that audio playback using the speakers didn't work. Too bad. So here's the solution that worked for me.

Open /etc/modprobe.d/alsa-base.conf and add the following lines at the end of the file: