I am trying to get sound out from a Raspberry Pi zero with RaspiOS bullseye. I have enabled the alternate functions and use a RC filter to get an audio signal to some earbuds. However when I try to play anything using aplay it doesn't work.

I have the following clues:

I made sure that dtparam=audio=on is present on config.txt.

When I try to force 3.5mm from raspi-config menu it seems that there is some problem. When I click "S2 Audio" the screen flashes for a few seconds and it goes back to the main raspi-config page.

When I try alsamixer I only get HDMI as an option. The same happens when I run aplay -l

Any idea on what can be wrong? I tried reinstalling the OS several times and it didn't help.

2 Answers 2


You need to add the following to config.txt (assuming you are using PWM 12 and 13):


Test using:

speaker-test -c2


pi@raspberrypi:~ $ dtoverlay -h audremap
Name:   audremap

Info:   Switches PWM sound output to GPIOs on the 40-pin header

Usage:  dtoverlay=audremap,<param>=<val>

Params: swap_lr                 Reverse the channel allocation, which will also
                                swap the audio jack outputs (default off)
        enable_jack             Don't switch off the audio jack output
                                (default off)
        pins_12_13              Select GPIOs 12 & 13 (default)
        pins_18_19              Select GPIOs 18 & 19

I had success by adding the following to config.txt:

note this only enables audio out on GPIO 18 which is the only output available on all models (see README.TXT in config.txt directory

Enable audio (loads snd_bcm2835)

dtparam=audio=on dtoverlay=audremap,enable_jack dtoverlay=pwm-2chan,pin=18,func=2

Until I added the "enable_jack" parameter, the only audio out option was the HDMI option... 

The "pins_18_19" did not work , had to use the `dtoverlay=pwm-2chan,pin=18,func=2`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.