From 146abc03d1eeca2411dc31b60d714c5a4e08eeb3 Mon Sep 17 00:00:00 2001 From: scw Date: Wed, 11 Jun 2003 14:22:27 +0000 Subject: In ac97_restore_shadow(), make sure to restore the codec's extended control register if we configured it during ac97_attach(). --- sys/dev/ic/ac97.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c index 847da9275de..2f49fb686c4 100644 --- a/sys/dev/ic/ac97.c +++ b/sys/dev/ic/ac97.c @@ -1,4 +1,4 @@ -/* $NetBSD: ac97.c,v 1.41 2003/03/03 02:14:12 bsh Exp $ */ +/* $NetBSD: ac97.c,v 1.42 2003/06/11 14:22:27 scw Exp $ */ /* $OpenBSD: ac97.c,v 1.8 2000/07/19 09:01:35 csapuntz Exp $ */ /* @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.41 2003/03/03 02:14:12 bsh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.42 2003/06/11 14:22:27 scw Exp $"); #include #include @@ -716,6 +716,14 @@ ac97_restore_shadow(self) si = &source_info[idx]; ac97_write(as, si->reg, as->shadow_reg[si->reg >> 1]); } + + if (as->ext_id & (AC97_EXT_AUDIO_VRA | AC97_EXT_AUDIO_DRA + | AC97_EXT_AUDIO_SPDIF | AC97_EXT_AUDIO_VRM + | AC97_EXT_AUDIO_CDAC | AC97_EXT_AUDIO_SDAC + | AC97_EXT_AUDIO_LDAC)) { + ac97_write(as, AC97_REG_EXT_AUDIO_CTRL, + as->shadow_reg[AC97_REG_EXT_AUDIO_CTRL >> 1]); + } } int -- cgit