Posts: 1
Joined: Fri Nov 15, 2019 9:09 pm

No sound through HDMI

Fri Nov 15, 2019 10:11 pm

I know this has been posted tons of times, but i seriously can't make work any of the solutions, so here I am.

I have a Raspberry pi 4 B. I installed Raspbian from the image which includes LXDE. I don't think I have made anything that could have break some part of the audio system. The only "weird" thing I did was changing from LXDE to XFCE.
But here is my situation. Audio works just fine with the headphone jack but I can't make it work under HDMI.

All post i have found basically say the same as the two pages I have followed:
First i tried these steps: https://www.raspberrypi.org/documentati ... -config.md
Using raspi-config I realized the headphone jack worked just fine. But forcing audio output to hdmi didn't work with any of the three methods.

Then i tried these guide: https://elinux.org/R-Pi_Troubleshooting#Sound
- I tried all three options mentioned in Sound does not work with an HDMI monitor but nothing.
- All three tests failed for hdmi in the section More reasons why sound does not work with an HDMI monitor
- Section No sound card present, the card is present just fine:

Code: Select all

[email protected]:~ $ amixer controls
numid=3,iface=MIXER,name='PCM Playback Route'
numid=2,iface=MIXER,name='PCM Playback Switch'
numid=1,iface=MIXER,name='PCM Playback Volume'
numid=5,iface=PCM,name='IEC958 Playback Con Mask'
numid=4,iface=PCM,name='IEC958 Playback Default'
- I know alsa-utils is installed and kernel module is loaded, but tried the section Sound does not work at all, or in some applications anyways to no effect.
- I also tried removing pulseaudio but it didn't work so i installed it again.

Here are the output from some commands in case they are useful for anything:

Code: Select all

[email protected]:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code: Select all

Module                  Size  Used by
evdev                  24576  0
joydev                 20480  1
hid_sony               32768  0
ff_memless             16384  1 hid_sony
hidp                   24576  1
bnep                   20480  2
hci_uart               40960  1
btbcm                  16384  1 hci_uart
serdev                 20480  1 hci_uart
bluetooth             389120  29 hidp,hci_uart,bnep,btbcm
ecdh_generic           28672  1 bluetooth
fuse                  110592  5
brcmfmac              311296  0
brcmutil               16384  1 brcmfmac
sha256_generic         20480  0
vc4                   176128  13
v3d                    61440  12
gpu_sched              28672  1 v3d
drm_kms_helper        184320  2 vc4
cfg80211              614400  1 brcmfmac
rfkill                 28672  6 bluetooth,cfg80211
drm                   442368  26 v3d,vc4,gpu_sched,drm_kms_helper
snd_soc_core          192512  1 vc4
bcm2835_codec          36864  0
bcm2835_v4l2           45056  0
snd_compress           20480  1 snd_soc_core
drm_panel_orientation_quirks    16384  1 drm
v4l2_mem2mem           24576  1 bcm2835_codec
raspberrypi_hwmon      16384  0
hwmon                  16384  1 raspberrypi_hwmon
snd_pcm_dmaengine      16384  1 snd_soc_core
syscopyarea            16384  1 drm_kms_helper
bcm2835_mmal_vchiq     32768  2 bcm2835_codec,bcm2835_v4l2
sysfillrect            16384  1 drm_kms_helper
videobuf2_dma_contig    20480  1 bcm2835_codec
v4l2_common            16384  1 bcm2835_v4l2
videobuf2_vmalloc      16384  1 bcm2835_v4l2
sysimgblt              16384  1 drm_kms_helper
videobuf2_memops       16384  2 videobuf2_dma_contig,videobuf2_vmalloc
fb_sys_fops            16384  1 drm_kms_helper
videobuf2_v4l2         24576  3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common       45056  4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
snd_bcm2835            24576  1
videodev              200704  6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
snd_pcm               102400  4 vc4,snd_pcm_dmaengine,snd_bcm2835,snd_soc_core
vc_sm_cma              36864  8 bcm2835_mmal_vchiq
media                  36864  3 bcm2835_codec,videodev,v4l2_mem2mem
snd_timer              32768  1 snd_pcm
snd                    73728  7 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
rpivid_mem             16384  0
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
fixed                  16384  0
i2c_dev                20480  0
ip_tables              24576  0
x_tables               32768  1 ip_tables
ipv6                  450560  46

Also. I'm pretty sure it's not a problem from the cable or the tv, since I tested both with a pc running Archlinux and they work just fine.
I didn't test the audio before switching DE (probalby should have...), but the only thing i can think of that XFCE and pulseaudio are somehow intervening with some configuration of raspbian, but I don't where to look.

Any ideas of what I could try?

Thanks in advance!

Posts: 2144
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: No sound through HDMI

Sat Nov 16, 2019 6:45 am

post the contents of your setup's /boot/config.txt file
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24133
Joined: Sat Jul 30, 2011 7:41 pm

Re: No sound through HDMI

Sat Nov 16, 2019 7:46 am

Think you need to check things when running the standard desktop , the audio plugins for that are custom for the Pi.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Posts: 131
Joined: Mon May 11, 2015 6:41 pm
Location: Chicago, USA
Contact: Website

Re: No sound through HDMI

Sat Nov 16, 2019 8:51 am

One possible reason is that, by default, only ONE of the HDMI connectors supports Sound, not both.

Try moving your cable to the second HDMI connector and that should resolve the issue. If not, then ... difficult to tell.

I struggled with the same issue as well :)
Last edited by jb63 on Sat Nov 16, 2019 2:40 pm, edited 1 time in total.

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7533
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: No sound through HDMI

Sat Nov 16, 2019 10:58 am

With the default configuration one alsa device can be routed through one of analog, hdmi0, or hdmi1. I'm not sure of the historic reasons for that decision.


Code: Select all

snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_compat_alsa=0
to /boot/cmdline.txt and it'll create independent devices for each output.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Beginners”