[pulseaudio-discuss] Can some pulseaudio modules support multi-instances?

Arun Raghavan arun.raghavan at collabora.co.uk
Wed Aug 3 21:17:38 PDT 2011

On Thu, 2011-08-04 at 11:22 +0800, Lin, Mengdong wrote:
> I want to ask a very basic question. Can these modules support
> multiple instances?
> 1.       Module-alsa-card
> For example, if my platform has 2 ALSA devices, will there be two
> instances of module-alsa-card?

The easiest way to check if a module is intended to be loaded multiple
times is to look for the PA_MODULE_LOAD_ONCE() macro in the module's
sources. If it's called with a FALSE, you know that the author intended
for it to be okay to have multiple instances loaded.

> 2.       Module-echo-cancel
> And if more than one input/output stream need echo cancellation (just
> for example), will there be two module-echo-cancel instances?

The idea is the module applies to one sink/source pair at a time, and
all streams that want to talk to that sink/source pair and need AEC
should go through the virtual sink/source pair created by loading
module-echo-cancel on top of the master sink/source pair.

So if you have 2 devices which you want to run echo cancellation on, you
load two instances of the module (module-filter-apply should do this for

-- Arun

More information about the pulseaudio-discuss mailing list