From owner-freebsd-current Fri Dec 24 19: 6:58 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 1521D14A23 for ; Fri, 24 Dec 1999 19:06:54 -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 MAA66397; Sat, 25 Dec 1999 12:06:50 +0900 (JST) Received: from silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp (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 MAA02405; Sat, 25 Dec 1999 12:06:29 +0900 (JST) Date: Sat, 25 Dec 1999 12:06:28 +0900 Message-ID: <14436.13492.839612.72159A@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> From: Seigo Tanimura To: dmmiller@cvzoom.net Cc: current@freebsd.org Subject: Re: more patch for secondary buffer, polling and DMA emulation in pcm In-Reply-To: In your message of "Fri, 24 Dec 1999 10:39:31 +0900" <14434.52947.683451.72159A@rina.r.dl.itc.u-tokyo.ac.jp> 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> 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 Fri, 24 Dec 1999 10:39:31 +0900, Seigo Tanimura said: Seigo> players. My sound cards are SB32, SB64 and CS461x, so the problem is Seigo> likely to be in channel.c or dsp.c. OK, here is the result of my investigation on RealPlayer 5.0: RealPlayer 5.0 is an ill-behaving application in two points. First, it passes a size of 16 to SNDCTL_DSP_SETFRAGMENT. This size is obviously too small to buffer pcm data. Second, RealPlayer 5.0 often attempts to write larger pcm data than the block size of the secondary buffer. The result is to write only a part of pcm data ending up with an error, and make polling really weird. AFAIK these problems are fixed in RealPlayer G2. The following fixes are somewhat klutzy, but seem to work: - If a device is in nonblocking mode, adapt the block size to the pcm data to write. - Poll the remaining size to write, rather than that of free space. These fixes are included in: http://people.freebsd.org/~tanimura/patches/newmidi/2ndbuf-19991225.diff.gz -- Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message