50-alsa-config.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. alsa_monitor.enabled = true
  2. alsa_monitor.properties = {
  3. -- Create a JACK device. This is not enabled by default because
  4. -- it requires that the PipeWire JACK replacement libraries are
  5. -- not used by the session manager, in order to be able to
  6. -- connect to the real JACK server.
  7. --["alsa.jack-device"] = false,
  8. -- Reserve devices via org.freedesktop.ReserveDevice1 on D-Bus
  9. -- Disable if you are running a system-wide instance, which
  10. -- doesn't have access to the D-Bus user session
  11. ["alsa.reserve"] = true,
  12. --["alsa.reserve.priority"] = -20,
  13. --["alsa.reserve.application-name"] = "WirePlumber",
  14. -- Enables MIDI functionality
  15. ["alsa.midi"] = true,
  16. -- Enables monitoring of alsa MIDI devices
  17. ["alsa.midi.monitoring"] = true,
  18. -- MIDI bridge node properties
  19. ["alsa.midi.node-properties"] = {
  20. -- Name set for the node with ALSA MIDI ports
  21. ["node.name"] = "Midi-Bridge",
  22. -- Removes longname/number from MIDI port names
  23. --["api.alsa.disable-longname"] = true,
  24. },
  25. -- These properties override node defaults when running in a virtual machine.
  26. -- The rules below still override those.
  27. ["vm.node.defaults"] = {
  28. ["api.alsa.period-size"] = 1024,
  29. ["api.alsa.headroom"] = 8192,
  30. },
  31. }
  32. alsa_monitor.rules = {
  33. -- An array of matches/actions to evaluate.
  34. --
  35. -- If you want to disable some devices or nodes, you can apply properties per device as the following example.
  36. -- The name can be found by running pw-cli ls Device, or pw-cli dump Device
  37. --{
  38. -- matches = {
  39. -- {
  40. -- { "device.name", "matches", "name_of_some_disabled_card" },
  41. -- },
  42. -- },
  43. -- apply_properties = {
  44. -- ["device.disabled"] = true,
  45. -- },
  46. --}
  47. {
  48. -- Rules for matching a device or node. It is an array of
  49. -- properties that all need to match the regexp. If any of the
  50. -- matches work, the actions are executed for the object.
  51. matches = {
  52. {
  53. -- This matches all cards.
  54. { "device.name", "matches", "alsa_card.*" },
  55. },
  56. },
  57. -- Apply properties on the matched object.
  58. apply_properties = {
  59. -- Use ALSA-Card-Profile devices. They use UCM or the profile
  60. -- configuration to configure the device and mixer settings.
  61. ["api.alsa.use-acp"] = true,
  62. -- Use UCM instead of profile when available. Can be
  63. -- disabled to skip trying to use the UCM profile.
  64. --["api.alsa.use-ucm"] = true,
  65. -- Don't use the hardware mixer for volume control. It
  66. -- will only use software volume. The mixer is still used
  67. -- to mute unused paths based on the selected port.
  68. --["api.alsa.soft-mixer"] = false,
  69. -- Ignore decibel settings of the driver. Can be used to
  70. -- work around buggy drivers that report wrong values.
  71. --["api.alsa.ignore-dB"] = false,
  72. -- The profile set to use for the device. Usually this is
  73. -- "default.conf" but can be changed with a udev rule or here.
  74. --["device.profile-set"] = "profileset-name",
  75. -- The default active profile. Is by default set to "Off".
  76. --["device.profile"] = "default profile name",
  77. -- Automatically select the best profile. This is the
  78. -- highest priority available profile. This is disabled
  79. -- here and instead implemented in the session manager
  80. -- where it can save and load previous preferences.
  81. ["api.acp.auto-profile"] = false,
  82. -- Automatically switch to the highest priority available port.
  83. -- This is disabled here and implemented in the session manager instead.
  84. ["api.acp.auto-port"] = false,
  85. -- Other properties can be set here.
  86. --["device.nick"] = "My Device",
  87. },
  88. },
  89. {
  90. matches = {
  91. {
  92. -- Matches all sources.
  93. { "node.name", "matches", "alsa_input.*" },
  94. },
  95. {
  96. -- Matches all sinks.
  97. { "node.name", "matches", "alsa_output.*" },
  98. },
  99. },
  100. apply_properties = {
  101. --["node.nick"] = "My Node",
  102. --["node.description"] = "My Node Description",
  103. --["priority.driver"] = 100,
  104. --["priority.session"] = 100,
  105. --["node.pause-on-idle"] = false,
  106. --["monitor.channel-volumes"] = false
  107. --["resample.quality"] = 4,
  108. --["resample.disable"] = false,
  109. --["channelmix.normalize"] = false,
  110. --["channelmix.mix-lfe"] = false,
  111. --["channelmix.upmix"] = true,
  112. --["channelmix.upmix-method"] = "psd", -- "none" or "simple"
  113. --["channelmix.lfe-cutoff"] = 150,
  114. --["channelmix.fc-cutoff"] = 12000,
  115. --["channelmix.rear-delay"] = 12.0,
  116. --["channelmix.stereo-widen"] = 0.0,
  117. --["channelmix.hilbert-taps"] = 0,
  118. --["channelmix.disable"] = false,
  119. --["dither.noise"] = 0,
  120. --["dither.method"] = "none", -- "rectangular", "triangular" or "shaped5"
  121. --["audio.channels"] = 2,
  122. --["audio.format"] = "S16LE",
  123. --["audio.rate"] = 44100,
  124. --["audio.allowed-rates"] = "32000,96000",
  125. --["audio.position"] = "FL,FR",
  126. --["api.alsa.period-size"] = 1024,
  127. --["api.alsa.period-num"] = 2,
  128. ["api.alsa.period-size"] = 1024,
  129. ["api.alsa.headroom"] = 8192,
  130. --["api.alsa.start-delay"] = 0,
  131. --["api.alsa.disable-mmap"] = false,
  132. --["api.alsa.disable-batch"] = false,
  133. --["api.alsa.use-chmap"] = false,
  134. --["api.alsa.multirate"] = true,
  135. --["latency.internal.rate"] = 0
  136. --["latency.internal.ns"] = 0
  137. --["clock.name"] = "api.alsa.0"
  138. --["session.suspend-timeout-seconds"] = 5, -- 0 disables suspend
  139. },
  140. },
  141. }