From owner-freebsd-multimedia Mon May 22 19:27: 5 2000 Delivered-To: freebsd-multimedia@freebsd.org Received: from oxygen.yy.ics.keio.ac.jp (oxygen.yy.ics.keio.ac.jp [131.113.47.3]) by hub.freebsd.org (Postfix) with ESMTP id 7309237B656 for ; Mon, 22 May 2000 19:27:01 -0700 (PDT) (envelope-from sanpei@sanpei.org) Received: from lavender.yy.cs.keio.ac.jp (ppp144.dialup.st.keio.ac.jp [131.113.27.144]) by oxygen.yy.ics.keio.ac.jp (8.9.3+3.2W/3.7W) with ESMTP id LAA21484; Tue, 23 May 2000 11:26:52 +0900 (JST) (envelope-from sanpei@sanpei.org) Received: (from sanpei@localhost) by lavender.yy.cs.keio.ac.jp (8.9.3/3.7W) id LAA03519; Tue, 23 May 2000 11:26:50 +0900 (JST) Message-Id: <200005230226.LAA03519@lavender.yy.cs.keio.ac.jp> To: multimedia@FreeBSD.org Subject: [patch, ESS sound chip] ess_resume code for NOTE-PC X-Mailer: Mew version 1.70 on Emacs 19.34.1 / Mule 2.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 23 May 2000 11:26:50 +0900 From: MIHIRA Sanpei Yoshiro Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I have NOTE-PC which has ESS 1869 sound chip. NEC MobioNX MMX Pentium120MHz [kernel configuration, this on-board card is not PnP] device pcm0 device sbc0 at isa? port 0x220 irq 5 drq 1 flags 0x13 % cat /dev/sndstat (under 5-current) FreeBSD Audio Driver (newpcm) May 21 2000 17:43:39 Installed devices: pcm0: at io 0x220 irq 5 drq 1:3 (1p/1r channels) ---------- After split up ess and sb code at 2000/03/28 by Cameron Grant-san, if I once suspend and resume NOTE-PC, I could not play MP3 file after resume. boot up kernel <--- I can play MP3 file suspend resume <--- I could not play MP3 file anymore mpg123 was run but increase count and no sound So I created quick hack patch for ess.c. Sorry I don't know why new ess.c code does not support above situation, what happen after resume.... If I have time, I will check it. P.S. I have another problem under ESS1869. If I set volume by /usr/sbin/mixer command. But it was not set correctly. % mixer vol 10 Setting the mixer vol to 10:10. ~~ ~~ % mixer vol Mixer vol is currently set to 9:9 ~ ~ Thank you. --- MIHIRA Sanpei Yoshiro Yokohama, Japan. --- sys/dev/sound/isa/ess.c.org Sun May 21 22:50:34 2000 +++ sys/dev/sound/isa/ess.c Tue May 23 11:11:30 2000 @@ -855,10 +855,25 @@ 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 at resume\n"); + } else { + device_printf(dev, "reset at resume\n"); + } + return 0; +} + static device_method_t ess_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ess_probe), DEVMETHOD(device_attach, ess_attach), + DEVMETHOD(device_resume, ess_resume), { 0, 0 } }; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message