Fix the MPU attachment on Aztech 1020 that has a separate mpu pnp device
instead of having the mpu in io[1]. From doomwarriorx at gmail dot com.
This commit is contained in:
parent
ad09581b8e
commit
afbea8995b
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.741 2006/04/12 03:41:51 martti Exp $
|
||||
# $NetBSD: GENERIC,v 1.742 2006/04/13 00:30:19 christos Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
|
@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
|
|||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC-$Revision: 1.741 $"
|
||||
#ident "GENERIC-$Revision: 1.742 $"
|
||||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
|
@ -1181,6 +1181,7 @@ audio* at audiobus?
|
|||
|
||||
# MPU 401 UARTs
|
||||
#mpu* at isa? port 0x330 irq 9 # MPU401 or compatible card
|
||||
mpu* at isapnp?
|
||||
mpu* at cmpci?
|
||||
mpu* at eso?
|
||||
mpu* at fms?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sb.c,v 1.81 2005/12/11 12:22:03 christos Exp $ */
|
||||
/* $NetBSD: sb.c,v 1.82 2006/04/13 00:30:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.81 2005/12/11 12:22:03 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.82 2006/04/13 00:30:19 christos Exp $");
|
||||
|
||||
#include "midi.h"
|
||||
|
||||
|
@ -234,16 +234,21 @@ sbattach(struct sbdsp_softc *sc)
|
|||
audio_attach_mi(&sb_hw_if, sc, &sc->sc_dev);
|
||||
|
||||
#if NMPU > 0
|
||||
if (sc->sc_hasmpu) {
|
||||
switch(sc->sc_hasmpu) {
|
||||
default:
|
||||
case -1: /* no mpu */
|
||||
break;
|
||||
case 0: /* try to attach midi directly */
|
||||
midi_attach_mi(&sb_midi_hw_if, sc, &sc->sc_dev);
|
||||
break;
|
||||
case 1: /* search for mpu */
|
||||
arg.type = AUDIODEV_TYPE_MPU;
|
||||
arg.hwif = 0;
|
||||
arg.hdl = 0;
|
||||
sc->sc_mpudev = config_found(&sc->sc_dev, &arg, audioprint);
|
||||
} else {
|
||||
midi_attach_mi(&sb_midi_hw_if, sc, &sc->sc_dev);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (sc->sc_model >= SB_20) {
|
||||
arg.type = AUDIODEV_TYPE_OPL;
|
||||
arg.hwif = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: isapnpdevs,v 1.58 2006/02/19 21:30:46 martin Exp $
|
||||
$NetBSD: isapnpdevs,v 1.59 2006/04/13 00:30:20 christos Exp $
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -178,6 +178,7 @@ devlogic le BUF0001 0 Melco Inc. LGY-IV
|
|||
*/
|
||||
devlogic mpu AZT0002 0 Aztech AZT2320 MPU401 MIDI
|
||||
devlogic mpu AZT2001 0 Aztech MPU401 MIDI
|
||||
devlogic mpu AZT2004 0 Aztech AZT1020 MPU401 MIDI
|
||||
devlogic mpu CSC0003 0 CS4235 MPU401 MIDI
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: mpu_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $ */
|
||||
/* $NetBSD: mpu_isapnp.c,v 1.13 2006/04/13 00:30:20 christos Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mpu_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mpu_isapnp.c,v 1.13 2006/04/13 00:30:20 christos Exp $");
|
||||
|
||||
#include "midi.h"
|
||||
|
||||
|
@ -83,6 +83,8 @@ mpu_isapnp_attach(parent, self, aux)
|
|||
printf("%s: %s %s\n", sc->sc_dev.dv_xname, ipa->ipa_devident,
|
||||
ipa->ipa_devclass);
|
||||
|
||||
sc->sc_mpu.model = "Roland MPU-401 MIDI UART";
|
||||
|
||||
midi_attach_mi(&mpu_midi_hw_if, &sc->sc_mpu, &sc->sc_dev);
|
||||
|
||||
sc->sc_ih = isa_intr_establish(ipa->ipa_ic, ipa->ipa_irq[0].num,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sb_isapnp.c,v 1.45 2006/03/29 06:51:47 thorpej Exp $ */
|
||||
/* $NetBSD: sb_isapnp.c,v 1.46 2006/04/13 00:30:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.45 2006/03/29 06:51:47 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.46 2006/04/13 00:30:20 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -135,7 +135,13 @@ sb_isapnp_attach(struct device *parent, struct device *self, void *aux)
|
|||
sc->sc_drq16 = -1;
|
||||
|
||||
#if NMPU > 0
|
||||
if (ipa->ipa_nio > 1) {
|
||||
/*
|
||||
* Aztech 1020 don't store information about it's mpu in io[1]
|
||||
* It has a seperate pnpdev for the mpu
|
||||
*/
|
||||
if (strcmp(ipa->ipa_devlogic, "AZT1016") == 0)
|
||||
sc->sc_hasmpu = -1;
|
||||
else if (ipa->ipa_nio > 1) {
|
||||
sc->sc_hasmpu = 1;
|
||||
sc->sc_mpu_iot = ipa->ipa_iot;
|
||||
sc->sc_mpu_ioh = ipa->ipa_io[1].h;
|
||||
|
|
Loading…
Reference in New Issue