Unable to force sound to headphone jack RPI 4

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
gofireworks
Posts: 3
Joined: Wed Jul 29, 2020 3:17 am

Unable to force sound to headphone jack RPI 4

Post by gofireworks »

Hello, I have a raspberry pi 4 running the latest version of DietPi (v6.31.2). I have it plugged in to my TV through an HDMI cord, and to my speakers through the 3.5mm jack. I would like to force the audio through 3.5mm so that I am able to use shairport-sync and play audio without having to turn on the TV, but I am unable to do so. I have set the audio to force 3.5mm through the use of dietpi-config > audio options > sound card > rip-bcm2835-3.5mm (also see image below), but no sound comes through until I turn on the TV. Is this an issue with shairport-sync that I need to configure, or something else?

I appreciate any help!

Screen Shot 2020-07-28 at 8.22.57 PM.png
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unable to force sound to headphone jack RPI 4

Post by MichaIng »

Many thanks for your report.

Did you reboot one time after applying the sound card selection?

Can you paste the output of amixer -c 0 contents (in case after reboot if 3.5mm output still does not work).

And in case try to add hdmi_drive=1 to /boot/config.txt and reboot another time. This forces DVI mode which disables HDMI sound from the other side.
gofireworks
Posts: 3
Joined: Wed Jul 29, 2020 3:17 am

Re: Unable to force sound to headphone jack RPI 4

Post by gofireworks »

I did not reboot, but after doing so I have not been able to force 3.5mm. I've added the hdmi_drive=1 line, reboot, and I actually lose all sound coming from the Pi, even when the TV is on.

The contents of amixer -c 0 contents are as follows:

Code: Select all

numid=2,iface=MIXER,name='HDMI Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=1,iface=MIXER,name='HDMI Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
  : values=2
  | dBscale-min=-102.39dB,step=0.01dB,mute=1
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unable to force sound to headphone jack RPI 4

Post by MichaIng »

Strange. hdmi_drive=1 disables HDMI sound the other way, so it makes sense that you loose all sound then.

What is strange is that numid=2 is not shown in your amixer output as this is what usually switches between 3.5mm, HDMI and auto: https://www.raspberrypi.org/documentati ... -config.md

If you again comment/remove the hdmi_drive line, does amixer -c 0 contents still only show those two switches?

And just to assure: dtparam=audio=on is set in config.txt, right?
gofireworks
Posts: 3
Joined: Wed Jul 29, 2020 3:17 am

Re: Unable to force sound to headphone jack RPI 4

Post by gofireworks »

Yes, I get the same results from amixer after uncommenting the hdmi_drive line

The portion in config.txt is also set to on, as well: dtparam=audio=on
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unable to force sound to headphone jack RPI 4

Post by MichaIng »

Hmm, probably this needs to be configured differently on RPi4 (although never heard of an 3.5mm issue) or hardware issue?
Btw you can follow any Raspbian/Raspberry Pi OS instructions you find.

Just checked raspi-config and they do the same: https://github.com/RPi-Distro/raspi-con ... 1724-L1737

Ah did we already check if onboard audio is really card 0 or if something else occupied that ID? Please paste the output of:
aplay -l
aplay -L
Post Reply