diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-01-02 00:02:57 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-01-02 00:02:57 +0000 |
commit | 16eef665101a8c1334032296ea7d1584ff9c7e57 (patch) | |
tree | 5cc9b881cb0bdd13a85c95e2cbd124b47ddc4645 /sys/dev/isa/sb_isapnp.c | |
parent | 890d46b55a21bec77e2f60dbf22d16199ccdbaa7 (diff) |
Midi & sequencer support from NetBSD, mostly by Lennart Augustsson
Diffstat (limited to 'sys/dev/isa/sb_isapnp.c')
-rw-r--r-- | sys/dev/isa/sb_isapnp.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/sys/dev/isa/sb_isapnp.c b/sys/dev/isa/sb_isapnp.c index 774052dd5f7..c3b70a3a0e4 100644 --- a/sys/dev/isa/sb_isapnp.c +++ b/sys/dev/isa/sb_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sb_isapnp.c,v 1.5 1998/05/13 20:07:47 deraadt Exp $ */ +/* $OpenBSD: sb_isapnp.c,v 1.6 1999/01/02 00:02:47 niklas Exp $ */ /* $NetBSD: sb_isa.c,v 1.3 1997/03/20 11:03:11 mycroft Exp $ */ /* @@ -45,6 +45,7 @@ #include <sys/audioio.h> #include <dev/audio_if.h> +#include <dev/midi_if.h> #include <dev/mulaw.h> #include <dev/isa/isavar.h> @@ -107,14 +108,22 @@ sb_isapnp_attach(parent, self, aux) } else sc->sc_drq16 = DRQUNK; - /* - * isapnp is a child if isa, and we needs isa for the dma - * routines - */ - sc->sc_isa = parent->dv_parent; +#if NMIDI > 0 + if (ia->ipa_nio > 1) { + sc->sc_mpu_sc.iobase = ia->ipa_io[1].base; + sc->sc_mpu_sc.ioh = ia->ipa_io[1].h; + } else + sc->sc_mpu_sc.iobase = 0; +#endif - if (!sbmatch(sc)) + if (!sbmatch(sc)) { + printf("%s: sbmatch failed\n", sc->sc_dev.dv_xname); return; + } + + printf("%s: %s %s", sc->sc_dev.dv_xname, ia->ipa_devident, + ia->ipa_devclass); + sc->sc_isa = parent; sbattach(sc); } |