Helpful Error Messages from ALSA (not!) (Shallow Thoughts)

Akkana's Musings on Open Source Computing, Science, and Nature.

Tue, 07 Apr 2009

Helpful Error Messages from ALSA (not!)

Today's award concerns clarity of error messages.

My desktop machine has been getting flakier for a week or two. Strange messages at boot, CDROM drive unable to burn reliably or verify after burning, and finally it culminated in a morning where it wouldn't boot at all. Turned out (after much experimentation) to be not one but two bad IDE cables -- and these were the snazzy expensive heavy-duty cables, not the cheap ribbon cables, in a box that hadn't been opened for months. Weird.

Anyway, since I had the system disk out anyway (to recover data from it) I left it out, migrated my data to the newer, bigger disk and installed a new Ubuntu Intrepid. Been meaning to do that anyway -- running two disks just adds to the noise, heat and power usage and doesn't really add that much speed.

It took a couple of hours to get the system working the way I want it -- installing things I need, like tcsh, vim, emacs, plucker, vlc, sox etc. and cleaning up some of the longstanding Ubuntu udev and kernel configuration bugs that keep various hardware from working. I thought I had everything ready when I noticed I wasn't getting any sound alerts, so I tried playing a sample .wav file, and got a rather unusual error:

(clavius)- play sample.wav
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:3513:(_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:3513:(_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:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2196:(snd_pcm_open_noupdate) Unknown PCM default
play soxio: Can't open output file `default': cannot open audio device

What does that mean? Well, it turns out what it means is ... my user wasn't in the "audio" group, so I didn't have write permission on the sound device. I added myself to "audio" in /etc/groups and sound worked fine in my next session.

Now, I've seen some fairly obscure error messages in my time, but this one may just win my all-time obscurity award. 9 lines and 744 characters to say "Can't open $device."

And with all that, it still managed to omit the one piece of information that might have been helpful: the name of the device it was trying to open (so that an ls -l would have told me the problem right away).

Impressive!

Tags: , , ,
[ 13:23 Apr 07, 2009    More tech | permalink to this entry | comments ]
(Commenting requires Javascript from ShallowSky.com and Disqus.com, and a cookie from Disqus.com.)
blog comments powered by Disqus

Syndicated on:
LinuxChix Live
Ubuntu Women
Women in Free Software
Graphics Planet
DevChix
Ubuntu California
Planet Openbox
Devchix
Planet LCA2009

Friends' Blogs:
Morris "Mojo" Jones
Jane Houston Jones
Dan Heller
Long Live the Village Green
Ups & Downs
DailyBBG

Other Blogs of Interest:
DevChix
Scott Adams
Dave Barry
BoingBoing

Powered by PyBlosxom.