diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2000-07-18 07:03:30 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2000-07-18 07:03:30 +0000 |
commit | f0abce66ede82c53fc934a762a930e170b9c52b5 (patch) | |
tree | 7ea299b40d9005d7901b3b8184d6e42f4827c3a1 /sys | |
parent | d1816a6b79fa12db06e2185a9246e443481bf72d (diff) |
Reset AC97 codec on ES1371 revisions 7 and above. Thanks to Alejo Sanchez
for pointin this out.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/eap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index 73b116432c2..a95d1824e05 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.c,v 1.8 1999/12/13 06:43:01 csapuntz Exp $ */ +/* $OpenBSD: eap.c,v 1.9 2000/07/18 07:03:29 csapuntz Exp $ */ /* $NetBSD: eap.c,v 1.25 1999/02/18 07:59:30 mycroft Exp $ */ /* @@ -771,9 +771,11 @@ eap_attach(parent, self, aux) pcireg_t csr; mixer_ctrl_t ctl; int i; + int revision; sc->sc_1371 = !(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENSONIQ_AUDIOPCI); + revision = PCI_REVISION(pa->pa_class); /* Map I/O register */ if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0, @@ -856,7 +858,11 @@ eap_attach(parent, self, aux) EWRITE4(sc, EAP_ICSC, 0); EWRITE4(sc, E1371_LEGACY, 0); - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENSONIQ_CT5880) { + /* It seems that revision 7 and greater of the AUDIOPCI 97 + are actually CT5880 */ + if ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENSONIQ_CT5880) || + ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENSONIQ_AUDIOPCI97) + && (revision >= 7))) { EWRITE4(sc, EAP_ICSS, CT5880_AC97_RESET); delay(20000); |