Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] ALSA - enabling both equalizer and channel duplicat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Mar 18, 2012 6:21 am    Post subject: [SOLVED] ALSA - enabling both equalizer and channel duplicat Reply with quote

Hello !

Finnaly I found equalizer I want - media-plugins/alsaequal and example how to duplicate stereo to other (5.1) channels (see below).
Both equalizer and duplication works separately, but how can I make them work simultaneously ?

duplication:

pcm.duplicate {
type plug
slave.pcm "surround51"
slave.channels 6
route_policy duplicate
}


equalizer:

ctl.equal {
type equal;
channels 6;
}

pcm.plugequal {
type equal;
slave.pcm "plug:dmix";
channels 6;
}

pcm.equal {

type plug;
slave.pcm plugequal;
}

Thanks !


Last edited by 187 on Sun Apr 08, 2012 12:35 am; edited 1 time in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7022

PostPosted: Sun Mar 18, 2012 8:22 am    Post subject: Reply with quote

Well, in hopefully non-technical terms, you choose one to operate first, then send its output into the second, and the second then finally outputs to the soundcard.

"route_policy duplicate" is not the best way - see my ~/.asoundrc
Back to top
View user's profile Send private message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Mar 18, 2012 3:28 pm    Post subject: Reply with quote

PaulBredbury
Thanks, just a great .asoundrc to dig in.
Tried dmix + pcm.!default - speaker-test segfaults...
Now have to think why :)

>Well, in hopefully non-technical terms, you choose one to operate first, then send its output into the second, and the second then finally outputs to the soundcard.
I understand it. The question is "How ?" :)
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7022

PostPosted: Sun Mar 18, 2012 3:38 pm    Post subject: Reply with quote

Take a look at the file I just showed you - notice how upmix_20to51 flows into lowpass_21to21, using slave.pcm

Recompile alsa-utils, and ensure that its version is the same as the output of:
Code:
cat /proc/asound/version
Back to top
View user's profile Send private message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Mar 18, 2012 6:42 pm    Post subject: Reply with quote

PaulBredbury wrote:

Recompile alsa-utils, and ensure that its version is the same as the output of:
Code:
cat /proc/asound/version


Yes, the versions are different.

Code:
#eix alsa-lib
[D] media-libs/alsa-lib
     Available versions:  1.0.24.1 ~1.0.25 {alisp alsa_pcm_plugins_adpcm alsa_pcpcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_pluginsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugi
     Installed versions:  1.0.25-r1(19:16:05 18.03.2012)

#cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.24.


As I understand, in-kernel alsa drivers are older then external ones ?
Trying to mask 1.0.25* versions to downgrade alsa-libs doesn't help:
Code:
# emerge -pvD alsa-lib

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   #] media-libs/alsa-lib-1.0.25-r1  USE="-alisp -debug -doc -python" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

The following mask changes are necessary to proceed:
#required by alsa-lib (argument)
# /etc/portage/package.mask:
=media-libs/alsa-lib-1.0.25-r1
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7022

PostPosted: Sun Mar 18, 2012 6:52 pm    Post subject: Reply with quote

It is alsa-utils that provides /usr/bin/speaker-test

Versions shown here.
Back to top
View user's profile Send private message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Mar 25, 2012 10:10 am    Post subject: Reply with quote

PaulBredbury,

No, it's not because of speaker-test.
aplay, alsaplay, ... - segfaults too.

If I remove bidings for channels 2-5 in pcm.dmixed, everything is ok. With all bindings - segfaults.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7022

PostPosted: Sun Mar 25, 2012 10:15 am    Post subject: Reply with quote

You are unique, AFAIK, with this problem.

Obvious thing to check: Recompile alsa-driver for your current kernel.
Back to top
View user's profile Send private message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Mar 25, 2012 10:39 am    Post subject: Reply with quote

I'm using in-kernel alsa.

Maybe the problem is here ?
cat /proc/asound/oss/sndstat
Sound Driver:3.8.1a-980706 (ALSA v1.0.24 emulation code)
Kernel: Linux storage 3.2.12-gentoo #1 SMP PREEMPT Sun Mar 25 01:49:36 MSK 2012 x86_64
Config options: 0

Installed drivers:
Type 10: ALSA emulation

Card config:
Audigy SE [SB0570] at 0xe800 irq 21
HDA ATI SB at 0xfcff4000 irq 16
HDA NVidia at 0xfe87c000 irq 19

Audio devices: NOT ENABLED IN CONFIG

Synth devices: NOT ENABLED IN CONFIG

Midi devices:
0: CA0106 MPU-401 (UART)

Timers:
31: system timer

Mixers: NOT ENABLED IN CONFIG
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7022

PostPosted: Sun Mar 25, 2012 10:44 am    Post subject: Reply with quote

187 wrote:
cat /proc/asound/oss/sndstat

You're using ALSA, not OSS (i.e. ALSA's emulation of OSS), so why are you looking at OSS?
Back to top
View user's profile Send private message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Mar 25, 2012 10:56 am    Post subject: Reply with quote

Just trying everything from http://www.gentoo.org/doc/en/alsa-guide.xml ...

When I'm switching from card 0 to card 1, device 0, ... - everything is ok...

cat /proc/asoundcards
0 [CA0106 ]: CA0106 - CA0106
Audigy SE [SB0570] at 0xe800 irq 21
1 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfcff4000 irq 16
2 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfe87c000 irq 19
Back to top
View user's profile Send private message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Mar 25, 2012 5:39 pm    Post subject: Reply with quote

Oh $#$CK !!!!!
I spent 2 days for it !!!

Instead of using

card 0
device 0

bindings
0 0
1 1
2 2
...


I have to use:

card 0
device 0

bindings
0 0
1 1


card 0
device 1

bindings
0 0
1 1


...

Now it's time to think how to modify .asoundrc for it.
But only the next weekend :(
Back to top
View user's profile Send private message
187
n00b
n00b


Joined: 30 Sep 2003
Posts: 10

PostPosted: Sun Apr 08, 2012 12:33 am    Post subject: Reply with quote

Ok, maybe it helps somebody.
Not very beautiful, but works.

.asoundrc:

pcm.ca0106 {
type hw
card 0 #1
device 0
# channels 6
}
ctl.ca0106 {
type hw
card 0 #1
device 0
}



ctl.equal {
type equal;
channels 6;
}

pcm.plugequal {
type equal;
# slave.pcm "plug:dmix";
slave.pcm "quad3";
channels 6;
}

pcm.equal {
# Or if you want the equalizer to be your
# default soundcard uncomment the following
# line and comment the above line.
# pcm.!default {
type plug;
slave.pcm plugequal;
}


pcm.quad {
type multi

slaves.a.pcm "hw:0,0"
slaves.a.channels 2
slaves.b.pcm "hw:0,1"
slaves.b.channels 2
slaves.c.pcm "hw:0,2"
slaves.c.channels 2

bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
bindings.4.slave c
bindings.4.channel 0
bindings.5.slave c
bindings.5.channel 1
}

pcm.quad2 {
type route
slave.pcm "quad"
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
ttable.0.4 1
ttable.1.5 1
}

pcm.quad3 {
type plug
slave.pcm "quad2"
}



speaker-test -c 2 -D equal -t wav
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum