When I tried to play audio on the Raspberrypi using mpg123, I could only do so as the superuser. Unless I was root, I got the following errors:
mpg123 -l 6 -g 200 18000.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
...
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4241:(_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:4241:(_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:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
Can't find a suitable libao driver. (Is device in use?)
Well, I used strace to find the problem. I was a lack on the correct access priveliges on the audio device (of course). I had suspected this, but it was hard to find. The solution is to gain root access then then type:
chmod o+rw /dev/snd/controlC0
one might also try the more drastic
chmod o+rw /dev/snd/*
26 June
2014 chmod solution included
By Gregory Dudek at 00:00 June 26, 2014
| Read (2) or Leave a comment
| permalink link to this entry
Comments
Or rather, add yourself to the "audio" group. Most distros have those device files set to be writable by this group. Posted by:
Anonymous
at June 26,2014 03:07
Thanks a lot ! Posted by:
anonymous
at October 16,2015 01:13
Post your own response
![]()
Each comment is manually screened for the presence of appropriate and substantive content, due to a constant onslaught of comment-spam. This means there may be a delay before your comment appears. |
![]() Recent Entries
Happy New Year(01/01 01:01)
Caught NEOWISE on film(08/05 20:14) Disposing of cookie-accepts with uBlock(06/14 12:56) Stephanie Dudek obituary(02/26 19:30) Happy birthday, Mom!(12/18 00:16) Oculus Rift S (12/04 23:36) More: List of all entries... Search this site
Loading
About
Categories
Miscellaneous (56 items)
Computers and Technology (77 items) Travel (39 items) Education (35 items) Hacks (42 items) Robotics (92 items) Science (34 items) Programming and Software (15 items) iPhone (9 items) Digital TV and Video (7 items) Intellectual Property & Copyright (13 items) Personal (18 items) Recent Comments
Re: How to find an audio stream from streamtheworld.com(Julio F : 04/02 11:06)
Re: Stephanie Dudek obituary(Serge Lenis : 03/01 14:40) Re: Stephanie Dudek obituary(Joan Esar : 02/27 22:00) Re: Stephanie Dudek obituary(Cary : 02/27 01:30) Re: Stephanie Dudek obituary(Patrick Lam : 02/26 22:07) Re: Happy birthday, Mom!(Tina Gholami : 01/05 10:01) Blog Roll
(If in doubt, pick RSS 2.0)
|