Commit 727dede0 authored by Takashi Iwai's avatar Takashi Iwai

sound: Retire OSS

Since no complaints have been raised after disabling the build of OSS
(Open Sound System) by the commit 31cbee6a ("sound: Disable the
build of OSS drivers"), let's finally drop the whole code and

Some glue codes are still left intact since sound/oss/dmasound stuff
remains -- which is an independent implementation solely for m68k, and
it's not covered by ALSA yet.

Also, a couple of API header files (linux/sound.h and
linux/soundcard.h) are kept remaining as well, since the OSS API
itself is still supported by ALSA OSS emulation, and applications can
refer to these.

Where we're at it, some help texts in the top-level Kconfig are
adjusted, too (who still needs to specify I/O port in kbuild
Reviewed-by: default avatarJaroslav Kysela <>
Signed-off-by: default avatarTakashi Iwai <>
parent 3f1185d6
ALS-007/ALS-100/ALS-200 based sound cards
Support for sound cards based around the Avance Logic
ALS-007/ALS-100/ALS-200 chip is included. These chips are a single
chip PnP sound solution which is mostly hardware compatible with the
Sound Blaster 16 card, with most differences occurring in the use of
the mixer registers. For this reason the ALS code is integrated
as part of the Sound Blaster 16 driver (adding only 800 bytes to the
SB16 driver).
To use an ALS sound card under Linux, enable the following options as
modules in the sound configuration section of the kernel config:
- 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
- FM synthesizer (YM3812/OPL-3) support
- standalone MPU401 support may be required for some cards; for the
ALS-007, when using isapnptools, it is required
Since the ALS-007/100/200 are PnP cards, ISAPnP support should probably be
compiled in. If kernel level PnP support is not included, isapnptools will
be required to configure the card before the sound modules are loaded.
When using kernel level ISAPnP, the kernel should correctly identify and
configure all resources required by the card when the "sb" module is
inserted. Note that the ALS-007 does not have a 16 bit DMA channel and that
the MPU401 interface on this card uses a different interrupt to the audio
section. This should all be correctly configured by the kernel; if problems
with the MPU401 interface surface, try using the standalone MPU401 module,
passing "0" as the "sb" module's "mpu_io" module parameter to prevent the
soundblaster driver attempting to register the MPU401 itself. The onboard
synth device can be accessed using the "opl3" module.
If isapnptools is used to wake up the sound card (as in 2.2.x), the settings
of the card's resources should be passed to the kernel modules ("sb", "opl3"
and "mpu401") using the module parameters. When configuring an ALS-007, be
sure to specify different IRQs for the audio and MPU401 sections - this card
requires they be different. For "sb", "io", "irq" and "dma" should be set
to the same values used to configure the audio section of the card with
isapnp. "dma16" should be explicitly set to "-1" for an ALS-007 since this
card does not have a 16 bit dma channel; if not specified the kernel will
default to using channel 5 anyway which will cause audio not to work.
"mpu_io" should be set to 0. The "io" parameter of the "opl3" module should
also agree with the setting used by isapnp. To get the MPU401 interface
working on an ALS-007 card, the "mpu401" module will be required since this
card uses separate IRQs for the audio and MPU401 sections and there is no
parameter available to pass a different IRQ to the "sb" driver (whose
inbuilt MPU401 driver would otherwise be fine). Insert the mpu401 module
passing appropriate values using the "io" and "irq" parameters.
The resulting sound driver will provide the following capabilities:
- 8 and 16 bit audio playback
- 8 and 16 bit audio recording
- Software selection of record source (line in, CD, FM, mic, master)
- Record and playback of midi data via the external MPU-401
- Playback of midi data using inbuilt FM synthesizer
- Control of the ALS-007 mixer via any OSS-compatible mixer programs.
Controls available are Master (L&R), Line in (L&R), CD (L&R),
DSP/PCM/audio out (L&R), FM (L&R) and Mic in (mono).
Jonathan Woithe
30 March 1998
Modified 2000-02-26 by Dave Forrest, to add ALS100/ALS200
Modified 2000-04-10 by Paul Laufer, to add ISAPnP info.
Modified 2000-11-19 by Jonathan Woithe,
- updated information for kernel 2.4.x.
Information about Audio Excel DSP 16 driver can be found in the source
file aedsp16.c
Please, read the head of the source before using it. It contain useful
The Audio Excel configuration, is now done with the standard Linux setup.
You have to configure the sound card (Sound Blaster or Microsoft Sound System)
and, if you want it, the Roland MPU-401 (do not use the Sound Blaster MPU-401,
SB-MPU401) in the main driver menu. Activate the lowlevel drivers then select
the Audio Excel hardware that you want to initialize. Check the IRQ/DMA/MIRQ
of the Audio Excel initialization: it must be the same as the SBPRO (or MSS)
setup. If the parameters are different, correct it.
I you own a Gallant's audio card based on SC-6600, activate the SC-6600 support.
If you want to change the configuration of the sound board, be sure to
check off all the configuration items before re-configure it.
Module parameters
To use this driver as a module, you must configure some module parameters, to
set up I/O addresses, IRQ lines and DMA channels. Some parameters are
mandatory while some others are optional. Here a list of parameters you can
use with this module:
Name Description
==== ===========
io I/O base address (0x220 or 0x240)
irq irq line (5, 7, 9, 10 or 11)
dma dma channel (0, 1 or 3)
mss_base I/O base address for activate MSS mode (default SBPRO)
(0x530 or 0xE80)
mpu_base I/O base address for activate MPU-401 mode
(0x300, 0x310, 0x320 or 0x330)
mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0)
A configuration file in /etc/modprobe.d/ directory will have lines like this:
options opl3 io=0x388
options ad1848 io=0x530 irq=11 dma=3
options aedsp16 io=0x220 irq=11 dma=3 mss_base=0x530
Where the aedsp16 options are the options for this driver while opl3 and
ad1848 are the corresponding options for the MSS and OPL3 modules.
Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly
the sound card. Installation dependencies must be written in configuration
files under /etc/modprobe.d/ directory:
softdep ad1848 pre: aedsp16
softdep opl3 pre: aedsp16
Then you must load the sound modules stack in this order:
sound -> aedsp16 -> [ ad1848, opl3 ]
With the above configuration, loading ad1848 or opl3 modules, will
automatically load all the sound stack.
Sound cards supported
This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
I'm working on the III version of the card: if someone have useful
information about it, please let me know.
For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
activating the audio card with the MS-DOS device driver, then you have to
<ctrl>-<alt>-<del> and boot Linux.
Follow these steps:
1) Compile Linux kernel with standard sound driver, using the emulation
you want, with the parameters of your audio card,
e.g. Microsoft Sound System irq10 dma3
2) Install your new kernel as the default boot kernel.
3) Boot MS-DOS and configure the audio card with the boot time device
driver, for MSS irq10 dma3 in our example.
4) <ctrl>-<alt>-<del> and boot Linux. This will maintain the DOS configuration
and will boot the new kernel with sound driver. The sound driver will find
the audio card and will recognize and attach it.
Reports on User successes
> Date: Mon, 29 Jul 1996 08:35:40 +0100
> From: Mr S J Greenaway <>
> To: (Riccardo Facchetti)
> Subject: Re: Audio Excel DSP 16 initialization code
> Just to let you know got my Audio Excel (emulating a MSS) working
> with my original SB16, thanks for the driver!
Last revised: 20 August 1998
Riccardo Facchetti
Documentation for CMI 8330 (SoundPRO)
Alessandro Zummo <>
( Be sure to read Documentation/sound/oss/SoundPro too )
This adapter is now directly supported by the sb driver.
The only thing you have to do is to compile the kernel sound
support as a module and to enable kernel ISAPnP support,
as shown below.
and optionally:
for MPU401 support.
(I suggest you to use "make menuconfig" or "make xconfig"
for a more comfortable configuration editing)
Then you can do
modprobe sb
and everything will be (hopefully) configured.
You should get something similar in syslog:
sb: CMI8330 detected.
sb: CMI8330 sb base located at 0x220
sb: CMI8330 mpu base located at 0x330
sb: CMI8330 mail reports to Alessandro Zummo <>
sb: ISAPnP reports CMI 8330 SoundPRO at i/o 0x220, irq 7, dma 1,5
The old documentation file follows for reference
How to enable CMI 8330 (SOUNDPRO) soundchip on Linux
Stefan Laudat <>
[Note: The CMI 8338 is unrelated and is supported by cmpci.o]
In order to use CMI8330 under Linux you just have to use a proper isapnp.conf, a good isapnp and a little bit of patience. I use isapnp 1.17, but
you may get a better one I guess at
Of course you will have to compile kernel sound support as module, as shown below:
# Mikro$chaft sound system (kinda useful here ;))
The /etc/isapnp.conf file will be:
<snip below>
(READPORT 0x0203)
(CONFIGURE CMI0001/16777472 (LD 0
(IO 0 (SIZE 8) (BASE 0x0530))
(IO 1 (SIZE 8) (BASE 0x0388))
(INT 0 (IRQ 7 (MODE +E)))
(NAME "CMI0001/16777472[0]{CMI8330/C3D Audio Adapter}")
(CONFIGURE CMI0001/16777472 (LD 1
(IO 0 (SIZE 2) (BASE 0x0330))
(INT 0 (IRQ 11 (MODE +E)))
(NAME "CMI0001/16777472[1]{CMI8330/C3D Audio Adapter}")
# Joystick
(CONFIGURE CMI0001/16777472 (LD 2
(IO 0 (SIZE 8) (BASE 0x0200))
(NAME "CMI0001/16777472[2]{CMI8330/C3D Audio Adapter}")
# SoundBlaster
(CONFIGURE CMI0001/16777472 (LD 3
(IO 0 (SIZE 16) (BASE 0x0220))
(INT 0 (IRQ 5 (MODE +E)))
(NAME "CMI0001/16777472[3]{CMI8330/C3D Audio Adapter}")
<end of snip>
The module sequence is trivial:
/sbin/insmod soundcore
/sbin/insmod sound
/sbin/insmod uart401
# insert this first
/sbin/insmod ad1848 io=0x530 irq=7 dma=0 soundpro=1
# The sb module is an alternative to the ad1848 (Microsoft Sound System)
# Anyhow, this is full duplex and has MIDI
/sbin/insmod sb io=0x220 dma=1 dma16=5 irq=5 mpu_io=0x330
Alma Chao <> suggests the following in
a /etc/modprobe.d/*conf file:
alias sound ad1848
alias synth0 opl3
options ad1848 io=0x530 irq=7 dma=0 soundpro=1
options opl3 io=0x388
Documentation for the ESS AudioDrive chips
In 2.4 kernels the SoundBlaster driver not only tries to detect an ESS chip, it
tries to detect the type of ESS chip too. The correct detection of the chip
doesn't always succeed however, so unless you use the kernel isapnp facilities
(and you chip is pnp capable) the default behaviour is 2.0 behaviour which
means: only detect ES688 and ES1688.
All ESS chips now have a recording level setting. This is a need-to-have for
people who want to use their ESS for recording sound.
Every chip that's detected as a later-than-es1688 chip has a 6 bits logarithmic
master volume control.
Every chip that's detected as a ES1887 now has Full Duplex support. Made a
little testprogram that shows that is works, haven't seen a real program that
needs this however.
For ESS chips an additional parameter "esstype" can be specified. This controls
the (auto) detection of the ESS chips. It can have 3 kinds of values:
-1 Act like 2.0 kernels: only detect ES688 or ES1688.
0 Try to auto-detect the chip (may fail for ES1688)
688 The chip will be treated as ES688
1688 ,, ,, ,, ,, ,, ,, ES1688
1868 ,, ,, ,, ,, ,, ,, ES1868
1869 ,, ,, ,, ,, ,, ,, ES1869
1788 ,, ,, ,, ,, ,, ,, ES1788
1887 ,, ,, ,, ,, ,, ,, ES1887
1888 ,, ,, ,, ,, ,, ,, ES1888
Because Full Duplex is supported for ES1887 you can specify a second DMA
channel by specifying module parameter dma16. It can be one of: 0, 1, 3 or 5.
Documentation for the ESS1868F AudioDrive PnP sound card
The ESS1868 sound card is a PnP ESS1688-compatible 16-bit sound card.
It should be automatically detected by the Linux Kernel isapnp support when you
load the sb.o module. Otherwise you should take care of:
* The ESS1868 does not allow use of a 16-bit DMA, thus DMA 0, 1, 2, and 3
may only be used.
* isapnptools version 1.14 does work with ESS1868. Earlier versions might
* Sound support MUST be compiled as MODULES, not statically linked
into the kernel.
NOTE: this is only needed when not using the kernel isapnp support!
For configuring the sound card's I/O addresses, IRQ and DMA, here is a
sample copy of the isapnp.conf directives regarding the ESS1868:
(IO 0 (BASE 0x0220))
(IO 1 (BASE 0x0388))
(IO 2 (BASE 0x0330))
(INT 0 (IRQ 5 (MODE +E)))
(for a full working isapnp.conf file, remember the
at the beginning and the
at the end.)
In this setup, the main card I/O is 0x0220, FM synthesizer is 0x0388, and
the MPU-401 MIDI port is located at 0x0330. IRQ is IRQ 5, DMA is channel 1.
After configuring the sound card via isapnp, to use the card you must load
the sound modules with the proper I/O information. Here is my setup:
# ESS1868F AudioDrive initialization
/sbin/modprobe sound
/sbin/insmod uart401
/sbin/insmod sb io=0x220 irq=5 dma=1 dma16=-1
/sbin/insmod mpu401 io=0x330
/sbin/insmod opl3 io=0x388
/sbin/insmod v_midi
opl3 is the FM synthesizer
/sbin/insmod opl3 io=0x388
This diff is collapsed.
This diff is collapsed.
A pure OPL3 card is nice and easy to configure. Simply do
insmod opl3 io=0x388
Change the I/O address in the very unlikely case this card is differently
Support for the OPTi 82C931 chip
Note: parts of this README file apply also to other
cards that use the mad16 driver.
Some items in this README file are based on features
added to the sound driver after Linux-2.1.91 was out.
By the time of writing this I do not know which official
kernel release will include these features.
Please do not report inconsistencies on older Linux
The OPTi 82C931 is supported in its non-PnP mode.
Usually you do not need to set jumpers, etc. The sound driver
will check the card status and if it is required it will
force the card into a mode in which it can be programmed.
If you have another OS installed on your computer it is recommended
that Linux and the other OS use the same resources.
Also, it is recommended that resources specified in /etc/modprobe.d/*.conf
and resources specified in /etc/isapnp.conf agree.
Compiling the sound driver
I highly recommend that you build a modularized sound driver.
This document does not cover a sound-driver which is built in
the kernel.
Sound card support should be enabled as a module (chose m).
Answer 'm' for these items:
Generic OPL2/OPL3 FM synthesizer support (CONFIG_SOUND_ADLIB)
Microsoft Sound System support (CONFIG_SOUND_MSS)
Support for OPTi MAD16 and/or Mozart based cards (CONFIG_SOUND_MAD16)
FM synthesizer (YM3812/OPL-3) support (CONFIG_SOUND_YM3812)
The configuration menu may ask for addresses, IRQ lines or DMA
channels. If the card is used as a module the module loading
options will override these values.
For the OPTi 931 you can answer 'n' to:
Support MIDI in older MAD16 based cards (requires SB) (CONFIG_SOUND_MAD16_OLDCARD)
If you do need MIDI support in a Mozart or C928 based card you
need to answer 'm' to the above question. In that case you will
also need to answer 'm' to:
'100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support' (CONFIG_SOUND_SB)
Go on and compile your kernel and modules. Install the modules. Run depmod -a.
Using isapnptools
In most systems with a PnP BIOS you do not need to use isapnp. The
initialization provided by the BIOS is sufficient for the driver
to pick up the card and continue initialization.
If that fails, or if you have other PnP cards, you need to use isapnp
to initialize the card.
This was tested with isapnptools-1.11 but I recommend that you use
isapnptools-1.13 (or newer). Run pnpdump to dump the information
about your PnP cards. Then edit the resulting file and select
the options of your choice. This file is normally installed as
The driver has one limitation with respect to I/O port resources:
IO3 base must be 0x0E0C. Although isapnp allows other ports, this
address is hard-coded into the driver.
Using kmod and autoloading the sound driver
Config files in '/etc/modprobe.d/' are used as below:
alias mixer0 mad16
alias audio0 mad16
alias midi0 mad16
alias synth0 opl3
options sb mad16=1
options mad16 irq=10 dma=0 dma16=1 io=0x530 joystick=1 cdtype=0
options opl3 io=0x388
install mad16 /sbin/modprobe -i mad16 && /sbin/ad1848_mixer_reroute 14 8 15 3 16 6
If you have an MPU daughtercard or onboard MPU you will want to add to the
"options mad16" line - eg
options mad16 irq=5 dma=0 dma16=3 io=0x530 mpu_io=0x330 mpu_irq=9
To set the I/O and IRQ of the MPU.
alias mixer0 mad16
alias audio0 mad16
alias midi0 mad16
alias synth0 opl3
When any sound device is opened the kernel requests auto-loading
of char-major-14. There is a built-in alias that translates this
request to loading the main sound module.
The sound module in its turn will request loading of a sub-driver
for mixer, audio, midi or synthesizer device. The first 3 are
supported by the mad16 driver. The synth device is supported
by the opl3 driver.
There is currently no way to autoload the sound device driver
if more than one card is installed.
options sb mad16=1
This is left for historical reasons. If you enable the
config option 'Support MIDI in older MAD16 based cards (requires SB)'
or if you use an older mad16 driver it will force loading of the
SoundBlaster driver. This option tells the SB driver not to look
for a SB card but to wait for the mad16 driver.
options mad16 irq=10 dma=0 dma16=1 io=0x530 joystick=1 cdtype=0
options opl3 io=0x388
post-install mad16 /sbin/ad1848_mixer_reroute 14 8 15 3 16 6
This sets resources and options for the mad16 and opl3 drivers.
I use two DMA channels (only one is required) to enable full duplex.
joystick=1 enables the joystick port. cdtype=0 disables the cd port.
You can also set mpu_io and mpu_irq in the mad16 options for the
uart401 driver.
This tells modprobe to run /sbin/ad1848_mixer_reroute after
mad16 is successfully loaded and initialized. The source
for ad1848_mixer_reroute is appended to the end of this readme
file. It is impossible for the sound driver to know the actual
connections to the mixer. The 3 inputs intended for cd, synth
and line-in are mapped to the generic inputs line1, line2 and
line3. This program reroutes these mixer channels to their
right names (note the right mapping depends on the actual sound
card that you use).
The numeric parameters mean:
14=line1 8=cd - reroute line1 to the CD input.
15=line2 3=synth - reroute line2 to the synthesizer input.
16=line3 6=line - reroute line3 to the line input.
For reference on other input names look at the file
Using a joystick
You must enable a joystick in the mad16 options. (also
in /etc/isapnp.conf if you use it).
Tested with regular analog joysticks.
A CDROM drive connected to the sound card
The 82C931 chip has support only for secondary ATAPI cdrom.
(cdtype=8). Loading the mad16 driver resets the C931 chip
and if a cdrom was already mounted it may cause a complete
system hang. Do not use the sound card if you have an alternative.
If you do use the sound card it is important that you load
the mad16 driver (use "modprobe mad16" to prevent auto-unloading)
before the cdrom is accessed the first time.
Using the sound driver built-in to the kernel may help here, but...
Most new systems have a PnP BIOS and also two IDE controllers.
The IDE controller on the sound card may be needed only on older
systems (which have only one IDE controller) but these systems
also do not have a PnP BIOS - requiring isapnptools and a modularized
Known problems
1. See the section on "A CDROM drive connected to the sound card".
2. On my system the codec cannot capture companded sound samples.
(eg., recording from /dev/audio). When any companded capture is
requested I get stereo-16 bit samples instead. Playback of
companded samples works well. Apparently this problem is not common
to all C931 based cards. I do not know how to identify cards that
have this problem.
Source for ad1848_mixer_reroute.c
#include <stdio.h>
#include <fcntl.h>
#include <linux/soundcard.h>
static char *mixer_names[SOUND_MIXER_NRDEVICES] =
main(int argc, char **argv) {
int val, from, to;
int i, fd;
fd = open("/dev/mixer", O_RDWR);
if(fd < 0) {
return 1;
for(i = 2; i < argc; i += 2) {
from = atoi(argv[i-1]);
to = atoi(argv[i]);
fprintf(stderr, "%s: turning off mixer %s\n",
argv[0], mixer_names[to]);
fprintf(stderr, "%s: rerouting mixer %s to %s\n",
argv[0], mixer_names[from], mixer_names[to]);
val = from << 8 | to;
if(ioctl(fd, SOUND_MIXER_PRIVATE2, &val)) {
perror("AD1848 mixer reroute");
return 1;
return 0;
Pro Audio Spectrum 16 for 2.3.99 and later
by Thomas Molina (
last modified 3 Mar 2001
Acknowledgement to Axel Boldt ( for stuff taken
from, Riccardo Facchetti for stuff from README.OSS,
and others whose names I could not find.
This documentation is relevant for the PAS16 driver (pas2_card.c and
friends) under kernel version 2.3.99 and later. If you are
unfamiliar with configuring sound under Linux, please read the
Sound-HOWTO, Documentation/sound/oss/Introduction and other
relevant docs first.
The following information is relevant information from README.OSS
and legacy docs for the Pro Audio Spectrum 16 (PAS16):
The pas2_card.c driver supports the following cards --
Pro Audio Spectrum 16 (PAS16) and compatibles:
Pro Audio Spectrum 16
Pro Audio Studio 16
Logitech Sound Man 16
NOTE! The original Pro Audio Spectrum as well as the PAS+ are not
and will not be supported by the driver.
The sound driver configuration dialog
Sound configuration starts by making some yes/no questions. Be careful
when answering to these questions since answering y to a question may
prevent some later ones from being asked. For example don't answer y to
the question about (PAS16) if you don't really have a PAS16. Sound
configuration may also be made modular by answering m to configuration
options presented.
Note also that all questions may not be asked. The configuration program
may disable some questions depending on the earlier choices. It may also
select some options automatically as well.
"ProAudioSpectrum 16 support",
- Answer 'y'_ONLY_ if you have a Pro Audio Spectrum _16_,
Pro Audio Studio 16 or Logitech SoundMan 16 (be sure that
you read the above list correctly). Don't answer 'y' if you
have some other card made by Media Vision or Logitech since they
are not PAS16 compatible.
NOTE! Since 3.5-beta10 you need to enable SB support (next question)
if you want to use the SB emulation of PAS16. It's also possible to
the emulation if you want to use a true SB card together with PAS16
(there is another question about this that is asked later).
"Generic OPL2/OPL3 FM synthesizer support",
- Answer 'y' if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
The PAS16 has an OPL3-compatible FM chip.
With PAS16 you can use two audio device files at the same time. /dev/dsp (and
/dev/audio) is connected to the 8/16 bit native codec and the /dev/dsp1 (and
/dev/audio1) is connected to the SB emulation (8 bit mono only).
The new stuff for 2.3.99 and later
The following configuration options are relevant to configuring the PAS16:
Sound card support
If you have a sound card in your computer, i.e. if it can say more
than an occasional beep, say Y. Be sure to have all the information
about your sound card and its configuration down (I/O port,
interrupt and DMA channel), because you will be asked for it.
You want to read the Sound-HOWTO, available from . General information
about the modular sound system is contained in the files
Documentation/sound/oss/Introduction. The file
Documentation/sound/oss/README.OSS contains some slightly outdated but
still useful information as well.
OSS sound modules
OSS is the Open Sound System suite of sound card drivers. They make
sound programming easier since they provide a common API. Say Y or M
here (the module will be called sound.o) if you haven't found a
driver for your sound card above, then pick your driver from the