ALSA: RME Digi96 ADAT as separate stereo outputs
Posted: Thu Jul 23, 2009 11:42 am
Whoever owns an RME Digi96 soundcard and wants to use its multiple output channels not for multitrack recording/mixing, but as separate stereo outputs in regular applications like mplayer, amarok or any other audio app that handles ALSA, might have stumbled over 2 questions:
Well, here's how I've handled that situation:
The 8 input/output channels are available as ADAT only. Alsa registers them as hw 0, device 1. The other output "hw0,device0" is the single stereo in/out on the card itself, which is the one that shows up in mixer apps.
If you want to have analog outputs, you require additional hardware to translate the digital ADAT signal into analog. So you can either get an AEB 4/8 extension board from RME (alternative link: thomann product page), or an ADAT converter device from any manufacturer. I'd prefer the 2nd option, since it's compatible to any ADAT capable device.
Now, beautiful but difficult alsa config, makes it possible to provide software mixing controls for those ADAT channels, since the RME card does not provide hardware mixing for ADAT (which makes sense for its intended usage).
The following /etc/asound.conf (or ~/.asoundrc) groups the 8 mono ADAT channels into 4 stereo outputs with software mixing (using alsa's "softvol"). The great thing is, that they actually register as soundcard controls and are therefore listed in any application like regular outputs and volume controls.
Awesome!
This is a copy of our configuration file:
Using the virtual "softvol" channels:
With the above configuration, ALSA is aware of the following new device names:
(Caution: Do not confuse the virtual devices "softvol1" with "stereo1", because using "stereo1" directly will ignore the volume settings adjusted using e.g. alsamixer)
Additional information:
1) Where the f**k are these multiple outputs? Don't see anything in my mixer application (e.g. alsamixer)
2) qjackctl shows 8 outputs alright, but how can I use them with a non-jack-aware, plain-alsa application with regular stereo output?
Well, here's how I've handled that situation:
The 8 input/output channels are available as ADAT only. Alsa registers them as hw 0, device 1. The other output "hw0,device0" is the single stereo in/out on the card itself, which is the one that shows up in mixer apps.
If you want to have analog outputs, you require additional hardware to translate the digital ADAT signal into analog. So you can either get an AEB 4/8 extension board from RME (alternative link: thomann product page), or an ADAT converter device from any manufacturer. I'd prefer the 2nd option, since it's compatible to any ADAT capable device.
Now, beautiful but difficult alsa config, makes it possible to provide software mixing controls for those ADAT channels, since the RME card does not provide hardware mixing for ADAT (which makes sense for its intended usage).
The following /etc/asound.conf (or ~/.asoundrc) groups the 8 mono ADAT channels into 4 stereo outputs with software mixing (using alsa's "softvol"). The great thing is, that they actually register as soundcard controls and are therefore listed in any application like regular outputs and volume controls.
Awesome!
This is a copy of our configuration file:
Code: Select all
pcm.snd-card {
type hw
card 0
device 1
}
ctl.snd-card {
type hw
card 0
device 1
}
pcm.dmixer {
type dmix
ipc_key 1024
ipc_perm 0666
slave.pcm "snd-card"
slave {
period_time 1000
period_size 64
buffer_size 4096
rate 44100
channels 8
}
bindings {
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
}
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.stereo1 {
type plug
slave {
pcm "dmixer"
channels 8
}
ttable.0.0 1
ttable.1.1 1
}
pcm.stereo2 {
type plug
slave {
pcm "dmixer"
channels 8
}
ttable.0.2 1
ttable.1.3 1
}
pcm.stereo3 {
type plug
slave {
pcm "dmixer"
channels 8
}
ttable.0.4 1
ttable.1.5 1
}
pcm.stereo4 {
type plug
slave {
pcm "dmixer"
channels 8
}
ttable.0.6 1
ttable.1.7 1
}
pcm.softvol1 {
type softvol
slave {
pcm "stereo1"
}
control {
name "Stereo_1"
card 0
}
}
pcm.softvol2 {
type softvol
slave {
pcm "stereo2"
}
control {
name "Stereo_2"
card 0
}
}
With the above configuration, ALSA is aware of the following new device names:
In order to test the output, you can use the "speaker-test" command:stereo1
stereo2
stereo3
stereo4
softvol1
softvol2
(Caution: Do not confuse the virtual devices "softvol1" with "stereo1", because using "stereo1" directly will ignore the volume settings adjusted using e.g. alsamixer)
Code: Select all
speaker-test -c 2 -D softvol1
- If you want to use all 8 ADAT channels as analog outputs, simply copy/paste the "pcm.softvol" blocks and rename them to "stereo3"/"stereo4" respectively. Note: For an "AEB 4-O" expansion board, only 2 stereo channels are physically available.
- If you have multiple soundcards in your PC and the RME is not the first one, change all lines with "card 0" to the correct value (e.g. "card 1" if it's the 2nd card).
- Important: it seems that the settings take effect (possibly after calling "/etc/init.d/alsa-utils restart" and the virtual softvol-channels are available - even (!) if they don't show up in alsamixer.