joy_ess.c revision 1.4 1 1.4 lukem /* $NetBSD: joy_ess.c,v 1.4 2007/12/11 11:56:46 lukem Exp $ */
2 1.4 lukem
3 1.4 lukem #include <sys/cdefs.h>
4 1.4 lukem __KERNEL_RCSID(0, "$NetBSD: joy_ess.c,v 1.4 2007/12/11 11:56:46 lukem Exp $");
5 1.1 drochner
6 1.1 drochner #include <sys/param.h>
7 1.1 drochner #include <sys/systm.h>
8 1.1 drochner #include <sys/kernel.h>
9 1.1 drochner #include <sys/device.h>
10 1.1 drochner #include <sys/audioio.h>
11 1.1 drochner #include <dev/audio_if.h>
12 1.3 ad #include <sys/bus.h>
13 1.1 drochner
14 1.1 drochner #include <dev/isa/isavar.h>
15 1.1 drochner #include <dev/isa/essvar.h>
16 1.1 drochner #include <dev/ic/joyvar.h>
17 1.1 drochner
18 1.1 drochner int joy_ess_match(struct device *, struct cfdata *, void *);
19 1.1 drochner void joy_ess_attach(struct device *, struct device *, void *);
20 1.1 drochner
21 1.1 drochner CFATTACH_DECL(joy_ess, sizeof (struct joy_softc),
22 1.1 drochner joy_ess_match, joy_ess_attach, NULL, NULL);
23 1.1 drochner
24 1.1 drochner int
25 1.1 drochner joy_ess_match(struct device *parent, struct cfdata *match, void *aux)
26 1.1 drochner {
27 1.1 drochner struct audio_attach_args *aa = aux;
28 1.1 drochner
29 1.1 drochner if (aa->type != AUDIODEV_TYPE_AUX)
30 1.1 drochner return (0);
31 1.1 drochner return (1);
32 1.1 drochner }
33 1.1 drochner
34 1.1 drochner void
35 1.1 drochner joy_ess_attach(struct device *parent, struct device *self, void *aux)
36 1.1 drochner {
37 1.1 drochner struct ess_softc *esc = (struct ess_softc *)parent;
38 1.1 drochner struct joy_softc *sc = (struct joy_softc *)self;
39 1.1 drochner
40 1.1 drochner printf("\n");
41 1.1 drochner
42 1.1 drochner sc->sc_iot = esc->sc_joy_iot;
43 1.1 drochner sc->sc_ioh = esc->sc_joy_ioh;
44 1.1 drochner
45 1.1 drochner joyattach(sc);
46 1.1 drochner }
47