diff options
author | 2002-09-05 17:03:33 +0000 | |
---|---|---|
committer | 2002-09-05 17:03:33 +0000 | |
commit | 6f5e04eb94bc922c15d49853c3f1e47f6ddba36f (patch) | |
tree | 3f4da7e34631b06ba90ee8ed720d0372b41ca1e6 | |
parent | Do not require the presence of subjectAltName in certificates used for (diff) | |
download | wireguard-openbsd-6f5e04eb94bc922c15d49853c3f1e47f6ddba36f.tar.xz wireguard-openbsd-6f5e04eb94bc922c15d49853c3f1e47f6ddba36f.zip |
Use the value from AUDIO_CTRL, later to be or'ed with VRM or VRA, not
AUDIO_ID which contains what the codec supports, and do it only if the
codec supports VRM or VRA.
discussed with mickey@ a while ago.
-rw-r--r-- | sys/dev/ic/ac97.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c index 9af1bc37272..4b3d7b78ece 100644 --- a/sys/dev/ic/ac97.c +++ b/sys/dev/ic/ac97.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ac97.c,v 1.31 2002/07/28 06:27:07 fgsch Exp $ */ +/* $OpenBSD: ac97.c,v 1.32 2002/09/05 17:03:33 fgsch Exp $ */ /* * Copyright (c) 1999, 2000 Constantine Sapuntzakis @@ -712,12 +712,14 @@ ac97_attach(host_if) if (as->ext_id) DPRINTF(("ac97: ext id %b\n", as->ext_id, AC97_EXT_AUDIO_BITS)); - ac97_read(as, AC97_REG_EXT_AUDIO_ID, &id1); - if (as->ext_id & AC97_EXT_AUDIO_VRA) - id1 |= AC97_EXT_AUDIO_VRA; - if (as->ext_id & AC97_EXT_AUDIO_VRM) - id1 |= AC97_EXT_AUDIO_VRM; - ac97_write(as, AC97_REG_EXT_AUDIO_CTRL, id1); + if (as->ext_id & (AC97_EXT_AUDIO_VRA | AC97_EXT_AUDIO_VRM)) { + ac97_read(as, AC97_REG_EXT_AUDIO_CTRL, &id1); + if (as->ext_id & AC97_EXT_AUDIO_VRA) + id1 |= AC97_EXT_AUDIO_VRA; + if (as->ext_id & AC97_EXT_AUDIO_VRM) + id1 |= AC97_EXT_AUDIO_VRM; + ac97_write(as, AC97_REG_EXT_AUDIO_CTRL, id1); + } ac97_setup_source_info(as); |