From owner-freebsd-bugs Mon Sep 24 10:40: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2B3E537B40E for ; Mon, 24 Sep 2001 10:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8OHe1161402; Mon, 24 Sep 2001 10:40:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A5C8237B40D for ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/30794: ESS Solo-1 does not work after suspend/resume. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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