Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 1998 20:24:55 -0600 (CST)
From:      Kevin Day <toasty@home.dragondata.com>
To:        richard@pegasus.com (Richard Foulk)
Cc:        freebsd-hardware@FreeBSD.ORG
Subject:   Re: sane sound cards?
Message-ID:  <199812120224.UAA13709@home.dragondata.com>
In-Reply-To: <199812120145.PAA10540@pegasus.com> from Richard Foulk at "Dec 11, 1998  3:45:20 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> } If you're getting skipping/missing, it's because your system can't keep up
> } or there are driver problems.
> } 
> } I have an original Soundblaster 1.0 (giant ISA card) that has a 64 byte
> } buffer, but can DMA. I'm able to play mp3's on it with ease.
> } 
> } Look for IRQ conflicts, or try a different audio driver if possible.
> 
> Perhaps I wasn't clear.  My system can play them just fine too.  But
> not if I do a fair amount of other work at the same time.  I'm convinced
> that a lack of sufficient buffering on the sound card is the only thing
> standing in my way.

Maybe I wasn't either. :) I can play mp3's on my old soundblaster during a
make world -j4, with no skipping... P/200 with 128MB of ram.

> } > A larger on-card buffer would make the problem go away.
> } 
> } Not really. You're DMA'ing data from the system to the card, so that will
> } never get interrupted with load.
> 
> I don't think you understand how DMA works.  Since the transfer is
> limited to the buffer on the card it can only transfer tiny bits of data
> at a time.
> 
> You can't DMA a megabyte buffer full of data to a card that doesn't have
> any place to put it.  So a five minute song is going to take roughly
> 100,000 separate DMA transfers.  That's 100,000 chances for another
> process to keep the CPU busy long enough for the sound card to run out
> of data.  64 bytes is only a few milliseconds of play time.  Unacceptable.

At least in my design, you trigger an interrupt/timer/something to go off
just before the dma finishes, and in that handler you start up another
transfer.

I do arcade game programming. In past projects, i've done similar things on
funky processors as slow as 33Mhz, with no problem keeping things fed. I'd
usually set a timer to expire just before my dma was finished, that
triggered an interrupt, and my interrupt handler started the next dma. No
matter what was happening, i never missed a dma.

Kevin

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hardware" in the body of the message



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