Do first check all Windows' sound controls are ON. And look in Control Panel, Hardware, Device Manager to check if sound circuitry is present and no fault is flagged up.
Most likely a software issue. Look for a new driver pack for the laptop from HP/Compaq support site. And refresh the sound driver in Device Manager.