Ok I'm done, I finally have my sound working on my HP pavilion dv7 2150ez with Ubuntu 9.10 Karmic Koala; Both speakers are working and they switch off when I plug my headphones.
So for the record here is what I did:
I updated my BIOS; that did not do the trick
I updated my alsa to version 1.0.21; that did not do the trick
I edited my alsa-base.conf and added the enable_msi=1 option: that did not do the trick
So I finally installed the alsa-driver-snapshot.tar.gz as described here
and edited the alsa-base.conf file and added
options snd_hda_intel model=hp-dv5
(and not options=hp_dv5 as I read in a few threads)
and that did it.
The bottom line is; when everything else fails, read the doc!
It was right there under my eyes but read the section about dv7 ignoring the one about dvxx. When I tried the section about dvxx (dv7 is, afterall, a dvxx), everything fitted.
Next step: getting HDMI working...