Guest User

pipewire conf file

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