An strace on artsd shows that the write() in audiosubsys.cc is
occasionally getting the system error EAGAIN. (Obviously, since the
return value of write() is -1, this fails the assertion.) Looking at the
code in the aureal driver, this seems to occur when the DMA buffer is
not emptied after one attempt to write it and the caller has specified
non-blocking IO, as is specified in the open on /dev/dsp. I wonder if
this is the right semantics for EAGAIN in the aureal driver?

Another thing I noticed is that after successfully playing something,
artsd consumes ~100% of the cpu for a couple of seconds. After this, it
will no longer play anything. The strace shows that it gets the audio
file name over the MCOP channel and reads the data from the file, but it
never writes to /dev/dsp again. I guess I'll instrument artsd some and
see why this happens.

Thanks,
Allen


Stefan Westerfeld wrote:
> 
> Anyway, the assert you are seeing fail is that artsd makes a query for
> available output space (with SNDCTL_DSP_GETOSPACE), and then calculates
> data according to that size, and writes the data. This should always
> succeed (as it will write less or equal bytes than there is space, so it
> should always work). Using strace or adding printfs might be able to help
> you to examine the problem more closely, if you want to debug it.
> 
>    Cu... Stefan
> 
> > Stefan Westerfeld wrote:
> > >
> > >    Hi!
> > >
> > > On Fri, Mar 16, 2001 at 01:35:16PM -0500, Allen Barnett wrote:
> > > > I've installed KDE 2.1 and have not been able to make aRts work
> > > > reliably. It starts and runs long enough to play the KDE opening theme,
> > > > but the sound is very choppy (plays ~1/4 second of sound, pauses ~1/4
> > > > sec, plays another 1/4 second). After this, the artsd server dies. Once,
> > > > after starting it at a console and playing a short while, it produced an
> > > > error message:
> > > >
> > > > [allen@guanaco soundserver]$ /usr/local/bin/artswrapper
> > > > >> running as realtime process now (priority 50)
> > > > artsd: audiosubsys.cc:458: void Arts::AudioSubSystem::handleIO(int):
> > > > Assertion `len == can_write' failed.
> > > > Aborted
> > > >

Reply via email to