mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 13:38:02 +02:00
alsa: use the pcm name to populate the node.nick
This avoids using device.nick, which is the card name, on all nodes of a card. Useful on UCM, where analog, hdmi, etc are all exposed as nodes on a single profile.
This commit is contained in:
parent
afbc0ce57a
commit
4e5af26382
1 changed files with 4 additions and 3 deletions
|
|
@ -135,9 +135,9 @@ function createNode(parent, id, type, factory, properties)
|
|||
|
||||
-- and a nick
|
||||
local nick = properties["node.nick"]
|
||||
or properties["api.alsa.pcm.name"]
|
||||
or properties["alsa.name"]
|
||||
or dev_props["device.nick"]
|
||||
or dev_props["api.alsa.card.name"]
|
||||
or dev_props["alsa.card_name"]
|
||||
-- also sanitize nick, replace ':' with ' '
|
||||
properties["node.nick"] = nick:gsub("(:)", " ")
|
||||
|
||||
|
|
@ -230,7 +230,8 @@ function prepareDevice(parent, id, type, factory, properties)
|
|||
-- ensure the device has a nick
|
||||
properties["device.nick"] =
|
||||
properties["device.nick"] or
|
||||
properties["api.alsa.card.name"]
|
||||
properties["api.alsa.card.name"] or
|
||||
properties["alsa.card_name"]
|
||||
|
||||
-- set the icon name
|
||||
if not properties["device.icon-name"] then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue