netbsd-help: Re: A-to-D with SBPRO on 1.0

Subject: Re: A-to-D with SBPRO on 1.0
To: None <chiltj@ois.com>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: netbsd-help
Date: 01/14/1995 20:08:53
 I'm wondering if anyone could tell me the secret to reading from the
 /dev/audio device on NetBSD 1.0 with a Soundblaster "Pro" [1] in it.
The `sb' driver was broken for reading in 1.0. The one in -current
should work better.
Here's the relevant diff:
*** sb.c~	1994年11月18日 22:03:38
--- sb.c	1994年12月17日 18:45:11
***************
*** 40,43 ****
--- 40,44 ----
 #include <sys/syslog.h>
 #include <sys/device.h>
+ #include <sys/buf.h>
 
 #include <machine/cpu.h>
***************
*** 180,184 ****
 	 * never need the buffer anyway.)
 	 */
! 	at_dma(1, &dmabuf, 1, ia->ia_drq);
 	if (wdsp(iobase, SB_DSP_RDMA) == 0) {
 		(void)wdsp(iobase, 0);
--- 181,185 ----
 	 * never need the buffer anyway.)
 	 */
! 	at_dma(B_READ, &dmabuf, 1, ia->ia_drq);
 	if (wdsp(iobase, SB_DSP_RDMA) == 0) {
 		(void)wdsp(iobase, 0);
***************
*** 525,529 ****
 	register int iobase;
 
! 	at_dma(1, p, cc, sc->sc_dmachan);
 	sc->sc_intr = intr;
 	sc->sc_arg = arg;
--- 536,540 ----
 	register int iobase;
 
! 	at_dma(B_READ, p, cc, sc->sc_dmachan);
 	sc->sc_intr = intr;
 	sc->sc_arg = arg;
***************
*** 560,564 ****
 	register int iobase;
 
! 	at_dma(0, p, cc, sc->sc_dmachan);
 	sc->sc_intr = intr;
 	sc->sc_arg = arg;
--- 571,575 ----
 	register int iobase;
 
! 	at_dma(B_WRITE, p, cc, sc->sc_dmachan);
 	sc->sc_intr = intr;
 	sc->sc_arg = arg;

AltStyle によって変換されたページ (->オリジナル) /