Date: Mon, 24 Sep 2001 10:39:08 -0700 (PDT) From: NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/30794: ESS Solo-1 does not work after suspend/resume. Message-ID: <200109241739.f8OHd8p60208@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 30794
>Category: kern
>Synopsis: ESS Solo-1 does not work after suspend/resume.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Sep 24 10:40:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: NOKUBI Hirotaka
>Release: 5.0-CURRENT
>Organization:
>Environment:
FreeBSD ghila.nokubi.or.jp 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Tue Sep 25 02:05:33 JST 2001 h-nokubi@ghila.nokubi.or.jp:/usr/src/sys/compile/GHILA i386
>Description:
On IBM ThinkPad 240, ESS Solo-1 does not work after suspend/resume.
When I tried mpg123 after resume, it said that 'pcm0: play interrupt
timeout, channel dead'.
>How-To-Repeat:
Suspend/resume (or hypernation, wrong spelling?), then use pcm0 device.
>Fix:
I tried following patch and seems to work well for me.
(Sorry, It's cut and paste...)
I do not have any document about ESS Solo-1.
The patch is written by guess.
Index: solo.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pci/solo.c,v
retrieving revision 1.18
diff -u -r1.18 solo.c
--- solo.c 2000/12/23 03:16:12 1.18
+++ solo.c 2001/09/24 17:34:43
@@ -991,12 +991,31 @@
return 0;
}
+static int
+ess_resume(device_t dev)
+{
+ struct ess_info *sc;
+
+ sc = pcm_getdevinfo(dev);
+ if (ess_reset_dsp(sc))
+ goto no;
+ if (mixer_reinit(dev) == -1)
+ goto no;
+ port_wr(sc->io, 0x7, 0xb0, 1); /* enable irqs */
+ if (sc->newspeed)
+ ess_setmixer(sc, 0x71, 0x2a);
+ return 0;
+no:
+ device_printf(dev, "unable to reinitialize the card or mixer\n");
+ return ENXIO;
+}
+
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, bus_generic_resume),
+ DEVMETHOD(device_resume, ess_resume),
DEVMETHOD(device_suspend, bus_generic_suspend),
{ 0, 0 }
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109241739.f8OHd8p60208>
