Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 1997 15:09:33 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        multimedia@freebsd.org
Subject:   state of audio driver...
Message-ID:  <199710011409.PAA10426@labinfo.iet.unipi.it>

next in thread | raw e-mail | index | archive | help
Some more information on the sudden removal of snd970930.

The thing I was trying to do was overcome the deadlock problems I
was having with some cards -- noticeably the SB16 and OPTI -- when
working in full duplex. To this purpose, I did some modifications
to the dma code to see what was really going on. More specifically,
I added some sanity checks, and programmed the ISA DMA controller
with a larger count, so that I could confirm my idea that some
cards would miss dma transfers and overrun their programmed count.
Unfortunately things appear to be much worse than I imagined.

When used in single DMA mode, ALL cards I have, to different degrees,
appear to be generate interrupts at different stages of the DMA
transfer. The most reliable ones (4236/4237) seem to interrupt
almost always at the end of count, although occasionally (say every
100..1000 interrupts) they interrupt 1-2 samples earlier. For the
SB16-Vibra16, interrupts seem to come 1 sample earlier in 50..100%
of the cases (it is not systematic). The OPTI interrupts up to 8
bytes before the due time, and in some cases completely misses
interrupts and reinitializes the DMA for another transfer.

The problem with these early (or "advisory") interrupts is that
missing bytes (or samples) cannot be recovered, generating clicks
which are more or less audible. In the worst cases (e.g. when the
missing bytes are not a multiple of the sample size) the next DMA
transfer will be completely misaligned, with the effects that you can
well imagine...

This suggests that I should forget the idea of try to support single
DMA since most cards screw up when they are reprogrammed in single DMA
mode. So, although the code I have now is slightly more robust than
snd970924.tgz, there is no much point in releasing it since it is still
triggering bugs in the cards.

If nothing else, now I have a much better understanding of the problem,
and know how to possibly fix it.

	Cheers
	Luigi
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710011409.PAA10426>