summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2007-10-22 21:42:15 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2007-10-22 21:42:15 +0000
commit5a94dc522ac59100f25e000c478dbed494e6e296 (patch)
tree6eb90a2ab7084af077a3e6d5dbcfca101873ead1 /sys/dev/pci
parent369b3aaf2392bc381dfcd4ce52971f87b240eadd (diff)
the codec is not readable. If we try to read it the ac-link enters a kind of
"busy state" in which it's not writeable. This fix tags the host as unable to read the codec, so the ac97 driver doesn't try to read it, instead it keeps in memory copy of all codec registers. Fixes pr 2451 ok jakemsr
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/maestro.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index e7238de1900..176047252ba 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.22 2007/10/09 17:06:18 gilles Exp $ */
+/* $OpenBSD: maestro.c,v 1.23 2007/10/22 21:42:14 ratchov Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -500,6 +500,7 @@ int maestro_trigger_input(void *, void *, void *, int, void (*)(void *),
void *, struct audio_params *);
int maestro_attach_codec(void *, struct ac97_codec_if *);
+enum ac97_host_flags maestro_codec_flags(void *);
int maestro_read_codec(void *, u_int8_t, u_int16_t *);
int maestro_write_codec(void *, u_int8_t, u_int16_t);
void maestro_reset_codec(void *);
@@ -744,6 +745,7 @@ maestro_attach(parent, self, aux)
/* Attach the AC'97 */
sc->host_if.arg = sc;
sc->host_if.attach = maestro_attach_codec;
+ sc->host_if.flags = maestro_codec_flags;
sc->host_if.read = maestro_read_codec;
sc->host_if.write = maestro_write_codec;
sc->host_if.reset = maestro_reset_codec;
@@ -1331,6 +1333,13 @@ maestro_trigger_output(hdl, start, end, blksize, intr, arg, param)
* Codec interface
*/
+enum ac97_host_flags
+maestro_codec_flags(self)
+ void *self;
+{
+ return AC97_HOST_DONT_READ;
+}
+
int
maestro_read_codec(self, regno, datap)
void *self;