Subject: Re: preliminary sound survey
To: SUNAGAWA Keiki <kei_sun@ba2.so-net.or.jp>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 01/09/1998 11:42:02
SUNAGAWA Keiki wrote:
> 
> Hi Colin, it's nice timing!

:-)

> I've been restarted working on implement of sound
> driver. (since last spring:-) I modified the file Scott
> posted port-mac68k some month ago and got ugly harmony;-)

I've got a nice beep on my Q700 finally, and a nasty squeal if I try to
play a linear .au file (although I think that I'm doing that wrong).  I
need to set my IIci back up for NetBSD use since I think it'll work
more easily.
 
> Colin Wood <cwood@ichips.intel.com> wrote:
> 
> Colin> Ok, I've got a favor to ask everyone.  I'm working on
> Colin> "sound" support for NetBSD.  This is motivated by the
> Colin> fact that my Quadra 700 only clicks for it's term
> Colin> bell, whereas my IIci actually beeps.
> 
> Which do you think it's the machine-speed problem or one
> caused by difference of the sound chip?

I think it's an ASC vs. EASC difference.  On the IIci, you can play a
sound by writing to the sound buffers and enabling the chip for the
duration that you want to hear the sound.  On the Q700, it appears that
you have to continually write to the sound buffer.  I'm not sure, however,
that it's supposed to work this way.

> Colin>   I'd like to be able to get all Macs to the point
> Colin> where they can at least beep.  I'd really like to be
> Colin> able to fully support /dev/audio, but that might
> Colin> require a minor miracle (or a lot more staring at ROM
> Colin> code ;-)
> 
> Yes, it's cool.  I'd like to do 'cp somefile /dev/audio.'

Me too (well, I think it's 'cat somefile > /dev/audio', but either way...)

> Now I'm modifying asc.c, ascvar.h and writing a new file
> ascreg.h.  My plan is to emulate ROM sound driver.  At this
> moment, I translate the ROM code to NetBSD's scheme, but
> since my lack of knolwedge of device driver, things get
> slow.

I've got a more-or-less C translation of both the IIci and Q700 .Sound
drivers at the moment; the IIci driver appears to be a subset of the Q700
driver.  However, attempting to follow how the Q700 driver handles
synthesized sound didn't quite seem to work.  I have a feeling that
there's something crucial involving the VIA timers and interrupts that I'm
missing.  Maybe we need the ASC timer interrupt turned on?

> Colin> Anyway, as part of this, I'd like to figure out how
> :
> 
> I ran it, but the result was always different after it
> beeps.  Is it OK?  I'll send the result to you another mail,
> anyway.

Cool, thanks!

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.