create-item: Only configure audio device sink nodes in MONO

This allows multi channel mixing in the graph, even if MONO is enabled.
This commit is contained in:
Julian Bouzas 2025-12-08 09:24:07 -05:00
parent beded0214d
commit bec20fc054
3 changed files with 4 additions and 2 deletions

View file

@ -165,7 +165,7 @@ msgstr ""
#. /wireplumber.settings.schema/node.features.audio.mono/description
#: wireplumber.conf
msgid "Configure all audio nodes in MONO"
msgid "Configure all audio device sink nodes in MONO"
msgstr ""
#. /wireplumber.settings.schema/node.features.audio.mono/name

View file

@ -956,7 +956,7 @@ wireplumber.settings.schema = {
}
node.features.audio.mono = {
name = "Mono"
description = "Configure all audio nodes in MONO"
description = "Configure all audio device sink nodes in MONO"
type = "bool"
default = false
}

View file

@ -16,6 +16,7 @@ items = {}
function configProperties (node)
local properties = node.properties
local media_class = properties ["media.class"] or ""
local factory_name = properties ["factory.name"] or ""
-- ensure a media.type is set
if not properties ["media.type"] then
@ -40,6 +41,7 @@ function configProperties (node)
properties ["item.features.control-port"] =
Settings.get_boolean ("node.features.audio.control-port")
properties ["item.features.mono"] =
(factory_name == "api.alsa.pcm.sink" or factory_name == "api.bluez5.a2dp.sink") and
Settings.get_boolean ("node.features.audio.mono")
properties ["node.id"] = node ["bound-id"]