2

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
Cerin
  • 2,291
  • 8
  • 33
  • 49

3 Answers3

5

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

Cerin
  • 2,291
  • 8
  • 33
  • 49
5

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
Serge Stroobandt
  • 455
  • 7
  • 18
1

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.

RalfFriedl
  • 2,180
  • 2
  • 11
  • 12
EECONS
  • 11
  • 1