Date: Mon, 25 Nov 2002 02:10:10 +0900 From: Watanabe Kazuhiro <CQG00620@nifty.ne.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/45682: Sometime failed to record/play with CS4231A & newpcm Message-ID: <200211241717.CAA20372@ums509.nifty.ne.jp>
next in thread | raw e-mail | index | archive | help
>Number: 45682 >Category: kern >Synopsis: Sometime failed to record/play with CS4231A & newpcm >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 24 09:20:02 PST 2002 >Closed-Date: >Last-Modified: >Originator: Watanabe Kazuhiro >Release: FreeBSD 4.5-RELEASE i386 >Organization: >Environment: System: FreeBSD aries.zodiac.org 4.5-RELEASE FreeBSD 4.5-RELEASE #13: Sun Nov 24 15:30:52 JST 2002 nabe@aries.zodiac.org:/usr/src/sys/compile/LEFTEYE i386 dmesg: pcm0: <CS4231A> at port 0xf40-0xf47 irq 10 drq 1 flags 0x1a100 on isa0 drq/irq conf 1a I'm tested on NEC PC-9821Xa9 and applied patches posted below: "PC98 internal CS4231A is mis-detected to OPTi chip (newpcm)" http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/45673 "Cannot record except 8bit-mono with CS4231A & newpcm (half-duplex mode)" http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/45679 >Description: With newpcm driver & CS4231A, an application software (such as ports/audio/wavplay) sometime failed to play/record with a console message like "play interrupt timeout, channel dead". OSS/Free driver work fine. In newpcm driver, doesn't call ad_wait_init() after set the sampling frequency or rec/play format to CS4231A. >How-To-Repeat: /usr/bin/time wavrec -S -b 16 -t 5 test.wav 5.38 real 0.01 user 0.34 sys # recording stereo/16bit/5sec. /usr/bin/time wavplay test.wav Pathname: test.wav Device: /dev/audio Sampling Rate: 22050 Hz Mode: Stereo Samples: 110250 Bits: 16 Writing samples to audio device 2.31 real 0.01 user 0.30 sys # aborted. console message: Nov 25 01:45:37 aries /kernel: pcm0: play interrupt timeout, channel dead >Fix: --- mss.c.orig Mon Nov 25 01:36:16 2002 +++ mss.c Mon Nov 25 01:36:19 2002 @@ -959,6 +959,7 @@ abs(speed-speeds[i]) < abs(speed-speeds[sel])) sel = i; speed = speeds[sel]; ad_write(mss, 8, (ad_read(mss, 8) & 0xf0) | sel); + ad_wait_init(mss, 10000); } ad_leave_MCE(mss); @@ -998,8 +999,10 @@ arg <<= 4; ad_enter_MCE(mss); ad_write(mss, 8, (ad_read(mss, 8) & 0x0f) | arg); + ad_wait_init(mss, 10000); if (ad_read(mss, 12) & 0x40) { /* mode2 ? */ ad_write(mss, 28, arg); /* capture mode */ + ad_wait_init(mss, 10000); } ad_leave_MCE(mss); return format; >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?200211241717.CAA20372>