style: Reformat config files

Use spaces instead of tabs (as they depend on text editor settings).
Make configuration files more readable and consistent seeing as there
were some mixed indentation and styling.
Also put some logic into styling.
This commit is contained in:
Ivan 2021-02-11 22:09:18 +02:00 committed by Wim Taymans
parent b6108df6f3
commit 0d56f717bf
5 changed files with 146 additions and 144 deletions

View file

@ -19,86 +19,86 @@ rules = [
# matches work, the actions are executed for the object. # matches work, the actions are executed for the object.
matches = [ matches = [
{ {
# This matches all cards. These are regular expressions # This matches all cards. These are regular expressions
# so "." matches one character and ".*" matches many. # so "." matches one character and ".*" matches many.
device.name = "~alsa_card.*" device.name = "~alsa_card.*"
} }
] ]
actions = { actions = {
# Actions can update properties on the matched object. # Actions can update properties on the matched object.
update-props = { update-props = {
# Use ALSA-Card-Profile devices. They use UCM or # Use ALSA-Card-Profile devices. They use UCM or
# the profile configuration to configure the device # the profile configuration to configure the device
# and mixer settings. # and mixer settings.
api.alsa.use-acp = true api.alsa.use-acp = true
# Use UCM instead of profile when available. Can be # Use UCM instead of profile when available. Can be
# disabled to skip trying to use the UCM profile. # disabled to skip trying to use the UCM profile.
#api.alsa.use-ucm = true #api.alsa.use-ucm = true
# Don't use the hardware mixer for volume control. It # Don't use the hardware mixer for volume control. It
# will only use software volume. The mixer is still used # will only use software volume. The mixer is still used
# to mute unused paths based on the selected port. # to mute unused paths based on the selected port.
#api.alsa.soft-mixer = false #api.alsa.soft-mixer = false
# Ignore decibel settings of the driver. Can be used to # Ignore decibel settings of the driver. Can be used to
# work around buggy drivers that report wrong values. # work around buggy drivers that report wrong values.
#api.alsa.ignore-dB = false #api.alsa.ignore-dB = false
# The profile set to use for the device. Usually this # The profile set to use for the device. Usually this
# "default.conf" but can be changed with a udev rule # "default.conf" but can be changed with a udev rule
# or here. # or here.
#device.profile-set = "profileset-name" #device.profile-set = "profileset-name"
# The default active profile. Is by default set to "Off". # The default active profile. Is by default set to "Off".
#device.profile = "default profile name" #device.profile = "default profile name"
# Automatically select the best profile. This is the # Automatically select the best profile. This is the
# highest priority available profile. This is disabled # highest priority available profile. This is disabled
# here and instead implemented in the session manager # here and instead implemented in the session manager
# where it can save and load previous preferences. # where it can save and load previous preferences.
api.acp.auto-profile = false api.acp.auto-profile = false
# Automatically switch to the highest priority available # Automatically switch to the highest priority available
# port. This is disabled here and implemented in the # port. This is disabled here and implemented in the
# session manager instead. # session manager instead.
api.acp.auto-port = false api.acp.auto-port = false
# Other properties can be set here. # Other properties can be set here.
#device.nick = "My Device" #device.nick = "My Device"
} }
} }
} }
{ {
matches = [ matches = [
{ {
# Matches all sinks. These are regular expressions # Matches all sinks. These are regular expressions
# so "." matches one character and ".*" matches many. # so "." matches one character and ".*" matches many.
node.name = "~alsa_input.*" node.name = "~alsa_input.*"
} }
{ {
# Matches all sources. # Matches all sources.
node.name = "~alsa_output.*" node.name = "~alsa_output.*"
} }
] ]
actions = { actions = {
update-props = { update-props = {
#node.nick = "My Node" #node.nick = "My Node"
#node.nick = null #node.nick = null
#priority.driver = 100 #priority.driver = 100
#priority.session = 100 #priority.session = 100
node.pause-on-idle = false node.pause-on-idle = false
#resample.quality = 4 #resample.quality = 4
#channelmix.normalize = false #channelmix.normalize = false
#channelmix.mix-lfe = false #channelmix.mix-lfe = false
#audio.channels = 2 #audio.channels = 2
#audio.format = "S16LE" #audio.format = "S16LE"
#audio.rate = 44100 #audio.rate = 44100
#audio.position = "FL,FR" #audio.position = "FL,FR"
#api.alsa.period-size = 1024 #api.alsa.period-size = 1024
#api.alsa.headroom = 0 #api.alsa.headroom = 0
#api.alsa.disable-mmap = false #api.alsa.disable-mmap = false
#api.alsa.disable-batch = false #api.alsa.disable-batch = false
} }
} }
} }

