summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/ac97.c
diff options
context:
space:
mode:
authormatthieu <matthieu@openbsd.org>2006-04-27 21:40:00 +0000
committermatthieu <matthieu@openbsd.org>2006-04-27 21:40:00 +0000
commit778047b6cdad31723f67a9c849ede33ed9573804 (patch)
tree382f753b76c7c548904bb55af2b924b69eef57a7 /sys/dev/ic/ac97.c
parentMake test use explicit signed char, instead of just char. We'll make (diff)
downloadwireguard-openbsd-778047b6cdad31723f67a9c849ede33ed9573804.tar.xz
wireguard-openbsd-778047b6cdad31723f67a9c849ede33ed9573804.zip
Quirk for MSI Megabook S270 audio output. Ok deraadt@.
Diffstat (limited to 'sys/dev/ic/ac97.c')
-rw-r--r--sys/dev/ic/ac97.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c
index 5df196602fc..fa50522dd6f 100644
--- a/sys/dev/ic/ac97.c
+++ b/sys/dev/ic/ac97.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ac97.c,v 1.59 2005/12/28 14:36:25 fgsch Exp $ */
+/* $OpenBSD: ac97.c,v 1.60 2006/04/27 21:40:00 matthieu Exp $ */
/*
* Copyright (c) 1999, 2000 Constantine Sapuntzakis
@@ -1132,7 +1132,11 @@ ac97_alc655_init(struct ac97_softc *as)
u_int16_t misc;
ac97_read(as, AC97_AV_REG_MISC, &misc);
- misc |= AC97_AV_MISC_SPDIFEN;
+ if (as->host_flags & AC97_HOST_DONT_ENABLE_SPDIF) {
+ misc &= ~AC97_AV_MISC_SPDIFEN;
+ } else {
+ misc |= AC97_AV_MISC_SPDIFEN;
+ }
misc &= ~AC97_AV_MISC_VREFDIS;
ac97_write(as, AC97_AV_REG_MISC, misc);