Any good ALSA tutorials?

irishScott

Lifer
Oct 10, 2006
21,562
3
0
My main computer is a laptop with an external monitor/5.1 USB surround sound adapter. I'm running Ubuntu 8.04, and all the software I've tried (VLC, Mplayer, etc) work automatically with the external USB when it's hooked up, and it's easy to switch back via GUI when it's not (assuming Ubuntu doesn't by default).

Firefox, however, does not. Everything I play in youtube/other sites (even with other plugins) projects sound out of my crappy laptop speakers. I assume I have to somehow associate Firefox with the external card by setting it to default or screwing the the mozilla config file (or both). However, I have no experience with ALSA, and thus no idea as to how to do either. Google's returned very little of value.

I find that weird, since ALSA is used by every distro under the sun, but what can you do?

I found instructions where someone fixed it by deactivating/blakclisting their laptop speakers, but I still want the speakers to work/default when I disconnect my laptop. Suppose I could write a script to blacklist/deblacklist it, but I'd have to learn some basic ALSA regardless.

And I want to actually understand WTF I'm doing to my computer. :)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
FF doesn't do ALSA AFAIK so it's using the OSS emulation provided by ALSA and likely just using the first device. Running FF under aoss might help but there's a chance that you'll still have to figure out how to swap the sound cards so the USB one becomes first when plugged in.
 

SleepWalkerX

Platinum Member
Jun 29, 2004
2,649
0
0
Here's what I do when I want to switch the default audio device for firefox flash videos.

asoundconf list

This will bring up a list of devices.

Then do:

asoundconf set-default-card <card>

Where <card> is one of the listed devices from asoundconf list. Then restart firefox and it should change.
 

irishScott

Lifer
Oct 10, 2006
21,562
3
0
OMG. It was that simple... :|

Why do I always end up spending 4 hours of googeling and never find anything of use? I was screwing with ALSA config files left and right with no results...