Possible causes:
-a software problem -try reinstalling the latest drivers for your sound card.
-maybe your 40 GB hard drive has the same version of windows installed on it and when you connect your 40GB HDD your system boots from it.You should set your old hard drive as Master and your new HDD as Slave or format the new HDD.Your computer will boot now from your old HDD and normally it shouldn't have problems with sound because when you connect a HDD it doesn't affect your audio drivers.
-when you connected your HDD you damaged your sound card.