1

So, my second question about linux audio on the site. The previous one generated quite a lot introductory information.

I have ALSA and PulseAudio installed.

  • Before installing PulseAudio, no audio cards were being detected in the graphical "Sound" panel. And now, under "Applications" I see listed ALSA plug-in(firefox). Why do I need PulseAudio to detect the sound card and to play through ALSA?

  • alsamixer does not work - muting the master has no effect. Furthermore, only one application can play simultaniously - starting a second one reports device busy.

So my software mixing is not working. How do I fix it. How do I trace what path take the signals from the applications to the hardware?

Note" the audio is being streamed through USB. alsamixer sais no options for ths device and the controls that I was modifying apper to be the motherboard soundcard's.

1

I can answer at least one of your questions. Keep in mind that alsa and pulseaudio are not replacements for one another, they occupy different places in the software stack. Pulseaudio is added on top of alsa and supplants the alsa userland tools. It does not replace alsa.

under "Applications" I see listed ALSA plug-in(firefox). Why do I need PulseAudio to detect the sound card and to play through ALSA?

It's the other way around. The pulseaudio plugin for alsa is for alsa, so that it will play through pulseaudio, or at least, WRT firefox. However, I believe it does have to go back to ALSA eventually, in so far as ALSA is the actual hardware system (keep reading), in keeping with the software stack layering just mentioned.

Applications must be pulseaudio aware in order to use it; generally this means they have some kind of plugin of their own. For example, if you use mpg123 on a system with pulseaudio running but you do not have the "mpg123 pulseaudio plug-in" installed, mpg123 probably won't be able to access an output device and will fail. Pulseaudio cannot "intercept" sound streams from applications: the applications must initiate the relationship intentionally.

ALSA is a low level kernel system (with some userland parts) that applications will generally use unless they have a higher priority plugin installed, such as one for pulseaudio. In that case, they stream to pulseaudio. Pulseaudio is a higher level userland system (i.e., it is not a kernel subsystem and has no direct access to hardware) that can then do various things with the stream, but in the end if you are using your local soundcard, it must pass this on to the lower level hardware system. I presume (on linux) this means ALSA, on which pulseaudio maintains a lock, which is why other userland things (such as the "alsamixer") then can't use it. [In fact, this is a major reason for using pulseaudio: otherwise, the soundsystem would only be available to one application at a time. Pulseaudio is that one application, but it multiplexes from other applications.]

The deal with the alsa firefox plugin is that flash and pulseaudio don't get along (there is either no plugin for flash, or not one that works). So flash never looks for pulseaudio, it looks for alsa. The point of the plugin is to allow alsa to pass the sound to pulseaudio rather than hardware; when pulseaudio then passes it back to alsa, the alsa-firefox plugin is not involved, so there is no circle: alsa does it's job with the hardware. In short:

Flash/firefox alsa userland plugin for pulseaudio -> pulseaudio -> alsa kernelspace subsystem -> soundcard driver

The first step could be any original source audio application. Exactly why there isn't just a flash pulseaudio plugin I dunno, but it is a historical issue.

So my software mixing is not working. How do I fix it?

Use a pulseaudio mixer, not the userland alsa one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.