I had a similar problem with my old Gateway. Anytime we recorded from an external source with the laptop plugged into wall
power, it buzzed like a swarm of angry bees. Assuming that it was a
ground loop, I proceeded to lift the
ground on the
line feeding the laptop, but it did not fix the problem. I had this same issue in multiple venues so then I knew it wasn't dirty
power or a bad
ground. I tested it with multiple sources, mics, mixers, headphone jacks,
etc. I had also tried it with balanced and unbalanced mics so I know it wasn't a balancing issue. I could record on battery and it was clean as a whistle, but the battery was getting old and was just barely making it
thru a show. When I discussed this with the school's IT department, I was told that they had received multiple complaints about this and had determined that on this particular model of computer, the sound card and the
power supply were too close together and AC present in the
Power supply when the laptop was plugged in was creating a buzz on the sound card circuits. Since batteries are DC there was no buzz when operating on battery. While I was a
bit skeptical, they upgraded my laptop to the newer model and the problem went away. Since then I have put an old laptop and a new laptop right next to each other, the old one buzzed, the new one didn't. I guess the new laptop's
power supply is across the board from the sound card. I don't know if this could be your problem but it may be something to consider. Using firewire or USB would also solve the problem, because the digital stream wouldn't be affected by the AC bleed, but reqires the expense of an external firewire or USB source.
Matt