USB mic. device (webcam) takes default audio device.

New to Debian (Or Linux in general)? Ask your questions here!

USB mic. device (webcam) takes default audio device.

Postby Jambones » 2009-12-15 16:57

Hello everyone,

I've been using Debian Stable (Lenny, 5.0.3 as of writing,) for a while now and everything seems to be working a treat. But I have a niggling issue with a Logitech Quickcam Pro 9000 that follows me whatever distribution I use: Sometimes, seemingly randomly, the system will take the webcam's microphone as the default audio output device.

It wouldn't be so bad, but the whole family use the computer and often times I am called into action to 'fix the sound.' The sound works, it's just bumped to device 1 instead of device 0 it should take.

Any help is appreciated. I am afraid my knowledge of running Linux, modules, etc is limit, so please forgive me. :oops: Is there a proper way to diagnose the problem, and fix it? I've Googled a lot, many have the same problem, but I haven't seen the solution yet.

Thanks for any help or advice you may have.

EDIT: Should have mentioned I am running 64 bit as well, but the issue seems to be unrelated to architecture.
Last edited by Jambones on 2009-12-17 01:25, edited 1 time in total.
Jambones
 
Posts: 4
Joined: 2009-12-15 16:42

Re: USB device (webcam) takes default audio device.

Postby smallchange » 2009-12-15 19:22

You can probably fix this by using line like this in /etc/modprobe.d/alsa-base.conf.
alias snd-card-0 snd-intel8x0
alias snd-card-1 snd-usb-audio
options snd cards_limit=3
#options snd slots=snd-intel8x0,snd-usb-audio
options snd-usb-audio index=1,2 vid=0x0d8c,0x046d pid=0x000c,0x09a2


They will need to be adjusted for your hardware. You can find out about your hardware and the drivers (kernel modules) using commands lspci, aplay -l, and lsmod.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: USB device (webcam) takes default audio device.

Postby Jambones » 2009-12-17 01:01

Thanks for the reply. I appended what seemed to be the appropriate module to your example, snd_hda_intel, and commented out the line containing 'vid' as I didn't understand it completely. I went ahead and restarted about 9 or 10 times and so far no shenanigans from the USB device.

Contents of /etc/modprobe.d/alsa-base.conf:
alias snd-card-0 snd_hda_intel
alias snd-card-1 snd_usb_audio
options snd cards_limit=3
#options snd slots=snd_hda_intel,snd_usb_audio
# options snd-usb-audio index=1,2 vid=0x0d8c,0x046d pid=0x000c,0x09a2


Just in case the next time I restart if continues to taunt me,could you explain a little about the 'snd slots,' pid, and vid entires? Presumably that is the actual address of the device, or some such.

Again, pardon my inexperience.
Jambones
 
Posts: 4
Joined: 2009-12-15 16:42

Re: USB mic. device (webcam) takes default audio device.

Postby smallchange » 2009-12-17 02:02

I will try but my knowledge is skimpy. I think I got this here http://wiki.debian.org/ALSA and in /usr/share/doc/alsa-base. For some reason in the alias statement I think - is used instead of _. snd_slots is used to give an order to cards and I don't remember how it differs from card-0 and card-1. It is also from ALSA version older than the one in sid, where index has been introduced. I don't know about the Lenny version. The index line is for ordering 2 devices that use the same driver. In my case that is a USB headset and a USB webcam with microphone. The vendor id (vid) and pid are found with lsusb. I don't remember what pid stands for but here is the lsusb entry for my webcam so you can compare it to the line.
Bus 001 Device 004: ID 046d:09a2 Logitech, Inc. QuickCam Communicate Deluxe/S7500
You can see that lsusb shows vid:pid and both are ordered second in the index line. I wish I could give a better explanation, but maybe someone else will jump in here and enlighten us both.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: USB mic. device (webcam) takes default audio device.

Postby Jambones » 2009-12-17 14:10

Just read the Debian wiki Alsa page you linked to; looks like the troubleshooting section has what I need, and hopefully it is still valid for Lenny:

There are two ways to fix this problem.

1. Force the cards to load in a different order. I chose this route, and added the following to my /etc/modprobe.d/sound:

options snd-trident index=0
options snd-usb-audio index=1

This forces my Trident card to be the default (card 0) and my USB microphone to be card 1.

2. Change the default card by editing /etc/asound.conf or ~/.asoundrc . More info on this Alsa


I guess we'll see if this works in time. It's just rather bothersome that it's not consistent in when it decides to choose the mic. over the soundcard.
Jambones
 
Posts: 4
Joined: 2009-12-15 16:42

Re: USB mic. device (webcam) takes default audio device.

Postby Yasser » 2010-01-16 03:39

Jambones wrote:
I've been using Debian Stable (Lenny, 5.0.3 as of writing,) for a while now and everything seems to be working a treat. But I have a niggling issue with a Logitech Quickcam Pro 9000 that follows me whatever distribution I use: Sometimes, seemingly randomly, the system will take the webcam's microphone as the default audio output device.


Change the default card by editing /etc/asound.conf or ~/.asoundrc
Procrastinating...
Yasser
 
Posts: 3
Joined: 2010-01-16 03:26

Re: USB mic. device (webcam) takes default audio device.

Postby aspnair » 2010-01-16 04:32

I had a similar problem once. USB capture device (snd_usb_audio) was getting initalized before my main sound card (snd_hda_intel). I fixed that by always loading snd_hda_intel before snd_usb_audio module

/etc/modprobe.d/aliases.conf
Code: Select all
install snd_usb_audio /sbin/modprobe --use-blacklist snd_hda_intel; /sbin/modprobe --ignore-install snd_usb_audio $CMDLINE_OPTS
Compressed Air Energy Storage, Entropy and Efficiency
http://saurorja.org/2012/06/18/compress ... fficiency/
User avatar
aspnair
 
Posts: 1247
Joined: 2009-06-18 12:27
Location: Twitter: @anand_sivaram


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable