Unable to load two module-alsa-sink to two alsa devices over the same hardware device
I am using alsaequal, and I would like to load into pulseaudio two module-alsa-sink
, one for the plug:plugequal
(the alsaequal device), the other for plug:dmix
which is the dmix for the same sound card. The alsaequal device is connected through a sample conversion to plug:dmix
so it is possible for these to play simultaneously.
And it works! I can
pactl load-module module-alsa-sink device=plug:plugequal sink_name=lounge
pactl load-module module-alsa-sink device=plug:dmix sink_name=lounge_bypass
and both module instances load and play.
However, if I add these to default.pa, the second always fails with:
I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC0D0p' failed (-16)
I: [pulseaudio] (alsa-lib)pcm_dmix.c: unable to open slave
I: [pulseaudio] alsa-util.c: Error opening PCM device plug:dmix: Device or resource busy
E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" (argument: "device=plug:dmix sink_name="lounge_bypass""): initialization failed.
I think the first must still have /dev/snd/pcmC0D0p
for purposes other than playback, like determining sample spec or something. This occurs even if they are at opposite ends of default.pa, with lots of other modules being loaded in between.
If I load one during startup and load another later, this works, but it would be more convenient to know that both modules had been loaded whenever pulseaudio becomes available.