Re: [ecasound] ecasound and PulseAudio problems

From: Lindsay Haisley <fmouse@email-addr-hidden>
Date: Fri Jul 01 2011 - 03:55:23 EEST

On Fri, 2011-07-01 at 00:37 +0200, Julien Claassen wrote:
> Hello Lindsay!
> I don't know about me being smart, but here may be a partial answer to your
> problem:
> Ecasound has a resample object:
> ecasound -c -f:16,2,44100 -i resample,22050,file -o whatever
> the first param of resample is the samplerate of the file. I think you need
> to specify the -f option to make it clear, what your preferred format is.

Thanks for your response, Julien.

This is true, and I'm aware of the -f option to ecasound apps, and have
made the -f option work, but it's kind of a secondary issue. I'm also,
sometimes, getting "Device or Resource Busy" when I try to connect
through devices other than alsa,default, which makes use of the resample
object useless. I can manipulate the sample rate for playback with no
problem if the PulseAudio daemon isn't running, but if it's running,
well.... things just get flaky and unpredictable. I've had lockups
with ecaplay, and If I kill the crashed process it disappears from the
process table it still shows up as a running ALSA process in the
applications tab of gnome-volume-control.

> About PulseAudio: Not being a GUI user at all, I don't really know, but
> isn't there a way to make PulseAudio and JACK interact?

PulseAudio isn't, in itself, a GUI app, just a sound server. There are
GUI apps that interact with it and help control it (just as there are
for JACK), but from 14 years of working with Linux and watching things
change and develop, I can say with some confidence that it's a pretty
raw project that's being pushed into a major production theater before
it's ready. There are _lots_ of rough edges. It's rather flaky, and
many of the utilities are poorly documented with features that change
unstably. It's kind of in the same state that the ALSA project was in
say 5 or 6 years ago. I expect it'll get better over time.

> Can PA be a client to
> JACK or something like that?

Well this is a very good suggestion and does seem to help! Thanks!
Since the PulseAudio daemon is fundamental to the sound system, jackd
apparently runs on top of it, or more likely just pushes it aside, but
if it's running the ecasound programs interacts with jackd and the sound
chain seems to be much better behaved on a number of counts. The
instantiated output device, according to ecasound, is "jack_alsa". It's
apparently not a true ALSA device since it can be spec'd with
"-o:jack_alsa" rather than "-o:alsa,jack_alsa". The only drawback is
that there's no automatic sample rate conversion, as ALSA seems to do
for the default device without PulseAudio running. I have to change the
sample rate in jackd using qjackctl, then stop and start the daemon, and
then switch back to my CLI window and run ecaplay/ecasound. Othewise I
get a complaint that "object 'jack_alsa' differs from engine rate (44100
<-> 22050); unable to continue." Do you know if there's a daemon which
will manage automatic sample rate conversions and can be hooked into the
jack device chain?

This is good, and will be a BIG help. When people on the ubuntu-studio
list started touting JACK to me I'll admit that I was skeptical, but the
more I use it, the better I like it. It's apparently pretty well
written - probably better than PulseAudio.

> Otherwise, if you can use your soundcards devices
> although pulseaudio is running you might write a jackplugin device, which
> ecasound can use instead of alsa,default. I have one example if you like.
> I hope that helps a bit.

Yes, I'd very much like to see your work on this! I'd really like to
see PA and ecasound made to play nice with one another, but in the
meantime, using JACK seems to be a reasonable workaround. Thanks!!

Lindsay Haisley       | "Everything works if you let it"
FMP Computer Services |
512-259-1190          |     - The Roadie    |
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
Ecasound-list mailing list
Received on Fri Jul 1 04:15:03 2011

This archive was generated by hypermail 2.1.8 : Fri Jul 01 2011 - 04:15:03 EEST