View file

@ -2,19 +2,19 @@
properties = { properties = {
# MSBC is not expected to work on all headset + adapter combinations. # MSBC is not expected to work on all headset + adapter combinations.
#bluez5.msbc-support = true #bluez5.msbc-support = true
#bluez5.sbc-xq-support = true #bluez5.sbc-xq-support = true
# Enabled headset roles (default: [ hsp_hs hfp_ag ]), this # Enabled headset roles (default: [ hsp_hs hfp_ag ]), this
# property only applies to native backend. Currently some headsets # property only applies to native backend. Currently some headsets
# (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag # (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag
# enabled, disable either hsp_ag or hfp_ag to work around it. # enabled, disable either hsp_ag or hfp_ag to work around it.
# #
# Supported headset roles: hsp_hs (HSP Headset), # Supported headset roles: hsp_hs (HSP Headset),
# hsp_ag (HSP Audio Gateway), # hsp_ag (HSP Audio Gateway),
# hfp_ag (HFP Audio Gateway) # hfp_ag (HFP Audio Gateway)
#bluez5.headset-roles = [ hsp_hs hsp_ag hfp_ag ] #bluez5.headset-roles = [ hsp_hs hsp_ag hfp_ag ]
# Enabled A2DP codecs (default: all). # Enabled A2DP codecs (default: all).
#bluez5.codecs = [ sbc aac ldac aptx aptx_hd ] #bluez5.codecs = [ sbc aac ldac aptx aptx_hd ]
} }
@ -27,38 +27,38 @@ rules = [
# matches work, the actions are executed for the object. # matches work, the actions are executed for the object.
matches = [ matches = [
{ {
# This matches all cards. # This matches all cards.
device.name = "~bluez_card.*" device.name = "~bluez_card.*"
} }
] ]
actions = { actions = {
# Actions can update properties on the matched object. # Actions can update properties on the matched object.
update-props = { update-props = {
#device.nick = "My Device" #device.nick = "My Device"
} }
} }
} }
{ {
matches = [ matches = [
{ {
# Matches all sinks. # Matches all sinks.
node.name = "~bluez_input.*" node.name = "~bluez_input.*"
} }
{ {
# Matches all sources. # Matches all sources.
node.name = "~bluez_output.*" node.name = "~bluez_output.*"
} }
] ]
actions = { actions = {
update-props = { update-props = {
#node.nick = "My Node" #node.nick = "My Node"
#node.nick = null #node.nick = null
#priority.driver = 100 #priority.driver = 100
#priority.session = 100 #priority.session = 100
node.pause-on-idle = false node.pause-on-idle = false
#resample.quality = 4 #resample.quality = 4
#channelmix.normalize = false #channelmix.normalize = false
#channelmix.mix-lfe = false #channelmix.mix-lfe = false
} }
} }
} }

View file

