diff options
| author | 2003-01-30 03:23:19 +0000 | |
|---|---|---|
| committer | 2003-01-30 03:23:19 +0000 | |
| commit | 3ef393b9feaf864385f59febb2928ce1dcaf477f (patch) | |
| tree | 11b330396aa1373c84c6438290a55724c6bcbc20 | |
| parent | AD1849 not AD1848, also give the name of the AD1849 chip now that I have the datasheet. (diff) | |
| download | wireguard-openbsd-3ef393b9feaf864385f59febb2928ce1dcaf477f.tar.xz wireguard-openbsd-3ef393b9feaf864385f59febb2928ce1dcaf477f.zip | |
real meat in audio_device; discussed w/ jason@
| -rw-r--r-- | sys/arch/hppa/gsc/harmony.c | 19 | ||||
| -rw-r--r-- | sys/arch/hppa/gsc/harmonyvar.h | 4 |
2 files changed, 14 insertions, 9 deletions
diff --git a/sys/arch/hppa/gsc/harmony.c b/sys/arch/hppa/gsc/harmony.c index fc8e8edc487..c2e2d5b88bc 100644 --- a/sys/arch/hppa/gsc/harmony.c +++ b/sys/arch/hppa/gsc/harmony.c @@ -1,4 +1,4 @@ -/* $OpenBSD: harmony.c,v 1.12 2003/01/30 01:23:24 jason Exp $ */ +/* $OpenBSD: harmony.c,v 1.13 2003/01/30 03:23:19 mickey Exp $ */ /* * Copyright (c) 2003 Jason L. Wright (jason@thought.net) @@ -109,12 +109,6 @@ struct audio_hw_if harmony_sa_hw_if = { harmony_trigger_input, }; -const struct audio_device harmony_device = { - "harmony", - "gsc", - "lasi", -}; - int harmony_match(struct device *, void *, void *); void harmony_attach(struct device *, struct device *, void *); int harmony_intr(void *); @@ -234,6 +228,12 @@ harmony_attach(parent, self, aux) if ((rev & CS4215_REV_VER) >= CS4215_REV_VER_E) sc->sc_hasulinear8 = 1; + strlcpy(sc->sc_audev.name, ga->ga_name, sizeof(sc->sc_audev.name)); + sprintf(sc->sc_audev.version, "%u.%u;%u", ga->ga_type.iodc_sv_rev, + ga->ga_type.iodc_model, ga->ga_type.iodc_revision); + strlcpy(sc->sc_audev.config, sc->sc_dv.dv_xname, + sizeof(sc->sc_audev.config)); + audio_attach_mi(&harmony_sa_hw_if, sc, &sc->sc_dv); } @@ -588,7 +588,10 @@ harmony_halt_input(void *vsc) int harmony_getdev(void *vsc, struct audio_device *retp) { - *retp = harmony_device; + struct harmony_softc *sc = vsc; + + *retp = sc->sc_audev; + return (0); } diff --git a/sys/arch/hppa/gsc/harmonyvar.h b/sys/arch/hppa/gsc/harmonyvar.h index 4054d5474c7..59085f750be 100644 --- a/sys/arch/hppa/gsc/harmonyvar.h +++ b/sys/arch/hppa/gsc/harmonyvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: harmonyvar.h,v 1.2 2003/01/30 01:23:24 jason Exp $ */ +/* $OpenBSD: harmonyvar.h,v 1.3 2003/01/30 03:23:19 mickey Exp $ */ /* * Copyright (c) 2003 Jason L. Wright (jason@thought.net) @@ -81,6 +81,8 @@ struct harmony_channel { struct harmony_softc { struct device sc_dv; + struct audio_device sc_audev; + bus_dma_tag_t sc_dmat; bus_space_tag_t sc_bt; bus_space_handle_t sc_bh; |
