0

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.

1 Answer 1

2

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

dtoverlay=audremap,pins_12_13

Test using:

speaker-test -c2

Info:

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
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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