1

How do enable sound on a Raspberry Pi 3 running Ubuntu 16?

I've tried the solutions outlined for Pi2, like this question, but nothing seems to work.

Running sudo aplay /usr/share/sounds/alsa/Front_Center.wav gives me the output:

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:722: audio open error: No such file or directory

Running aplay -l lists no devices.

Running uname -a shows:

Linux localhost 4.4.23-v7+ #913 SMP Tue Oct 4 14:16:19 BST 2016 armv7l armv7l armv7l GNU/Linux
5

After digging around in my /boot/config.txt, I found the solution was to simply add the line dtparam=audio=on.

1
  • I had the same set up and problem and this solution almost worked. After changing config.txt the sound card modules and all the alsa tools worked well. I now have the problem of hearing nothing but an audible "dead air" sound when I play a audio file to the analog output. Have you experienced something similar? – BryanK Sep 29 '17 at 15:48
2

On Ubuntu 18.04 LTS

On Ubuntu 18.04 LTS, the file to be edited is /boot/firmware/usercfg.txt Simply add dtparam=audio=on

Here is a one-liner that does exactly that:

$ echo 'dtparam=audio=on' |sudo tee -a /boot/firmware/usercfg.txt
2
  • 1
    Warning - this command will overwrite whatever is in your /boot/firmware/config.txt. That file acutally says: Please DO NOT modify this file; if you need to modify the boot config, the "usercfg.txt" So this would be more appropriate and will append, not overwrite target file: echo 'dtparam=audio=on' |sudo tee -a /boot/firmware/usercfg.txt – Janis Veinbergs Feb 23 '20 at 16:55
  • Yep, this will certainly screw up the bootloader – lcnittl Nov 17 '20 at 23:12
0

Raspberry Pi 3B+ running Ubuntu 18.04.2

Hope this helps someone - I kept getting that long list of errors noted on this thread, I added this line to /boot/firmware/config:

dtparam=audio=on 

rebooted and I can now generate a sound with

play -n synth 0.2 sin 440

I installed sox and alsa-utils and did this:

sudo modprobe snd_bcm2835

No idea what that did so I don't know if it was needed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.