summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/isa/ess.c
diff options
context:
space:
mode:
authorgreid <greid@FreeBSD.org>2001-04-08 23:02:06 +0000
committergreid <greid@FreeBSD.org>2001-04-08 23:02:06 +0000
commitdbd4bd55a826eced19b00f127fd1bfca77b9b055 (patch)
tree3b0d6b25e6893a47672dcfa96da8d6f1d8a92a2a /sys/dev/sound/isa/ess.c
parent1c766fe616c6c7b4603ebe9da1e03a1aae97d947 (diff)
downloadFreeBSD-src-dbd4bd55a826eced19b00f127fd1bfca77b9b055.zip
FreeBSD-src-dbd4bd55a826eced19b00f127fd1bfca77b9b055.tar.gz
Reinitialise the DSP and mixer after a resume from suspend
PR: 22372 Submitted by: Hiroyuki Aizu <aizu@jaist.ac.jp> Reviewed by: cg
Diffstat (limited to 'sys/dev/sound/isa/ess.c')
-rw-r--r--sys/dev/sound/isa/ess.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c
index 77d102e..67792e0 100644
--- a/sys/dev/sound/isa/ess.c
+++ b/sys/dev/sound/isa/ess.c
@@ -890,11 +890,32 @@ ess_detach(device_t dev)
return 0;
}
+static int
+ess_resume(device_t dev)
+{
+ struct ess_info *sc;
+
+ sc = pcm_getdevinfo(dev);
+
+ if (ess_reset_dsp(sc)) {
+ device_printf(dev, "unable to reset DSP at resume\n");
+ return ENXIO;
+ }
+
+ if (mixer_reinit(dev)) {
+ device_printf(dev, "unable to reinitialize mixer at resume\n");
+ return ENXIO;
+ }
+
+ return 0;
+}
+
static device_method_t ess_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ess_probe),
DEVMETHOD(device_attach, ess_attach),
DEVMETHOD(device_detach, ess_detach),
+ DEVMETHOD(device_resume, ess_resume),
{ 0, 0 }
};
OpenPOWER on IntegriCloud