From owner-freebsd-current Fri Dec 31 20:36:43 1999 Delivered-To: freebsd-current@freebsd.org Received: from rina.r.dl.itc.u-tokyo.ac.jp (rina.r.dl.itc.u-tokyo.ac.jp [133.11.199.247]) by hub.freebsd.org (Postfix) with ESMTP id A580E14CAD for ; Fri, 31 Dec 1999 20:36:38 -0800 (PST) (envelope-from tanimura@r.dl.itc.u-tokyo.ac.jp) Received: (from uucp@localhost) by rina.r.dl.itc.u-tokyo.ac.jp (8.9.3+3.2W/3.7W-r-0.1-19990829) with UUCP id NAA70053; Sat, 1 Jan 2000 13:36:35 +0900 (JST) Received: from silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (tanimura@localhost [127.0.0.1]) by silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (8.9.3+3.2W/3.7W) with ESMTP id NAA10870; Sat, 1 Jan 2000 13:35:42 +0900 (JST) Date: Sat, 01 Jan 2000 13:35:41 +0900 Message-ID: <14445.33821.200059.72159A@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> From: Seigo Tanimura To: dmmiller@cvzoom.net Cc: current@freebsd.org Subject: Re: Newpcm is broken again for mpg123 (ESS 1868 isa sound card) In-Reply-To: In your message of "Wed, 29 Dec 1999 20:38:48 -0500" <386AB7A8.DC369061@cvzoom.net> References: <14429.46098.1195.72159A@rina.r.dl.itc.u-tokyo.ac.jp> <14433.63218.157116.72159A@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> <386278C7.B748EEF5@cvzoom.net> <14434.52947.683451.72159A@rina.r.dl.itc.u-tokyo.ac.jp> <14436.13492.839612.72159A@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> <14439.4177.642029.72159A@rina.r.dl.itc.u-tokyo.ac.jp> <14439.26155.338725.72159A@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> <386AB7A8.DC369061@cvzoom.net> Cc: Seigo Tanimura User-Agent: Wanderlust/1.0.3 (Notorious) SEMI/1.13.4 (Terai) FLIM/1.12.7 (=?ISO-8859-4?Q?Y=FEzaki?=) MULE XEmacs/21.1 (patch 8) (Bryce Canyon) (i386--freebsd) Organization: Carrots MIME-Version: 1.0 (generated by SEMI 1.13.4 - "Terai") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 29 Dec 1999 20:38:48 -0500, Donn Miller said: Donn> I just recently did another cvsup, and now newpcm is broken Donn> again. When I try to play a clip with mpg123, I hear a very Donn> short burst of the beginning of the clip repeated indefinitely, Donn> like so: Donn> "ba ba ba ba ba ba ba ba ba ba ba ba ba ba". I have the ESS Donn> 1868, of course. Well, I (wisely) saved my old kernel as Donn> /kernel.good and just booted into that. Donn> Could you also say what was fixed if you get around to it? I'd Donn> to learn a little more about the sound driver. The following things were in the recent mail of mine: - All ioctl(2)s go to see the secondary buffer(if I have forget nothing). - chn_setblocksize() changes the size of the secondary buffer. - chn_mmap() maps the secondary buffer. - chn_poll() invokes DMA. - chn_wrintr() performs DMA emulation for pcm devices with no DMA functionality(requested by nyan). - SNDCTL_DSP_SETFRAGMENT handles the count correctly. - GETI/OSPACE returns the number of fragments. - DMA transfer keeps running upon underrun. Some DSPs seem to end up with an unpredictable result if the DMA gets stopped followed by immediate restart. This revokes the change in sys/dev/sound/pcm/channel.c rev 1.12. - chn_write() and chn_read() returns EAGAIN for nonblocking if there are no space to write or data to read. You can add something like: printf("chn_write: writing %d bytes, bs->fl = %d, bs->rl = %d, b->fl = %d, b->rl = %d, b->dl = %d\n", buf->uio_resid, bs->fl, bs->rl, b->fl, b->rl, b->dl); to see the state of the buffers, especially before and after triggering DMA transfer(around chn_{wr,rd}intr()) or feeding(around chn_{wr,rd}feed()). A positive value of b->dl shows that DMA transfer is taking place. -- Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message