From root, 5 Days ago, written in Plain Text.
This paste will slip away in 3 Weeks.
Embed
  1. # Daemon config file for PipeWire version "1.4.2" #
  2. #
  3. # Copy and edit this file in /etc/pipewire for system-wide changes
  4. # or in ~/.config/pipewire for local changes.
  5. #
  6. # It is also possible to place a file with an updated section in
  7. # /etc/pipewire/pipewire.conf.d/ for system-wide changes or in
  8. # ~/.config/pipewire/pipewire.conf.d/ for local changes.
  9. #
  10.  
  11. context.properties = {
  12.     ## Configure properties in the system.
  13.     #library.name.system                   = support/libspa-support
  14.     #context.data-loop.library.name.system = support/libspa-support
  15.     #support.dbus                          = true
  16.     #link.max-buffers                      = 64
  17.     link.max-buffers                       = 10                       # version < 3 clients can't handle more
  18.     #mem.warn-mlock                        = false
  19.     #mem.allow-mlock                       = true
  20.     #mem.mlock-all                         = false
  21.     #clock.power-of-two-quantum            = true
  22.     #log.level                             = 2
  23.     #cpu.zero.denormals                    = false
  24.  
  25.     #loop.rt-prio = -1            # -1 = use module-rt prio, 0 disable rt
  26.     #loop.class = data.rt
  27.     #thread.affinity = [ 0 1 ]    # optional array of CPUs
  28.     #context.num-data-loops = 1   # -1 = num-cpus, 0 = no data loops
  29.     #
  30.     #context.data-loops = [
  31.     #    {   loop.rt-prio = -1
  32.     #        loop.class = [ data.rt audio.rt ]
  33.     #        #library.name.system = support/libspa-support
  34.     #        thread.name = data-loop.0
  35.     #        #thread.affinity = [ 0 1 ]    # optional array of CPUs
  36.     #    }
  37.     #]
  38.  
  39.     core.daemon = true              # listening for socket connections
  40.     core.name   = pipewire-0        # core name and socket name
  41.  
  42.     ## Properties for the DSP configuration.
  43.     default.clock.rate          = 2822400
  44.     default.clock.allowed-rates = [ 44100,48000,192000 ]
  45.     #default.clock.quantum       = 1024
  46.     default.clock.min-quantum   = 30
  47.     #default.clock.max-quantum   = 2048
  48.     #default.clock.quantum-limit = 8192
  49.     #default.clock.quantum-floor = 4
  50.     #default.video.width         = 640
  51.     #default.video.height        = 480
  52.     #default.video.rate.num      = 25
  53.     #default.video.rate.denom    = 1
  54.     #
  55.     #settings.check-quantum      = false
  56.     #settings.check-rate         = false
  57.     dither.method = wannamaker10
  58. }
  59.  
  60. context.properties.rules = [
  61.     {   matches = [ { cpu.vm.name = !null } ]
  62.         actions = {
  63.             update-props = {
  64.                 # These overrides are only applied when running in a vm.
  65.                 default.clock.min-quantum = 1024
  66.             }
  67.         }
  68.     }
  69. ]
  70.  
  71. context.spa-libs = {
  72.     #<factory-name regex> = <library-name>
  73.     #
  74.     # Used to find spa factory names. It maps an spa factory name
  75.     # regular expression to a library name that should contain
  76.     # that factory.
  77.     #
  78.     audio.convert.* = audioconvert/libspa-audioconvert
  79.     avb.*           = avb/libspa-avb
  80.     api.alsa.*      = alsa/libspa-alsa
  81.     api.v4l2.*      = v4l2/libspa-v4l2
  82.     api.libcamera.* = libcamera/libspa-libcamera
  83.     api.bluez5.*    = bluez5/libspa-bluez5
  84.     api.vulkan.*    = vulkan/libspa-vulkan
  85.     api.jack.*      = jack/libspa-jack
  86.     support.*       = support/libspa-support
  87.     video.convert.* = videoconvert/libspa-videoconvert
  88.     #filter.graph    = filter-graph/libspa-filter-graph
  89.     #videotestsrc   = videotestsrc/libspa-videotestsrc
  90.     #audiotestsrc   = audiotestsrc/libspa-audiotestsrc
  91. }
  92.  
  93. context.modules = [
  94.     #{ name = <module-name>
  95.     #    ( args  = { <key> = <value> ... } )
  96.     #    ( flags = [ ( ifexists ) ( nofail ) ] )
  97.     #    ( condition = [ { <key> = <value> ... } ... ] )
  98.     #}
  99.     #
  100.     # Loads a module with the given parameters.
  101.     # If ifexists is given, the module is ignored when it is not found.
  102.     # If nofail is given, module initialization failures are ignored.
  103.     # If condition is given, the module is loaded only when the context
  104.     # properties all match the match rules.
  105.     #
  106.  
  107.     # Uses realtime scheduling to boost the audio thread priorities. This uses
  108.     # RTKit if the user doesn't have permission to use regular realtime
  109.     # scheduling. You can also clamp utilisation values to improve scheduling
  110.     # on embedded and heterogeneous systems, e.g. Arm big.LITTLE devices.
  111.     # use module.rt.args = { ... } to override the arguments.
  112.     { name = libpipewire-module-rt
  113.         args = {
  114.             nice.level    = -11
  115.             rt.prio       = 88
  116.             #rt.time.soft = -1
  117.             #rt.time.hard = -1
  118.             #uclamp.min = 0
  119.             #uclamp.max = 1024
  120.         }
  121.         flags = [ ifexists nofail ]
  122.         condition = [ { module.rt = !false } ]
  123.     }
  124.  
  125.     # The native communication protocol.
  126.     { name = libpipewire-module-protocol-native
  127.         args = {
  128.             # List of server Unix sockets, and optionally permissions
  129.             #sockets = [ { name = "pipewire-0" }, { name = "pipewire-0-manager" } ]
  130.         }
  131.     }
  132.  
  133.     # The profile module. Allows application to access profiler
  134.     # and performance data. It provides an interface that is used
  135.     # by pw-top and pw-profiler.
  136.     # use module.profiler.args = { ... } to override the arguments.
  137.     { name = libpipewire-module-profiler
  138.         args = {
  139.             #profile.interval.ms = 0
  140.         }
  141.         condition = [ { module.profiler = !false } ]
  142.     }
  143.  
  144.     # Allows applications to create metadata objects. It creates
  145.     # a factory for Metadata objects.
  146.     { name = libpipewire-module-metadata
  147.         condition = [ { module.metadata = !false } ]
  148.     }
  149.  
  150.     # Creates a factory for making devices that run in the
  151.     # context of the PipeWire server.
  152.     { name = libpipewire-module-spa-device-factory
  153.         condition = [ { module.spa-device-factory = !false } ]
  154.     }
  155.  
  156.     # Creates a factory for making nodes that run in the
  157.     # context of the PipeWire server.
  158.     { name = libpipewire-module-spa-node-factory
  159.         condition = [ { module.spa-node-factory = !false } ]
  160.     }
  161.  
  162.     # Allows creating nodes that run in the context of the
  163.     # client. Is used by all clients that want to provide
  164.     # data to PipeWire.
  165.     { name = libpipewire-module-client-node
  166.         condition = [ { module.client-node = !false } ]
  167.     }
  168.  
  169.     # Allows creating devices that run in the context of the
  170.     # client. Is used by the session manager.
  171.     { name = libpipewire-module-client-device
  172.         condition = [ { module.client-device = !false } ]
  173.     }
  174.  
  175.     # The portal module monitors the PID of the portal process
  176.     # and tags connections with the same PID as portal
  177.     # connections.
  178.     { name = libpipewire-module-portal
  179.         flags = [ ifexists nofail ]
  180.         condition = [ { module.portal = !false } ]
  181.     }
  182.  
  183.     # The access module can perform access checks and block
  184.     # new clients.
  185.     { name = libpipewire-module-access
  186.         args = {
  187.             # Socket-specific access permissions
  188.             #access.socket = { pipewire-0 = "default", pipewire-0-manager = "unrestricted" }
  189.  
  190.             # Deprecated legacy mode (not socket-based),
  191.             # for now enabled by default if access.socket is not specified
  192.             #access.legacy = true
  193.         }
  194.         condition = [ { module.access = !false } ]
  195.     }
  196.  
  197.     # Makes a factory for wrapping nodes in an adapter with a
  198.     # converter and resampler.
  199.     { name = libpipewire-module-adapter
  200.         condition = [ { module.adapter = !false } ]
  201.     }
  202.  
  203.     # Makes a factory for creating links between ports.
  204.     # use module.link-factory.args = { ... } to override the arguments.
  205.     { name = libpipewire-module-link-factory
  206.         args = {
  207.             #allow.link.passive = false
  208.         }
  209.         condition = [ { module.link-factory = !false } ]
  210.     }
  211.  
  212.     # Provides factories to make session manager objects.
  213.     { name = libpipewire-module-session-manager
  214.         condition = [ { module.session-manager = !false } ]
  215.     }
  216.  
  217.     # Use libcanberra to play X11 Bell
  218.     { name = libpipewire-module-x11-bell
  219.         args = {
  220.             #sink.name = "@DEFAULT_SINK@"
  221.             #sample.name = "bell-window-system"
  222.             #x11.display = null
  223.             #x11.xauthority = null
  224.         }
  225.         flags = [ ifexists nofail ]
  226.         condition = [ { module.x11.bell = !false } ]
  227.     }
  228.     # The JACK DBus detection module. When jackdbus is started, this
  229.     # will automatically make PipeWire become a JACK client.
  230.     # use module.jackdbus-detect.args = { ... } to override the arguments.
  231.     { name = libpipewire-module-jackdbus-detect
  232.         args = {
  233.             #jack.library     = libjack.so.0
  234.             #jack.server      = null
  235.             #jack.client-name = PipeWire
  236.             #jack.connect     = true
  237.             #tunnel.mode      = duplex  # source|sink|duplex
  238.             source.props = {
  239.                 #audio.channels = 2
  240.                 #midi.ports = 1
  241.                 #audio.position = [ FL FR ]
  242.                 # extra sink properties
  243.             }
  244.             sink.props = {
  245.                 #audio.channels = 2
  246.                 #midi.ports = 1
  247.                 #audio.position = [ FL FR ]
  248.                 # extra sink properties
  249.             }
  250.         }
  251.         flags = [ ifexists nofail ]
  252.         condition = [ { module.jackdbus-detect = !false } ]
  253.     }
  254. ]
  255.  
  256. context.objects = [
  257.     #{ factory = <factory-name>
  258.     #    ( args  = { <key> = <value> ... } )
  259.     #    ( flags = [ ( nofail ) ] )
  260.     #    ( condition = [ { <key> = <value> ... } ... ] )
  261.     #}
  262.     #
  263.     # Creates an object from a PipeWire factory with the given parameters.
  264.     # If nofail is given, errors are ignored (and no object is created).
  265.     # If condition is given, the object is created only when the context properties
  266.     # all match the match rules.
  267.     #
  268.     #{ factory = spa-node-factory   args = { factory.name = videotestsrc node.name = videotestsrc node.description = videotestsrc node.param.Props = { patternType = 1 } } }
  269.     #{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
  270.     #{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
  271.     #{ factory = spa-node-factory   args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
  272.     #{ factory = adapter            args = { factory.name = audiotestsrc node.name = my-test node.description = audiotestsrc node.param.Props = { live = false }} }
  273.     #{ factory = spa-node-factory   args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
  274.  
  275.     # A default dummy driver. This handles nodes marked with the "node.always-process"
  276.     # property when no other driver is currently active. JACK clients need this.
  277.     { factory = spa-node-factory
  278.         args = {
  279.             factory.name    = support.node.driver
  280.             node.name       = Dummy-Driver
  281.             node.group      = pipewire.dummy
  282.             node.sync-group  = sync.dummy
  283.             priority.driver = 200000
  284.             #clock.id       = monotonic # realtime | tai | monotonic-raw | boottime
  285.             #clock.name     = "clock.system.monotonic"
  286.         }
  287.         condition = [ { factory.dummy-driver = !false } ]
  288.     }
  289.     { factory = spa-node-factory
  290.         args = {
  291.             factory.name    = support.node.driver
  292.             node.name       = Freewheel-Driver
  293.             priority.driver = 190000
  294.             node.group      = pipewire.freewheel
  295.             node.sync-group  = sync.dummy
  296.             node.freewheel  = true
  297.             #freewheel.wait = 10
  298.         }
  299.         condition = [ { factory.freewheel-driver = !false } ]
  300.     }
  301.  
  302.     # This creates a new Source node. It will have input ports
  303.     # that you can link, to provide audio for this source.
  304.     #{ factory = adapter
  305.     #    args = {
  306.     #        factory.name     = support.null-audio-sink
  307.     #        node.name        = "my-mic"
  308.     #        node.description = "Microphone"
  309.     #        media.class      = "Audio/Source/Virtual"
  310.     #        audio.position   = "FL,FR"
  311.     #        monitor.passthrough = true
  312.     #    }
  313.     #}
  314.  
  315.     # This creates a single PCM source device for the given
  316.     # alsa device path hw:0. You can change source to sink
  317.     # to make a sink in the same way.
  318.     #{ factory = adapter
  319.     #    args = {
  320.     #        factory.name           = api.alsa.pcm.source
  321.     #        node.name              = "alsa-source"
  322.     #        node.description       = "PCM Source"
  323.     #        media.class            = "Audio/Source"
  324.     #        api.alsa.path          = "hw:0"
  325.     #        api.alsa.period-size   = 1024
  326.     #        api.alsa.headroom      = 0
  327.     #        api.alsa.disable-mmap  = false
  328.     #        api.alsa.disable-batch = false
  329.     #        audio.format           = "S16LE"
  330.     #        audio.rate             = 48000
  331.     #        audio.channels         = 2
  332.     #        audio.position         = "FL,FR"
  333.     #    }
  334.     #}
  335.  
  336.     # Use the metadata factory to create metadata and some default values.
  337.     #{ factory = metadata
  338.     #    args = {
  339.     #        metadata.name = my-metadata
  340.     #        metadata.values = [
  341.     #            { key = default.audio.sink   value = { name = somesink } }
  342.     #            { key = default.audio.source value = { name = somesource } }
  343.     #        ]
  344.     #    }
  345.     #}
  346. ]
  347.  
  348. context.exec = [
  349.     #{   path = <program-name>
  350.     #    ( args = "<arguments>" | [ <arg1> <arg2> ... ] )
  351.     #    ( condition = [ { <key> = <value> ... } ... ] )
  352.     #}
  353.     #
  354.     # Execute the given program with arguments.
  355.     # If condition is given, the program is executed only when the context
  356.     # properties all match the match rules.
  357.     #
  358.     # You can optionally start the session manager here,
  359.     # but it is better to start it as a systemd service.
  360.     # Run the session manager with -h for options.
  361.     #
  362.     #{ path = "/usr/bin/pipewire-media-session" args = ""
  363.     #  condition = [ { exec.session-manager = !false } ] }
  364.     #
  365.     # You can optionally start the pulseaudio-server here as well
  366.     # but it is better to start it as a systemd service.
  367.     # It can be interesting to start another daemon here that listens
  368.     # on another address with the -a option (eg. -a tcp:4713).
  369.     #
  370.     #{ path = "/usr/bin/pipewire" args = [ "-c" "pipewire-pulse.conf" ]
  371.     #  condition = [ { exec.pipewire-pulse = !false } ] }
  372. ]