1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/sys/i386/isa/sound/Readme.modules
Jordan K. Hubbard ae28ee13b4 Update the sound driver to VOXWARE 3.05 with one GUS patch from
Amancio.  There is some SoundSource support here that is primitive and
probably doesn't work, but I'll let the two submitters let me know
how my integration of that was since I don't have this card to test.
I've only tested this on my GUS MAX since it's all I have.

This all probably needs to be re-done anyway since we're widely variant
from the original VOXWARE source in the current layout.
Submitted by:	Amancio Hasty and Jim Lowe
Obtained from:  Hannu Savolainen
1995-07-28 21:40:49 +00:00

88 lines
2.7 KiB
Plaintext

Linux sound-driver module
(c) Peter Trattler
License: GPL (Gnu Public License)
Idea:
I've modified the sources for the sound driver to allow simply insert and
remove the sound driver from the kernel by calling (only available for Linux)
insmod /usr/src/linux/modules/sound.o
and
rmmod sound
This may be useful if you are doing one of the following things:
1) Debugging the sound driver
2) Creating a new device within the sound-driver
3) You do not the sound driver all the time (as it wastes quite a lot of
memory for its buffers)
Compilation:
Go to /usr/src/linux and make the following steps:
a) configure the sound driver: To do that call "make config" and enable the
sound-driver -- you will be asked different questions about your
sound-hardware (remember not to use a too big DMA-Buffer size; you
should use 16kB, if you have 16Bit devices, otherwise you can use 32kB)
b) disable the sound driver in the kernel: call make config again but answer
'N' to "Sound card support"
c) run "make modules"; the sound-driver sound.o should end up in
/usr/src/linux/modules
If memory is tight:
I've allocated at about 70kB for the sound-drivers internal tables. If this
is too much, 'insmod sound.o' will generate the following warning
...
use 'insmod memsize=xxxx'
...
You can only use this command, if you have (I think) at least
modules-1.1.87 or up. You can also switch debugging on by running the command
insmod sound.o debugmem=1
Files I changed:
I've only changed the files soundcard.c(most changes) and some changes within
the Makefile, sound_config.h and the Makefile in /usr/src/linux/drivers
Bugs:
a) As the kmalloc (..., GFP_DMA) caused some unexpected errors (I don't know if
it is my fault), I created some code, which is (by default) enabled by
#define KMALLOC_DMA_BROKEN 1 (within soundcard.c).
It trys to allocate a large enough region, so that the complete dma-buffer
can be occupied in this space. If it does not fit within this region it
doubles the size of it. But this can cause problems, if the sound-buffer is
too big (as kmalloc can only handle regions at up to circa 100kB).
So take care to use for 8Bit devices a sound-DMA-buffer of 32kB (maximum)
and for 16Bit devices a maximum of 16kB. Otherwise the allocation scheme
might fail.
b) Buffers allocated by the different sound devices via calls to kmalloc are
not freed, if the sound driver is removed again (these buffers tend to be
quite small -- so it does not harm a lot)
c) If there is not enough (kernel-) memory available, the installation of
the sound-driver fails. (This happens quite often, if you did not install the
driver right after booting -- [PS: I've only got 5MB of Ram, so this might
be the source for this problem])
Author:
Peter Trattler (peter@sbox.tu-graz.ac.at)