From nobody@FreeBSD.org  Mon Sep 24 10:39:10 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id A5C8237B40D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Sep 2001 10:39:08 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f8OHd8p60208;
	Mon, 24 Sep 2001 10:39:08 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109241739.f8OHd8p60208@freefall.freebsd.org>
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: ESS Solo-1 does not work after suspend/resume.
X-Send-Pr-Version: www-1.0

>Number:         30794
>Category:       kern
>Synopsis:       ESS Solo-1 does not work after suspend/resume.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sound
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 24 10:40:00 PDT 2001
>Closed-Date:    Tue May 20 07:47:01 PDT 2003
>Last-Modified:  Tue May 20 07:47:01 PDT 2003
>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:
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: ru 
Responsible-Changed-When: Mon Sep 24 23:59:14 PDT 2001 
Responsible-Changed-Why:  
Sound issue. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30794 
State-Changed-From-To: open->closed 
State-Changed-By: orion 
State-Changed-When: Tue May 20 07:44:57 PDT 2003 
State-Changed-Why:  
Fixed in revision 1.18 of ess.c. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=30794 
>Unformatted:
