Hi there!

Here's a device driver for MiNT to drive the STe's DMA sound system.
It's not very advanced yet -- it only plays 12.5kHz mono sound -- but
I hope you find it useful anyway!  There's no documentation; use the
source, Luke!

To use, run audiodev.ttp and it will install a file /dev/audio.  The
program will then terminate and stay resident, using up (with the
default buffer sizes) about 75K of memory.  It's interrupt driven, and
should take up virtually no processor time.

If you have a sound file (12.5kHz, unsigned byte samples, monophonic)
you want to play, just

  cat soundfile > /dev/audio &

and it'll play in the background.  I'm waiting with baited breath for
someone to write a .MOD player that I can to this with:

  modplay enigma.mod > /dev/audio &

The buffer used can be changed in size by changing a constant and
recompiling.  The size I've set it to is probably much bigger than
necessary -- please adjust as you see fit.

This driver is based (heavily!) on the Centronics device driver by
Thierry Bousch.  It's covered by the GPL, so modify, share and enjoy.
Although there are no docs as such for audiodev, I've left the lpdev
man pages in -- audiodev is very similar to lpdev.  If you make any
improvements, please distribute them; the MiNT mailing list would be
a good place to do that.

Bye,

Charles Briscoe-Smith  (currently cpbs@ukc.ac.uk, but maybe not for long).

----------------------------------------------------------------------
Dear MiNT-users,

here is an installable device driver for the Centronics port.  Just
execute the program "lpdev.ttp" (better yet, put it in you mint.cnf
file) and it will install the /dev/lp device. 

This driver is interrupt-driven (there are no busy loops) and therefore
shouldn't hog the processor too much.  Top reveals that the command

	cat file > /dev/lp

takes less than 1% of CPU time (when other tasks are running, of
course).  The command "cp file /dev/lp" would be less efficient, because
cp copies one byte at a time, while cat copies large chunks of data.

The device uses a 24-kbyte circular buffer.  This can be modified by
altering the BUFSIZE variable in lpdev.c.  Please choose an even size,
otherwise the bit-copies won't be word-aligned and it will be much
slower. 

I have also included a small utility called "lpflush.ttp" to clear the
/dev/lp queue, so everything should be ready for use. Read the man pages
for more information.

Enjoy,

    Thierry Bousch

    Fidonet:	Thierry Bousch @ 2:320/100.9
    Internet:	bousch@suntopo.matups.fr

