Subject: Re: Sound support for SB16 in NetBSD-1.0
To: Mark Tamola <buckwild@u.washington.edu>
From: Herb Peyerl <hpeyerl@novatel.ca>
List: netbsd-help
Date: 11/16/1994 06:33:24
On Wed, 16 Nov 1994 00:44:13 -0800 (PST)   Mark Tamola <buckwild@u.washington.edu> wrote:
 > I am running NetBSD-1.0_BETA circa October 11 sources, and as of then, 
 > the sound driver for the SB16 is not functional (i.e. an *.au file catted 
 > to /dev/audio hangs the process).  Sorry if this was answered before, but 

I've been toying with this the last couple of days (between bouts of actually
having to do stuff that I'm being paid for).

It turns out to be a tsleep() that never gets woken up on the last block
of output from the file. It doesn't happen everytime I send a file to
/dev/audio either... It's somewhat random.

Anyhow; now that I've determined the symptoms, I need to find out why. I
hope to have something for this soon...

 > hack to the sb driver, in that you add three calls to a function 
 > tenmicrosec() after each call to outb.  However, I found that this 
 > function is not part of the NetBSD library, thus I get undefined symbols 

Because it's an icky disgusting hack to an icky disgusting device driver.
(No offense intended).

 > when recompiling the kernel.  Is there a function equivalent to FreeBSD's 
 > tenmicrosec() in NetBSD?  Or is this just because the FreeBSD sb driver 
 > is completely different?

You can try substituting some value of DELAY() if you feel so inclined.  If
I recall, 'tenmicrosec' was a macro that had DELAY() in it.  What you have
to remember is that the FreeBSD device driver was originally written for Linux
and then hacked to support Linux, SVR4 and FreeBSD simultaneously.