Subject: Debugging SB-16/Pro
To: The Grey Wolf <aellwood@MIT.EDU>
From: Mark Willey <mwilley@hillres142.cc.purdue.edu>
List: netbsd-help
Date: 02/14/1995 10:15:18
The Grey Wolf writes:
> 
> >I have seen others report this type of error as well.  It looks like it's
> >fine, but when you do a "cat file.au > /dev/audio" the process never exits,
> >and you can't kill it.  No sound, either, BTW.  ;-)
> 
> I have this problem as well.  I have a Sound Blaster 16 (this is
> NetBSD 1.0 for the i386, btw) which loads just fine.


The Grey Wolf's boot message:
> sb0 at isa0 port 0x220-0x22f irq 5 drq 1: dsp v4.13
                   ^^^^^^^^^^^

My boot message:
sb0 at isa0 port 0x220-0x237 irq 7 drq 1: dsp v4.12
                 ^^^^^^^^^^^

Why is this different?  Her card is detected immediately.  Mine takes about
10 seconds to detect the SB and the SCSI on the SB card.

device          sb0     at isa? port 0x220 bio irq 7 drq 1 vector sbintr

> I haven't tried to debug it either, though I will at some point
> because I want to use mbone ;)

Me too.  I have a nice ethernet connection now, and am dying for Talk
Radio!  ;-)

I have done a little debugging, tho.  I may a bsd_audio.c and sb.c with
some uprintf's (thanks, Kenneth!).  They, along with my test .au file, are
available in ftp://hillres142.cc.purdue.edu/pub/NetBSD/sb_debug/

If someone with a working card could verify that this is a working .au
file, that would be nice.  :)  :)  I got it from the David Letterman web
page.

Anyhow, this is the result of that debugging code:
hillres142 $ cat *.au > /dev/audio
gonna reset the card... reset the card.
setting SR... gonna write a DSP byte... wrote a DSP byte.
gonna write a DSP byte... wrote a DSP byte.
set SR.
turning on speaker... gonna write a DSP byte... wrote a DSP byte.
speaker on.
audio_pint... not greater than 0... doing DMA output.
adacmode = SB_ADAC_LS.
gonna write a DSP byte... wrote a DSP byte.
gonna write a DSP byte... wrote a DSP byte.
gonna write a DSP byte... wrote a DSP byte.
returning 0.
done.
in audiowrite.
audiostartp... doing DMA output.
adacmode = SB_ADAC_LS.
gonna write a DSP byte... wrote a DSP byte.
gonna write a DSP byte... wrote a DSP byte.
gonna write a DSP byte... wrote a DSP byte.
returning 0.
done.
in audiowrite.
in audiowrite.
in audiowrite.

<here's where the cat process hangs>

The really strange thing is that I can't find ANYTHING in the i386 code
that calls this function!  (Didn't check the while ksrc, just the i386
part.)  Does anyone know where this might be called from.  I guess learning
to use the kernel debugger would be a good idea.)

Mark

-- 
      Ask me about FREE UNIX and X for your PC/Mac/Sun/Amiga/etc...
              mwilley@hillres142.cc.purdue.edu  Mark Willey
                   http://hillres142.cc.purdue.edu/