Here is the second method for most Compaq CQ which the sound disappear after restart.
this solution regarding to audio works after installing batch file KB835221.
Download the CQaudiosolution: (Link fixed on March 22 2015)
Inside the RAR file there is an audio patch and devcon patch file. Devcon file will solve issue with KB835221 (missing PnP function id). Follow the given instruction below
a) You must install two patches first from Microsoft: KB835221 (UAA version 1.0) and then kb888111 (UAA update version 1.0a)
b) Install the IDT HD Audio driver (you can use your Vista driver from HP site as well)
c) Extract CQAudioSolution.rar you've downloaded
d) Extract devcon.exe self-extracter from Devcon folder extracted in c)
e) Copy devcon.exe from extracted folder in (d) to C:\WINDOWS\SYSTEM32
f) Run Audio path from extracted Audio Path folder in c)
h) You should be able play sound with IDT HD Audio after restart.
However, in Device Manager, there is a exclamation icon on "Audio Device on High Definition Audio Bus". This is installed by KB835221 patch. Just ignore it. The CQAudioSolution will make sure that there is no more issue with missing IDT HD Audio when restarting after installing the IDT HD Audio driver.