media-session: use simplified syntax

Now sure about this, it looks better but it's less compatible.
This commit is contained in:
Wim Taymans 2020-12-31 10:19:48 +01:00
parent 2fd35488c7
commit 20e9ec25be
2 changed files with 90 additions and 90 deletions

View file

@ -1,55 +1,55 @@
{
"properties": {
},
"rules": [
properties = {
}
rules = [
{
"#": [ "rules for matching a device or node. It is an array of",
"properties that all need to match the regexp. If any of the",
"matches work, the actions are executed for the object."
],
# rules for matching a device or node. It is an array of
# properties that all need to match the regexp. If any of the
# matches work, the actions are executed for the object.
"matches": [
matches = [
{
"device.name": "~alsa_card.*"
device.name = ~alsa_card.*
}
],
"actions": {
"#": [ "actions can update properties on the matched object."
],
]
actions = {
# actions can update properties on the matched object.
"update-props": {
"api.alsa.use-acp": true,
"#api.alsa.use-ucm": true,
"#api.alsa.soft-mixer": false,
"#api.alsa.ignore-dB": false,
"#device.profile-set": "profileset-name",
"#device.profile": "default profile name",
"#api.acp.auto-port": true,
"#api.acp.auto-profile": true
"#device.nick": "My Device",
update-props = {
api.alsa.use-acp = true
#api.alsa.use-ucm = true
#api.alsa.soft-mixer = false
#api.alsa.ignore-dB = false
#device.profile-set = "profileset-name"
#device.profile = "default profile name"
#api.acp.auto-port = true
#api.acp.auto-profile = true
#device.nick = "My Device"
}
}
},
}
{
"matches": [
matches = [
{
"node.name": "~alsa_input.*"
},
{
"node.name": "~alsa_output.*"
node.name = ~alsa_input.*
}
],
"actions": {
"update-props": {
"#node.nick": "My Node",
"#node.nick": null,
"#priority.driver": 100,
"#resample.quality": 4,
"#channelmix.normalize": false,
"#channelmix.mix-lfe": false,
"#audio.format": "S16LE",
"#audio.rate": 44100,
"#audio.position": "FL,FR"
{
node.name = ~alsa_output.*
}
]
actions = {
update-props = {
#node.nick = "My Node"
#node.nick = null
#priority.driver = 100
#priority.session = 100
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false
#audio.format = "S16LE"
#audio.rate = 44100
#audio.position = "FL,FR"
}
}
}