PJ – Disable PCM GPIO audio and use the headphone jack instead

This short guide will allow you to PJ in situations where you’d want to use the headphone jack with an external stereo amplifier instead of the built in JAMMA mono output

Write your image to the SD card as normal. When finished, take the SD card out of your PC and insert it back in. You should see a boot directory under the drive representing the SD card. Go into the directory and find a file called config.txt. Make a copy of it so you can replace it if something goes wrong. Next, you will need to edit this file so you will need to open it with Wordpad.

Comment out (disable) the following settings by putting a ‘#’ in front of the following lines:

dtoverlay=pwm,pin=18,func=2

On a Pi4, you may have to disable to following lines:

audio_pwm_mode=2
dtoverlay=audremap,pins_18_19

Save the file, eject and take your card out of your PC and insert it back into the Raspberry Pi. After restart the audio will be configured to go out the headphone jack which is the default setting.