Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 1998 23:27:04 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        undisclosed-recipients:;
Subject:   x11amp update
Message-ID:  <Pine.BSF.3.91.980903231129.12467A-100000@labinfo.iet.unipi.it>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.980903231129.12467A-100000>