Add an isapnp frontend for the ess driver. It somewhat works
(sounds is made but one buffer is played continuously).
This commit is contained in:
parent
7b044dea51
commit
202c97c54d
126
sys/dev/isapnp/ess_isapnp.c
Normal file
126
sys/dev/isapnp/ess_isapnp.c
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/* $NetBSD: ess_isapnp.c,v 1.1 1998/08/07 00:53:23 matt Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed by the Computer Systems
|
||||||
|
* Engineering Group at Lawrence Berkeley Laboratory.
|
||||||
|
* 4. Neither the name of the University nor of the Laboratory may be used
|
||||||
|
* to endorse or promote products derived from this software without
|
||||||
|
* specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
* SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/systm.h>
|
||||||
|
#include <sys/errno.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/syslog.h>
|
||||||
|
#include <sys/device.h>
|
||||||
|
#include <sys/proc.h>
|
||||||
|
|
||||||
|
#include <machine/bus.h>
|
||||||
|
|
||||||
|
#include <sys/audioio.h>
|
||||||
|
#include <dev/audio_if.h>
|
||||||
|
#include <dev/mulaw.h>
|
||||||
|
|
||||||
|
#include <dev/isa/isavar.h>
|
||||||
|
#include <dev/isa/isadmavar.h>
|
||||||
|
|
||||||
|
#include <dev/isapnp/isapnpreg.h>
|
||||||
|
#include <dev/isapnp/isapnpvar.h>
|
||||||
|
#include <dev/isapnp/isapnpdevs.h>
|
||||||
|
|
||||||
|
#include <dev/isa/essreg.h>
|
||||||
|
#include <dev/isa/essvar.h>
|
||||||
|
|
||||||
|
int ess_isapnp_match __P((struct device *, struct cfdata *, void *));
|
||||||
|
void ess_isapnp_attach __P((struct device *, struct device *, void *));
|
||||||
|
|
||||||
|
struct cfattach ess_isapnp_ca = {
|
||||||
|
sizeof(struct ess_softc), ess_isapnp_match, ess_isapnp_attach
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Probe / attach routines.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Probe for the soundblaster hardware.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
ess_isapnp_match(parent, match, aux)
|
||||||
|
struct device *parent;
|
||||||
|
struct cfdata *match;
|
||||||
|
void *aux;
|
||||||
|
{
|
||||||
|
return isapnp_devmatch(aux, &isapnp_ess_devinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Attach hardware to driver, attach hardware driver to audio
|
||||||
|
* pseudo-device driver.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
ess_isapnp_attach(parent, self, aux)
|
||||||
|
struct device *parent, *self;
|
||||||
|
void *aux;
|
||||||
|
{
|
||||||
|
struct ess_softc *sc = (struct ess_softc *)self;
|
||||||
|
struct isapnp_attach_args *ipa = aux;
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) {
|
||||||
|
printf("%s: error in region allocation\n", sc->sc_dev.dv_xname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sc->sc_ic = ipa->ipa_ic;
|
||||||
|
|
||||||
|
sc->sc_iot = ipa->ipa_iot;
|
||||||
|
sc->sc_iobase = ipa->ipa_io[0].base;
|
||||||
|
sc->sc_ioh = ipa->ipa_io[0].h;
|
||||||
|
|
||||||
|
sc->sc_in.irq = ipa->ipa_irq[0].num;
|
||||||
|
sc->sc_in.ist = ipa->ipa_irq[0].type;
|
||||||
|
sc->sc_in.drq = ipa->ipa_drq[0].num;
|
||||||
|
sc->sc_out.irq = ipa->ipa_irq[0].num;
|
||||||
|
sc->sc_out.ist = ipa->ipa_irq[0].type;
|
||||||
|
sc->sc_out.drq = ipa->ipa_drq[1].num;
|
||||||
|
|
||||||
|
if (!essmatch(sc)) {
|
||||||
|
printf("%s: essmatch failed\n", sc->sc_dev.dv_xname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("%s:", sc->sc_dev.dv_xname);
|
||||||
|
|
||||||
|
essattach(sc);
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: files.isapnp,v 1.16 1998/07/30 18:02:50 christos Exp $
|
# $NetBSD: files.isapnp,v 1.17 1998/08/07 00:53:23 matt Exp $
|
||||||
#
|
#
|
||||||
# Config file and device description for machine-independent ISAPnP code.
|
# Config file and device description for machine-independent ISAPnP code.
|
||||||
# Included by ports that need it.
|
# Included by ports that need it.
|
||||||
@ -55,6 +55,10 @@ file dev/isapnp/ym_isapnp.c ym_isapnp
|
|||||||
attach wss at isapnp with wss_isapnp
|
attach wss at isapnp with wss_isapnp
|
||||||
file dev/isapnp/wss_isapnp.c wss_isapnp
|
file dev/isapnp/wss_isapnp.c wss_isapnp
|
||||||
|
|
||||||
|
# ESS compatibles
|
||||||
|
attach ess at isapnp with ess_isapnp
|
||||||
|
file dev/isapnp/ess_isapnp.c ess_isapnp
|
||||||
|
|
||||||
#
|
#
|
||||||
# ISAPnP SCSI Controller
|
# ISAPnP SCSI Controller
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$NetBSD: isapnpdevs,v 1.2 1998/07/30 09:45:16 drochner Exp $
|
$NetBSD: isapnpdevs,v 1.3 1998/08/07 00:53:23 matt Exp $
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, Christos Zoulas
|
* Copyright (c) 1998, Christos Zoulas
|
||||||
@ -37,6 +37,7 @@ $NetBSD: isapnpdevs,v 1.2 1998/07/30 09:45:16 drochner Exp $
|
|||||||
driver aic Adaptec SCSI
|
driver aic Adaptec SCSI
|
||||||
driver com National Semiconductor Serial
|
driver com National Semiconductor Serial
|
||||||
driver ep 3Com 3CXXX Ethernet
|
driver ep 3Com 3CXXX Ethernet
|
||||||
|
driver ess ESS Audio Drive
|
||||||
driver joy Generic Joystick
|
driver joy Generic Joystick
|
||||||
driver gus Gravis Ultrasound
|
driver gus Gravis Ultrasound
|
||||||
driver le Lance Ethernet
|
driver le Lance Ethernet
|
||||||
@ -73,6 +74,12 @@ devlogic ep TCM5094 3Com 3c509B-4
|
|||||||
devlogic ep TCM5095 3Com 3c509B-5
|
devlogic ep TCM5095 3Com 3c509B-5
|
||||||
devlogic ep TCM5098 3Com 3c509B-8
|
devlogic ep TCM5098 3Com 3c509B-8
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ess
|
||||||
|
*/
|
||||||
|
devlogic ess ESS1868 ESS1868
|
||||||
|
devlogic ess ESS1869 ESS1869
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* joy
|
* joy
|
||||||
*/
|
*/
|
||||||
@ -115,7 +122,6 @@ devlogic sb CTL0043 SB16 PnP (CT4170)
|
|||||||
devlogic sb CTL0042 SB AWE64 Value
|
devlogic sb CTL0042 SB AWE64 Value
|
||||||
devlogic sb CTL0044 SB AWE64 Gold
|
devlogic sb CTL0044 SB AWE64 Gold
|
||||||
devlogic sb CTL0045 SB AWE64 Value
|
devlogic sb CTL0045 SB AWE64 Value
|
||||||
devlogic sb ESS1868 ESS1868
|
|
||||||
devlogic sb OPT9250 Televideo card, Opti
|
devlogic sb OPT9250 Televideo card, Opti
|
||||||
devcompat sb PNPB000 Generic SB 1.5
|
devcompat sb PNPB000 Generic SB 1.5
|
||||||
devcompat sb PNPB001 Generic SB 2.0
|
devcompat sb PNPB001 Generic SB 2.0
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: isapnpdevs.c,v 1.2 1998/07/30 09:47:49 drochner Exp $ */
|
/* $NetBSD: isapnpdevs.c,v 1.3 1998/08/07 00:53:23 matt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||||
@ -88,6 +88,19 @@ const struct isapnp_devinfo isapnp_ep_devinfo = {
|
|||||||
isapnp_ep_devlogic, isapnp_ep_devcompat
|
isapnp_ep_devlogic, isapnp_ep_devcompat
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* ESS Audio Drive */
|
||||||
|
static const char *isapnp_ess_devlogic[] = {
|
||||||
|
"ESS1868", /* ESS1868 */
|
||||||
|
"ESS1869", /* ESS1869 */
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const char *isapnp_ess_devcompat[] = {
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
const struct isapnp_devinfo isapnp_ess_devinfo = {
|
||||||
|
isapnp_ess_devlogic, isapnp_ess_devcompat
|
||||||
|
};
|
||||||
|
|
||||||
/* Generic Joystick */
|
/* Generic Joystick */
|
||||||
static const char *isapnp_joy_devlogic[] = {
|
static const char *isapnp_joy_devlogic[] = {
|
||||||
"CSCA801", /* Terratec EWS64XL */
|
"CSCA801", /* Terratec EWS64XL */
|
||||||
@ -164,7 +177,6 @@ static const char *isapnp_sb_devlogic[] = {
|
|||||||
"CTL0042", /* SB AWE64 Value */
|
"CTL0042", /* SB AWE64 Value */
|
||||||
"CTL0044", /* SB AWE64 Gold */
|
"CTL0044", /* SB AWE64 Gold */
|
||||||
"CTL0045", /* SB AWE64 Value */
|
"CTL0045", /* SB AWE64 Value */
|
||||||
"ESS1868", /* ESS1868 */
|
|
||||||
"OPT9250", /* Televideo card, Opti */
|
"OPT9250", /* Televideo card, Opti */
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: isapnpdevs.h,v 1.2 1998/07/30 09:47:49 drochner Exp $ */
|
/* $NetBSD: isapnpdevs.h,v 1.3 1998/08/07 00:53:24 matt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||||
@ -53,6 +53,8 @@ extern const struct isapnp_devinfo isapnp_aic_devinfo;
|
|||||||
extern const struct isapnp_devinfo isapnp_com_devinfo;
|
extern const struct isapnp_devinfo isapnp_com_devinfo;
|
||||||
/* 3Com 3CXXX Ethernet */
|
/* 3Com 3CXXX Ethernet */
|
||||||
extern const struct isapnp_devinfo isapnp_ep_devinfo;
|
extern const struct isapnp_devinfo isapnp_ep_devinfo;
|
||||||
|
/* ESS Audio Drive */
|
||||||
|
extern const struct isapnp_devinfo isapnp_ess_devinfo;
|
||||||
/* Generic Joystick */
|
/* Generic Joystick */
|
||||||
extern const struct isapnp_devinfo isapnp_joy_devinfo;
|
extern const struct isapnp_devinfo isapnp_joy_devinfo;
|
||||||
/* Gravis Ultrasound */
|
/* Gravis Ultrasound */
|
||||||
|
Loading…
Reference in New Issue
Block a user