Subject: [ecasound] Re: Re: [Alsa-user] [RME Hammerfall] Using multiple channels (fwd)
From: Kai Vehmanen (kai.vehmanen_AT_wakkanet.fi)
Date: Thu Jul 18 2002 - 16:12:12 EEST
Comments about the proposed (see below) new chainops are welcome.
---------- Forwarded message ----------
Date: Thu, 18 Jul 2002 16:10:34 +0300 (EEST)
From: Kai Vehmanen <kai.vehmanen_AT_wakkanet.fi>
Subject: Re: Re: [Alsa-user] [RME Hammerfall] Using multiple channels
On Thu, 18 Jul 2002 jep_AT_servicez.org wrote:
> What do i have to do, to play just 1 wav file on 1 channel (i mean: not
> 8 at the same time). That would solve all my problems ;). If i play
> something now, it uses all the channels.
Have you tried ecasound - http://www.eca.cx/ecasound ...?
# play mono-wav file on ch 1
ecasound -i foo.wav -f:s32_le,10,44100 -o alsa,default
# play mono-wav file on ch 8
ecasound -i foo.wav -f:s32_le,10,44100,n -o alsa,default -erc:1,8 -eac:0,1
# play stereo-wav on channels 7 and 8
ecasound -i foo.wav -f:s32_le,10,44100,n -o alsa,default \
-erc:1,7 -erc:2,8 -eac:0,1 -eac:0,2
... and so on. Here the soundcard is opened through the ALSA plugin layer,
using non-interleaved access, 10 channels, 32bit (little-endian) and
44100Hz. This configuration should work on RME9652 without any changes to
asoundrc or to other configuration files. Also direct hw-access (replacing
'alsa,default' with 'alsa,hw:0') should work with these params.
Anyways, you can freely route audio between channels. If you need to
repeatedly do the same tasks, you should probably write a small
shell-script. Ecasound also understands mp3s, oggs, aiff, etc files...
The used operators are -erc (channel-copy) and -eac (channel-amplify).
For instance '-erc:1,8 -eac:0,1' copies the audio data from channel
1 to channel 8, and then -eac mutes the first channel. Another
possibly useful operator is -erm (channel-mix). It allows you
to downmix all channels of one chain (= one logical audio stream) to
a single channel. Check...
... for an introduction to ecasound use.
As multichannel devices are becoming more and more common,
I'm planning to add a few more channel routing ops... for instance:
-ercs:frompair,topair stereo-pair copy; copy pairs of channels
-err:from,to channel-route, shorthand for the
-erc+-eac combination; mutes the source
-errs:frompair,topair stereo-pair route; like -ercs but to
But these pretty are much just shorthands for existing functionality.
PS One known multichannel-related problem in ecasound is routing
multichannel inputs efficiently to separate chains.
While it is possible (and has been for a long time),
it can be _very_ inefficient. The absolute worst-case is mixing
26 channels from an RME9652 to 26 ecasound chains.
At 44.1kHz, that would result in ~1Gbit/s of memory i/o. Ugh.
Fortunately there is a solution to this, and that's
to use JACK. Then instead of reading data from one
26ch ALSA device, ecasound registers 26 mono JACK-clients.
-- http://www.eca.cx Audio software for Linux!
-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.
This archive was generated by hypermail 2b28 : Thu Jul 18 2002 - 16:26:43 EEST