summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-01-30 03:23:20 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-01-30 03:23:20 +0000
commit2caf64284c4778676d10a14338c02351b9774fe6 (patch)
tree384342f5cc442e1fdd8c17b9d314530ba7a720d0 /sys
parent959a37fd9179da6b4c2da429dc90b86c9c33d9bd (diff)
real meat in audio_device; discussed w/ jason@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/gsc/harmony.c19
-rw-r--r--sys/arch/hppa/gsc/harmonyvar.h4
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;