[ecasound] JACK plugin added to ecasound

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [ecasound] JACK plugin added to ecasound
From: Kai Vehmanen (k_AT_eca.cx)
Date: Sun Dec 16 2001 - 03:44:36 EET

Committed to CVS. Experimental but works.


To use it, update ecasound tree from CVS, and give --with-jack=/path/to option to configure. I've installed jack in ~/apps/jack so I use --with-jack=/home/user/apps/jack; with default jack install you'd use --with-jack=/usr/local.

--- And actual use:

./jackd -p 128 -r 44100 & ecasound -b:128 -i foo.wav -o jack,ecaoutput1 ecasound -b:128 -i jack,ecarec -o foo.wav

--- Known limitations:

- you must manually set buffersize to match jackd's buffersize; ie. 'jackd -p x ...' --> 'ecasound -b:x ...' - you must manually set sample rate ie. 'jackd -r 48000 ...' --> 'ecasound -sr:48000 ...' - don't use multiple JACK plugins in the same chainsetup (hangs in UNIX-socket poll() somewhere in JACK client code) - only mono output and input supported; depending on direction, ecasound makes a connection to either 'ALSA I/O:Input 1' or 'ALSA I/O:Output 1'

--- Performance

Playback and recording works without xruns even with '-p 64', but is very sensitive to outside events. I'm not running a ll-patched kernel so this is to be expected. Also, the ecasound JACK plugin has lots of room for optimization. As it is now, two pthread_cond+pthread_signal combinations are issued per period.

There are lots of misc problems. When something goes wrong you usually have to "killall -9 jackd ; rm -f /tmp/jack* ; ./jackd".

--- Patches&stuff

I'm using ALSA0.9 ens1371 driver. With the current JACK CVS-tree I couldn't run jackd with '-r 44100'. ens1371 (unlike ens1370) has a continuous range of supported sample rates. This also means that if you request for 44100 you don't get that exact rate. Or at least this is my interpretation. In any case I get an error from 'snd_pcm_hw_param_set_rate()'. I got around this with the following change:

--cut-- diff -u -r1.9 alsa_driver.c --- alsa_driver.c 2001/12/08 18:11:38 1.9 +++ alsa_driver.c 2001/12/16 01:18:09 @@ -219,7 +219,7 @@ } } - if ((err = snd_pcm_hw_params_set_rate (handle, hw_params, driver->frame_rate, 0)) < 0) { + if ((err = snd_pcm_hw_params_set_rate_near (handle, hw_params, driver->frame_rate, 0)) < 0) { --cut--

And another very, very important patch :)...

--cut-- --- AUTHORS 2001/11/12 04:08:38 +++ AUTHORS 2001/12/16 01:18:09 @@ -5,7 +5,7 @@ Paul Davis David Olofson Benno Sennoner - Kai Vehamen + Kai Vehmanen --cut--

-- 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>.

New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Dec 16 2001 - 03:37:37 EET