Date: Sat, 28 Oct 2000 00:38:50 -0700 (PDT) From: aizu@jaist.ac.jp To: freebsd-gnats-submit@FreeBSD.org Subject: kern/22372: [PATCH] resume from suspend breaks sound mixer volume. (with ESS18XX) Message-ID: <20001028073850.DFF3337B479@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 22372 >Category: kern >Synopsis: [PATCH] resume from suspend breaks sound mixer volume. (with ESS18XX) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 28 00:40:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Hiroyuki Aizu >Release: FreeBSD 4.1-RELEASE & ||4.1.1-STABLE >Organization: JAIST >Environment: Sony VAIO 505SX w/128MB RAM 4.1.1-STABLE FreeBSD 4.1.1-STABLE #2: Sat Oct 28 16:01:52 JST 2000 pcm0: <ESS 18xx DSP> on sbc0 >Description: After resuming from suspend, Mixer volume of pcm will be shift. So, it needs re-initialize the mixer. And because it makes just noise after resume, call reset_dsp() at resume. >How-To-Repeat: suspend + resume and play sounds. >Fix: Patch against dev/sound/isa/ess.c of 4.1.1-STABLE. (It will works -CURRENT, I think) diff -u ess.c.orig ess.c --- ess.c.orig Thu Oct 5 14:07:49 2000 +++ ess.c Sat Oct 28 16:01:32 2000 @@ -888,11 +888,33 @@ return ess_doattach(dev, sc); } +static int +ess_resume(device_t dev) +{ + struct ess_info *sc; + + sc = pcm_getdevinfo(dev); + if (ess_reset_dsp(sc)) { + device_printf(dev, "unable reset the DSP at resume\n"); + return ENXIO; + } else { + device_printf(dev, "reset at resume\n"); + } + + if (mixer_reinit(dev)) { + device_printf(dev, "unable to reinitialize the 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 } }; >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?20001028073850.DFF3337B479>