Re: Looping sound output from pcm

From: Scott Long <scottl_at_freebsd.org>
Date: Mon, 22 Dec 2003 20:05:57 -0700
Robert Watson wrote:
> I ran aim after a recent kernel update, and had a rather odd problem.  I
> got an instant message from someone which resulted in a "ding" from aim. 
> However, the ding never stopped dinging -- the sample repeated over and
> over again, and continues as I type.  Even after the aim process exited. 
> Sending additional sound output didn't make it go away either.  KDE/arts,
> etc, don't seem to be involved in the problem, so it really seems like the
> kernel is looping the sample.  When I try to unload pcm, I get: 
> 
> pcm0: unregister: channel pcm0:play:2 busy (pid 965)
> 
> And there's no pid 965.
> 
> paprika# cat /dev/sndstat 
> FreeBSD Audio Driver (newpcm)
> Installed devices:
> pcm0: <ESS Technology Maestro3> at io 0xd800 irq 5 (4p/1r/0v channels duplex default)
> 
> Any suggestions welcome; in the mean time, I'll just listen to it ding
> away ad naueseum. 
> 
> Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
> robert_at_fledge.watson.org      Senior Research Scientist, McAfee Research
> 

As was pointed out, this is probably an interrupt problem.  The sound
hardware should have interrupted the driver to say that it was almost
done playing what was in the _ring_ buffer, and the driver should have
responded by either filling the buffer with new data, or turning off the
hardware.  Instead, the hardware just kept on doing what it was designed
to do: keep on playing through the ring buffer.  The same thing would
have happened if the OS had crashed while a sample was playing.

The maestro3 driver is growing more stale over time.  I no longer have
any hardware to deal with it though.  If anyone knows where I can get
an Maestro3 or Allegro-1 PCI card, I'll gladly buy it and fix start
working on the driver again.

Try playing something else to see if the interrupt loss was transient.
You can do something as easy as just cat a file into /dev/dsp0.

Scott
Received on Mon Dec 22 2003 - 18:07:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC