Unfortunately, there are many things that might be going on. Here are a few things to thin about:
- Make sure that no DC grounds are connected with the 220v "ground"
- PSU might be failing, so try with a known good PSU
- Try using a typical arcade cab PSU, "Peter Chou" type, that provides both 12v and 5v power. They are not expensive.
- getting a separate PSU for your amp is a good idea to try
- Fit a line filter to your AC power inlet. This will help reduce electromagenetic interference from power lines (and reduce any interference your devices may put back)
- Maybe your Pi4's power regulation is crap. Try the amp with something else to rule this out.
- Long power lines can lose voltage over distance. A capacitor (say 100-470uF) at the device end, across the positive and negative power input terminals, can help to smooth out voltage variations as power demand fluctuates
- Long signal transmission lines can lose signal strength over distance. Worse, they can act as radio antennas. Use well-shielded (or high capacity, thick) signal cables and keep the lengths short.
- You could fit Zobel termination to your speakers to remove a lot of unwanted noise/static/oscillation: a simple way to do this is add a capacitor (say, 0.1uf (104) ceramic) and then a resistor (say, 10 ohm/1W+ rated, metal film or carbon film type, not wire wound type) across the positive and negative terminals (Values are suggestions only, exact values for your application may vary) So that your diagram looks like this:
POSITIVE(+)......CAPACITOR......RESISTOR......NEGATIVE(-)
As always, any home-baked advice I give is provided on the basis of all care but no responsibility. If you do something I suggest and your world turns into something FUBAR, please don't blame me
Cheers