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