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