From owner-freebsd-mobile Wed Jun 26 13:35:38 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by hub.freebsd.org (Postfix) with ESMTP id 83A5A37CD36 for ; Wed, 26 Jun 2002 13:28:34 -0700 (PDT) Received: (from ambrisko@localhost) by ambrisko.com (8.11.6/8.11.6) id g5QKRm002976; Wed, 26 Jun 2002 13:27:48 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200206262027.g5QKRm002976@ambrisko.com> Subject: Re: Soundcard freezes after a suspend... In-Reply-To: <200206232033.g5NKX7l16315@gamma.cis.ohio-state.edu> To: murat demirbas Date: Wed, 26 Jun 2002 13:27:48 -0700 (PDT) Cc: freebsd-mobile@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org murat demirbas writes: | I managed to install FreeBSD 4.5 on my Thinkpad T20 a few days ago... | I am enjoying the ride... Wireless support is awesome... | Everything is almost perfect... | | I configured APM so I can suspend my laptop... | However, when I resume the laptop, the soundcard freezes... | | I get the following error when I attempt to play XMMS: | bash-2.05a# | ** WARNING **: oss_open(): Failed to open audio device (/dev/dsp): Device busy | | | I couldn't figure out the problem... My soundcard works fine when I | reboot the system but freezes again after the first suspend... | | Can anybody suggest a quick fix? I won't mind entering a few commands to restart snd device... | | | More information on my system: | I configured soundcard my putting "device pcm" in my Kernel.conf | My soundcard is CS46xx | Yes, I disabled "PCI bus sleep mode" from BIOS Try this patch in /sys/dev/sound/pci then rebuild your kernel and reboot. I'm sure it is not the best way for me but it works for me and is better then doing a kldunload/kldload. Doug A. Index: csa.c =================================================================== RCS file: /cvs/src/sys/dev/sound/pci/csa.c,v retrieving revision 1.8.2.10 diff -c -r1.8.2.10 csa.c *** csa.c 22 Apr 2002 15:49:32 -0000 1.8.2.10 --- csa.c 26 Jun 2002 20:25:18 -0000 *************** *** 360,365 **** --- 360,374 ---- return bus_generic_detach(dev); } + static int + csa_resume(device_t dev) + { + csa_detach(dev); + csa_attach(dev); + + return 0; + } + static struct resource * csa_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) *************** *** 1023,1029 **** DEVMETHOD(device_detach, csa_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), ! DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), --- 1032,1038 ---- DEVMETHOD(device_detach, csa_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), ! DEVMETHOD(device_resume, csa_resume), /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message