therealmoby
Posts: 5
Joined: Wed Aug 07, 2019 8:42 am

Pi4 - No hdmi audio

Wed Aug 07, 2019 10:07 am

Hi,

Got my pi4, got official white hdmi cable. Cannot get sound over hdmi working.

No sound using libreelect or raspbian. analog lineout sound works.

The pi3 sound worked for me over hdmi.

So what could be the problem? What can I do to troubleshoot this? Is it possible there is an issue with compatibility with the pi4 and my cheap tv?

Any help appreciated. I presume everyone else has sound over hdmi working with a fresh libreelect flash.

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

Re: Pi4 - No hdmi audio

Wed Aug 07, 2019 10:20 am

We've had a couple of reports like this. It's odd. I can only presume that the tv EDID is defective.

Can you do

Code: Select all

tvservice -d edid.bin
base64 edid.bin 
and C&P the results here so I can test it?

Also, you could try adding

hdmi_force_edid_audio=-1

in config.txt
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

therealmoby
Posts: 5
Joined: Wed Aug 07, 2019 8:42 am

Re: Pi4 - No hdmi audio

Thu Aug 08, 2019 8:37 am

Hi there, thanks for your help, I tried what you suggested, still the same.

Code: Select all

[email protected]:~ $ tvservice -d edid.bin
Written 256 bytes to edid.bin
[email protected]:~ $ base64 edid.bin
AP///////wBjGAAAAAAAABcYAQOAAAAACtelollKliQUUFSjCADRwLMAgQCBgIFAgcABAQEBBHQA
MPJwWoCwWIoARBd0AAAefyFWqlEAHjBGjzMAP0MhAAAeAAAA/QAyTB5QEAAKICAgICAgAAAA/ABB
QUEKICAgICAgICAgAQwCAy50UJAFBAMHAgYBHxQTEhYRFSApCQcDFQdQVwcAgwEAAG0DDAAQAAA8
IABgAQIDAR0AvFLQHiC4KFVAxI4hAAAeAR2A0HIcFiAQLCWAxI4hAACejArQiiDgLRAQPpYAE44h
AAAYjArQkCBAMSAMQFUAE44hAAAYAAAAAAAAYA==

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

Re: Pi4 - No hdmi audio

Fri Aug 09, 2019 3:36 pm

therealmoby wrote:
Thu Aug 08, 2019 8:37 am
Hi there, thanks for your help, I tried what you suggested, still the same.

Code: Select all

[email protected]:~ $ tvservice -d edid.bin
Written 256 bytes to edid.bin
[email protected]:~ $ base64 edid.bin
AP///////wBjGAAAAAAAABcYAQOAAAAACtelollKliQUUFSjCADRwLMAgQCBgIFAgcABAQEBBHQA
MPJwWoCwWIoARBd0AAAefyFWqlEAHjBGjzMAP0MhAAAeAAAA/QAyTB5QEAAKICAgICAgAAAA/ABB
QUEKICAgICAgICAgAQwCAy50UJAFBAMHAgYBHxQTEhYRFSApCQcDFQdQVwcAgwEAAG0DDAAQAAA8
IABgAQIDAR0AvFLQHiC4KFVAxI4hAAAeAR2A0HIcFiAQLCWAxI4hAACejArQiiDgLRAQPpYAE44h
AAAYjArQkCBAMSAMQFUAE44hAAAYAAAAAAAAYA==
So it looks like your monitor is 4k (3840x2160p30), is that correct? The EDID seems to say audio of various sorts is supported, so not sure what the problem might be.

Edit: Think I can replicate this - using your EDID on my 1920x1200, I obviously don't get video, but I also don't get audio. Will take a closer look Monday with an actual 4k display.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

therealmoby
Posts: 5
Joined: Wed Aug 07, 2019 8:42 am

Re: Pi4 - No hdmi audio

Wed Aug 14, 2019 4:44 am

Hi,

Yes my TV is at 4k 30p, did you get a chance to have a look? let me know if you need anymore information.

Thanks again.

Cassboo
Posts: 1
Joined: Fri Aug 16, 2019 3:18 pm

Re: Pi4 - No hdmi audio

Fri Aug 16, 2019 3:23 pm

I have same issue with desktop kit.
NEITHER HDMI cables get sound working using a SONY Bravia TV as monitor.

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

Re: Pi4 - No hdmi audio

Mon Sep 09, 2019 4:51 pm

OK, after much gnashing of teeth we have got to the bottom of the OP's issue.

The EDID supplied is bad. Whatever monitor the OP is using is sending back an EDID that has a bad data offset number inside, which causes the parser to think that the device is DVI (amongst other nasties), which obviously turns off audio (no audio on DVI). it also means that various other blocks of data in the file past the error point will be corrupted, if they are used.

