Tag Archives: Sound

Ubuntu Sound Saga

This post is to document my saga with a usb sound card and getting it to work. I know that I can get sound out of this card because I already had it working. I changed a setting and now no sound.

What I have tried so far:
Reinstall of Ubuntu, this time I’m going for minimal install.

installed packages for sound:
sudo apt-get install linux-sound-base alsa-base alsa-utils

aplay -vv /usr/share/sounds/alsa/Front_Center.wav  (Verbose tells me no card)

No sound.  Displays:

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4184:(_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:4184:(_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:4184:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4663:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:660: audio open error: No such file or directory

Now I search to see why my usb card is not detected.

sudo aplay -l
Displays (just aplay -l says no sound card... maybe this is my problem):
**** List of PLAYBACK Hardware Devices ****
card 1: default [Generic USB Audio Device ], device 0: USB Audio [USB Audio]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

Now I’m trying:

lspci -v | grep -A7 -i "audio"

Shows nothing, this could be a problem (turns out this is because I’m using a usb sound card and my pci card is disabled).  I am going to try reseating the usb card.  Looks like I had the cable plugged into the mic input.  Still no sound and same error when aplay is used.  On to the next thing.  Reading the SoundTroubleShooting guide leads me to think it might be bios, checking settings in bios.

alsamixer does not run.  But if I specify the card alsamixer –card=1 it will work.

I changed USB bootable in my bios and now I can use aplay -l with no sudo but still same error when trying to play some file.  Still nothing shows up with lspci. Next I will look to see if my driver is loading correctly.

Step 1: what is my sound driver supposed to be called?  snd-usb?

lsusb

Gives more info, my card is:

Bus 004 Device 002: ID 0d8c:000e C-Media Electronics, Inc. Audio Adapter (Planet UP-100, Genius G-Talk)

This sounds familiar from the last time, at least the Planet UP-100. Ok what driver do I need?

Perhaps the driver is snd-usb-audio?  Taking a look at the file: /etc/modprobe.d/alsa-base.conf this file prevents the loading of the snd-usb-audio driver as the 0 device.  Since I disabled my primary card (it doesn’t work with Ubuntu) the usb has to be the primary card.  I will comment out the lines that prevent it from loading (there happen to be two of them exactly the same):

options snd-usb-audio index=-2 (just add a # in front of the line)

Restarting alsa:

sudo alsa force-reload

It also gave me a nice list of the drivers being loaded by alsa.  Retesting.

SUCCESS!!

Recap:

1. Check cables.

2. Play sound: aplay -vv /usr/share/sounds/alsa/Front_Center.wav

3. Check if there is a card: sudo aplay -l

4. Use either lsusb or lspci -v | grep -A7 -i “audio” to find out if there is a sound card detected.

5. Check that the drivers are loading correctly.  If usb and it has to be the primary card edit /etc/modprobe.d/alsa-base.conf to allow usb as card 0.

Reloading alsa: sudo alsa force-reload

 

**Update**

I got a new computer and there were some audio problems with it as well after a minimal install.  Here is what I did:

After running the requisite aplay I got an error message saying:

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4184:(_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:4184:(_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:4184:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4663:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:660: audio open error: No such file or directory

Next I tried to run aplay sound with sudo, it worked fine.  My hunch is that there is some sort of permission problem and my user is not setup for access to sound where the root user is.  Now I will check to see if there is a group problem.

First I tried adding my user to the audio group:

sudo adduser username audio

I get the same error running aplay.  Restarting alsa does not fix the problem.  Reboot the computer.

Success!
Links:

https://help.ubuntu.com/community/SoundTroubleshooting

http://mauroandres.wordpress.com/2007/04/18/minimal-ubuntu-install/#Sound

http://www.alsa-project.org/main/index.php/SoundcardTesting

http://www.maenad.net/geek/di8k-debian/node23.html

 

https://help.ubuntu.com/8.04/serverguide/C/user-management.html

 

 

 

2 Comments

Filed under Ubuntu