[yocto] [meta-raspberrypi][question] how to setup alsa on rpi3?

Tanu Kaskinen tanuk at iki.fi
Fri Oct 21 04:26:58 PDT 2016


On Fri, 2016-10-21 at 12:08 +0200, Piotr Lewicki wrote:
> Hi,
> 
> I want to use aplay to play a sound on raspberry pi 3, but for some 
> reason it does not work for me.
> 
> I have built a new "rpi-test-image" with only one difference from 
> original- I added "alsa-utils" to the image.
> 
> My steps:
> 
> 1. I ssh'd to the board with the built image,
> 
> 2. downloaded wav sample ("wget 
> http://freewavesamples.com/files/Korg-Triton-Harmonica-C5.wav"),
> 
> 3. enabled the sound kernel module ("modprobe snd-bcm2835"),
> 
> 4. tried to play it with "aplay" tool.
> 
> 
> It did not work and I got an error:
> 
> root at raspberrypi3:~# aplay ./Korg-Triton-Harmonica-C5.wav
> ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:767:(parse_card) cannot 
> find card '0'
> ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) 
> function snd_func_card_driver returned error: No such file or directory
> ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:392:(snd_func_concat) error 
> evaluating strings
> ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) 
> function snd_func_concat returned error: No such file or directory
> ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:1246:(snd_func_refer) error 
> evaluating name
> ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) 
> function snd_func_refer returned error: No such file or directory
> ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4850:(snd_config_expand) 
> Evaluate error: No such file or directory
> ALSA lib 
> ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) 
> Unknown PCM default
> aplay: main:786: audio open error: No such file or directory

It looks like the default alsa device is configured to use card 0, but
card 0 doesn't exist. What do "cat /proc/asound/cards" and "ls -l
/dev/snd" print?

-- 
Tanu



More information about the yocto mailing list