Virtual sources are created with the wrong number of channels when WirePlumber is running
Hi! I am the developer of EasyEffects(formerly known as PulseEffects). Recently I started to do some tests with WirePlumber instead of the built-in media manager and something odd happens when creating virtual sources. First I noticed I could not set its volume or mute state in Pavucontrol. What works fine when not using WirePlumber. But then I realized that the number of channels was wrong. This is the output of pw-cli
id: 53
permissions: rwxm
type: PipeWire:Interface:Node/3
* input ports: 0/64
* output ports: 1/0
* state: "suspended"
* properties:
* node.name = "easyeffects_source"
* node.description = "EasyEffects Source"
* factory.name = "support.null-audio-sink"
* media.class = "Audio/Source/Virtual"
* audio.position = "FL,FR"
* monitor.channel-volumes = "true"
* factory.id = "18"
* client.id = "46"
* node.driver = "true"
* factory.mode = "merge"
* audio.adapt.follower = ""
* library.name = "audioconvert/libspa-audioconvert"
* object.id = "53"
* params: (8)
* 3 (Spa:Enum:ParamId:EnumFormat) r-
* 1 (Spa:Enum:ParamId:PropInfo) r-
* 2 (Spa:Enum:ParamId:Props) rw
* 4 (Spa:Enum:ParamId:Format) -w
* 10 (Spa:Enum:ParamId:EnumPortConfig) r-
* 11 (Spa:Enum:ParamId:PortConfig) rw
* 15 (Spa:Enum:ParamId:Latency) rw
* 16 (Spa:Enum:ParamId:ProcessLatency) rw
Despite setting audio.position = "FL,FR"
the source has only one channel. This is the code that creates it
pw_properties* props_source = pw_properties_new(nullptr, nullptr);
pw_properties_set(props_source, PW_KEY_NODE_NAME, "easyeffects_source");
pw_properties_set(props_source, PW_KEY_NODE_DESCRIPTION, "EasyEffects Source");
pw_properties_set(props_source, "factory.name", "support.null-audio-sink");
pw_properties_set(props_source, PW_KEY_MEDIA_CLASS, "Audio/Source/Virtual");
pw_properties_set(props_source, "audio.position", "FL,FR");
pw_properties_set(props_source, "monitor.channel-volumes", "true");
proxy_stream_input_source = static_cast<pw_proxy*>(
pw_core_create_object(core, "adapter", PW_TYPE_INTERFACE_Node, PW_VERSION_NODE, &props_source->dict, 0));
It is the same we use to create our virtual sink and there is no problem in this case. It has 2 channels as expected. It is only when the media class is changed to "Audio/Source/Virtual"
that this happens.