Move node.pause-on-idle setting to config files

So that we can configure it.
Add some more docs to the config file
This commit is contained in:
Wim Taymans 2021-02-08 17:19:47 +01:00
parent 0f028dab40
commit ecd1d3e1d7
9 changed files with 114 additions and 42 deletions

View file

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

View file

@ -54,7 +54,7 @@ rules = [
#node.nick = null
#priority.driver = 100
#priority.session = 100
#node.pause-on-idle = false
node.pause-on-idle = false
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false

View file

@ -38,7 +38,7 @@ rules = [
#node.nick = null
#priority.driver = 100
#priority.session = 100
#node.pause-on-idle = true
node.pause-on-idle = false
}
}
}

View file

@ -41,52 +41,95 @@ spa-libs = {
}
modules = {
## <module-name> = { [args = "<key>=<value> ..."]
# [flags = [ifexists]|[nofail]}
## <module-name> = { [args = { <key>=<value> ... }]
# [flags = "[ifexists]|[nofail]"}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignoed when it is not found.
# If nofail is given, module initialization failures are ignored.
#
# Uses RTKit to boost the data thread priority
libpipewire-module-rtkit = {
"#args" = { nice.level = -11
rt.prio = 20
rt.time.soft = 200000
rt.time.hard = 200000 }
"flags" = "ifexists|nofail"
args = {
#nice.level = -11
#rt.prio = 20
#rt.time.soft = 200000
#rt.time.hard = 200000
}
flags = "ifexists|nofail"
}
# The native communication protocol
libpipewire-module-protocol-native = null
# The profile module. Allows application to access profiler
# and performance data. It provides an interface that is used
# by pw-top and pw-profiler.
libpipewire-module-profiler = null
# Allows applications to create metadata objects. It creates
# a factory for Metadata objects.
libpipewire-module-metadata = null
# Creates a factory for making devices that run in the
# context of the PipeWire server.
libpipewire-module-spa-device-factory = null
# Creates a factory for making nodes that run in the
# context of the PipeWire server.
libpipewire-module-spa-node-factory = null
# Allows creating nodes that run in the context of the
# client. Is used by all clients that want to provide
# data to PipeWire.
libpipewire-module-client-node = null
# Allows creating devices that run in the context of the
# client. Is used by the session manager.
libpipewire-module-client-device = null
# The portal module monitors the PID of the portal process
# and tags connections with the same PID as portal
# connections.
libpipewire-module-portal = null
# The access module can perform acces checks and block
# new clients.
libpipewire-module-access = {
"#args" = {
# access.allowed to list an array of paths of allowed
# apps.
access.allowed = [
@media_session_path@
]
# an array of rejected paths
access.rejected = [ ]
# an array of paths with restricted access
access.restricted = [ ]
# anything not in the above lists gets assigned the
# access.force permission.
access.force = flatpak
}
args = {
# access.allowed to list an array of paths of allowed
# apps.
#access.allowed = [
# @media_session_path@
#]
# an array of rejected paths
#access.rejected = [ ]
# an array of paths with restricted access
#access.restricted = [ ]
# anything not in the above lists gets assigned the
# access.force permission.
#access.force = flatpak
}
}
# Makes a factory for wrapping nodes in an adapter with a
# converter and resampler.
libpipewire-module-adapter = null
# Makes a factory for creating links between ports
libpipewire-module-link-factory = null
# Provides factories to make session manager objects
libpipewire-module-session-manager = null
}
objects = {
## <factory-name> = { [args = "<key>=<value> ..."]
# [flags = nofail] }
## <factory-name> = { [args = { <key>=<value> ... } ]
# [flags = "nofail"] }
#
# Creates an object from a PipeWire factory with the given parameters.
# If nofail is given, errors are ignored (and no object is created)
@ -101,9 +144,10 @@ objects = {
# 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.
spa-node-factory = {
args = { factory.name = support.node.driver
node.name = Dummy-Driver
priority.driver = 8000
args = {
factory.name = support.node.driver
node.name = Dummy-Driver
priority.driver = 8000
}
}
}