Depending on the age of the XP hardware, there are some older sound modules that are not Windows 7 compatible. If the sound hardware was compatible, Windows, in most cases, will at least install the generic, basic function, "High Definition Audio Driver". If that was not installed, there is a good chance the XP hardware is not compatible. (And in almost all cases the XP sound driver is not Windows 7 compatible. You need at a minimum Vista specific sound drivers).
If the sound device is not compatible, your ONLY option is to install a Windows 7 sound card (if this is a desktop) or a USB connected sound card. Compatibility was a major issue back when Vista came out as there were many users that upgraded to Vista only to find out the sound hardware was not compatible.