I've built a little soundmachine using a Raspberry Pi 3, the Adafruit MAX 9744 Amp and two recycled Car-Stereo-Speakers. Since this installation is ment to be used on a boat, I have an incoming 12v current. To reduce the voltage down to 5v for the Pi3 I use a DCDC stepper. The wiring can be seen in the poor diagram attached ;)
The Amp runs on 12 volts, so it is directly connected to the power source. For if it matters, here at home I'm using an AC/DC stepper (to simulate the boat battery) which turns the local 230 volts AC into 12 volts DC.
On to the problem. When I connect this setup I hear a very audible humming in the speakers. When I disconnect the audio jack from the PI and I use my phone as an audio source, the humming disappears.
I should mention that the picture doesn't show the entire setup. The 12 volt power source feeds another DC/DC stepper which in turn sends 7.5 volts into an arduino. Also a I have used the same power curcuit to feed 12 volts via Power over Ethernet into a device. Since I believe (or rather hope) that these do not have anything to do with the problem at hand, I didn't include them.
I'm a beginner when it comes to electronics, please take this into account when providing a solution ;)