Talk:Low-pass filter for subwoofer channel (HOWTO)
From the ALSA wiki
I think that the upmix sounds better (YMMV) with a high pass filter going to the left and right audio, cutting out the bass frequencies that are being sent to the LFE. I also add a little bit of resonance to the LFE, and lower the frequency cutoff for it slightly.
Initially, I had it configured like the following. Notice that I manually duplicated the first block with a 'policy none'. I found that every time I ran a program with that PCM for it's output, it would crash. After changing it to not repeat the first LADSPA block and to use 'policy duplicate' instead, it works perfectly:
pcm.lowpass21to21 {
type ladspa
slave.pcm "upmix21to51"
path "/usr/lib/ladspa"
channels 3
plugins {
## 0 {
## id 1098 # Identity (Audio) (1098/identity_audio)
## policy duplicate
## input.bindings.0 "Input";
## output.bindings.0 "Output";
## }
### above is original configuration with no high-pass filters
# Program received signal SIGSEGV, Segmentation fault.
# [Switching to Thread 1133033792 (LWP 18078)]
# 0x00002aaab1c350c7 in ?? () from /usr/lib/ladspa/highpass_iir_1890.so
#
# 0 {
# id 1890
# policy none
# input.bindings.0 "Input"
# output.bindings.0 "Output"
# input {
# controls [ 250 2 ]
# }
# }
# 1 {
# id 1890
# policy none
# input.bindings.1 "Input"
# output.bindings.1 "Output"
# input {
# controls [ 250 2 ]
# }
# }
0 {
id 1890
policy duplicate
input.bindings.0 "Input"
output.bindings.0 "Output"
input {
controls [ 250 2 ]
}
}
1 {
id 1672 # 4 Pole Low-Pass Filter with Resonance (FCRCIA) (1672/lp4pole_fcrcia_oa)
policy none
input.bindings.2 "Input";
output.bindings.2 "Output";
input {
# This should cut off at 120 Hz ???
# http://www.halfgaar.net/surround-sound-in-linux
# http://www.dolby.com/assets/pdf/tech_library/38_LFE.pdf
controls [ 300 2 ]
}
}
}
}
--KarlHeg 09:39, 5 May 2007 (EST)
Hello,
yes you are right resonance 2 sounds better. I changed it in on the main HOWTO page.
But I have another problem with the high-pass filter. When I try policy duplicate I get a segmentation fault. Two policy none work fine. Here is the part of my config file:
pcm.lowpass_21to21 {
type ladspa
slave.pcm upmix_21to51
path "/usr/lib/ladspa"
channels 3
plugins {
0 {
id 1890 # Glame Highpass Filter (1890/highpass_iir)
policy none
input.bindings.0 "Input";
output.bindings.0 "Output";
input {
controls [ 250 2 ]
}
}
1 {
id 1890 # Glame Highpass Filter (1890/highpass_iir)
policy none
input.bindings.1 "Input";
output.bindings.1 "Output";
input {
controls [ 250 2 ]
}
}
2 {
id 1672 # 4 Pole Low-Pass Filter with Resonance (FCRCIA) (1672/lp4pole_fcrcia_oa)
policy none
input.bindings.2 "Input";
output.bindings.2 "Output";
input {
controls [ 300 0 ]
}
}
}
}
Regards,
Benjamin
On the official ALSA reference it says that type plug should be able to do automatic channel/rate/format conversion, however, on my system it did not. So i had to define all the routing-devices to be of type route explicitly. But ladspa didn't like route-input, a type plug was needed inbetween. Next, the ladspa-output didn't want to play without format conversion behind it, and the plug plugin was helpless. I had to introduce another device of type lfloat, to be able to finally hear my playback - so after all, the chain is (somewhat like) input --> route --> plug --> ladspa --> lfloat --> hw.
I think I tried all combinations to get rid of the many devices, but no other configuration worked. Maybe we should also put this as a solution on the article page, maybe as troubleshooting-hint?
--Benjamin 02:01, 14 May 2010 (EST)
Hello Benjamin,
if this is a common problem, we should add it to the HOWTO. You could add a short notice in the beginning (like I did for the required ALSA versions) and link to your description on this discussion page. Or you could add a troubleshooting section to the end of the HOWTO and insert your problem description and solution there.
Kind regards, Benjamin --BlazE 17:12, 14 May 2010 (EST)