Getting Analogue Sound Working on Raspberry Pi 3B+ / Raspbian Stretch

I’ve been testing the Raspberry Pi 3B+ with Raspbian Stretch recently. I have a few older Raspberry Pi 3 devices around the house, but these are all running RasPlex and connected via HDMI to a TV – these devices have always worked perfectly (and impressively  well considering their cost) when playing high bit-rate 1080p video with lossless HD surround sound.

The same cannot be said for getting analogue audio working in Raspbian O/S- to say this has been a “journey of discovery” for something so simple would be an understatement. Out of the box I could not get Chromium, omxplayer or any applications to play sound via the Analogue audio jack.

Nevertheless, with some “tweaking” I now have analogue audio working across  Chromium, omxplayer and other applications. Instructions follow…

First we will set configuration in /boot/config.txt

# Force HDMI to operate in DVI mode
# Pretends all audio formats are *unsupported* by HDMI display, i.e. use analogue jack
# Force use of newer audio driver for RPi, not sure actually needed on stretch/ 3B+

With the above in-place, following a reboot, I had sound in omxplayer, but Chromium and other applications continued to be silent.

The final piece of the puzzle was to use the command below to set output to the Analogue jack:

# Force audio through analogue jack, needed for audio_pwm_mode=2 driver
amixer -c 0 cset numid=3 1

Next challenge, hardware acceleration for video in Chromium itself… this looks like a mess on Linux at the moment, so I am unlikely to sort this with a few config file changes!