The OSS/Free kernel driver is included with the regular Linux distributions. Note that the distribution kernels are usually a version or so behind the lastest release. If your soundcard isn't supported, you may want to get the lastest version from:
Depending on your solution, you may need some additional patches for the kernel and/or the OSS/Free driver.
These are recommended reading for all Linux MIDI enthusiests.
If you have a "Plug-and-Play" soundcard (also denoted by "PnP"), you will need additional software to the driver and patches mentioned above
Plug-and-Play kernel patch
This patch also contains patches for the AWE-32 driver, and so should be applied after the AWE-32 patches are applied.
If installed as a module, the "pnp" module needs to be loaded before the "sound" module (almost obvious, really.
You should run "isapnp" to configure your PnP card before you load the "sound" module (the OSS/Free driver MUST be compiled as a module if you are using isapnp).
The Linux kernels of the 1.2.xx series are distributed with a fairly old version of the sound driver (2.x) and you will probably need to upgrade the driver. Most currently available applications require version 3.x of the sound driver.
The best solution is to get a Linux 2.x kernel.
If you are updating the OSS/Free driver, it is a good idea to start by removing the old sound driver:
Note that Tom Lees' PnP patch, there are TWO patches to apply:
I strongly recommended that you compile the sound driver as a module.
If you're never used kernel modules before, now is the time to start.
There are two advantages to be realised:
You will be taken through another menu asking you lots of questions about your soundcard, such as base-addresses, IRQ's and DMA channels. Have this information ready. It is possible to have multiple MIDI-devices, though this is not well-supported by applications (see below).
Note that it is possible to selectively disable devices, so it's best to configure everything you have the hardware for.
Install the new kernel (ie using lilo or whatever you usually use)
options sound trace_init=1
Or if you are using a pnp kernel-patch,
Normally, the kerneld would take care of this for us.
/proc/pnp should list the sound-card devices.
the /dev/sndstat file lists all configured devices. If a device appears in brackets, it is unused. That is: the software exists to handle the device type, but the hardware was not detected.
Here is a sample output from the command:
Sound Driver:3.5.4-960630 (Tue Mar 18 00:46:06 EST 1997 root, Linux crystal 2.0.22 #5 Sun Mar 16 20:42:46 EST 1997 i486) Kernel: Linux crystal 2.0.22 #7 Tue Mar 18 00:48:20 EST 1997 i486 Config options: 1510002 Installed drivers: Type 1: OPL-2/OPL-3 FM Type 2: Sound Blaster Type 7: SB MPU-401 Type 32: 16450/16550A Midi Card config: Sound Blaster at 0x220 irq 7 drq 0,5 (SB MPU-401 at 0x330 irq 7 drq 0) OPL-2/OPL-3 FM at 0x388 drq 0,0 16450/16550A Midi at 0x2f8 irq 3 drq 3,0 (16450/16550A Midi at 0x2e8 irq 7 drq 16) (16450/16550A Midi drq 0) (16450/16550A Midi drq 0) Audio devices: 0: Sound Blaster 16 (4.16) Synth devices: 0: Yamaha OPL-3 1: AWE32 Driver v0.3.99b (DRAM 8192k) Midi devices: 0: uart16450 MIDI Timers: 0: System clock Mixers: 0: Sound Blaster 1: AWE32 Equalizer
The driver was confiured to support three types of devices:
The 2nd 16450/16550 Midi device was setup during configuration, but disabled using the module parameter sound=... (see below). The SB MPU-401 was similary disabled. The 3rd and 4th 16450/16550 Midi device are normally disabled (having an IOBASE of 0x0), but these can be activated by the sound=... parameter.
The above configuration was performed by the kerneld using:
By default, the sound driver probes for all the hardware that was configured during the make config .
Those devices which are detected become active, otherwise they are disabled. Disabled devices appear in brackets in the /dev/sndstat listing (see above)
It is possible to re-configure the sound-driver, so as to:
This is done by using the parameter sound=...
The parameter is specified at boot-time, and the system must be re-booted in order to change the sound-device configuration.
The parameter is specified when the module is loaded, and the module need only be unloaded and re-loaded with new parameters in order to change the sound-device configuration.
D ..... is the 16-bit DMA channel
nn .... is the device-number (or "Type") of the driver
bbb ... is the base address
i ..... is the IRQ
d ..... is the 8-bit DMA channel
All values are specified in hexadecimal. The device-number or "Type" appears in the /dev/sndstat listing (eg 7 for the SB MPU-401)
The parameter is in fact a comma-seperated list, so multiple devices may be specified. Only those devices which appear in the list are probed-for, so any devices ommitted will be effectively disabled.
There are two notable variations on the above format:
It is not possible to disable low-level drivers (such as the AWE-32) using this method.
It is possible to configure the driver for more than one MIDI device, but most applications are "unaware" of this, and will just default to using the 1st MIDI device.
One solution is to use the sound=... parameter to selectively disable MIDI devices, so that only one MIDI device is configured. If you compiled the driver as a module, you can choose between the possible MIDI devices by reloading the module with the appropriate parameters.
Some applications which do support multiple devices are: