My girlfriend had this exact same problem with her HP Pavilion Desktop. It was an easy fix, once we figured out the problem. Your computer uses an onboard sound chip (rather than a PCI card) that processes sounds and music. On Compaqs and HPs and I expect on others, these little chips (for whatever reason), do not typically like Service Pack 2. Even after we updated her drivers we could not install SP2 successfully. It could be something else like a needed BIOS update, but my money is on the sound chip.
You should first ask Compaq if there is a way to correct this by using one of the support links on their website (http://www.compaq.com
' ">http://www.compaq.com). If I were you I would probably try to "Chat with a Support Specialist". If they give you some bull-crap answer like "A fix is in the works..." then go ahead and try my next recommendation. If they have yet to fix any issues with SP2, then they are probably not going to fix them at this point.
If you want to use your computer with Windows XP SP2, you will probably have to go and buy a new sound card. You can find a good deal on one at Wal-Mart (about $30), or at a computer parts store. You then need to go into the BIOS (usually by pressing the delete key, or one of the F1-F9 keys right when the computer starts up), and change the setting for your onboard sound processor so that it is turned off. I do not know how your particular BIOS is set up, but you will probably find the setting you need under "Onboard Devices" or something similar.
Once you have disabled the onboard sound, you should save and exit from the BIOS screen, turn the computer off, install the sound card into a free PCI slot (the only ones that the card will fit into). Now boot up your computer, and install the software that came with the card. Now install Service Pack 2. Everything should be in working order. And, if it isn't, at least you have a good sound card now. Plus we've eliminated one possibility off of the list. The only other possibilities should be a needed BIOS update or a driver update, both of which can be downloaded from Compaq's website.
Hope all this helps.
AMD Opteron 165 CCBBE (2.7GHz @ 1.35v)
DFI CFX3200-DR (07/28)
Kingston HyperX DDR500 (3-3-3-8-1T)
Asus Dark Knight Radeon 4870 1GB
2x 74GB Western Digital Raptors in RAID0
500GB SATA-300 WD Drive
CoolerMaster RealPowerPro 850W
NZXT Zero full-tower case
Windows XP Pro SP2