Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the internal sound device and a USB headset and depending on the situation I could want to use either, but I've found no good solutions. I'd like a cross-platform solution, but I'm on linux for most of my use cases. I can configure some apps (VLC) to use one or the other, and I can set preferences in KDE, but not everything listens and most notably Flash seems to just grab whatever it can.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You need to use a sound server like PulseAudio, which serves as a proxy for your sound applications.

A sound server is basically a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.

How it works:

One of the goals of PulseAudio is to reroute all sound streams through it, including those from processes that attempt to directly access the hardware (like legacy OSS applications). PulseAudio achieves this by providing adapters to applications using other audio systems, like aRts and ESD.

In a typical installation scenario under Linux, the user configures ALSA to use a virtual device provided by PulseAudio. Thus, applications using ALSA will output sound to PulseAudio, which then uses ALSA itself to access the real sound card. PulseAudio also provides its own native interface to applications that want to support PulseAudio directly, as well as a legacy interface for ESD applications, making it suitable as a drop-in replacement for ESD.

Older versions of some applications did not work well with PulseAudio when using the ALSA protocol, so if you do stumble across this issue, you'll need to find a patch for the pulse plugin in ALSA.

Here's a diagram showing a birds-eye view of where PulseAudio sits, and how it works:

enter image description here

To be brutally honest, you might run up against problems trying to configure PulseAudio, so be prepared. Things are a lot better than they used to be, but not as good as they ought to be. It might be a good idea to track the changes you make in case you need to revert them later. You'd also be advised to have a look at this article and other articles on the confusing mess that is the linux audio subsystem before you start.

share|improve this answer
    
Found this article about how to configure one system-wide pulseaudio instance for all apps to use: alanbriolat.co.uk/tag/pulseaudio –  nagul Aug 19 '09 at 20:11
    
PulseAudio is the best solution, but also a huge PITA. –  Rob Dec 30 '11 at 5:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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