| View previous topic :: View next topic |
| Author |
Message |
andyknownasabu Apprentice


Joined: 06 Feb 2003 Posts: 281 Location: Zurich, Switzerland
|
Posted: Sat Sep 03, 2005 6:04 am Post subject: [ALSA] Howto send one channel through lowpass filter? |
|
|
Hi all,
I'm using the following setup (.asoundrc) to send a stereo signal to all 6 channels of my 5.1 system:
| Code: | pcm.duplicate {
type plug
slave.pcm "surround51"
slave.channels 6
slave.rate 44100
route_policy duplicate
}
|
Unfortunately, using this setup the subwoofer also receives the "normal", unfiltered signal - bad.
=> I want to put a lowpass filter in front of it.
I found the following setup which should accomplish that:
| Code: | pcm.lowpass {
type ladspa
slave.pcm "surround51"
path "/usr/lib/ladspa"
plugins [ {
label lpf
input {
controls [ 50 ]
}
} ]
}
|
My question is now: How can I combine them, how can I send a filtered signal to the subwoofer? _________________ Please, also have a look at:
Global Marshall Plan Initiative
http://www.globalmarshallplan.org/ |
|
| Back to top |
|
 |
blaster999 l33t


Joined: 09 May 2004 Posts: 902 Location: Between keyboard and chair
|
Posted: Thu Feb 23, 2006 4:09 pm Post subject: |
|
|
It's a pity that nobody answered this post. I want to do a bass redirection (like a window$ utility supplied with audigy) to the subwoofer. I imagine I need to use lpf and hpf, but there's no good and easy to understand documentation. _________________ 60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
http://forums.gentoo.org/viewtopic.php?p=1896734#1896734 |
|
| Back to top |
|
 |
sl0815 n00b


Joined: 29 Mar 2003 Posts: 35 Location: Germany
|
Posted: Mon Mar 06, 2006 7:04 pm Post subject: |
|
|
I have two amps connected to my Audigy 2 card on front and rear port. I wanted to apply a low-pass to front and a high-pass to rear. I tried for two days now but no success. Does anyone has a solution yet? My .asoundrc look like this (explanation below):
| Code: | #FILTER
###############################################################################
pcm.lpf
{
type ladspa
slave.pcm "test2"
path "/usr/lib/ladspa";
plugins
[
{
label lpf
policy "duplicate"
input
{
controls [250]
}
}
]
}
pcm.hpf
{
type ladspa
slave.pcm "test3";
path "/usr/lib/ladspa";
playback_plugins
[
{
label hpf
policy "duplicate"
input
{
controls [350]
}
}
]
}
#FILTER-WRAPPER
###############################################################################
pcm.testlpf
{
type plug
slave
{
pcm "plug:lpf"
rate 44100
channels 2
}
ttable.0.0 1
ttable.1.1 1
}
pcm.testhpf
{
type plug
slave
{
pcm "plug:hpf"
rate 44100
channels 2
}
ttable.0.0 1
ttable.1.1 1
}
#FILTER-SINK
###############################################################################
pcm.test2
{
type plug
slave
{
pcm "front"
channels 2
}
ttable.0.0 1
ttable.1.1 1
}
pcm.test3
{
type plug
slave
{
pcm "rear"
channels 2
}
ttable.0.0 0
ttable.1.1 0
}
#ROUTING
###############################################################################
pcm.surround4
{
type multi
slaves
[
{ pcm "testlpf" channels 2 }
{ pcm "testhpf" channels 2 }
]
bindings
[
{ slave 0 channel 0 }
{ slave 0 channel 1 }
{ slave 1 channel 0 }
{ slave 1 channel 1 }
]
}
pcm.stereo40
{
type route;
slave
{
pcm "surround4"
channels 4
}
ttable.0.0 1;
ttable.0.2 1;
ttable.1.1 1;
ttable.1.3 1;
}
ctl.stereo40{ type hw; card 2; }
|
I use "stereo40" to duplicate left/right to four channels. These four channels are then routed through "surround4" which splits them to 2 x 2 channels and sends them to "testlpf" and "testhpf". Then the signals should be processed by the low-pass and high-pass and finally should be sent to front and rear.
I can use something like "aplay -Dplug:lpf somewavfile" to play a wav-file but only on front (or rear if I change the config). I can also use stereo40 to duplicate stereo signals to four channels.
Problem (I think): When using "front" or "rear" some hook function is called which sets some volume parameters. The parameters in the hook functions for front and rear differ slightly and I suspect when these functions are called seperatly (like I do above) they set a false volume which then results in no sound at all.
That's why I tried to mix the pcm devices "test2" and "test3" together. I used the dmix plugin for that but that only crashed aplay. Same for dshare plugin (I really don't understand the docs about these plugins and tried both). As a last try I used the multi plugin and nothing segfaulted but then alsa used four (instead of two) subdevices but still no sound. All four subdevices were at state PREPARED. So I believe the config was wrong.
Question: Does someone know how to route two two-channel pcms to one four-channel pcm (which then could be routed to the surround40 pcm supplied by ALSA)?
Cheers, Jan _________________ 6CE258F277E25EB5 |
|
| Back to top |
|
 |
bertaboy Guru


Joined: 04 Nov 2004 Posts: 594
|
Posted: Wed Aug 16, 2006 5:38 pm Post subject: |
|
|
| sl0815 wrote: | I have two amps connected to my Audigy 2 card on front and rear port. I wanted to apply a low-pass to front and a high-pass to rear. I tried for two days now but no success. Does anyone has a solution yet? My .asoundrc look like this (explanation below):
...
Cheers, Jan |
How did you get ladspa plugins installed? I'm trying to get gst-plugins-good to recognize ladspa, but if I could bypass gstreamer and go directly to alsa, that would be great. _________________
| someone else wrote: | | someone wrote: | | If there are two people that have got a problem with each other, then that person could just ignore the other person. |
You can do that without any technological mumbo-jumbo....
- someone else |
|
|
| Back to top |
|
 |
sl0815 n00b


Joined: 29 Mar 2003 Posts: 35 Location: Germany
|
Posted: Wed Aug 16, 2006 6:30 pm Post subject: |
|
|
"emerge media-libs/ladspa-sdk", i suppose. Don't know for sure. Just used them as described in some alsa-docs. _________________ 6CE258F277E25EB5 |
|
| Back to top |
|
 |
|