From d99ac615b2a140f8fdf8fc0aa09387dec487556e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 31 Dec 2020 21:45:36 +0100 Subject: [PATCH] conf: remove extra object level We can parse this without the extra object level. Use 4 spaces per level --- src/daemon/media-session.d/alsa-monitor.conf | 113 +++++++++--------- src/daemon/media-session.d/media-session.conf | 62 +++++----- src/daemon/pipewire.conf.in | 20 ++-- 3 files changed, 96 insertions(+), 99 deletions(-) diff --git a/src/daemon/media-session.d/alsa-monitor.conf b/src/daemon/media-session.d/alsa-monitor.conf index 7c84b5083..c55c5c045 100644 --- a/src/daemon/media-session.d/alsa-monitor.conf +++ b/src/daemon/media-session.d/alsa-monitor.conf @@ -1,58 +1,59 @@ # alsa-monitor config file -{ - 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. - - matches = [ - { - device.name = ~alsa_card.* - } - ] - 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" - } - } - } - { - matches = [ - { - node.name = ~alsa_input.* - } - { - 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" - } - } - } - ] +properties = { } + +rules = [ + # an array of matches/actions to evaluate + { + # 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 = [ + { + # this matches all cards + device.name = ~alsa_card.* + } + ] + 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" + } + } + } + { + matches = [ + { + # matches all sinks + node.name = ~alsa_input.* + } + { + # matches all sources + 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" + } + } + } +] + diff --git a/src/daemon/media-session.d/media-session.conf b/src/daemon/media-session.d/media-session.conf index 240568e5c..86bd164af 100644 --- a/src/daemon/media-session.d/media-session.conf +++ b/src/daemon/media-session.d/media-session.conf @@ -1,60 +1,58 @@ # media-session config file -{ - properties = { +properties = { # Properties to configure the session and some # modules #bluez5.msbc-support = true - } +} - spa-libs = { +spa-libs = { # Mapping from factory name to library. api.bluez5.* = bluez5/libspa-bluez5 api.alsa.* = alsa/libspa-alsa api.v4l2.* = v4l2/libspa-v4l2 api.libcamera.* = libcamera/libspa-libcamera - } +} - modules = { +modules = { # These are the modules that are enabled when a file with # the key name is found in the media-session.d config directory. # the default bundle is always enabled. default = [ - flatpak # manages flatpak access - portal # manage portal permissions - v4l2 # video for linux udev detection - #libcamera # libcamera udev detection - suspend-node # suspend inactive nodes - policy-node # configure and link nodes - #metadata # export metadata API - #default-nodes # restore default nodes - #default-profile # restore default profiles - #default-routes # restore default route - #alsa-seq # alsa seq midi support - #alsa-monitor # alsa udev detection - #bluez5 # bluetooth support - #restore-stream # restore stream settings + flatpak # manages flatpak access + portal # manage portal permissions + v4l2 # video for linux udev detection + #libcamera # libcamera udev detection + suspend-node # suspend inactive nodes + policy-node # configure and link nodes + #metadata # export metadata API + #default-nodes # restore default nodes + #default-profile # restore default profiles + #default-routes # restore default route + #alsa-seq # alsa seq midi support + #alsa-monitor # alsa udev detection + #bluez5 # bluetooth support + #restore-stream # restore stream settings ] with-audio = [ - metadata - default-nodes - default-profile - default-routes - alsa-seq - alsa-monitor + metadata + default-nodes + default-profile + default-routes + alsa-seq + alsa-monitor ] with-alsa = [ - with-audio + with-audio ] with-jack = [ - with-audio + with-audio ] with-pulseaudio = [ - with-audio - bluez5 - restore-stream + with-audio + bluez5 + restore-stream ] - } } diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in index 94ebd39af..e052fa374 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in @@ -1,6 +1,5 @@ #daemon config file for PipeWire version @VERSION@ -{ - properties = { +properties = { ## configure properties in the system #library.name.system = support/libspa-support #context.data-loop.library.name.system = support/libspa-support @@ -18,9 +17,9 @@ #default.video.height = 480 #default.video.rate.num = 25 #default.video.rate.denom = 1 - } +} - spa-libs = { +spa-libs = { ## = # # used to find spa factory names. It maps an spa factory name @@ -37,9 +36,9 @@ support.* = support/libspa-support #videotestsrc = videotestsrc/libspa-videotestsrc #audiotestsrc = audiotestsrc/libspa-audiotestsrc - } +} - modules = { +modules = { ## = { [args = "= ..."] # [flags = ifexists] } # @@ -59,9 +58,9 @@ libpipewire-module-adapter = null libpipewire-module-link-factory = null libpipewire-module-session-manager = null - } +} - objects = { +objects = { ## = { [args = "= ..."] # [flags = nofail] } # @@ -75,9 +74,9 @@ #adapter = { args = "factory.name=audiotestsrc node.name=my-test" } #spa-node-factory = { args = "factory.name=api.vulkan.compute.source node.name=my-compute-source" } spa-node-factory = { args = "factory.name=support.node.driver node.name=Dummy priority.driver=8000" } - } +} - exec = { +exec = { ## = { [args = ""] } # # Execute the given program with arguments. @@ -97,5 +96,4 @@ # on another address with the -a option (eg. -a tcp:4713) # #"@pipewire_pulse_path@" = { "#args" = "-a tcp:4713" } - } }