Sorry, but there is very little we can do about a device that is sending back incorrect EDID data. We've discussed if there is anything we can do to mitigate this, but haven't come up with any ideas.

Would be interesting to know what the OP's device actually is.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: Pi4 - No hdmi audio

Mon Sep 09, 2019 4:51 pm

Cassboo wrote:
Fri Aug 16, 2019 3:23 pm
I have same issue with desktop kit.
NEITHER HDMI cables get sound working using a SONY Bravia TV as monitor.
Can you, in a command prompt, try "tvservice -s" and report back the result?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: Pi4 - No hdmi audio

Mon Sep 09, 2019 4:54 pm

jamesh wrote:
Mon Sep 09, 2019 4:51 pm
OK, after much gnashing of teeth we have got to the bottom of the OP's issue.

The EDID supplied is bad. Whatever monitor the OP is using is sending back an EDID that has a bad data offset number inside, which causes the parser to think that the device is DVI (amongst other nasties), which obviously turns off audio (no audio on DVI). it also means that various other blocks of data in the file past the error point will be corrupted, if they are used.

Sorry, but there is very little we can do about a device that is sending back incorrect EDID data. We've discussed if there is anything we can do to mitigate this, but haven't come up with any ideas.

Would be interesting to know what the OP's device actually is.
In debugging what was going on, we managed to manually fix the EDID up to report the right information. James has had to leave now, but he'll post that fixed EDID in the morning.
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.

therealmoby
Posts: 5
Joined: Wed Aug 07, 2019 8:42 am

Re: Pi4 - No hdmi audio

Mon Sep 09, 2019 6:53 pm

jamesh wrote:
Mon Sep 09, 2019 4:51 pm
OK, after much gnashing of teeth we have got to the bottom of the OP's issue.

The EDID supplied is bad. Whatever monitor the OP is using is sending back an EDID that has a bad data offset number inside, which causes the parser to think that the device is DVI (amongst other nasties), which obviously turns off audio (no audio on DVI). it also means that various other blocks of data in the file past the error point will be corrupted, if they are used.

Sorry, but there is very little we can do about a device that is sending back incorrect EDID data. We've discussed if there is anything we can do to mitigate this, but haven't come up with any ideas.

Would be interesting to know what the OP's device actually is.

Hi,

The TV is a 55inch veon. It is one of them discount store 4k TVs. The audio works with a pi3, I wonder how come, maybe because I am only using 1080 then so it sends the correct info. So possibly using 1080 audio may work through HDMI, I will try.

Thanks


Thanks again.

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

Re: Pi4 - No hdmi audio

Mon Sep 09, 2019 7:48 pm

therealmoby wrote:
Mon Sep 09, 2019 6:53 pm
The TV is a 55inch veon. It is one of them discount store 4k TVs. The audio works with a pi3, I wonder how come, maybe because I am only using 1080 then so it sends the correct info. So possibly using 1080 audio may work through HDMI, I will try.
It's down to error checking on the edid. Technically the firmware is doing the wrong thing in allowing audio.

It's down to the cea extension. As documented in https://en.wikipedia.org/wiki/Extended_ ... sion_block, the 2nd byte is an offset that specifies where the dtd blocks start. The blocks in between each have a length field.
Drm checks that the length of each of these blocks fits within the defined gap. With your edid, the offset is insufficient, therefore the last of 4 blocks is ignored.

Unfortunately that is the block that is being looked for to determine whether the monitor is an hdmi or dvi one.
It's the offset that is wrong - each of the individual blocks is correct. Trying to decode the dtd blocks also gives gibberish using the offset as provided by the monitor.
Increase the offset by 3 bytes (IIRC), correct the checksum, and drm is happy with it being an hdmi monitor, supports audio, and all the detailed timings are sane.

We're using edid-decode as an edid compliance test, and even it doesn't notice the error - we'll be sending in a patch to fix that to make it easier next time.
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.

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

Re: Pi4 - No hdmi audio

Tue Sep 10, 2019 12:08 pm

This is the edid but with some manual fixes to the errors (use base64 -d to convert to binary)

MPJwWoCwWIoARBd0AAAefyFWqlEAHjBGjzMAP0MhAAAeAAAA/QAyTB5QEAAKICAgICAgAAAA/ABB
QUEKICAgICAgICAgAQwCAzF0UJAFBAMHAgYBHxQTEhYRFSApCQcDFQdQVwcAgwEAAG0DDAAQAAA8
IABgAQIDAR0AvFLQHiC4KFVAxI4hAAAeAR2A0HIcFiAQLCWAxI4hAACejArQiiDgLRAQPpYAE44h
AAAYjArQkCBAMSAMQFUAE44hAAAYAAAAAAAAXQ==


