From owner-freebsd-hardware Fri Dec 11 20:20:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA12081 for freebsd-hardware-outgoing; Fri, 11 Dec 1998 20:20:54 -0800 (PST) (envelope-from owner-freebsd-hardware@FreeBSD.ORG) Received: from pegasus.com ([209.84.70.244]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id UAA12076 for ; Fri, 11 Dec 1998 20:20:50 -0800 (PST) (envelope-from richard@pegasus.com) Received: by pegasus.com (8.6.8/PEGASUS-2.2) id SAA10884; Fri, 11 Dec 1998 18:20:21 -1000 Date: Fri, 11 Dec 1998 18:20:21 -1000 From: richard@pegasus.com (Richard Foulk) Message-Id: <199812120420.SAA10884@pegasus.com> In-Reply-To: Kevin Day "Re: sane sound cards?" (Dec 11, 8:24pm) X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: freebsd-hardware@FreeBSD.ORG Subject: Re: sane sound cards? Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org } > 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. Buffering algorithms are everywhere. Choose one, I'm not picky. } 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. Arcade games are real-time systems. Apples and oranges. I"ve built I/O cards and written drivers and this is a classic case where a little more buffer will make things work more reliably. Sort of like the older serial ports that had only one or two characters of buffer. At higher speeds under Unix they would occasionally lose characters. So the chip makers eventually added more buffer. What's taking the sound card guys so long? Is it because most of them are used for much less than 44.1KHz stereo? Richard To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message