diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-12-17 16:22:59 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-12-17 16:22:59 +0000 |
commit | 83a165d515f82d67c0dd3363698703a86bad9b0c (patch) | |
tree | e4cef96870bbe3caf129af4548eceaf17df76e1a | |
parent | 1d6eb343e3755161c37de68f82563b9f0c98c863 (diff) |
be more accurate in enabling variable rate bits
-rw-r--r-- | sys/dev/ic/ac97.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c index 947836f1c03..41189efce83 100644 --- a/sys/dev/ic/ac97.c +++ b/sys/dev/ic/ac97.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ac97.c,v 1.26 2001/12/01 16:29:54 mickey Exp $ */ +/* $OpenBSD: ac97.c,v 1.27 2001/12/17 16:22:58 mickey Exp $ */ /* * Copyright (c) 1999, 2000 Constantine Sapuntzakis @@ -709,9 +709,12 @@ 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) - ac97_write(as, AC97_REG_EXT_AUDIO_CTRL, - AC97_EXT_AUDIO_VRA | AC97_EXT_AUDIO_VRM); + 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); |