The example looks incomplete. You use the slaves
option to add several sinks to the combined sink:
load-module module-combine-sink sink_name=combination-sink sink_properties=device.description=myCombinationSink slaves=sink1,sink2[,...] channels=2
where sink1
etc. are the sinks you want to combine.
Also, usually you don't need to load modules for ALSA hardware, they should be loaded automatically.
Use list-sinks
to get a list of available sinks (or use pavucontrol
if you prefer a GUI).
Edit
hw:0,0
is an ALSA name for a device. The module-alsa-*
modules make ALSA devices available as Pulseaudio sources and sinks. When you use other Pulseaudio modules which refer to existing sources/sinks, you use of course the Pulseaudio names (see pacmd list-sinks
etc., without the angular brackets). The ALSA names are not relevant in Pulseaudio.
I'm not sure what you mean by "virtual devices". Pulseaudio has sources and sinks, of various different kinds. Some of those correspond to physical hardware available via ALSA, some of those correspond to streaming audio on the network, some of those correspond to physical Bluetooth devices (not via ALSA), and some of those are neither. Pulseaudio doesn't care what they are, they are just sources and sinks, and none of them is called "virtual".
Edit
Sink names on my system:
$ pacmd list-sinks | grep name:
name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
name: <alsa_output.usb-Roland_UA-25EX-00.analog-stereo>
$ pactl list short sinks
0 alsa_output.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz IDLE
1 alsa_output.usb-Roland_UA-25EX-00.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING
So, on my system:
pacmd load-module module-combine-sink sink_name=combined sink_properties=device.description=CombinedSink slaves=alsa_output.pci-0000_00_1b.0.analog-stereo,alsa_output.usb-Roland_UA-25EX-00.analog-stereo
To repeat: No, you cannot use names like hw:1
for Pulseaudio. These are ALSA names for ALSA devices accessed through ALSA libraries. You can use them in Pulseaudio in exactly one place, namely when an ALSA module (module-alsa-devices
or module-aslsa-card
) is loaded that makes the ALSA devices available to Pulseaudio. Everywhere else you use the Pulseaudio sink names obtained from the list commands above (or by loading modules that provide sinks like module-null-sink
and giving them names).
Edit
I'm not sure what you mean by "absolute name". The name is whatever the module that provides the sink chooses to set. It can often be specified as a parameter when the module is loaded, or it can be chosen by the module when it's not specified, like it is done for the ALSA sinks (using the hardware location) when the modules are loaded by default when Pulseaudio starts. But all this doesn't matter: Just look at what sinks you have, and use the right one. And if you load additional modules, name the sink, if you like.
slaves=sink0,sink1..sinkN channels=N
not sure... what format should I use thehw:0,0
or virtual device name or...? I mean what if I want to combine hardware's (build-in) headphones and virtual devices at the same time to have them simultaneous? what exactly identificators should I use to point to hardware and virtual devices? – user390525 May 13 '18 at 12:01load-module module-null-sink
for example. So can such kind of null sink be included to the simultaneous items list by using the instruction https://wiki.archlinux.org/index.php/PulseAudio/Examples#Simultaneous_HDMI_and_analog_output ? – user390525 May 15 '18 at 23:59slaves=sink0,sink1..sinkN channels=N
? Should it be sink names or what? And can I have something like thisslaves=sink0,hw:1,0..sinkN
for example? Give more details please – user390525 May 19 '18 at 21:46load-module module-null-sink sink_name=myNullSink0
can I use...sink_properties=device.description="Combined Sink" slaves=myNullSink0...
? Comment please – user390525 May 21 '18 at 20:14$pacmd load-module module-combine-sink sink_name=combined2 sink_properties=device.description="Combined with a null sink" slaves=combined,MyTestSink
but it throwsModule load failed
. Something's wrong with the syntax or what can be wrong here? I have thecombined and MyTestSink
on list-sinks output :S I edited my question please see it – user390525 Jun 11 '18 at 23:39sink_properties=device.description=CombinedSink
. – dirkt Jun 12 '18 at 03:59device.description=Combined_with_a_null_sink
with no quotes and spaces. So now I have the module name ascombined2
onpactl list short sinks
output; So, yes, that was really the syntax issue; But why the syntax get changed from version to version or something? Are there any doc-s about that? – user390525 Jun 13 '18 at 10:36