Audio through analog 3.5mm Jack

Hey guys,

I’m trying to force audio through the 3.5mm Jack but it keeps playing form the HDMI cable. I’m already using
amixer cset numid=3 1 in the config.txt but it didn’t have any effects.

I use a RaspberryPi3 and Resin OS 2.10.1+rev1 (prod). I’m also using ALSA which may be the problem and forces it back to HDMI.

If anyone had the same issue or does know any other way to force audio (maybe through the resin dashboard as a varibale) I would be super thankful!

Hi @fabianio!

One of the things that might be useful to look at is this documentation on how to modify the config.txt remotely through the dashboard: – that’ll make it much easier to reproduce things going forward.

To select the mini jack for audio output, you can run amixer cset numid=3 1 on the command line, adding it to config.txt doesn’t really do anything.

You can test this out by connecting to the device terminal by going to the dashboard, clicking on the device in the list, and on the right hand side connect to your application terminal and running the command there.

Let me know if that works!


Thanks a lot, by running amixer cset numid=3 1 through the command line it worked as expected!


Is there a way to run this command after each boot of the device? I tried it trough a Dockerfile.template but it was always fired while pushing to resin master while amixer is undefined. Thanks!

@fabianio probably the best route would be have a bash script that is in your CMD which will first run this command and then run your actual code. You can see something similar in our boombeastic wifi speaker example:

That project also actually sets up the asound.conf here: to route audio to the correct audio device, so that might be something to look at as well.

@shaunmulligan Thanks for the links! I got it working just by calling a through my package.json like so:

"scripts": {
    "preinstall": "bash",
    "start": "bash"

and then inside the i call the amixer and after that i start my app


amixer cset numid=3 1
node /usr/src/app/server.js

Thanks again!