Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have two sound cards and I think that I have now got a grip on how to manage them and refer to each of them in different situations.
For MPlayer, I can use -ao or edit ~/.mplayer/config.
In MPD, i can deal with the audio_outputs in /etc/mpd.conf.
However, Firefox doesn't give any sound when I play Flash or plugins. Except if I start playing something with MPD and then start the Flash object in Firefox. In that case, the Flash starts to play through card 0 (MPD is card 1).
Why does it only play if MPD is already playing?
How does Firefox select its sound card? This one solved. See post 7 and post 5.
Last edited by Arla; 10-05-2009 at 11:52 AM.
Reason: Striking one of the two questions out.
I guess that Firefox simply uses the first available sound card that is listed by the system. I am not aware of any Firefox setting that would allow dealing with hardware matters directly. It's not even sure that Firefox is at fault here. Have you ever tried to run Skype on that box and checked what soundcard it uses by default?
You can re-index your driver modules to make your default card be card 0.
And card 0 seems to be the default for web browsers and other applications like festival. There are tricks to get firefox and such to use pulse audio and other sound methods. But it's generally just best to set your modules up so that the card you want to use is card 0.
For example, on my system, in /etc/modprobe.d/alsa_custom.conf
alias char-major-116 snd
alias char-major-14 soundcore
alias snd-card-0 snd-atiixp
alias snd-card-1 snd-atiixp-modem
alias snd-card-2 snd-usb-audio
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias sound-slot-1 snd-card-1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
alias sound-slot-2 snd-card-2
alias sound-service-2-0 snd-mixer-oss
alias sound-service-2-1 snd-seq-oss
alias sound-service-2-3 snd-pcm-oss
alias sound-service-2-8 snd-seq-oss
alias sound-service-2-12 snd-pcm-oss
If I need to change that around, I just change the index numbers and module association. And then run:
I think I'm being a bit misunderstood here. I know how to set default ALSA sound card. I also know how to switch between them in several applications. However this does not go for Firefox. Instead, it seems to always use the default card. This is of course not surprising, but I would certainly prefer to be able to control that.
Furthermore, and more importantly, Firefox generally doesn't play sound at all. I have however made it happen a couple of times, when I have had MPD playing as the Firefox sound started playing, as said in first post.
arla@ezekiel ~> cat /proc/asound/cards
0 [M2496 ]: ICE1712 - M Audio Audiophile 24/96
M Audio Audiophile 24/96 at 0xbca0, irq 16
1 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xfebfc000 irq 16
Yes, firefox defaults to card 0. That's pretty much a given. There's a few tricks with pulse-audio and other means to override that. But it's pretty safe to assume that firefox will always default to card 0. The above change in configuration changes your default card 0 to your desired card. If used/customized for your system.
$ aoss firefox-bin
Works up until the point that you open a new browser from within the browser. At which point the child process is NOT started with aoss. Pretty much the same as artsdsp or esddsp, or many of the other means of sharing a single soundcard among several applications at the same time. dmix helps and defaults for alsa these days, but it assumes that the application uses alsa by default, which firefox does not. aoss tricks it, within limits.
It really depends on your system's configuration. KDE seems to wrap applications a little better with artsd as the sound daemon to share the device. And there are a few applications that bring up artsd when they access sound. pidgin, rosegarden, ..... I'm not usually using more than one sound generating application at a time, so I don't have an issue shuffling my card order. festival and a few other apps, mainly those geared towards multi-platform are the ones affected. They were written a while back based on OSS and were never updated to use alsa. Or their condition / licensing prevents them from being updated. Who knows, I don't deal with that half.
Basically it's an OSS thing. Those apps that use /dev/dsp directly, and they tend to hog the device in the process. Those are the ones that exhibit this type of behavior. festival will work with esddsp, but it tries to say all of the words in a sentence at the same time. And if you want to record from the pcm device, it's much easier to just let it default to card 0.
On the flip side, some soundcards have hardware mixers. If you can setup alsa to use that ability and keep the first two channels in that mixer clear. You can make it behave more normally with only using one of your soundcards. There's so many different ways to setup and use audio, it's near impossible to tell how your system / distro is setup. When I'm recording I use jackd. When I'm playing games, I might use esd or artsd. But generally I just use alsa natively and configure my media applications to do the same.