Get good quality analog audio from your Raspberry Pi for cheap.
The analog audio out from Raspberry Pi produces a really poor sound quality. So if you want to use your Pi as an audio player you need a sound card. It can be a USB or I2C. For plug’n’play there’s Hifi Berry, pHAT DAC and several others.
If you’re too cheap for a DAC HAT, you can get your hands on a PCM5102A chip from your not so local Chinese electronics supplier of choice for $5. Wire or solder it to your Raspberry Pi and enjoy quite good sound quality from your Pi.
Connect the DAC to the Pi like so:
|3V3||10kOhm resistor -> XMT|
|XMT||10kOhm resistor -> 3V3|
Raspberry Pi Zero W + PCM5102A + Volumio
Credits: Björns techblog