Skip to content

Instantly share code, notes, and snippets.

@otuva
Last active March 5, 2025 16:56
Show Gist options
  • Select an option

  • Save otuva/1089abb2c12543f298fe4b13015313aa to your computer and use it in GitHub Desktop.

Select an option

Save otuva/1089abb2c12543f298fe4b13015313aa to your computer and use it in GitHub Desktop.

Revisions

  1. otuva revised this gist Mar 5, 2025. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions jack.conf
    Original file line number Diff line number Diff line change
    @@ -65,11 +65,11 @@ context.modules = [

    # global properties for all jack clients
    jack.properties = {
    node.latency = 64/48000 # sampling rate
    #node.rate = 1/48000
    #node.quantum = 1024/48000
    node.latency = 128/48000
    node.rate = 1/48000
    node.quantum = 128/48000
    #node.lock-quantum = true
    node.force-quantum = 1024 # to remove crackling
    #node.force-quantum = 1024
    #jack.show-monitor = true
    #jack.merge-monitor = true
    #jack.show-midi = true
  2. otuva created this gist Feb 23, 2025.
    139 changes: 139 additions & 0 deletions jack.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,139 @@
    # JACK client config file for PipeWire version "1.2.4" #
    #
    # Copy and edit this file in /etc/pipewire for system-wide changes
    # or in ~/.config/pipewire for local changes.
    #
    # It is also possible to place a file with an updated section in
    # /etc/pipewire/jack.conf.d/ for system-wide changes or in
    # ~/.config/pipewire/jack.conf.d/ for local changes.
    #

    context.properties = {
    ## Configure properties in the system.
    #mem.warn-mlock = false
    #mem.allow-mlock = true
    #mem.mlock-all = false
    log.level = 0

    #default.clock.quantum-limit = 8192
    }

    context.spa-libs = {
    #<factory-name regex> = <library-name>
    #
    # Used to find spa factory names. It maps an spa factory name
    # regular expression to a library name that should contain
    # that factory.
    #
    support.* = support/libspa-support
    }

    context.modules = [
    #{ name = <module-name>
    # ( args = { <key> = <value> ... } )
    # ( flags = [ ( ifexists ) ( nofail ) ] )
    # ( condition = [ { <key> = <value> ... } ... ] )
    #}
    #
    # Loads a module with the given parameters.
    # If ifexists is given, the module is ignored when it is not found.
    # If nofail is given, module initialization failures are ignored.
    #
    #
    # Boost the data thread priority.
    { name = libpipewire-module-rt
    args = {
    #rt.prio = 83
    #rt.time.soft = -1
    #rt.time.hard = -1
    }
    flags = [ ifexists nofail ]
    }

    # The native communication protocol.
    { name = libpipewire-module-protocol-native }

    # Allows creating nodes that run in the context of the
    # client. Is used by all clients that want to provide
    # data to PipeWire.
    { name = libpipewire-module-client-node }

    # Allows applications to create metadata objects. It creates
    # a factory for Metadata objects.
    { name = libpipewire-module-metadata }
    ]

    # global properties for all jack clients
    jack.properties = {
    node.latency = 64/48000 # sampling rate
    #node.rate = 1/48000
    #node.quantum = 1024/48000
    #node.lock-quantum = true
    node.force-quantum = 1024 # to remove crackling
    #jack.show-monitor = true
    #jack.merge-monitor = true
    #jack.show-midi = true
    #jack.short-name = false
    #jack.filter-name = false
    #jack.filter-char = " "
    #
    # allow: Don't restrict self connect requests
    # fail-external: Fail self connect requests to external ports only
    # ignore-external: Ignore self connect requests to external ports only
    # fail-all: Fail all self connect requests
    # ignore-all: Ignore all self connect requests
    #jack.self-connect-mode = allow
    #
    # allow: Allow connect request of other ports
    # fail: Fail connect requests of other ports
    # ignore: Ignore connect requests of other ports
    #jack.other-connect-mode = allow
    #jack.locked-process = true
    #jack.default-as-system = false
    #jack.fix-midi-events = true
    #jack.global-buffer-size = false
    #jack.max-client-ports = 768
    #jack.fill-aliases = false
    #jack.writable-input = true
    }

    # client specific properties
    jack.rules = [
    { matches = [
    {
    # all keys must match the value. ! negates. ~ starts regex.
    #client.name = "Carla"
    #application.process.binary = "jack_simple_client"
    #application.name = "~jack_simple_client.*"
    }
    ]
    actions = {
    update-props = {
    #node.latency = 512/48000
    }
    }
    }
    { matches = [ { application.process.binary = "jack_bufsize" } ]
    actions = {
    update-props = {
    jack.global-buffer-size = true # quantum set globally using metadata
    }
    }
    }
    { matches = [ { application.process.binary = "qsynth" } ]
    actions = {
    update-props = {
    node.always-process = false # makes qsynth idle
    node.pause-on-idle = false # makes audio fade out when idle
    node.passive = out # makes the sink and qsynth suspend
    }
    }
    }
    { matches = [ { client.name = "Mixxx" } ]
    actions = {
    update-props = {
    jack.merge-monitor = false
    }
    }
    }
    ]