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

Khem Raj raj.khem at gmail.com
Sat Oct 22 09:32:53 PDT 2016


> On Oct 21, 2016, at 4:26 AM, Tanu Kaskinen <tanuk at iki.fi> 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 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
> 

Which kernel version are you using ?
with 4.4+ you will have to enable alsa in boot config since it is disabled by
default which was not the case with 4.1. test it by setting
dtparam=audio=on in /boot/config.txt if it works then perhaps you can patch
it in recipes-bsp/bootfiles/rpi-config_git.bb and add a knob to enable/disable
alsa


> 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
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20161022/447dd117/attachment.pgp>


More information about the yocto mailing list