null-sinks remain active when linked to a pw_filter even if no stream is playing to them
I've written a passthrough pw_filter like in the Pipewire source example and linked it to a null sink and to the sound card node as follows
audio player -> null-sink -> pw_filter -> sound card node
It works. But I was expecting the null sink to go idle when the audio player is idle. But the graph keeps running. I could verify that by putting a print inside pw_filter_events
"process" callback. The links are passive. This is the pw-cli info output for one of the links between the null-sink and the filter
id: 51
permissions: rwxm
type: PipeWire:Interface:Link/3
output-node-id: 39
output-port-id: 61
input-node-id: 72
input-port-id: 37
* state: "active"
* format:
Object: size 128, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:Format (4)
Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
Choice: type Spa:Enum:Choice:None, flags 00000000 20 4
Id 1 (Spa:Enum:MediaType:audio)
Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
Choice: type Spa:Enum:Choice:None, flags 00000000 20 4
Id 2 (Spa:Enum:MediaSubtype:dsp)
Prop: key Spa:Pod:Object:Param:Format:Audio:format (65537), flags 00000000
Choice: type Spa:Enum:Choice:None, flags 00000000 20 4
Id 518 (Spa:Enum:AudioFormat:F32P)
* properties:
* link.passive = "true"
* object.linger = "false"
* link.output.node = "39"
* link.output.port = "61"
* link.input.node = "72"
* link.input.port = "37"
* factory.id = "20"
* client.id = "64"
* object.id = "51"
and this is the output for one of the links between the filter and the sound card
id: 60
permissions: rwxm
type: PipeWire:Interface:Link/3
output-node-id: 72
output-port-id: 65
input-node-id: 52
input-port-id: 53
* state: "active"
* format:
Object: size 128, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:Format (4)
Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
Choice: type Spa:Enum:Choice:None, flags 00000000 20 4
Id 1 (Spa:Enum:MediaType:audio)
Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
Choice: type Spa:Enum:Choice:None, flags 00000000 20 4
Id 2 (Spa:Enum:MediaSubtype:dsp)
Prop: key Spa:Pod:Object:Param:Format:Audio:format (65537), flags 00000000
Choice: type Spa:Enum:Choice:None, flags 00000000 20 4
Id 518 (Spa:Enum:AudioFormat:F32P)
* properties:
* link.passive = "true"
* object.linger = "false"
* link.output.node = "72"
* link.output.port = "65"
* link.input.node = "52"
* link.input.port = "53"
* factory.id = "20"
* client.id = "64"
* object.id = "60"
Aren't passive links supposed to let the sink to go idle when nothing is playing to it?