More details on the github issue

https://github.com/raspberrypi/linux/issues/3218
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

rwgent
Posts: 2
Joined: Sat Oct 05, 2019 6:07 pm

Re: Pi4 - No hdmi audio

Sat Oct 05, 2019 6:20 pm

This worked for me:

Edit config.txt

sudo nano /boot/config.txt

Look for these lines:

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

uncomment the #hdmi_drive=2 just remove the # so it looks like this:

hdmi_drive=2

type: ctrl+o then hit enter to save the changes
then type ctrl+x to exit
reboot and try playing sound

therealmoby
Posts: 5
Joined: Wed Aug 07, 2019 8:42 am

Re: Pi4 - No hdmi audio

Sun Oct 06, 2019 3:27 am

rwgent's suggestion worked for me. thanks for that!!!

martin72
Posts: 3
Joined: Fri Jan 06, 2017 9:06 pm

Re: Pi4 - No hdmi audio

Mon Oct 21, 2019 10:02 pm

I've a Raspberry Pi 4 and I've also uncomment the line hdmi_drive=2 but after reboot still no audio at the hdmi. I use a IIyama Prolite XB2783HSU display and at the settings of this display I set the volume to 100% and mute to off.
When I connect a bluetooth speaker to the bluetooth interface then it works well so there's audio available.
Where else can I look to check everything is configured well for sound via HDMI at the Raspberry?

Pikkuiikka
Posts: 6
Joined: Fri Sep 20, 2019 1:52 pm
Location: Finland

Re: Pi4 - No hdmi audio

Fri Nov 22, 2019 7:58 pm

Hello,

rwgent's trick did indeed work for me with my LG TV over several weeks period. Just great sound via HDMI. However - today - after updating the Pi4 with 99 packets, the sound problem is back. The config file had that line 'hdmi_drive=2' uncommented still, but no sound. And it does not matter anymore whether line is uncommented or not.

Another weird thingy in both my problem cases has been (and now existing again), that the volume control slider wants so much to default to "2" when output is set to HDMI. Once and a while have to check and change that, although really doesn't matter because there is no sound now even when set to "100". In my "HDMI audio working period" I did not recognaise that weirdo.

A little bit frustrating, just when you get things percfectly set up. And speaking of that: my Pi setup is very basic, the installation version that has basic software with it - just few added programs including Vivaldi browser, GIMP etc. Pi 4 with 4 GB memory, bluetiooth keyboard (the great Logitech K380), wireless Logitech mouse, no wifi - ethernet instead. A Transcend SSD disk via USB-3.

Other systems hooked to LG TV via HDMI have no problems with audio.

Maybe there is a solution somewhere, keep searching the net...

-iikka

Pikkuiikka
Posts: 6
Joined: Fri Sep 20, 2019 1:52 pm
Location: Finland

Re: Pi4 - No hdmi audio

Fri Nov 22, 2019 8:34 pm

Well well well - guess what? I suddenly realised, that today after moving my Pi setup, I had put the HDMI cable to the connector that sits further away from the power connector. If I remember right, that is HDMI 1, while the connector just beside the power connector is HDMI 0.

So, I shut down the system, plugged my cable to HDMI 0, restarted - and there were sound again! Even without uncommenting the forementioned config option. To be sure, I did the same test with HDMI 1 again - no sound.

So, I don't know if this is how it should be. But if so, my apologies for wasting your time... It could of course be something with my system really (even while it is very standard one).

One problem less in my Pi-world... :roll:

-iikka

HumblePi
Posts: 6
Joined: Thu Jul 19, 2012 8:54 pm

Re: Pi4 - No hdmi audio

Wed Nov 27, 2019 6:11 pm

rwgent wrote:
Sat Oct 05, 2019 6:20 pm
This worked for me:

Edit config.txt

sudo nano /boot/config.txt

Look for these lines:

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

uncomment the #hdmi_drive=2 just remove the # so it looks like this:

hdmi_drive=2

type: ctrl+o then hit enter to save the changes
then type ctrl+x to exit
reboot and try playing sound
So this worked for me too on a Raspberry Pi4. This had me stumped for a while and I was pretty sure I had a hardware issue as this Pi worked fine for a couple of months then silence! This Pi is on the back of a Phillips "Dumb" TV making it a bit "Smarter" so is handy for YouTube and such like.
I invested in new HDMI cables as I had been using a stubby adaptor which wouldn't fit in HDMI0 beside the USB C, neither of these cables worked in either of the HDMI ports or in any of the HDMI ports of my TV. The only thing that changed on the Pi4 was the addition of a Pimoroni Fan Shim but to stop throttling but it worked for a while after this too! I was fairly sure I had a hardware issue as I had changed nothing on the Pi, perhaps changes due to apt-get update/upgrade?

