alsa plugin: allow specifying a media.role on the virtual device name

So that we can do:
  aplay -D pipewire:ROLE=Music music.wav
  aplay -D pipewire:ROLE=Notification notice.wav
This commit is contained in:
George Kiagiadakis 2021-06-22 13:23:22 +03:00 committed by Wim Taymans
parent 575d4456e1
commit 5ee9133b60
2 changed files with 23 additions and 2 deletions

View file

@ -3,9 +3,10 @@
defaults.pipewire.server "pipewire-0"
defaults.pipewire.node "-1"
defaults.pipewire.exclusive false
defaults.pipewire.role ""
pcm.pipewire {
@args [ SERVER NODE EXCLUSIVE ]
@args [ SERVER NODE EXCLUSIVE ROLE ]
@args.SERVER {
type string
default {
@ -27,6 +28,13 @@ pcm.pipewire {
name defaults.pipewire.exclusive
}
}
@args.ROLE {
type string
default {
@func refer
name defaults.pipewire.role
}
}
type pipewire
@ -34,6 +42,7 @@ pcm.pipewire {
playback_node $NODE
capture_node $NODE
exclusive $EXCLUSIVE
role $ROLE
hint {
show on
description "PipeWire Sound Server"