LFE channel fails to mix in various ways
Description of Problem:
Please refer to #3435
In order to work aaround the failure of the mix-lfe param, I was attempting to create a filter that would emulate the behaviour.
I tried a mix, where the LFE channel is mixed into every other channel:
{ name = libpipewire-module-filter-chain
args = {
node.name = Sony-Pro-Wrap
node.description = "Sony TV Pro Wrapper"
filter.graph = {
nodes = [
{
name = mixfl
type = builtin
label = mixer
control = {
"Gain 1" = 1.0
"Gain 2" = 0.0
"Gain 3" = 0.0
"Gain 4" = 1.0
"Gain 5" = 0.0
"Gain 6" = 0.0
}
}
{
name = mixfr
type = builtin
label = mixer
control = {
"Gain 1" = 0.0
"Gain 2" = 1.0
"Gain 3" = 0.0
"Gain 4" = 1.0
"Gain 5" = 0.0
"Gain 6" = 0.0
}
}
{
type = builtin
name = mixfc
label = mixer
control = {
"Gain 1" = 0.0
"Gain 2" = 0.0
"Gain 3" = 1.0
"Gain 4" = 1.0
"Gain 5" = 0.0
"Gain 6" = 0.0
}
}
{
type = builtin
name = mixlf
label = mixer
control = {
"Gain 1" = 0.0
"Gain 2" = 0.0
"Gain 3" = 0.0
"Gain 4" = 1.0
"Gain 5" = 0.0
"Gain 6" = 0.0
}
}
{
type = builtin
name = mixrl
label = mixer
control = {
"Gain 1" = 0.0
"Gain 2" = 0.0
"Gain 3" = 0.0
"Gain 4" = 1.0
"Gain 5" = 1.0
"Gain 6" = 0.0
}
}
{
type = builtin
name = mixrr
label = mixer
control = {
"Gain 1" = 0.0
"Gain 2" = 0.0
"Gain 3" = 0.0
"Gain 4" = 1.0
"Gain 5" = 0.0
"Gain 6" = 1.0
}
}
]
inputs = [ "mixfl:In 1" "mixfr:In 2" "mixfc:In 3" "mixlf:In 4" "mixrl:In 5" "mixrr:In 6" ]
outputs = [ "mixrl:Out" "mixrr:Out" "mixfl:Out" "mixfr:Out" "mixfc:Out" "mixlf:Out" ]
}
capture.props = {
node.name = Sony-Pro-Wrap
node.description = "Sony TV Pro Wrapper"
audio.position = [ FL FR FC LFE RL RR ]
media.class = "Audio/Sink"
}
playback.props = {
node.name = Sony-Pro-Wrap
audio.position = [ RL RR FL FR FC LFE ]
stream.dont-remix = true
node.passive = true
target.object = "alsa_output.pci-0000_07_00.1.pro-output-7"
}
}
}
This fails. It does work if you only have FR and FL channels. Once you have over 2 channels, the LFE channel is never mixed. Manually patching the output it is audible.
Using the combine stream filter works like a charm:
args = {
combine.mode = sink
node.name = "Sony-Pro-Wrap"
node.description = "Sony TV Pro Wrapper"
combine.latency-compensate = false
combine.props = {
audio.position = [ FL FR FC LFE RL RR ]
}
node.passive = true
stream.props = {
audio.position = [ AUX0 AUX1 AUX2 AUX3 AUX4 AUX5 ]
channelmix.upmix = false
channelmix.upmix-method = none
stream.dont-remix = true
channelmix.normalize = false
## only "psd", "none" or "simple" values are accepted
channelmix.upmix-method = "none"
channelmix.lfe-cutoff = 1000
channelmix.fc-cutoff = 20000
channelmix.mix-lfe = false
channelmix.rear-delay = 0.0
channelmix.stereo-widen = 0.0
channelmix.hilbert-taps = 0
}
stream.rules = [
{
matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
actions = {
create-stream = {
combine.audio.position = [ FL FR FC RL RR ]
audio.position = [ AUX2 AUX3 AUX4 AUX0 AUX1 ]
}
}
}
# {
# matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
# actions = {
# create-stream = {
# combine.audio.position = [ RL RR ]
# audio.position = [ AUX0 AUX1 ]
# }
# }
# }
# {
# matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
# actions = {
# create-stream = {
# combine.audio.position = [ FC ]
# audio.position = [ AUX4 ]
# }
# }
# }
{
matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
actions = {
create-stream = {
combine.audio.position = [ LFE ]
audio.position = [ AUX0 ]
}
}
}
{
matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
actions = {
create-stream = {
combine.audio.position = [ LFE ]
audio.position = [ AUX1 ]
}
}
}
{
matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
actions = {
create-stream = {
combine.audio.position = [ LFE ]
audio.position = [ AUX2 ]
}
}
}
{
matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
actions = {
create-stream = {
combine.audio.position = [ LFE ]
audio.position = [ AUX3 ]
}
}
}
{
matches = [ { node.name = "alsa_output.pci-0000_07_00.1.pro-output-7" } ]
actions = {
create-stream = {
combine.audio.position = [ LFE ]
audio.position = [ AUX4 ]
}
}
}
]
}
}
How Reproducible:
100% LFE mixing is broken
Steps to Reproduce:
- Want to hear LFE without a dedicated LFE transducer by using full-range speakers (mine are connected via HDMI to a TV and then out to the amp, in case you're wondering about the weird channel mapping)
- Use mix-lfe, be sad because it doesn't work
- Try to use mixer filter chains and still be sad because they also don't work
- Be sad because they don't work. Spend days trying different combinations of settings.
- Use combine filter and it is the only way it works
Actual Results:
Using the combine filter as a workaround
Expected Results:
channelmix.mix-lfe works as described in the documentation. Mixer filter works if trying to mix LFE channel into >2 channels Not needing this combine abomination with 6 inputs, 6 monitor outs, 5 playback outputs, plus 5 separate single playback outputs, all manually mapped to the appropriate channels, crowding up my graph and my config files XD