summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-05-20 00:22:57 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-05-20 00:22:57 +0000
commit144b1fcf15d9608592d24e92984d55ae3c707c64 (patch)
treedb5a5ad086ffc96b9346a6bc864e0333f8707328 /sys/dev
parentc2b52a8ec92c555bdfd144446a84c6815255bd3d (diff)
add flags support for reversing stereo.
ok mickey@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/auich.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index 25b781414be..4bc8a2e2126 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.32 2003/04/27 11:22:53 ho Exp $ */
+/* $OpenBSD: auich.c,v 1.33 2003/05/20 00:22:56 tedu Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -189,6 +189,7 @@ struct auich_softc {
int sc_sample_size;
int sc_sts_reg;
int sc_ignore_codecready;
+ int flags;
};
#ifdef AUICH_DEBUG
@@ -289,6 +290,7 @@ int auich_attach_codec(void *, struct ac97_codec_if *);
int auich_read_codec(void *, u_int8_t, u_int16_t *);
int auich_write_codec(void *, u_int8_t, u_int16_t);
void auich_reset_codec(void *);
+enum ac97_host_flags auich_flags_codec(void *);
int
auich_match(parent, match, aux)
@@ -407,6 +409,9 @@ auich_attach(parent, self, aux)
sc->host_if.read = auich_read_codec;
sc->host_if.write = auich_write_codec;
sc->host_if.reset = auich_reset_codec;
+ sc->host_if.flags = auich_flags_codec;
+ if (sc->sc_dev.dv_cfdata->cf_flags & 0x0001)
+ sc->flags = AC97_HOST_SWAPPED_CHANNELS;
if (ac97_attach(&sc->host_if) != 0) {
pci_intr_disestablish(pa->pa_pc, sc->sc_ih);
@@ -505,6 +510,14 @@ auich_reset_codec(v)
("%s: reset_codec timeout\n", sc->sc_dev.dv_xname));
}
+enum ac97_host_flags
+auich_flags_codec(void *v)
+{
+ struct auich_softc *sc = v;
+
+ return (sc->flags);
+}
+
int
auich_open(v, flags)
void *v;