Advertisement
Guest User

Untitled

a guest
Nov 24th, 2023
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 12.28 KB | None | 0 0
  1. # Daemon config file for PipeWire version "0.3.85" #
  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                       = 16                       # version < 3 clients can't handle more
  18.     mem.warn-mlock                         = true                     # Gentoo should have good RLIMITs now
  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.     core.daemon = true              # listening for socket connections
  26.     core.name   = pipewire-0        # core name and socket name
  27.  
  28.     ## Properties for the DSP configuration.
  29.     #default.clock.rate          = 48000
  30.     #default.clock.allowed-rates = [ 48000 ]
  31.     #default.clock.quantum       = 1024
  32.     #default.clock.min-quantum   = 32
  33.     #default.clock.max-quantum   = 2048
  34.     #default.clock.quantum-limit = 8192
  35.     #default.video.width         = 640
  36.     #default.video.height        = 480
  37.     #default.video.rate.num      = 25
  38.     #default.video.rate.denom    = 1
  39.     #
  40.     #settings.check-quantum      = false
  41.     #settings.check-rate         = false
  42.     #
  43.     # These overrides are only applied when running in a vm.
  44.     vm.overrides = {
  45.         default.clock.min-quantum = 1024
  46.     }
  47.  
  48.     # keys checked below to disable module loading
  49.     module.x11.bell = true
  50.     # enables autoloading of access module, when disabled an alternative
  51.     # access module needs to be loaded.
  52.     module.access = true
  53.     # enables autoloading of module-jackdbus-detect
  54.     module.jackdbus-detect = true
  55. }
  56.  
  57. context.spa-libs = {
  58.     #<factory-name regex> = <library-name>
  59.     #
  60.     # Used to find spa factory names. It maps an spa factory name
  61.     # regular expression to a library name that should contain
  62.     # that factory.
  63.     #
  64.     audio.convert.* = audioconvert/libspa-audioconvert
  65.     avb.*           = avb/libspa-avb
  66.     api.alsa.*      = alsa/libspa-alsa
  67.     api.v4l2.*      = v4l2/libspa-v4l2
  68.     api.libcamera.* = libcamera/libspa-libcamera
  69.     api.bluez5.*    = bluez5/libspa-bluez5
  70.     api.vulkan.*    = vulkan/libspa-vulkan
  71.     api.jack.*      = jack/libspa-jack
  72.     support.*       = support/libspa-support
  73.     #videotestsrc   = videotestsrc/libspa-videotestsrc
  74.     #audiotestsrc   = audiotestsrc/libspa-audiotestsrc
  75. }
  76.  
  77. context.modules = [
  78.     #{ name = <module-name>
  79.     #    ( args  = { <key> = <value> ... } )
  80.     #    ( flags = [ ( ifexists ) ( nofail ) ] )
  81.     #    ( condition = [ { <key> = <value> ... } ... ] )
  82.     #}
  83.     #
  84.     # Loads a module with the given parameters.
  85.     # If ifexists is given, the module is ignored when it is not found.
  86.     # If nofail is given, module initialization failures are ignored.
  87.     # If condition is given, the module is loaded only when the context
  88.     # properties all match the match rules.
  89.     #
  90.  
  91.     # Uses realtime scheduling to boost the audio thread priorities. This uses
  92.     # RTKit if the user doesn't have permission to use regular realtime
  93.     # scheduling. You can also clamp utilisation values to improve scheduling
  94.     # on embedded and heterogeneous systems, e.g. Arm big.LITTLE devices.
  95.     { name = libpipewire-module-rt
  96.         args = {
  97.             nice.level    = -11
  98.             #rt.prio      = 88
  99.             #rt.time.soft = -1
  100.             #rt.time.hard = -1
  101.             #uclamp.min = 0
  102.             #uclamp.max = 1024
  103.         }
  104.         flags = [ ifexists nofail ]
  105.     }
  106.  
  107.     # The native communication protocol.
  108.     { name = libpipewire-module-protocol-native
  109.         args = {
  110.             # List of server Unix sockets, and optionally permissions
  111.             #sockets = [ { name = "pipewire-0" }, { name = "pipewire-0-manager" } ]
  112.         }
  113.     }
  114.  
  115.     # The profile module. Allows application to access profiler
  116.     # and performance data. It provides an interface that is used
  117.     # by pw-top and pw-profiler.
  118.     { name = libpipewire-module-profiler }
  119.  
  120.     # Allows applications to create metadata objects. It creates
  121.     # a factory for Metadata objects.
  122.     { name = libpipewire-module-metadata }
  123.  
  124.     # Creates a factory for making devices that run in the
  125.     # context of the PipeWire server.
  126.     { name = libpipewire-module-spa-device-factory }
  127.  
  128.     # Creates a factory for making nodes that run in the
  129.     # context of the PipeWire server.
  130.     { name = libpipewire-module-spa-node-factory }
  131.  
  132.     # Allows creating nodes that run in the context of the
  133.     # client. Is used by all clients that want to provide
  134.     # data to PipeWire.
  135.     { name = libpipewire-module-client-node }
  136.  
  137.     # Allows creating devices that run in the context of the
  138.     # client. Is used by the session manager.
  139.     { name = libpipewire-module-client-device }
  140.  
  141.     # The portal module monitors the PID of the portal process
  142.     # and tags connections with the same PID as portal
  143.     # connections.
  144.     { name = libpipewire-module-portal
  145.         flags = [ ifexists nofail ]
  146.     }
  147.  
  148.     # The access module can perform access checks and block
  149.     # new clients.
  150.     { name = libpipewire-module-access
  151.         args = {
  152.             # Socket-specific access permissions
  153.             #access.socket = { pipewire-0 = "default", pipewire-0-manager = "unrestricted" }
  154.  
  155.             # Deprecated legacy mode (not socket-based),
  156.             # for now enabled by default if access.socket is not specified
  157.             #access.legacy = true
  158.         }
  159.         condition = [ { module.access = true } ]
  160.     }
  161.  
  162.     # Makes a factory for wrapping nodes in an adapter with a
  163.     # converter and resampler.
  164.     { name = libpipewire-module-adapter }
  165.  
  166.     # Makes a factory for creating links between ports.
  167.     { name = libpipewire-module-link-factory }
  168.  
  169.     # Provides factories to make session manager objects.
  170.     { name = libpipewire-module-session-manager }
  171.  
  172.     # Use libcanberra to play X11 Bell
  173.     { name = libpipewire-module-x11-bell
  174.         args = {
  175.             #sink.name = ""
  176.             #sample.name = "bell-window-system"
  177.             #x11.display = null
  178.             #x11.xauthority = null
  179.         }
  180.         flags = [ ifexists nofail ]
  181.         condition = [ { module.x11.bell = true } ]
  182.     }
  183.     { name = libpipewire-module-jackdbus-detect
  184.         args = {
  185.             #jack.library     = libjack.so.0
  186.             #jack.server      = null
  187.             #jack.client-name = PipeWire
  188.             #jack.connect     = true
  189.             #tunnel.mode      = duplex  # source|sink|duplex
  190.             source.props = {
  191.                 #audio.channels = 2
  192.         #midi.ports = 1
  193.                 #audio.position = [ FL FR ]
  194.                 # extra sink properties
  195.             }
  196.             sink.props = {
  197.                 #audio.channels = 2
  198.         #midi.ports = 1
  199.                 #audio.position = [ FL FR ]
  200.                 # extra sink properties
  201.             }
  202.         }
  203.         flags = [ ifexists nofail ]
  204.         condition = [ { module.jackdbus-detect = true } ]
  205.     }
  206. ]
  207.  
  208. context.objects = [
  209.     #{ factory = <factory-name>
  210.     #    ( args  = { <key> = <value> ... } )
  211.     #    ( flags = [ ( nofail ) ] )
  212.     #    ( condition = [ { <key> = <value> ... } ... ] )
  213.     #}
  214.     #
  215.     # Creates an object from a PipeWire factory with the given parameters.
  216.     # If nofail is given, errors are ignored (and no object is created).
  217.     # If condition is given, the object is created only when the context properties
  218.     # all match the match rules.
  219.     #
  220.     #{ factory = spa-node-factory   args = { factory.name = videotestsrc node.name = videotestsrc node.description = videotestsrc "Spa:Pod:Object:Param:Props:patternType" = 1 } }
  221.     #{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
  222.     #{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
  223.     #{ factory = spa-node-factory   args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
  224.     #{ factory = adapter            args = { factory.name = audiotestsrc node.name = my-test node.description = audiotestsrc } }
  225.     #{ factory = spa-node-factory   args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
  226.  
  227.     # A default dummy driver. This handles nodes marked with the "node.always-driver"
  228.     # property when no other driver is currently active. JACK clients need this.
  229.     { factory = spa-node-factory
  230.         args = {
  231.             factory.name    = support.node.driver
  232.             node.name       = Dummy-Driver
  233.             node.group      = pipewire.dummy
  234.             priority.driver = 20000
  235.             #clock.id       = monotonic # realtime | tai | monotonic-raw | boottime
  236.             #clock.name     = "clock.system.monotonic"
  237.         }
  238.     }
  239.     { factory = spa-node-factory
  240.         args = {
  241.             factory.name    = support.node.driver
  242.             node.name       = Freewheel-Driver
  243.             priority.driver = 19000
  244.             node.group      = pipewire.freewheel
  245.             node.freewheel  = true
  246.         }
  247.     }
  248.  
  249.     # This creates a new Source node. It will have input ports
  250.     # that you can link, to provide audio for this source.
  251.     #{ factory = adapter
  252.     #    args = {
  253.     #        factory.name     = support.null-audio-sink
  254.     #        node.name        = "my-mic"
  255.     #        node.description = "Microphone"
  256.     #        media.class      = "Audio/Source/Virtual"
  257.     #        audio.position   = "FL,FR"
  258.     #    }
  259.     #}
  260.  
  261.     # This creates a single PCM source device for the given
  262.     # alsa device path hw:0. You can change source to sink
  263.     # to make a sink in the same way.
  264.     #{ factory = adapter
  265.     #    args = {
  266.     #        factory.name           = api.alsa.pcm.source
  267.     #        node.name              = "alsa-source"
  268.     #        node.description       = "PCM Source"
  269.     #        media.class            = "Audio/Source"
  270.     #        api.alsa.path          = "hw:0"
  271.     #        api.alsa.period-size   = 1024
  272.     #        api.alsa.headroom      = 0
  273.     #        api.alsa.disable-mmap  = false
  274.     #        api.alsa.disable-batch = false
  275.     #        audio.format           = "S16LE"
  276.     #        audio.rate             = 48000
  277.     #        audio.channels         = 2
  278.     #        audio.position         = "FL,FR"
  279.     #    }
  280.     #}
  281.  
  282.     # Use the metadata factory to create metadata and some default values.
  283.     #{ factory = metadata
  284.     #    args = {
  285.     #        metadata.name = my-metadata
  286.     #        metadata.values = [
  287.     #            { key = default.audio.sink   value = { name = somesink } }
  288.     #            { key = default.audio.source value = { name = somesource } }
  289.     #        ]
  290.     #    }
  291.     #}
  292. ]
  293.  
  294. context.exec = [
  295.     #{   path = <program-name>
  296.     #    ( args = "<arguments>" )
  297.     #    ( condition = [ { <key> = <value> ... } ... ] )
  298.     #}
  299.     #
  300.     # Execute the given program with arguments.
  301.     # If condition is given, the program is executed only when the context
  302.     # properties all match the match rules.
  303.     #
  304.     # You can optionally start the session manager here,
  305.     # but it is better to start it as a systemd service.
  306.     # Run the session manager with -h for options.
  307.     #
  308.     { path = "/usr/bin/wireplumber" args = "" }
  309.     #  condition = [ { exec.session-manager = null } { exec.session-manager = true } ] }
  310.     #
  311.     # You can optionally start the pulseaudio-server here as well
  312.     # but it is better to start it as a systemd service.
  313.     # It can be interesting to start another daemon here that listens
  314.     # on another address with the -a option (eg. -a tcp:4713).
  315.     #
  316.     { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf"}
  317.     #  condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] }
  318. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement