[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: usb audio device & sound card



On Friday 02 March 2007 04:43, Mark Grieveson wrote:
> Mark Grieveson wrote:
> > > Hi.  I have a cheap usb audio device for Skype, and a regular sound
> > > card for the rest of the computer.  I'm using Etch.  I would like to
> > > be able to get sound when browsing the internet, or listening to
> > > music, or watching movies, from the soundcard, while simultaneously
> > > being able to use the usb audio device for Skype.
> >
> > I created a file in my home directory named .asoundrc with the following
> > contents:
> >
> > pcm.!default {
> >     type hw
> >     card 1
> > }
> >
> > ctl.!default {
> >     type hw
> >     card 1
> > }

> The fact that I can't get sound working properly for this computer and its
> devices has my Windows friends laughing at me (sound, apparently, is a
> "basic", and if Linux can't even handle that, well, "what good is it?"). 
> So, to help me regain a bit of dignity, please share any knowledge you may
> have with me.
>
> Thanks,
> Mark

I've had the same sort of problem with my usb midi keyboard. Alsa when booting 
up finds the keyboard, sees it's an audio device, and sets it as card0.  Then 
Alsa finds the real soundcard, and sets that as card1.

I'd suggest first to rename your .asoundrc so that it doesn't interfere with 
anything. In most cases a .asoundrc is not needed anyway, but some situations 
do require it.

Now you need to add some lines to /etc/modprobe.d/sound, as below.

alias snd-card-0 snd-emu10k1
options snd-emu10k1 index=0
alias snd-card-1 snd-usb-audio
options snd-usb-audio index=1

Change  snd-emu10k1 to whatever your driver is for the soundcard.

Not sure if it's needed, but after closing the text editor, and su'ed to root, 
run  update-modules .

Reboot, and the cards should be loaded in the correct order.

If you do actually need a .asoundrc for the sake of your skype thingy, you may 
have to mess with that. I don't use skype, so have no idea.

The problem is that the USB is started early in the boot process, so anything 
resembling an audio device is picked up first by Alsa. I first encountered 
this on Fedora Core 1 in 2003, and got the fix from Fernando on the 
planetccrma list. Somehow FC4, and FC5 have fixed the problem, and I no 
longer have to set the indexing options as far as my usb midi keyboard is 
concerned. Whether that would be the same if an actual soundcard was on the 
USB I don't know.

Just to check this out for yourself, and before messing 
with /etc/modprobe.d/sound, unplug, or switch off the skype device (if it has 
a power switch), and reboot. The soundcard should be set as card0. Now plug 
in, or switch on the skype device. If you run, cat /proc/asound/cards now, 
you should see the skype device set as card1.

Hope this works for you.

Nigel.



Reply to: