Skip to content

Instantly share code, notes, and snippets.

@saivert
Created February 4, 2021 17:44
Show Gist options
  • Select an option

  • Save saivert/c8b7bee3b49859e5761eec0eaa5ce9c2 to your computer and use it in GitHub Desktop.

Select an option

Save saivert/c8b7bee3b49859e5761eec0eaa5ce9c2 to your computer and use it in GitHub Desktop.
# alsa-monitor config file
properties = {
#alsa.jack-device = true
}
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 = false
#api.acp.auto-profile = false
#device.nick = "My Device"
}
}
}
# {
# matches = [
# {
# device.name = "alsa_card.pci-0000:02:02.0"
# }
# ]
# actions = {
# update-props = {
# api.alsa.use-acp = false
# device.nick = "Onboard sound"
# }
# }
# }
{
matches = [
{
node.name = "alsa_output.pci-0000:02:02.0.analog-stereo"
}
]
actions = {
update-props = {
node.nick = "Onboard audio"
node.description = "Onboard audio output"
#node.latency = "8192/48000"
api.alsa.period-size = 256
api.alsa.headroom = 8192
#api.alsa.disable-mmap = true
}
}
}
{
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
#node.pause-on-idle = false
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false
#audio.channels = 2
#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
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment