In that diagram the ground is coming from the power strip. You can get ground from the pi if you choose.
Here's another diagram I've made. This is how I usually do it. I never use a filter. Getting ground from the pi and I wrap it with the audio wire. Seems to help a bit with interference.
Hi, i will use this wiring, thanks for adding the picture.
I was also curios if the volume wheel should be before or after the amp.
I also have a tiny coax cabel i probably will use as audio wire.