On 21.10.2016 13:26, Tanu Kaskinen wrote:
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@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?
root@raspberrypi3:~# cat /proc/asound/cards
--- no soundcards ---
root@raspberrypi3:~# ls -al /dev/snd/
drwxr-xr-x    2 root     root            60 Oct 21 09:53 .
drwxr-xr-x   11 root     root         13200 Oct 21 09:53 ..
crw-rw----    1 root     audio     116,  33 Oct 21 09:53 timer


I wonder what is used by omxplayer that it works, but alsa does not.
--
Tanu
--
Piotr
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to