diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-09-21 02:12:21 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-09-21 02:12:21 +0000 |
commit | fc37dbdda805df0c3f25b8b76c15bd3ba9c32ac0 (patch) | |
tree | 483fb53d3990afc032bf5cefc2b72f8187b9a6d1 /sys | |
parent | 32b47c1854b6f558fad1950680f01601211f2cc5 (diff) |
use audio(4)'s DVACT_{QUIESCE,RESUME} and ac97(4)'s ac97_resume() for
suspend/resume, like in other AC'97 drivers
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/auacer.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c index d45d8008fd5..6888b10b60d 100644 --- a/sys/dev/pci/auacer.c +++ b/sys/dev/pci/auacer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auacer.c,v 1.9 2010/09/07 16:21:44 deraadt Exp $ */ +/* $OpenBSD: auacer.c,v 1.10 2010/09/21 02:12:20 jakemsr Exp $ */ /* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */ /*- @@ -1079,15 +1079,22 @@ int auacer_activate(struct device *self, int act) { struct auacer_softc *sc = (struct auacer_softc *)self; + int rv = 0; switch (act) { + case DVACT_ACTIVATE: + break; + case DVACT_QUIESCE: + rv = config_activate_children(self, act); + break; case DVACT_SUSPEND: break; case DVACT_RESUME: - auacer_reset_codec(sc); - delay(1000); - (sc->codec_if->vtbl->restore_ports)(sc->codec_if); + ac97_resume(&sc->host_if, sc->codec_if); + rv = config_activate_children(self, act); + break; + case DVACT_DEACTIVATE: break; } - return 0; + return (rv); } |