diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-09-21 02:53:15 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-09-21 02:53:15 +0000 |
commit | d44af743d055b3904231f690ffe156245c35a902 (patch) | |
tree | deece99874187236331208bd83192486f7f9c8da /sys/dev/pci/autri.c | |
parent | ab42e37b662c65765f5089ac08370a7f0486c95c (diff) |
audio(4) and ac97(4) style suspend/resume
Diffstat (limited to 'sys/dev/pci/autri.c')
-rw-r--r-- | sys/dev/pci/autri.c | 16 |
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 |