these lines worked with my ubuntu 9.10 installed in compaq cq40.

edit your /etc/modprobe.d/alsa-base.conf and add the following lines

options snd-pcsp index=-2
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=dell-m4-1
options snd-hda-intel enable_msi=1

* use alsa in sound configuration