diff --git a/src/daemon/filter-chain/meson.build b/src/daemon/filter-chain/meson.build index 4b9df2fa8..b96e7c25b 100644 --- a/src/daemon/filter-chain/meson.build +++ b/src/daemon/filter-chain/meson.build @@ -1,5 +1,6 @@ conf_files = [ [ 'demonic.conf', 'demonic.conf' ], + [ 'sink-dolby-surround.conf', 'sink-dolby-surround.conf' ], [ 'sink-eq6.conf', 'sink-eq6.conf' ], [ 'source-rnnoise.conf', 'source-rnnoise.conf' ], ] diff --git a/src/daemon/filter-chain/sink-dolby-surround.conf b/src/daemon/filter-chain/sink-dolby-surround.conf new file mode 100644 index 000000000..50ddc2d34 --- /dev/null +++ b/src/daemon/filter-chain/sink-dolby-surround.conf @@ -0,0 +1,66 @@ +# Dolby Surround encoder sink +# +# start with pipewire -c filter-chain/sink-dolby-surround.conf +# +context.properties = { + log.level = 0 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rtkit + args = { + #nice.level = -11 + #rt.prio = 88 + #rt.time.soft = 200000 + #rt.time.hard = 200000 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + node.name = "dolby_sink" + node.description = "Dolby Surround Sink" + media.name = "Dolby Surround Sink" + filter.graph = { + nodes = [ + { + type = builtin + name = mixer + label = mixer + control = { "Gain 1" = 0.5 "Gain 2" = 0.5 } + } + { + type = ladspa + name = enc + plugin = surround_encoder_1401 + label = surroundEncoder + } + ] + links = [ + { output = "mixer:Out" input = "enc:S" } + ] + inputs = [ "enc:L" "enc:R" "enc:C" null "mixer:In 1" "mixer:In 2" ] + outputs = [ "enc:Lt" "enc:Rt" ] + } + capture.props = { + media.class = Audio/Sink + audio.channels = 6 + audio.position = [ FL FR FC LFE SL SR ] + } + playback.props = { + node.passive = true + audio.channels = 2 + audio.position = [ FL FR ] + } + } + } +]