Subject: Re: audio device
To: Ken Nakata <kenn@synap.ne.jp>
From: David A. Gatwood <dgatwood@mvista.com>
List: port-mac68k
Date: 07/13/1999 22:40:21
On Wed, 14 Jul 1999, Ken Nakata wrote:

> On Tue, 13 Jul 1999 22:06:30 -0700 (PDT), "David A. Gatwood" <dgatwood@mvista.com> wrote:
> > 
> > If you find it, send me a copy.  MkLinux would love to have sound working
> > on the Performa 52/53/62/63xx machines (once we actually figure out why
> > they're not booting).
> 
> No problem.  Although I wish you were working for NetBSD/macppc

It's all under a BSD license, so you guys can feel free to rip stuff.
;-)



> > > I think we need to figure out how DMA works for audio I/O, also.  I
> > > tried to disassemble the ROM code but I quickly got lost every time I
> > > tried.
> > 
> > What DMA engine?  AMIC or something else?
> 
> PSC.  It does DMA among other things on the 68k AV Macs.

Ah.  I have a strange suspicion that it's a predecessor to AMIC, but I'd
have a hard time confirming that.  If it does, it's probably a lot simpler
than the ugly ML code would have you believe.  AMIC and DBDMA are both
remarkably simple onvce you see actual code, although DBDMA has a lot more
capabilities that can make the code a lot more complicated if somebody's
willing to use them.  Needless to say, though, I wouldn't expect PSC to be
anywhere close to that.

The AMIC DMA model, if it helps, is to have a section of RAM devoted to
DMA buffers (non-cached), and the AMIC chip contains very few registers,
basically one for the DMA address, and then a few registers for each
device, the first being the offset from the DMA buffer start (each device
was assigned a buffer region, and the hardware updated that pointer
whenever DMA had occurred to point to the next avaiable spot or wrap
around to the start of that devices buffer region.  There was a control
byte, which had a few flags, run, flush (some devices), pause (some
devices), I think reset, and a couple of others, maybe.  There was also a
counter to tell how many bytes to fetch or send.  That was literally it,
unless I'm forgetting something.  I'd imagine the PSC is similar, but
again, that's just a guess.

Oh, and you can generally operate that stuff w/o DMA (well, maybe not that
well, but...).  I think you'll find that you can do more direct
communication with the Singer through either the Cuda or one of the VIA
ports, not sure which.  At least I _think_ so.  :-)


Later,
David