4

I have looked at all kinds of tutorials, I modified the /boot/config.txt by adding hdmi_drive=2 and sound just does not work or if it does it always is over analog out.

I just want sound over HDMI to function. I used berryboot on my RPi 2 and tried some of the available distros. What I ended up doing is installing Raspbian then installing RetroPie because the retropie distro had issues with bluetooth, since I'm using a bluetooth controller this was not an option.

Is there a specific order for the /boot/config.txt file? I just added hdmi_drive=2 to the end.

Thank you for all assistance.

2 Answers 2

8

There's another setting in your /boot/config.txt that affects sound: hdmi_group

If you want sound over HDMI, config.txt should have both:

hdmi_group=1

hdmi_drive=2

You need them both set because hdmi_group=1 tells the kernel we are using CEA mode (for TV's, has sound) instead of DMT mode(for monitors, no sound) and hdmi_drive=2 tells the kernel to use HDMI if available. (HDMI mode has sound, DVI does not.)

If that doesn't work, verify that your snd-bcm2835 module being is loaded on boot (/etc/modules) and not blacklisted...

1
  • This worked for my HDMI TV. Commented Jan 11, 2017 at 19:29
2

Edit the file /boot/config.txt.

Change this part of the file to make it matching with the proposal below :

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=1

# uncomment to force HDMI mode rather than DVI. This can make audio work in DMT (computer monitor) modes
hdmi_drive=2
1
  • hdmi_drive=2 worked for me.
    – Shyam3089
    Commented Jan 12, 2023 at 8:06