alsa: also try the profile description if the pcm name is empty, for node.nick

This commit is contained in:
George Kiagiadakis 2022-03-01 12:11:25 +02:00
parent 4e5af26382
commit b95da3393c

View file

@ -134,9 +134,10 @@ function createNode(parent, id, type, factory, properties)
end end
-- and a nick -- and a nick
local nick = properties["node.nick"] local nick = nonempty(properties["node.nick"])
or properties["api.alsa.pcm.name"] or nonempty(properties["api.alsa.pcm.name"])
or properties["alsa.name"] or nonempty(properties["alsa.name"])
or nonempty(profile_desc)
or dev_props["device.nick"] or dev_props["device.nick"]
-- also sanitize nick, replace ':' with ' ' -- also sanitize nick, replace ':' with ' '
properties["node.nick"] = nick:gsub("(:)", " ") properties["node.nick"] = nick:gsub("(:)", " ")