Fix audio on Raspberry Pi

If audio is not playing on your Raspberry Pi and the only output recognised in settings is ‘dummy output’ then you have a problem. However, this issue is easy to solve, all you have to do is add two lines to config.txt.

Open up a terminal window and type in the following:

sudo nano /boot/config.txt

Or if you’re running an Ubuntu image with the linux-raspi2 kernel, run the following instead:

sudo nano /boot/firmware/config.txt

Use the arrow keys to navigate the file. At the end, add the following lines:

dtparam=audio=on
hdmi_drive=2

Then reboot your Pi. HDMI audio should now work. Enjoy!