All of lore.kernel.org
 help / color / mirror / Atom feed
* sb16 gets wedged when doing overlapped i/o (full duplex)
@ 2002-12-05 10:47 John S. Denker
  2002-12-05 11:31 ` usbaudio won't do 24-bit or 32-bit i/o, and won't do 96000 frames per second John S. Denker
                   ` (4 more replies)
  0 siblings, 5 replies; 46+ messages in thread
From: John S. Denker @ 2002-12-05 10:47 UTC (permalink / raw)
  To: alsa-devel

	==== This is a slightly-updated clone of item
	#648232 on the sourceforge bug/patch reporting
	system.  I'm moving it to here (the alsa-devel
	mailing list) at the request of Jaroslav. ====

Things run OK for a few minutes (sometimes 30 seconds,
sometimes 5+ minutes) then ALSA gets wedged.  Every read or
write results in an error.  This only happens when I'm doing
overlapped i/o; pure input runs happily for hours, and
although I haven't tried it I assume pure output works fine.

I observe this on two different machines using two different
models of card (classic sb16 PnP and sb32awe).

This is clearly a driver problem, not a problem in my
program, because when the ALSA system gets wedged, it stays
wedged.  If I kill and restart the program while things are
wedged, it puts out what sounds like one buffer of audio and
then gets nothing but errors.  There is a ten-second pause
associated with each error.  Then, if I do init.d/alsactl
restart, i.e. unload and reload the modules, we are back
where we started: things will run fine for a few minutes.

I'm doing stereo * 44100 frames per second * two
directions. The same pattern of i/o on a different machine
(faster cpu) with a different driver (snd-intel8x0) works
fine.

I observe the same problems with rc6 and also with
9.0beta11, so the problem has been lurking there for quite a
while.

The message (under rc6) is:
ALSA lib pcm_hw.c:428:(snd_pcm_hw_prepare)
SNDRV_PCM_IOCTL_PREPARE failed: Device or resource busy

The message is the same for beta11, except line 349.

Once it gets wedged, writes and reads both fail, with the
same message.

Because the runtime before failure is far from constant, I
suspect some sort of race condition. I tried varying the
load on the machine. I intermittently imposed enough load to
cause the application to suffer underruns, but this had no
discernible effect on the incidence of the wedge problem.

Further experiments tend to suggest that lowering the
frame-rate from 44100 to 22050 decreases the incidence of
the wedge problem by roughly a factor of two.  I suspect
most people don't do overlapped i/o at 44100 fps, which may
explain why the bug hasn't been reported before.

References, possibly related, possibly not:
http://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg02194.html
http://www.mail-archive.com/alsa-devel@lists.sourceforge.net/msg05183.html
http://www.mail-archive.com/alsa-devel@lists.sourceforge.net/msg05195.html



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2002-12-23 18:58 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-05 10:47 sb16 gets wedged when doing overlapped i/o (full duplex) John S. Denker
2002-12-05 11:31 ` usbaudio won't do 24-bit or 32-bit i/o, and won't do 96000 frames per second John S. Denker
2002-12-05 15:19   ` Clemens Ladisch
2002-12-05 19:10     ` John S. Denker
2002-12-06  9:16       ` Clemens Ladisch
2002-12-06 10:09         ` Jaroslav Kysela
2002-12-07 15:05           ` Patrick Shirkey
2002-12-06 13:13         ` John S. Denker
2002-12-06 14:22         ` many utils fail for extigy (usb) John S. Denker
2002-12-06  6:48     ` usbaudio won't do 24-bit or 32-bit i/o, and won't do 96000 frames per second Patrick Shirkey
2002-12-06  7:12       ` Patrick Shirkey
2002-12-13 18:19       ` Takashi Iwai
2002-12-14 10:48         ` usbaudio won't do 24-bit or 32-bit i/o Patrick Shirkey
2002-12-16 17:19           ` Takashi Iwai
2002-12-16 18:59             ` Patrick Shirkey
2002-12-16 20:11               ` Patrick Shirkey
2002-12-17 15:28               ` Takashi Iwai
2002-12-20 22:00                 ` Patrick Shirkey
2002-12-23 13:35                   ` Takashi Iwai
2002-12-23 18:58                     ` Patrick Shirkey
2002-12-05 11:39 ` sb16 gets wedged when doing overlapped i/o (full duplex) John S. Denker
2002-12-05 11:52 ` hard crash when snd-ice1712 loads John S. Denker
2002-12-05 17:42   ` Jaroslav Kysela
2002-12-05 23:10   ` Scott Bahling
2002-12-05 11:57 ` alsactl and alsamixer fail for extigy John S. Denker
2002-12-09 14:51   ` Takashi Iwai
2002-12-05 12:07 ` sb16 gets wedged when doing overlapped i/o (full duplex) Uros Bizjak
2002-12-05 13:45   ` John S. Denker
2002-12-05 14:55     ` Uros Bizjak
2002-12-05 17:47       ` Jaroslav Kysela
2002-12-05 18:33       ` John S. Denker
2002-12-06  7:14         ` Uros Bizjak
2002-12-06 14:08           ` John S. Denker
2002-12-06  0:41       ` cs4239 errs on full duplex (provoked by overruns?) John S. Denker
2002-12-05 15:23     ` sb16 gets wedged when doing overlapped i/o (full duplex) Paul Davis
2002-12-09 14:30       ` Takashi Iwai
2002-12-09 14:54     ` documentation or lack thereof John S. Denker
2002-12-09 15:05       ` Takashi Iwai
2002-12-09 15:23       ` ljp
2002-12-09 16:23       ` Paul Davis
2002-12-10 17:59         ` Patrick Shirkey
2002-12-10 22:28         ` soundcard matrix: broken links etc John S. Denker
2002-12-11  2:52           ` Patrick Shirkey
2002-12-11  4:05         ` John S. Denker
2002-12-11  5:27           ` Patrick Shirkey
2002-12-14 15:59         ` John S. Denker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.