Re: 16 bit DMA problems w/ Jazz sound driver in 1.3.62?

William E. Roadcap (roadcapw@cfw.com)
Sat, 17 Feb 1996 10:57:05 -0500 (EST)


On Fri, 16 Feb 1996, Andy Meyer wrote:

> /dev/dsp doesn't work at all...
> I either get an "Error opening audio-device" or a "Invalid audio buffer
> size" I set the buffer size as recommended to 65536, and I have tried
> 128k, 32k, 8k, and 4k buffers using the dma_buffsize=???? when

I remember reading somewhere, perhaps in the kernel patches, that some
players which use dsp are now broken with the new sound driver. Those
players make an uneccessary check of the buffer size. Hannu says there
will be a new version of the sound kit soon which will fix this for
vplay. On my system, I just commented out the offending code and it now
works.

Here is an excerpt from vplay.c, sorry it's not in patch form.

audio = open (AUDIO, omode, 0);
if (audio == -1) {
perror (AUDIO);
exit (-1);
}

IOCTL(audio, SNDCTL_DSP_GETBLKSIZE, abuf_size);
/*
if (abuf_size < 4096 || abuf_size > 65536) {
if (abuf_size == -1)
perror (AUDIO);
else
fprintf (stderr, "Invalid audio buffers size %d\n", abuf_size);
exit (-1);
}
*/

zbuf_size = 256;
if ( (audiobuf = (u_char *)malloc (abuf_size)) == NULL ||
(zerobuf = (u_char *)malloc (zbuf_size)) == NULL ) {

___
William E. Roadcap mailto://roadcapw@cfw.com
TITUS Software ftp://titus.cfw.com/pub
Waynesboro, Va (USA) http://www.cfw.com/~roadcapw