In any case, forcing the output to HDMI via the config.txt seems to have worked.


Keeps fingers crossed

GryKyo

jb7
Posts: 1
Joined: Mon Dec 09, 2019 3:00 pm

Re: Pi4 - No hdmi audio

Mon Dec 09, 2019 3:12 pm

Hello gang, I too have the same problem, no sound using a proper cables, with my 1 year old Samsung 4K, also a very old computer monitor, BUT unplugging and re-plugging the p and sound came through with the very old monitor, still N/G with a newer monitor and my 4K, with that said, I have tried numerous time to follow the above steps using putty and my PC, I don't see the same info you guys posted above, so I can not modify anything, putty states no such files etc etc. Any help in guiding me on how to properly fix this would be greatly appreciative, TIA.

MCLLC
Posts: 1
Joined: Wed Dec 11, 2019 2:56 am

Re: Pi4 - No hdmi audio

Wed Dec 11, 2019 3:00 am

I spent hours following videos and tutorials which were all unhelpful. My solution was simple. Go to preferences/audio device settings/select controls/select PCM/ deselect both boxes underneath. This fixed my problem as it for some reason switched to PCM mode.

rebroad
Posts: 3
Joined: Wed Dec 26, 2012 11:26 pm

Re: Pi4 - No hdmi audio

Thu Jan 16, 2020 4:26 am

Pikkuiikka wrote:
Fri Nov 22, 2019 8:34 pm
Well well well - guess what? I suddenly realised, that today after moving my Pi setup, I had put the HDMI cable to the connector that sits further away from the power connector. If I remember right, that is HDMI 1, while the connector just beside the power connector is HDMI 0.

So, I shut down the system, plugged my cable to HDMI 0, restarted - and there were sound again! Even without uncommenting the forementioned config option. To be sure, I did the same test with HDMI 1 again - no sound.

So, I don't know if this is how it should be. But if so, my apologies for wasting your time... It could of course be something with my system really (even while it is very standard one).

One problem less in my Pi-world... :roll:

-iikka
I have this exact same problem (or perhaps the opposite). Sound only works in the HDMI port closest to the power, but not in the one farthest away.

FilipLaca
Posts: 9
Joined: Sat Jan 18, 2020 4:25 pm

Re: Pi4 - No hdmi audio

Sat Jan 18, 2020 4:31 pm

rebroad wrote:
Pikkuiikka wrote:
Fri Nov 22, 2019 8:34 pm
Well well well - guess what? I suddenly realised, that today after moving my Pi setup, I had put the HDMI cable to the connector that sits further away from the power connector. If I remember right, that is HDMI 1, while the connector just beside the power connector is HDMI 0.

So, I shut down the system, plugged my cable to HDMI 0, restarted - and there were sound again! Even without uncommenting the forementioned config option. To be sure, I did the same test with HDMI 1 again - no sound.

So, I don't know if this is how it should be. But if so, my apologies for wasting your time... It could of course be something with my system really (even while it is very standard one).

One problem less in my Pi-world... :roll:

-iikka
I have this exact same problem (or perhaps the opposite). Sound only works in the HDMI port closest to the power, but not in the one farthest away.
I have same problem with audio on hdmi that is closer to ethernet port 😅. Is this on a purpose ? If I plug hdmi to micro HDMI to port that is closer to usb-C audio works normally but if I plug it in to other port audio doesn't work. And I don't think it is raspbyan problem... 🤔
Iam curious if is here any way how to get this port working with sound or if I need to plug speaker in to jack to get audio with this port 🤨

sollazzo08
Posts: 9
Joined: Mon Jan 20, 2020 6:14 am

Re: Pi4 - No hdmi audio

Tue Jan 21, 2020 7:18 am

This worked for me too haha, it is very strange..

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

Re: Pi4 - No hdmi audio

Tue Jan 21, 2020 9:23 am

HDMI audio should work in both ports, but there may be some config you can do to make it better.

Add this to the end of the line in cmdline.txt file in /boot (all must be on the same line)

snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_compat_alsa=0
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

jwbeech
Posts: 1
Joined: Tue Jan 21, 2020 5:49 pm

Re: Pi4 - No hdmi audio

Tue Jan 21, 2020 5:51 pm

I had the same issue and tried 2 of the config.txt changes suggested however my issue was also that I was using hdmi port 1 instead of 0. Changing to port 0 solved the issue

Return to “Troubleshooting”