Originally Posted by mossman
The whining noise means that the head unit isn't grounded very well. Try attaching the ground(black wire) to something metal that is touching the chassis of the car. If the problem still persists, the head unit is probably defective.
W3rd. Try to get a strong ground. Problem is, your wires are picking up engine noise electrically, and that's why you can hear it through the speakers.