@ -3,18 +3,17 @@
properties = { properties = {
# Properties to configure the session and some # Properties to configure the session and some
# modules. # modules.
#mem.mlock-all = false #mem.mlock-all = false
#context.profile.modules = default,rtkit #context.profile.modules = default,rtkit
#dbus = true #dbus = true
} }
spa-libs = { spa-libs = {
# Mapping from factory name to library. # Mapping from factory name to library.
api.bluez5.* = bluez5/libspa-bluez5
api.bluez5.* = bluez5/libspa-bluez5 api.alsa.* = alsa/libspa-alsa
api.alsa.* = alsa/libspa-alsa api.v4l2.* = v4l2/libspa-v4l2
api.v4l2.* = v4l2/libspa-v4l2 api.libcamera.* = libcamera/libspa-libcamera
api.libcamera.* = libcamera/libspa-libcamera
} }
modules = { modules = {
@ -23,21 +22,21 @@ modules = {
# the default bundle is always enabled. # the default bundle is always enabled.
default = [ default = [
flatpak # manages flatpak access flatpak # manages flatpak access
portal # manage portal permissions portal # manage portal permissions
v4l2 # video for linux udev detection v4l2 # video for linux udev detection
#libcamera # libcamera udev detection #libcamera # libcamera udev detection
suspend-node # suspend inactive nodes suspend-node # suspend inactive nodes
policy-node # configure and link nodes policy-node # configure and link nodes
#metadata # export metadata API #metadata # export metadata API
#default-nodes # restore default nodes #default-nodes # restore default nodes
#default-profile # restore default profiles #default-profile # restore default profiles
#default-routes # restore default route #default-routes # restore default route
#streams-follow-default # move streams when default changes #streams-follow-default # move streams when default changes
#alsa-seq # alsa seq midi support #alsa-seq # alsa seq midi support
#alsa-monitor # alsa udev detection #alsa-monitor # alsa udev detection
#bluez5 # bluetooth support #bluez5 # bluetooth support
#restore-stream # restore stream settings #restore-stream # restore stream settings
] ]
with-audio = [ with-audio = [
metadata metadata

View file

@ -1,7 +1,6 @@
# V4L2 monitor config file # # V4L2 monitor config file #
properties = { properties = { }
}
rules = [ rules = [
# An array of matches/actions to evaluate. # An array of matches/actions to evaluate.
@ -11,35 +10,35 @@ rules = [
# matches work, the actions are executed for the object. # matches work, the actions are executed for the object.
matches = [ matches = [
{ {
# This matches all devices. # This matches all devices.
device.name = "~v4l2_device.*" device.name = "~v4l2_device.*"
} }
] ]
actions = { actions = {
# Actions can update properties on the matched object. # Actions can update properties on the matched object.
update-props = { update-props = {
#device.nick = "My Device" #device.nick = "My Device"
} }
} }
} }
{ {
matches = [ matches = [
{ {
# Matches all sinks. # Matches all sinks.
node.name = "~v4l2_input.*" node.name = "~v4l2_input.*"
} }
{ {
# Matches all sources. # Matches all sources.
node.name = "~v4l2_output.*" node.name = "~v4l2_output.*"
} }
] ]
actions = { actions = {
update-props = { update-props = {
#node.nick = "My Node" #node.nick = "My Node"
#node.nick = null #node.nick = null
#priority.driver = 100 #priority.driver = 100
#priority.session = 100 #priority.session = 100
node.pause-on-idle = false node.pause-on-idle = false
} }
} }
} }

View file

@ -2,48 +2,50 @@
properties = { properties = {
## Configure properties in the system. ## Configure properties in the system.
#library.name.system = support/libspa-support #library.name.system = support/libspa-support
#context.data-loop.library.name.system = support/libspa-support #context.data-loop.library.name.system = support/libspa-support
#link.max-buffers = 64 #link.max-buffers = 64
link.max-buffers = 16 # version < 3 clients can't handle more link.max-buffers = 16 # version < 3 clients can't handle more
#mem.warn-mlock = false #mem.warn-mlock = false
#mem.allow-mlock = true #mem.allow-mlock = true
#mem.mlock-all = false #mem.mlock-all = false
#log.level = 2 #log.level = 2
## Properties for the DSP configuration. ## Properties for the DSP configuration.
#default.clock.rate = 48000 #default.clock.rate = 48000
#default.clock.quantum = 1024 #default.clock.quantum = 1024
#default.clock.min-quantum = 32 #default.clock.min-quantum = 32
#default.clock.max-quantum = 8192 #default.clock.max-quantum = 8192
#default.video.width = 640 #default.video.width = 640
#default.video.height = 480 #default.video.height = 480
#default.video.rate.num = 25 #default.video.rate.num = 25
#default.video.rate.denom = 1 #default.video.rate.denom = 1
} }
spa-libs = { spa-libs = {
## <factory-name regex> = <library-name> #<factory-name regex> = <library-name>
# #
# Used to find spa factory names. It maps an spa factory name # Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain # regular expression to a library name that should contain
# that factory. # that factory.
# #
audio.convert* = audioconvert/libspa-audioconvert audio.convert* = audioconvert/libspa-audioconvert
api.alsa.* = alsa/libspa-alsa api.alsa.* = alsa/libspa-alsa
api.v4l2.* = v4l2/libspa-v4l2 api.v4l2.* = v4l2/libspa-v4l2
api.libcamera.* = libcamera/libspa-libcamera api.libcamera.* = libcamera/libspa-libcamera
api.bluez5.* = bluez5/libspa-bluez5 api.bluez5.* = bluez5/libspa-bluez5
api.vulkan.* = vulkan/libspa-vulkan api.vulkan.* = vulkan/libspa-vulkan
api.jack.* = jack/libspa-jack api.jack.* = jack/libspa-jack
support.* = support/libspa-support support.* = support/libspa-support
#videotestsrc = videotestsrc/libspa-videotestsrc #videotestsrc = videotestsrc/libspa-videotestsrc
#audiotestsrc = audiotestsrc/libspa-audiotestsrc #audiotestsrc = audiotestsrc/libspa-audiotestsrc
} }
modules = { modules = {
## <module-name> = { [args = { <key>=<value> ... }] #<module-name> = {
# [flags = [ [ifexists] [nofail] ]} # [ args = { <key> = <value> ... } ]
# [ flags = [ [ ifexists ] [ nofail ] ]
#}
# #
# Loads a module with the given parameters. # Loads a module with the given parameters.
# If ifexists is given, the module is ignored when it is not found. # If ifexists is given, the module is ignored when it is not found.
@ -51,13 +53,13 @@ modules = {
# #
# Uses RTKit to boost the data thread priority. # Uses RTKit to boost the data thread priority.
libpipewire-module-rtkit = { libpipewire-module-rtkit = {
args = { args = {
#nice.level = -11 #nice.level = -11
#rt.prio = 20 #rt.prio = 20
#rt.time.soft = 200000 #rt.time.soft = 200000
#rt.time.hard = 200000 #rt.time.hard = 200000
} }
flags = [ ifexists nofail ] flags = [ ifexists nofail ]
} }
@ -129,25 +131,27 @@ modules = {
} }
objects = { objects = {
## <factory-name> = { [args = { <key>=<value> ... } ] #<factory-name> = {
# [flags = [ [nofail] ] } # [ args = { <key> = <value> ... } ]
# [ flags = [ [ nofail ] ]
#}
# #
# Creates an object from a PipeWire factory with the given parameters. # Creates an object from a PipeWire factory with the given parameters.
# If nofail is given, errors are ignored (and no object is created). # If nofail is given, errors are ignored (and no object is created).
# #
#spa-node-factory = { args = { factory.name=videotestsrc node.name=videotestsrc Spa:Pod:Object:Param:Props:patternType=1 } } #spa-node-factory = { args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } }
#spa-device-factory = { args = { factory.name=api.jack.device foo=bar } flags = [ nofail ] } #spa-device-factory = { args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
#spa-device-factory = { args = { factory.name=api.alsa.enum.udev } } #spa-device-factory = { args = { factory.name = api.alsa.enum.udev } }
#spa-device-factory = { args = { factory.name=api.alsa.seq.bridge node.name=Internal-MIDI-Bridge } } #spa-device-factory = { args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
#adapter = { args = { factory.name=audiotestsrc node.name=my-test } } #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 = api.vulkan.compute.source node.name = my-compute-source } }
# A default dummy driver. This handles nodes marked with the "node.always-driver" # A default dummy driver. This handles nodes marked with the "node.always-driver"
# property when no other driver is currently active. JACK clients need this. # property when no other driver is currently active. JACK clients need this.
spa-node-factory = { spa-node-factory = {
args = { args = {
factory.name = support.node.driver factory.name = support.node.driver
node.name = Dummy-Driver node.name = Dummy-Driver
priority.driver = 8000 priority.driver = 8000
} }
} }
@ -165,14 +169,14 @@ objects = {
} }
exec = { exec = {
## <program-name> = { [args = "<arguments>"] } #<program-name> = { [ args = "<arguments>" ] }
# #
# Execute the given program with arguments. # Execute the given program with arguments.
# #
# Start the session manager. Run the session manager with -h for # Start the session manager. Run the session manager with -h for
# options. # options.
# #
"@media_session_path@" = { args = ""} "@media_session_path@" = { args = "" }
# #
# You can optionally start the pulseaudio-server here as well # You can optionally start the pulseaudio-server here as well
# but it better to start it as a systemd service. # but it better to start it as a systemd service.