From owner-freebsd-multimedia Thu Sep 3 16:23:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA15801 for freebsd-multimedia-outgoing; Thu, 3 Sep 1998 16:23:04 -0700 (PDT) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id QAA15783 for ; Thu, 3 Sep 1998 16:22:53 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id XAA12494; Thu, 3 Sep 1998 23:27:09 +0200 Newsgroups: comp.unix.bsd.freebsd.misc Date: Thu, 3 Sep 1998 23:27:04 +0200 (MET DST) From: Luigi Rizzo Subject: x11amp update Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: undisclosed-recipients:; Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I think a few words are necessary to clarify the x11amp thing. I have exchanged some emails with 4Front people who have been very cooperative in fixing x11amp for the non-OSS FreeBSD audio driver (both the old one and the "pcm" driver). In short, x11amp works after applying the attached kernel patch to /sys/i386/isa/snd/sound.c . The first part of the patch is necessary because unfortunately we messed up the definition of SNDCTL_DSP_GETBLKSIZE in soundcard.h (this happened around v.1.11 in 1995) making it incompatible with the OSS definition. The second part i am not totally sure if it is necessary or not -- without it, x11amp seems to have problems on a locally-generated mp2 file which plays fine with amp (but produces some noise at some point, so it might well be a corrupt file). I don't have the time to test the thing right now. Please note that the incompatible SNDCTL_DSP_GETBLKSIZE definition is an annoying problem. In future releases we probably have to put back the correct one BUT ALSO make the driver understand both values (using the same trick as in the patch below). For the time being, if people want to run x11amp without rebuilding a patched kernel, the only chance is if the 4Front people put out another x11amp version which tries the SNDCTL_DSP_GETBLKSIZE twice, with both the 'right' and the 'wrong' value. My thanks to the 4Front people for supporting the non-OSS drivers on FreeBSD and helping in finding out this bug in our soundcard.h cheers luigi --- sound.c.old Tue Sep 1 21:58:51 1998 +++ sound.c Thu Sep 3 23:07:34 1998 @@ -893,7 +893,9 @@ /* * Finally, here is the linux-compatible ioctl interface */ +#define XYZ _IOWR('P', 4, int) /* the correct SNDCTL_DSP_GETBLKSIZE */ case SNDCTL_DSP_GETBLKSIZE: + case XYZ: *(int *) arg = d->play_blocksize ; break ; @@ -1011,7 +1013,7 @@ } splx(s); ask_init(d); -#if 0 +#if 1 /* XXX todo: set the buffer size to the # of fragments */ count = d->dbuf_in.bufsize / d->play_blocksize ; bytes = ffs(d->play_blocksize) - 1; -----------------------------+-------------------------------------- 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/ _____________________________|______________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message