summaryrefslogtreecommitdiff
path: root/sys/dev/ic/arcofivar.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-12-21 23:12:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-12-21 23:12:04 +0000
commitb909aca3812a992bda13f97d82c90b08658053d4 (patch)
tree948fa1cd2ddb9858d8ffd5ba76fe4f2da1324ab1 /sys/dev/ic/arcofivar.h
parent2348e0f29912799f5958c0165d793b37c57131a2 (diff)
Work-in-progress driver for the HP ``Audio1'' device found on the HP 9000/425e
(hp300) and the HP9000/705 and 9000/710 (hppa). 8-bit mono, 8KHz, no surprise since it is based upon a digital phone chip. Tested on 425e only so far, and playback only; configured in, but disabled, on hppa kernels until there are positive test reports (I am not sure the interrupt assignment on hppa is correct). And now people no longer can joke about audio on hp300.
Diffstat (limited to 'sys/dev/ic/arcofivar.h')
-rw-r--r--sys/dev/ic/arcofivar.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/sys/dev/ic/arcofivar.h b/sys/dev/ic/arcofivar.h
new file mode 100644
index 00000000000..ddfd83c2e25
--- /dev/null
+++ b/sys/dev/ic/arcofivar.h
@@ -0,0 +1,49 @@
+/* $OpenBSD: arcofivar.h,v 1.1 2011/12/21 23:12:03 miod Exp $ */
+
+/*
+ * Copyright (c) 2011 Miodrag Vallat.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#define ARCOFI_NREGS 6
+
+struct arcofi_softc {
+ struct device sc_dev;
+ bus_addr_t sc_reg[ARCOFI_NREGS];
+ bus_space_tag_t sc_iot;
+ bus_space_handle_t sc_ioh;
+
+ struct audio_device sc_audio_device;
+ void *sc_sih;
+
+ int sc_open;
+ int sc_mode;
+
+ struct {
+ uint8_t cr3, cr4;
+ uint gr_idx, gx_idx;
+ } sc_active,
+ sc_shadow;
+ struct {
+ uint8_t *buf;
+ uint8_t *past;
+ void (*cb)(void *);
+ void *cbarg;
+ } sc_recv,
+ sc_xmit;
+};
+
+void arcofi_attach(struct arcofi_softc *, const char *);
+int arcofi_hwintr(void *);
+void arcofi_swintr(void *);