I recently (3 days ago) installed ubuntu 11.10 and have spent the entire time looking for ways to activate the sound. I am completely new to ubuntu/linux and would love some help on this. I am running an hp pavilion dv6.
I have the same computer as you. I even had the same problem with the audio playing out of the headphones and the speakers! I looked everywhere for a fix and kept coming up short in my search for an actual solution. I finally found it. Short answer if you have an HP Pavilion dv6-2155dx all you have to do is this.
Enjoy beautiful sound and Ubuntu!
All thanks to a post on this website.
first try looking in system settings to see if the volume is set to mute! if it is not then keep reading :-)
This link is specific to your problem http://ubuntuforums.org/showthread.php?t=1546959 and aslo this http://ubuntuforums.org/showthread.php?p=9664708 though the first link which is useful the problem was soleved by a fresh install! though the second succeeded with some work! and welcome to the Ubuntu club :-)