From owner-freebsd-multimedia Mon Nov 17 06:52:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA15768 for multimedia-outgoing; Mon, 17 Nov 1997 06:52:01 -0800 (PST) (envelope-from owner-freebsd-multimedia) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id GAA15585 for ; Mon, 17 Nov 1997 06:48:53 -0800 (PST) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id OAA17030; Mon, 17 Nov 1997 14:32:36 +0100 From: Luigi Rizzo Message-Id: <199711171332.OAA17030@labinfo.iet.unipi.it> Subject: Re: ftp://rah.star-gate.com/pub/linux_ioctl-3.0-current.tar.gz To: henrich@crh.cl.msu.edu (Charles Henrich) Date: Mon, 17 Nov 1997 14:32:36 +0100 (MET) Cc: hasty@rah.star-gate.com, freebsd-multimedia@FreeBSD.ORG In-Reply-To: <199711171404.JAA06681@crh.cl.msu.edu> from "Charles Henrich" at Nov 17, 97 09:04:29 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >xquake and the linux real player 5.0 works over here with this version > >of the linux layer. > > Any chance of a 2.2.5 version of these mods? if you are only interested in raplayer, the fixes are quite trivial (the relevant files are in /sys/i386/linux): --- linux.h.orig Tue Dec 3 16:47:28 1996 +++ linux.h Mon Nov 17 00:05:29 1997 @@ -491,6 +491,9 @@ #define LINUX_SNDCTL_DSP_GETOSPACE 0x500C #define LINUX_SNDCTL_DSP_GETISPACE 0x500D #define LINUX_SNDCTL_DSP_NONBLOCK 0x500E +#define LINUX_SNDCTL_DSP_GETCAPS 0x500F +#define LINUX_SNDCTL_DSP_GETIPTR 0x5011 +#define LINUX_SNDCTL_DSP_GETOPTR 0x5012 #define LINUX_SOUND_MIXER_WRITE_VOLUME 0x4d00 #define LINUX_SOUND_MIXER_WRITE_BASS 0x4d01 #define LINUX_SOUND_MIXER_WRITE_TREBLE 0x4d02 --- linux_ioctl.c.orig Sat Nov 9 22:10:15 1996 +++ linux_ioctl.c Mon Nov 17 10:20:14 1997 @@ -691,6 +691,26 @@ args->cmd = SNDCTL_DSP_NONBLOCK; return ioctl(p, (struct ioctl_args *)args, retval); + case LINUX_SNDCTL_DSP_GETCAPS: + args->cmd = SNDCTL_DSP_GETCAPS; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_SNDCTL_DSP_GETIPTR: + args->cmd = SNDCTL_DSP_GETIPTR; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_SNDCTL_DSP_GETOPTR: + args->cmd = SNDCTL_DSP_GETOPTR; + { int a= ioctl(p, (struct ioctl_args *)args, retval); + struct count_info *p = (struct count_info *)(args->arg); +#if 0 + p->bytes += 128 ; /* if the output sounds choppy... */ + uprintf("GETOPTR bytes %d blk %d ptr %d\n", + p->bytes, p->blocks, p->ptr); +#endif + return a; + } + case LINUX_SOUND_MIXER_WRITE_VOLUME: args->cmd = SOUND_MIXER_WRITE_VOLUME; return ioctl(p, (struct ioctl_args *)args, retval); These changes more or less work with my audio driver (you need support for a few more ioctl() which I have added just yesterday and will make available later today). I notice that rvplayer 5.0 with the sample file (welcome.rm) seems to produce choppy audio output when the "synchronized" option is set -- at least with my driver and my P5-133 at home (with a P6-200 things are much smoother). I am not sure if the same problem exists with guspnp. Unless I have misinterpreted the semantics of GETOPTR (which is quite possible), i suspect the problem is that the application (which seems to be using 128-byte buffers) leaves too little spare data in the play buffer, which expires before rendering of the next video frame has expired. In case, the p->bytes += 128 is there to reduce the problem (it is a dirty hack, i know...) Cheers Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________