summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2010-09-21 02:53:15 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2010-09-21 02:53:15 +0000
commitd44af743d055b3904231f690ffe156245c35a902 (patch)
treedeece99874187236331208bd83192486f7f9c8da
parentab42e37b662c65765f5089ac08370a7f0486c95c (diff)
audio(4) and ac97(4) style suspend/resume
-rw-r--r--sys/dev/pci/autri.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index fce8bc7208b..860bf8aeab5 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.27 2010/09/07 16:21:44 deraadt Exp $ */
+/* $OpenBSD: autri.c,v 1.28 2010/09/21 02:53:14 jakemsr Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -622,17 +622,25 @@ int
autri_activate(struct device *self, int act)
{
struct autri_softc *sc = (struct autri_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:
autri_init(sc);
- /*autri_reset_codec(&sc->sc_codec);*/
- (sc->sc_codec.codec_if->vtbl->restore_ports)(sc->sc_codec.codec_if);
+ ac97_resume(&sc->sc_codec.host_if, sc->sc_codec.codec_if);
+ rv = config_activate_children(self, act);
+ break;
+ case DVACT_DEACTIVATE:
break;
}
- return 0;
+ return (rv);
}
int