Back in the day of the Raspberry Pi 1 B+, if you didn't want to route audio through the HDMI cable it was a good idea to use a USB sound card, because audio out of the headphone jack tended to get a little scratchy. Is this still the case with the Raspberry Pi 3 B+?
Judging by schematics the audio output circuit has not changed. It is definitely the same in Pi3 and Pi2, however in Pi1 this portion is omitted from the public schematics, but I have no reason to believe its different.
This is a very simple audio output circuit that smooths PWM from the CPU through a bandpass filter @ 33Hz-15KHz.
Additionally this shares a ground with other portions of the board, and there is digital noise and supply noise that is induced onto the output.
You may get slightly better fidelity with a cleaner power supply, but a dedicated audio output device is still your best bet.
There Two Channels, references for L channel
R60is a divider used to take
U11is an ONSemi NC7WZ16 (datasheet) fast buffer (x1 Amplifier) with characteristics suitable for fast PWM.
R16,R17,C59,C58form the bandpass filter
C59form the low-pass portion of the bandpass, at
C58form the high-pass portion of the bandpass, with
J7is the output jack
D4is actually a protection diode for the composite video out, quietly visible only as net label
It really depends on what you intend to use it for, but the on-board audio is definitely "not hifi". For a beep or voice prompt, it may be fine. Your most obvious options are:
- Use HDMI out if you have an amp, receiver, adaptor or TV that will accept it. Clean, and cheap solution if it works for you.
- Use a USB sound card. These are cheap but do add to the clutter a bit.
- Use a DAC, usually in the form of a HAT module mounted on the RPi. A bit more compact and clean, and high quality audio. A lot of options for on-board amps and connector types.
It is true that the Raspberry Pi audio is not top-notch quality. However, the answer to your questions also depends on the USB sound card. I've found that a low-end USB sound card suffers from the same problems as the Raspberry Pi.