I have a keyboard, which I run through the line-in port in the back of my computer. There is static coming from my speakers when I unmute the line-in port, but when I mute the port, the static goes away. I've done some research on it, and it's not a ground loop. Also, the output from my keyboard works fine whenever its plugged into anything else.
It would probably be best to mention that a little while back, I accidentally shorted out my onboard audio. I am now running off of a pci audio card.