I am building an application where the sound needs to be over the 3.5mm jack and video over HDMI.

However, sometimes it does send the sound over HDMI and 3.5mm jack. And sometimes it just uses HDMI only.

How can I force the sound always goes over 3.5mm jack (I do not care if the sound gets duplicated over HDMI, I will turn of the TV sound)?

Thankyou, Rick

  • Have a look here at hdmi_drive and hdmi_group settings for /boot/config.txt. I haven't tested or looked into this, but at a guess, using DMT may exclude the sound from HDMI (and hdmi_drive=1 definitely will), which may mean it goes out via the headphone jack.
    – goldilocks
    Jan 31 '17 at 14:37

use rasp-config to force sound in 3.5 jack. To do so use below commannd

sudo raspi-config

and then select

9 Advanced Options             Configure advanced settings 

and then select

A9 Audio        Force audio out through HDMI or 3.5mm jack

and finally

1 Force 3.5mm ('headphone') jack

For those looking to achieve the same result from the command line, here is the extract from the documentation:


The following command, entered in the command line, will switch the audio output to HDMI:

amixer cset numid=3 2

Here the output is being set to 2, which is HDMI. Setting the output to 1 switches to analogue (headphone jack). The default setting is 0 which is automatic.

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.