aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/oss
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/sound/oss
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'Documentation/sound/oss')
-rw-r--r--Documentation/sound/oss/AD181684
-rw-r--r--Documentation/sound/oss/ALS66
-rw-r--r--Documentation/sound/oss/AWE3276
-rw-r--r--Documentation/sound/oss/AudioExcelDSP16101
-rw-r--r--Documentation/sound/oss/CMI8330153
-rw-r--r--Documentation/sound/oss/CMI833885
-rw-r--r--Documentation/sound/oss/CS423223
-rw-r--r--Documentation/sound/oss/ESS34
-rw-r--r--Documentation/sound/oss/ESS186855
-rw-r--r--Documentation/sound/oss/INSTALL.awe134
-rw-r--r--Documentation/sound/oss/Introduction459
-rw-r--r--Documentation/sound/oss/MAD1656
-rw-r--r--Documentation/sound/oss/Maestro123
-rw-r--r--Documentation/sound/oss/Maestro392
-rw-r--r--Documentation/sound/oss/MultiSound1137
-rw-r--r--Documentation/sound/oss/NEWS42
-rw-r--r--Documentation/sound/oss/NM256280
-rw-r--r--Documentation/sound/oss/OPL36
-rw-r--r--Documentation/sound/oss/OPL3-SA52
-rw-r--r--Documentation/sound/oss/OPL3-SA2210
-rw-r--r--Documentation/sound/oss/Opti222
-rw-r--r--Documentation/sound/oss/PAS16163
-rw-r--r--Documentation/sound/oss/PSS41
-rw-r--r--Documentation/sound/oss/PSS-updates88
-rw-r--r--Documentation/sound/oss/README.OSS1456
-rw-r--r--Documentation/sound/oss/README.awe218
-rw-r--r--Documentation/sound/oss/README.modules106
-rw-r--r--Documentation/sound/oss/README.ymfsb107
-rw-r--r--Documentation/sound/oss/SoundPro105
-rw-r--r--Documentation/sound/oss/Soundblaster53
-rw-r--r--Documentation/sound/oss/Tropez+26
-rw-r--r--Documentation/sound/oss/VIA-chipset43
-rw-r--r--Documentation/sound/oss/VIBRA1680
-rw-r--r--Documentation/sound/oss/WaveArtist170
-rw-r--r--Documentation/sound/oss/Wavefront339
-rw-r--r--Documentation/sound/oss/btaudio92
-rw-r--r--Documentation/sound/oss/cs46xx138
-rw-r--r--Documentation/sound/oss/es137070
-rw-r--r--Documentation/sound/oss/es137164
-rw-r--r--Documentation/sound/oss/mwave185
-rw-r--r--Documentation/sound/oss/rme96xx767
-rw-r--r--Documentation/sound/oss/solo170
-rw-r--r--Documentation/sound/oss/sonicvibes81
-rw-r--r--Documentation/sound/oss/ultrasound30
-rw-r--r--Documentation/sound/oss/vwsnd293
45 files changed, 8275 insertions, 0 deletions
diff --git a/Documentation/sound/oss/AD1816 b/Documentation/sound/oss/AD1816
new file mode 100644
index 000000000000..14bd8f25d523
--- /dev/null
+++ b/Documentation/sound/oss/AD1816
@@ -0,0 +1,84 @@
1Documentation for the AD1816(A) sound driver
2============================================
3
4Installation:
5-------------
6
7To get your AD1816(A) based sound card work, you'll have to enable support for
8experimental code ("Prompt for development and/or incomplete code/drivers")
9and isapnp ("Plug and Play support", "ISA Plug and Play support"). Enable
10"Sound card support", "OSS modules support" and "Support for AD1816(A) based
11cards (EXPERIMENTAL)" in the sound configuration menu, too. Now build, install
12and reboot the new kernel as usual.
13
14Features:
15---------
16
17List of features supported by this driver:
18- full-duplex support
19- supported audio formats: unsigned 8bit, signed 16bit little endian,
20 signed 16bit big endian, µ-law, A-law
21- supported channels: mono and stereo
22- supported recording sources: Master, CD, Line, Line1, Line2, Mic
23- supports phat 3d stereo circuit (Line 3)
24
25
26Supported cards:
27----------------
28
29The following cards are known to work with this driver:
30- Terratec Base 1
31- Terratec Base 64
32- HP Kayak
33- Acer FX-3D
34- SY-1816
35- Highscreen Sound-Boostar 32 Wave 3D
36- Highscreen Sound-Boostar 16
37- AVM Apex Pro card
38- (Aztech SC-16 3D)
39- (Newcom SC-16 3D)
40- (Terratec EWS64S)
41
42Cards listed in brackets are not supported reliable. If you have such a card
43you should add the extra parameter:
44 options=1
45when loading the ad1816 module via modprobe.
46
47
48Troubleshooting:
49----------------
50
51First of all you should check, if the driver has been loaded
52properly.
53
54If loading of the driver succeeds, but playback/capture fails, check
55if you used the correct values for irq, dma and dma2 when loading the module.
56If one of them is wrong you usually get the following error message:
57
58Nov 6 17:06:13 tek01 kernel: Sound: DMA (output) timed out - IRQ/DRQ config error?
59
60If playback/capture is too fast or to slow, you should have a look at
61the clock chip of your sound card. The AD1816 was designed for a 33MHz
62oscillator, however most sound card manufacturer use slightly
63different oscillators as they are cheaper than 33MHz oscillators. If
64you have such a card you have to adjust the ad1816_clockfreq parameter
65above. For example: For a card using a 32.875MHz oscillator use
66ad1816_clockfreq=32875 instead of ad1816_clockfreq=33000.
67
68
69Updates, bugfixes and bugreports:
70--------------------------------
71
72As the driver is still experimental and under development, you should
73watch out for updates. Updates of the driver are available on the
74Internet from one of my home pages:
75 http://www.student.informatik.tu-darmstadt.de/~tek/projects/linux.html
76or:
77 http://www.tu-darmstadt.de/~tek01/projects/linux.html
78
79Bugreports, bugfixes and related questions should be sent via E-Mail to:
80 tek@rbg.informatik.tu-darmstadt.de
81
82Thorsten Knabe <tek@rbg.informatik.tu-darmstadt.de>
83Christoph Hellwig <hch@infradead.org>
84 Last modified: 2000/09/20
diff --git a/Documentation/sound/oss/ALS b/Documentation/sound/oss/ALS
new file mode 100644
index 000000000000..d01ffbfd5808
--- /dev/null
+++ b/Documentation/sound/oss/ALS
@@ -0,0 +1,66 @@
1ALS-007/ALS-100/ALS-200 based sound cards
2=========================================
3
4Support for sound cards based around the Avance Logic
5ALS-007/ALS-100/ALS-200 chip is included. These chips are a single
6chip PnP sound solution which is mostly hardware compatible with the
7Sound Blaster 16 card, with most differences occurring in the use of
8the mixer registers. For this reason the ALS code is integrated
9as part of the Sound Blaster 16 driver (adding only 800 bytes to the
10SB16 driver).
11
12To use an ALS sound card under Linux, enable the following options as
13modules in the sound configuration section of the kernel config:
14 - 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
15 - FM synthesizer (YM3812/OPL-3) support
16 - standalone MPU401 support may be required for some cards; for the
17 ALS-007, when using isapnptools, it is required
18Since the ALS-007/100/200 are PnP cards, ISAPnP support should probably be
19compiled in. If kernel level PnP support is not included, isapnptools will
20be required to configure the card before the sound modules are loaded.
21
22When using kernel level ISAPnP, the kernel should correctly identify and
23configure all resources required by the card when the "sb" module is
24inserted. Note that the ALS-007 does not have a 16 bit DMA channel and that
25the MPU401 interface on this card uses a different interrupt to the audio
26section. This should all be correctly configured by the kernel; if problems
27with the MPU401 interface surface, try using the standalone MPU401 module,
28passing "0" as the "sb" module's "mpu_io" module parameter to prevent the
29soundblaster driver attempting to register the MPU401 itself. The onboard
30synth device can be accessed using the "opl3" module.
31
32If isapnptools is used to wake up the sound card (as in 2.2.x), the settings
33of the card's resources should be passed to the kernel modules ("sb", "opl3"
34and "mpu401") using the module parameters. When configuring an ALS-007, be
35sure to specify different IRQs for the audio and MPU401 sections - this card
36requires they be different. For "sb", "io", "irq" and "dma" should be set
37to the same values used to configure the audio section of the card with
38isapnp. "dma16" should be explicitly set to "-1" for an ALS-007 since this
39card does not have a 16 bit dma channel; if not specified the kernel will
40default to using channel 5 anyway which will cause audio not to work.
41"mpu_io" should be set to 0. The "io" parameter of the "opl3" module should
42also agree with the setting used by isapnp. To get the MPU401 interface
43working on an ALS-007 card, the "mpu401" module will be required since this
44card uses separate IRQs for the audio and MPU401 sections and there is no
45parameter available to pass a different IRQ to the "sb" driver (whose
46inbuilt MPU401 driver would otherwise be fine). Insert the mpu401 module
47passing appropriate values using the "io" and "irq" parameters.
48
49The resulting sound driver will provide the following capabilities:
50 - 8 and 16 bit audio playback
51 - 8 and 16 bit audio recording
52 - Software selection of record source (line in, CD, FM, mic, master)
53 - Record and playback of midi data via the external MPU-401
54 - Playback of midi data using inbuilt FM synthesizer
55 - Control of the ALS-007 mixer via any OSS-compatible mixer programs.
56 Controls available are Master (L&R), Line in (L&R), CD (L&R),
57 DSP/PCM/audio out (L&R), FM (L&R) and Mic in (mono).
58
59Jonathan Woithe
60jwoithe@physics.adelaide.edu.au
6130 March 1998
62
63Modified 2000-02-26 by Dave Forrest, drf5n@virginia.edu to add ALS100/ALS200
64Modified 2000-04-10 by Paul Laufer, pelaufer@csupomona.edu to add ISAPnP info.
65Modified 2000-11-19 by Jonathan Woithe, jwoithe@physics.adelaide.edu.au
66 - updated information for kernel 2.4.x.
diff --git a/Documentation/sound/oss/AWE32 b/Documentation/sound/oss/AWE32
new file mode 100644
index 000000000000..cb179bfeb522
--- /dev/null
+++ b/Documentation/sound/oss/AWE32
@@ -0,0 +1,76 @@
1 Installing and using Creative AWE midi sound under Linux.
2
3This documentation is devoted to the Creative Sound Blaster AWE32, AWE64 and
4SB32.
5
61) Make sure you have an ORIGINAL Creative SB32, AWE32 or AWE64 card. This
7 is important, because the driver works only with real Creative cards.
8
92) The first thing you need to do is re-compile your kernel with support for
10 your sound card. Run your favourite tool to configure the kernel and when
11 you get to the "Sound" menu you should enable support for the following:
12
13 Sound card support,
14 OSS sound modules,
15 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support,
16 AWE32 synth
17
18 If your card is "Plug and Play" you will also need to enable these two
19 options, found under the "Plug and Play configuration" menu:
20
21 Plug and Play support
22 ISA Plug and Play support
23
24 Now compile and install the kernel in normal fashion. If you don't know
25 how to do this you can find instructions for this in the README file
26 located in the root directory of the kernel source.
27
283) Before you can start playing midi files you will have to load a sound
29 bank file. The utility needed for doing this is called "sfxload", and it
30 is one of the utilities found in a package called "awesfx". If this
31 package is not available in your distribution you can download the AWE
32 snapshot from Creative Labs Open Source website:
33
34 http://www.opensource.creative.com/snapshot.html
35
36 Once you have unpacked the AWE snapshot you will see a "awesfx"
37 directory. Follow the instructions in awesfx/docs/INSTALL to install the
38 utilities in this package. After doing this, sfxload should be installed
39 as:
40
41 /usr/local/bin/sfxload
42
43 To enable AWE general midi synthesis you should also get the sound bank
44 file for general midi from:
45
46 http://members.xoom.com/yar/synthgm.sbk.gz
47
48 Copy it to a directory of your choice, and unpack it there.
49
504) Edit /etc/modprobe.conf, and insert the following lines at the end of the
51 file:
52
53 alias sound-slot-0 sb
54 alias sound-service-0-1 awe_wave
55 install awe_wave /sbin/modprobe --first-time -i awe_wave && /usr/local/bin/sfxload PATH_TO_SOUND_BANK_FILE
56
57 You will of course have to change "PATH_TO_SOUND_BANK_FILE" to the full
58 path of of the sound bank file. That will enable the Sound Blaster and AWE
59 wave synthesis. To play midi files you should get one of these programs if
60 you don't already have them:
61
62 Playmidi: http://playmidi.openprojects.net
63
64 AWEMidi Player (drvmidi) Included in the previously mentioned AWE
65 snapshot.
66
67 You will probably have to pass the "-e" switch to playmidi to have it use
68 your midi device. drvmidi should work without switches.
69
70 If something goes wrong please e-mail me. All comments and suggestions are
71 welcome.
72
73 Yaroslav Rosomakho (alons55@dialup.ptt.ru)
74 http://www.yar.opennet.ru
75
76Last Updated: Feb 3 2001
diff --git a/Documentation/sound/oss/AudioExcelDSP16 b/Documentation/sound/oss/AudioExcelDSP16
new file mode 100644
index 000000000000..c0f08922993b
--- /dev/null
+++ b/Documentation/sound/oss/AudioExcelDSP16
@@ -0,0 +1,101 @@
1Driver
2------
3
4Informations about Audio Excel DSP 16 driver can be found in the source
5file aedsp16.c
6Please, read the head of the source before using it. It contain useful
7informations.
8
9Configuration
10-------------
11
12The Audio Excel configuration, is now done with the standard Linux setup.
13You have to configure the sound card (Sound Blaster or Microsoft Sound System)
14and, if you want it, the Roland MPU-401 (do not use the Sound Blaster MPU-401,
15SB-MPU401) in the main driver menu. Activate the lowlevel drivers then select
16the Audio Excel hardware that you want to initialize. Check the IRQ/DMA/MIRQ
17of the Audio Excel initialization: it must be the same as the SBPRO (or MSS)
18setup. If the parameters are different, correct it.
19I you own a Gallant's audio card based on SC-6600, activate the SC-6600 support.
20If you want to change the configuration of the sound board, be sure to
21check off all the configuration items before re-configure it.
22
23Module parameters
24-----------------
25To use this driver as a module, you must configure some module parameters, to
26set up I/O addresses, IRQ lines and DMA channels. Some parameters are
27mandatory while some others are optional. Here a list of parameters you can
28use with this module:
29
30Name Description
31==== ===========
32MANDATORY
33io I/O base address (0x220 or 0x240)
34irq irq line (5, 7, 9, 10 or 11)
35dma dma channel (0, 1 or 3)
36
37OPTIONAL
38mss_base I/O base address for activate MSS mode (default SBPRO)
39 (0x530 or 0xE80)
40mpu_base I/O base address for activate MPU-401 mode
41 (0x300, 0x310, 0x320 or 0x330)
42mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0)
43
44The /etc/modprobe.conf will have lines like this:
45
46options opl3 io=0x388
47options ad1848 io=0x530 irq=11 dma=3
48options aedsp16 io=0x220 irq=11 dma=3 mss_base=0x530
49
50Where the aedsp16 options are the options for this driver while opl3 and
51ad1848 are the corresponding options for the MSS and OPL3 modules.
52
53Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly
54the sound card. Installation dependencies must be written in the modprobe.conf
55file:
56
57install ad1848 /sbin/modprobe aedsp16 && /sbin/modprobe -i ad1848
58install opl3 /sbin/modprobe aedsp16 && /sbin/modprobe -i opl3
59
60Then you must load the sound modules stack in this order:
61sound -> aedsp16 -> [ ad1848, opl3 ]
62
63With the above configuration, loading ad1848 or opl3 modules, will
64automatically load all the sound stack.
65
66Sound cards supported
67---------------------
68This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
69It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
70I'm working on the III version of the card: if someone have useful
71informations about it, please let me know.
72For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
73activating the audio card with the MS-DOS device driver, then you have to
74<ctrl>-<alt>-<del> and boot Linux.
75Follow these steps:
76
771) Compile Linux kernel with standard sound driver, using the emulation
78 you want, with the parameters of your audio card,
79 e.g. Microsoft Sound System irq10 dma3
802) Install your new kernel as the default boot kernel.
813) Boot MS-DOS and configure the audio card with the boot time device
82 driver, for MSS irq10 dma3 in our example.
834) <ctrl>-<alt>-<del> and boot Linux. This will maintain the DOS configuration
84 and will boot the new kernel with sound driver. The sound driver will find
85 the audio card and will recognize and attach it.
86
87Reports on User successes
88-------------------------
89
90> Date: Mon, 29 Jul 1996 08:35:40 +0100
91> From: Mr S J Greenaway <sjg95@unixfe.rl.ac.uk>
92> To: riccardo@cdc8g5.cdc.polimi.it (Riccardo Facchetti)
93> Subject: Re: Audio Excel DSP 16 initialization code
94>
95> Just to let you know got my Audio Excel (emulating a MSS) working
96> with my original SB16, thanks for the driver!
97
98
99Last revised: 20 August 1998
100Riccardo Facchetti
101fizban@tin.it
diff --git a/Documentation/sound/oss/CMI8330 b/Documentation/sound/oss/CMI8330
new file mode 100644
index 000000000000..9c439f1a6dba
--- /dev/null
+++ b/Documentation/sound/oss/CMI8330
@@ -0,0 +1,153 @@
1Documentation for CMI 8330 (SoundPRO)
2-------------------------------------
3Alessandro Zummo <azummo@ita.flashnet.it>
4
5( Be sure to read Documentation/sound/oss/SoundPro too )
6
7
8This adapter is now directly supported by the sb driver.
9
10 The only thing you have to do is to compile the kernel sound
11support as a module and to enable kernel ISAPnP support,
12as shown below.
13
14
15CONFIG_SOUND=m
16CONFIG_SOUND_SB=m
17
18CONFIG_PNP=y
19CONFIG_ISAPNP=y
20
21
22and optionally:
23
24
25CONFIG_SOUND_MPU401=m
26
27 for MPU401 support.
28
29
30(I suggest you to use "make menuconfig" or "make xconfig"
31 for a more comfortable configuration editing)
32
33
34
35Then you can do
36
37 modprobe sb
38
39and everything will be (hopefully) configured.
40
41You should get something similar in syslog:
42
43sb: CMI8330 detected.
44sb: CMI8330 sb base located at 0x220
45sb: CMI8330 mpu base located at 0x330
46sb: CMI8330 mail reports to Alessandro Zummo <azummo@ita.flashnet.it>
47sb: ISAPnP reports CMI 8330 SoundPRO at i/o 0x220, irq 7, dma 1,5
48
49
50
51
52The old documentation file follows for reference
53purposes.
54
55
56How to enable CMI 8330 (SOUNDPRO) soundchip on Linux
57------------------------------------------
58Stefan Laudat <Stefan.Laudat@asit.ro>
59
60[Note: The CMI 8338 is unrelated and is supported by cmpci.o]
61
62
63 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
64you may get a better one I guess at http://www.roestock.demon.co.uk/isapnptools/.
65
66 Of course you will have to compile kernel sound support as module, as shown below:
67
68CONFIG_SOUND=m
69CONFIG_SOUND_OSS=m
70CONFIG_SOUND_SB=m
71CONFIG_SOUND_ADLIB=m
72CONFIG_SOUND_MPU401=m
73# Mikro$chaft sound system (kinda useful here ;))
74CONFIG_SOUND_MSS=m
75
76 The /etc/isapnp.conf file will be:
77
78<snip below>
79
80
81(READPORT 0x0203)
82(ISOLATE PRESERVE)
83(IDENTIFY *)
84(VERBOSITY 2)
85(CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
86(VERIFYLD N)
87
88
89# WSS
90
91(CONFIGURE CMI0001/16777472 (LD 0
92(IO 0 (SIZE 8) (BASE 0x0530))
93(IO 1 (SIZE 8) (BASE 0x0388))
94(INT 0 (IRQ 7 (MODE +E)))
95(DMA 0 (CHANNEL 0))
96(NAME "CMI0001/16777472[0]{CMI8330/C3D Audio Adapter}")
97(ACT Y)
98))
99
100# MPU
101
102(CONFIGURE CMI0001/16777472 (LD 1
103(IO 0 (SIZE 2) (BASE 0x0330))
104(INT 0 (IRQ 11 (MODE +E)))
105(NAME "CMI0001/16777472[1]{CMI8330/C3D Audio Adapter}")
106(ACT Y)
107))
108
109# Joystick
110
111(CONFIGURE CMI0001/16777472 (LD 2
112(IO 0 (SIZE 8) (BASE 0x0200))
113(NAME "CMI0001/16777472[2]{CMI8330/C3D Audio Adapter}")
114(ACT Y)
115))
116
117# SoundBlaster
118
119(CONFIGURE CMI0001/16777472 (LD 3
120(IO 0 (SIZE 16) (BASE 0x0220))
121(INT 0 (IRQ 5 (MODE +E)))
122(DMA 0 (CHANNEL 1))
123(DMA 1 (CHANNEL 5))
124(NAME "CMI0001/16777472[3]{CMI8330/C3D Audio Adapter}")
125(ACT Y)
126))
127
128
129(WAITFORKEY)
130
131<end of snip>
132
133 The module sequence is trivial:
134
135/sbin/insmod soundcore
136/sbin/insmod sound
137/sbin/insmod uart401
138# insert this first
139/sbin/insmod ad1848 io=0x530 irq=7 dma=0 soundpro=1
140# The sb module is an alternative to the ad1848 (Microsoft Sound System)
141# Anyhow, this is full duplex and has MIDI
142/sbin/insmod sb io=0x220 dma=1 dma16=5 irq=5 mpu_io=0x330
143
144
145
146Alma Chao <elysian@ethereal.torsion.org> suggests the following /etc/modprobe.conf:
147
148alias sound ad1848
149alias synth0 opl3
150options ad1848 io=0x530 irq=7 dma=0 soundpro=1
151options opl3 io=0x388
152
153
diff --git a/Documentation/sound/oss/CMI8338 b/Documentation/sound/oss/CMI8338
new file mode 100644
index 000000000000..387d058c3f95
--- /dev/null
+++ b/Documentation/sound/oss/CMI8338
@@ -0,0 +1,85 @@
1Audio driver for CM8338/CM8738 chips by Chen-Li Tien
2
3
4HARDWARE SUPPORTED
5================================================================================
6C-Media CMI8338
7C-Media CMI8738
8On-board C-Media chips
9
10
11STEPS TO BUILD DRIVER
12================================================================================
13
14 1. Backup the Config.in and Makefile in the sound driver directory
15 (/usr/src/linux/driver/sound).
16 The Configure.help provide help when you config driver in step
17 4, please backup the original one (/usr/src/linux/Document) and
18 copy this file.
19 The cmpci is document for the driver in detail, please copy it
20 to /usr/src/linux/Document/sound so you can refer it. Backup if
21 there is already one.
22
23 2. Extract the tar file by 'tar xvzf cmpci-xx.tar.gz' in the above
24 directory.
25
26 3. Change directory to /usr/src/linux
27
28 4. Config cm8338 driver by 'make menuconfig', 'make config' or
29 'make xconfig' command.
30
31 5. Please select Sound Card (CONFIG_SOUND=m) support and CMPCI
32 driver (CONFIG_SOUND_CMPCI=m) as modules. Resident mode not tested.
33 For driver option, please refer 'DRIVER PARAMETER'
34
35 6. Compile the kernel if necessary.
36
37 7. Compile the modules by 'make modules'.
38
39 8. Install the modules by 'make modules_install'
40
41
42INSTALL DRIVER
43================================================================================
44
45 1. Before first time to run the driver, create module dependency by
46 'depmod -a'
47
48 2. To install the driver manually, enter 'modprobe cmpci'.
49
50 3. Driver installation for various distributions:
51
52 a. Slackware 4.0
53 Add the 'modprobe cmpci' command in your /etc/rc.d/rc.modules
54 file.so you can start the driver automatically each time booting.
55
56 b. Caldera OpenLinux 2.2
57 Use LISA to load the cmpci module.
58
59 c. RedHat 6.0 and S.u.S.E. 6.1
60 Add following command in /etc/conf.modules:
61
62 alias sound cmpci
63
64 also visit http://www.cmedia.com.tw for installation instruction.
65
66DRIVER PARAMETER
67================================================================================
68
69 Some functions for the cm8738 can be configured in Kernel Configuration
70 or modules parameters. Set these parameters to 1 to enable.
71
72 mpuio: I/O ports base for MPU-401, 0 if disabled.
73 fmio: I/O ports base for OPL-3, 0 if disabled.
74 spdif_inverse:Inverse the S/PDIF-in signal, this depends on your
75 CD-ROM or DVD-ROM.
76 spdif_loop: Enable S/PDIF loop, this route S/PDIF-in to S/PDIF-out
77 directly.
78 speakers: Number of speakers used.
79 use_line_as_rear:Enable this if you want to use line-in as
80 rear-out.
81 use_line_as_bass:Enable this if you want to use line-in as
82 bass-out.
83 joystick: Enable joystick. You will need to install Linux joystick
84 driver.
85
diff --git a/Documentation/sound/oss/CS4232 b/Documentation/sound/oss/CS4232
new file mode 100644
index 000000000000..7d6af7a5c1c2
--- /dev/null
+++ b/Documentation/sound/oss/CS4232
@@ -0,0 +1,23 @@
1To configure the Crystal CS423x sound chip and activate its DSP functions,
2modules may be loaded in this order:
3
4 modprobe sound
5 insmod ad1848
6 insmod uart401
7 insmod cs4232 io=* irq=* dma=* dma2=*
8
9This is the meaning of the parameters:
10
11 io--I/O address of the Windows Sound System (normally 0x534)
12 irq--IRQ of this device
13 dma and dma2--DMA channels (DMA2 may be 0)
14
15On some cards, the board attempts to do non-PnP setup, and fails. If you
16have problems, use Linux' PnP facilities.
17
18To get MIDI facilities add
19
20 insmod opl3 io=*
21
22where "io" is the I/O address of the OPL3 synthesizer. This will be shown
23in /proc/sys/pnp and is normally 0x388.
diff --git a/Documentation/sound/oss/ESS b/Documentation/sound/oss/ESS
new file mode 100644
index 000000000000..bba93b4d2def
--- /dev/null
+++ b/Documentation/sound/oss/ESS
@@ -0,0 +1,34 @@
1Documentation for the ESS AudioDrive chips
2
3In 2.4 kernels the SoundBlaster driver not only tries to detect an ESS chip, it
4tries to detect the type of ESS chip too. The correct detection of the chip
5doesn't always succeed however, so unless you use the kernel isapnp facilities
6(and you chip is pnp capable) the default behaviour is 2.0 behaviour which
7means: only detect ES688 and ES1688.
8
9All ESS chips now have a recording level setting. This is a need-to-have for
10people who want to use their ESS for recording sound.
11
12Every chip that's detected as a later-than-es1688 chip has a 6 bits logarithmic
13master volume control.
14
15Every chip that's detected as a ES1887 now has Full Duplex support. Made a
16little testprogram that shows that is works, haven't seen a real program that
17needs this however.
18
19For ESS chips an additional parameter "esstype" can be specified. This controls
20the (auto) detection of the ESS chips. It can have 3 kinds of values:
21
22-1 Act like 2.0 kernels: only detect ES688 or ES1688.
230 Try to auto-detect the chip (may fail for ES1688)
24688 The chip will be treated as ES688
251688 ,, ,, ,, ,, ,, ,, ES1688
261868 ,, ,, ,, ,, ,, ,, ES1868
271869 ,, ,, ,, ,, ,, ,, ES1869
281788 ,, ,, ,, ,, ,, ,, ES1788
291887 ,, ,, ,, ,, ,, ,, ES1887
301888 ,, ,, ,, ,, ,, ,, ES1888
31
32Because Full Duplex is supported for ES1887 you can specify a second DMA
33channel by specifying module parameter dma16. It can be one of: 0, 1, 3 or 5.
34
diff --git a/Documentation/sound/oss/ESS1868 b/Documentation/sound/oss/ESS1868
new file mode 100644
index 000000000000..55e922f21bc0
--- /dev/null
+++ b/Documentation/sound/oss/ESS1868
@@ -0,0 +1,55 @@
1Documentation for the ESS1868F AudioDrive PnP sound card
2
3The ESS1868 sound card is a PnP ESS1688-compatible 16-bit sound card.
4
5It should be automatically detected by the Linux Kernel isapnp support when you
6load the sb.o module. Otherwise you should take care of:
7
8 * The ESS1868 does not allow use of a 16-bit DMA, thus DMA 0, 1, 2, and 3
9 may only be used.
10
11 * isapnptools version 1.14 does work with ESS1868. Earlier versions might
12 not.
13
14 * Sound support MUST be compiled as MODULES, not statically linked
15 into the kernel.
16
17
18NOTE: this is only needed when not using the kernel isapnp support!
19
20For configuring the sound card's I/O addresses, IRQ and DMA, here is a
21sample copy of the isapnp.conf directives regarding the ESS1868:
22
23(CONFIGURE ESS1868/-1 (LD 1
24(IO 0 (BASE 0x0220))
25(IO 1 (BASE 0x0388))
26(IO 2 (BASE 0x0330))
27(DMA 0 (CHANNEL 1))
28(INT 0 (IRQ 5 (MODE +E)))
29(ACT Y)
30))
31
32(for a full working isapnp.conf file, remember the
33(ISOLATE)
34(IDENTIFY *)
35at the beginning and the
36(WAITFORKEY)
37at the end.)
38
39In this setup, the main card I/O is 0x0220, FM synthesizer is 0x0388, and
40the MPU-401 MIDI port is located at 0x0330. IRQ is IRQ 5, DMA is channel 1.
41
42After configuring the sound card via isapnp, to use the card you must load
43the sound modules with the proper I/O information. Here is my setup:
44
45# ESS1868F AudioDrive initialization
46
47/sbin/modprobe sound
48/sbin/insmod uart401
49/sbin/insmod sb io=0x220 irq=5 dma=1 dma16=-1
50/sbin/insmod mpu401 io=0x330
51/sbin/insmod opl3 io=0x388
52/sbin/insmod v_midi
53
54opl3 is the FM synthesizer
55/sbin/insmod opl3 io=0x388
diff --git a/Documentation/sound/oss/INSTALL.awe b/Documentation/sound/oss/INSTALL.awe
new file mode 100644
index 000000000000..310f42ca1e83
--- /dev/null
+++ b/Documentation/sound/oss/INSTALL.awe
@@ -0,0 +1,134 @@
1================================================================
2 INSTALLATION OF AWE32 SOUND DRIVER FOR LINUX
3 Takashi Iwai <iwai@ww.uni-erlangen.de>
4================================================================
5
6----------------------------------------------------------------
7* Attention to SB-PnP Card Users
8
9If you're using PnP cards, the initialization of PnP is required
10before loading this driver. You have now three options:
11 1. Use isapnptools.
12 2. Use in-kernel isapnp support.
13 3. Initialize PnP on DOS/Windows, then boot linux by loadlin.
14In this document, only the case 1 case is treated.
15
16----------------------------------------------------------------
17* Installation on Red Hat 5.0 Sound Driver
18
19Please use install-rh.sh under RedHat5.0 directory.
20DO NOT USE install.sh below.
21See INSTALL.RH for more details.
22
23----------------------------------------------------------------
24* Installation/Update by Shell Script
25
26 1. Become root
27
28 % su
29
30 2. If you have never configured the kernel tree yet, run make config
31 once (to make dependencies and symlinks).
32
33 # cd /usr/src/linux
34 # make xconfig
35
36 3. Run install.sh script
37
38 # sh ./install.sh
39
40 4. Configure your kernel
41
42 (for Linux 2.[01].x user)
43 # cd /usr/src/linux
44 # make xconfig (or make menuconfig)
45
46 (for Linux 1.2.x user)
47 # cd /usr/src/linux
48 # make config
49
50 Answer YES to both "lowlevel drivers" and "AWE32 wave synth" items
51 in Sound menu. ("lowlevel drivers" will appear only in 2.x
52 kernel.)
53
54 5. Make your kernel (and modules), and install them as usual.
55
56 5a. make kernel image
57 # make zImage
58
59 5b. make modules and install them
60 # make modules && make modules_install
61
62 5c. If you're using lilo, copy the kernel image and run lilo.
63 Otherwise, copy the kernel image to suitable directory or
64 media for your system.
65
66 6. Reboot the kernel if necessary.
67 - If you updated only the modules, you don't have to reboot
68 the system. Just remove the old sound modules here.
69 in
70 # rmmod sound.o (linux-2.0 or OSS/Free)
71 # rmmod awe_wave.o (linux-2.1)
72
73 7. If your AWE card is a PnP and not initialized yet, you'll have to
74 do it by isapnp tools. Otherwise, skip to 8.
75
76 This section described only a brief explanation. For more
77 details, please see the AWE64-Mini-HOWTO or isapnp tools FAQ.
78
79 7a. If you have no isapnp.conf file, generate it by pnpdump.
80 Otherwise, skip to 7d.
81 # pnpdump > /etc/isapnp.conf
82
83 7b. Edit isapnp.conf file. Comment out the appropriate
84 lines containing desirable I/O ports, DMA and IRQs.
85 Don't forget to enable (ACT Y) line.
86
87 7c. Add two i/o ports (0xA20 and 0xE20) in WaveTable part.
88 ex)
89 (CONFIGURE CTL0048/58128 (LD 2
90 # ANSI string -->WaveTable<--
91 (IO 0 (BASE 0x0620))
92 (IO 1 (BASE 0x0A20))
93 (IO 2 (BASE 0x0E20))
94 (ACT Y)
95 ))
96
97 7d. Load the config file.
98 CAUTION: This will reset all PnP cards!
99
100 # isapnp /etc/isapnp.conf
101
102 8. Load the sound module (if you configured it as a module):
103
104 for 2.0 kernel or OSS/Free monolithic module:
105
106 # modprobe sound.o
107
108 for 2.1 kernel:
109
110 # modprobe sound
111 # insmod uart401
112 # insmod sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
113 (These values depend on your settings.)
114 # insmod awe_wave
115 (Be sure to load awe_wave after sb!)
116
117 See Documentation/sound/oss/AWE32 for
118 more details.
119
120 9. (only for obsolete systems) If you don't have /dev/sequencer
121 device file, make it according to Readme.linux file on
122 /usr/src/linux/drivers/sound. (Run a shell script included in
123 that file). <-- This file no longer exists in the recent kernels!
124
125 10. OK, load your own soundfont file, and enjoy MIDI!
126
127 % sfxload synthgm.sbk
128 % drvmidi foo.mid
129
130 11. For more advanced use (eg. dynamic loading, virtual bank and
131 etc.), please read the awedrv FAQ or the instructions in awesfx
132 and awemidi packages.
133
134Good luck!
diff --git a/Documentation/sound/oss/Introduction b/Documentation/sound/oss/Introduction
new file mode 100644
index 000000000000..15d4fb975ac0
--- /dev/null
+++ b/Documentation/sound/oss/Introduction
@@ -0,0 +1,459 @@
1Introduction Notes on Modular Sound Drivers and Soundcore
2Wade Hampton
32/14/2001
4
5Purpose:
6========
7This document provides some general notes on the modular
8sound drivers and their configuration, along with the
9support modules sound.o and soundcore.o.
10
11Note, some of this probably should be added to the Sound-HOWTO!
12
13Note, soundlow.o was present with 2.2 kernels but is not
14required for 2.4.x kernels. References have been removed
15to this.
16
17
18Copying:
19========
20none
21
22
23History:
24========
250.1.0 11/20/1998 First version, draft
261.0.0 11/1998 Alan Cox changes, incorporation in 2.2.0
27 as Documentation/sound/oss/Introduction
281.1.0 6/30/1999 Second version, added notes on making the drivers,
29 added info on multiple sound cards of similar types,]
30 added more diagnostics info, added info about esd.
31 added info on OSS and ALSA.
321.1.1 19991031 Added notes on sound-slot- and sound-service.
33 (Alan Cox)
341.1.2 20000920 Modified for Kernel 2.4 (Christoph Hellwig)
351.1.3 20010214 Minor notes and corrections (Wade Hampton)
36 Added examples of sound-slot-0, etc.
37
38
39Modular Sound Drivers:
40======================
41
42Thanks to the GREAT work by Alan Cox (alan@lxorguk.ukuu.org.uk),
43
44[And Oleg Drokin, Thomas Sailer, Andrew Veliath and more than a few
45 others - not to mention Hannu's original code being designed well
46 enough to cope with that kind of chopping up](Alan)
47
48the standard Linux kernels support a modular sound driver. From
49Alan's comments in linux/drivers/sound/README.FIRST:
50
51 The modular sound driver patches were funded by Red Hat Software
52 (www.redhat.com). The sound driver here is thus a modified version of
53 Hannu's code. Please bear that in mind when considering the appropriate
54 forums for bug reporting.
55
56The modular sound drivers may be loaded via insmod or modprobe.
57To support all the various sound modules, there are two general
58support modules that must be loaded first:
59
60 soundcore.o: Top level handler for the sound system, provides
61 a set of functions for registration of devices
62 by type.
63
64 sound.o: Common sound functions required by all modules.
65
66For the specific sound modules (e.g., sb.o for the Soundblaster),
67read the documentation on that module to determine what options
68are available, for example IRQ, address, DMA.
69
70Warning, the options for different cards sometime use different names
71for the same or a similar feature (dma1= versus dma16=). As a last
72resort, inspect the code (search for MODULE_PARM).
73
74Notes:
75
761. There is a new OpenSource sound driver called ALSA which is
77 currently under development: http://www.alsa-project.org/
78 The ALSA drivers support some newer hardware that may not
79 be supported by this sound driver and also provide some
80 additional features.
81
822. The commercial OSS driver may be obtained from the site:
83 http://www/opensound.com. This may be used for cards that
84 are unsupported by the kernel driver, or may be used
85 by other operating systems.
86
873. The enlightenment sound daemon may be used for playing
88 multiple sounds at the same time via a single card, eliminating
89 some of the requirements for multiple sound card systems. For
90 more information, see: http://www.tux.org/~ricdude/EsounD.html
91 The "esd" program may be used with the real-player and mpeg
92 players like mpg123 and x11amp. The newer real-player
93 and some games even include built-in support for ESD!
94
95
96Building the Modules:
97=====================
98
99This document does not provide full details on building the
100kernel, etc. The notes below apply only to making the kernel
101sound modules. If this conflicts with the kernel's README,
102the README takes precedence.
103
1041. To make the kernel sound modules, cd to your /usr/src/linux
105 directory (typically) and type make config, make menuconfig,
106 or make xconfig (to start the command line, dialog, or x-based
107 configuration tool).
108
1092. Select the Sound option and a dialog will be displayed.
110
1113. Select M (module) for "Sound card support".
112
1134. Select your sound driver(s) as a module. For ProAudio, Sound
114 Blaster, etc., select M (module) for OSS sound modules.
115 [thanks to Marvin Stodolsky <stodolsk@erols.com>]A
116
1175. Make the kernel (e.g., make bzImage), and install the kernel.
118
1196. Make the modules and install them (make modules; make modules_install).
120
121Note, for 2.5.x kernels, make sure you have the newer module-init-tools
122installed or modules will not be loaded properly. 2.5.x requires an
123updated module-init-tools.
124
125
126Plug and Play (PnP:
127===================
128
129If the sound card is an ISA PnP card, isapnp may be used
130to configure the card. See the file isapnp.txt in the
131directory one level up (e.g., /usr/src/linux/Documentation).
132
133Also the 2.4.x kernels provide PnP capabilities, see the
134file NEWS in this directory.
135
136PCI sound cards are highly recommended, as they are far
137easier to configure and from what I have read, they use
138less resources and are more CPU efficient.
139
140
141INSMOD:
142=======
143
144If loading via insmod, the common modules must be loaded in the
145order below BEFORE loading the other sound modules. The card-specific
146modules may then be loaded (most require parameters). For example,
147I use the following via a shell script to load my SoundBlaster:
148
149SB_BASE=0x240
150SB_IRQ=9
151SB_DMA=3
152SB_DMA2=5
153SB_MPU=0x300
154#
155echo Starting sound
156/sbin/insmod soundcore
157/sbin/insmod sound
158#
159echo Starting sound blaster....
160/sbin/insmod uart401
161/sbin/insmod sb io=$SB_BASE irq=$SB_IRQ dma=$SB_DMA dma16=$SB_DMA2 mpu_io=$SB_MP
162
163When using sound as a module, I typically put these commands
164in a file such as /root/soundon.sh.
165
166
167MODPROBE:
168=========
169
170If loading via modprobe, these common files are automatically loaded
171when requested by modprobe. For example, my /etc/modprobe.conf contains:
172
173alias sound sb
174options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300
175
176All you need to do to load the module is:
177
178 /sbin/modprobe sb
179
180
181Sound Status:
182=============
183
184The status of sound may be read/checked by:
185 cat (anyfile).au >/dev/audio
186
187[WWH: This may not work properly for SoundBlaster PCI 128 cards
188such as the es1370/1 (see the es1370/1 files in this directory)
189as they do not automatically support uLaw on /dev/audio.]
190
191The status of the modules and which modules depend on
192which other modules may be checked by:
193 /sbin/lsmod
194
195/sbin/lsmod should show something like the following:
196 sb 26280 0
197 uart401 5640 0 [sb]
198 sound 57112 0 [sb uart401]
199 soundcore 1968 8 [sb sound]
200
201
202Removing Sound:
203===============
204
205Sound may be removed by using /sbin/rmmod in the reverse order
206in which you load the modules. Note, if a program has a sound device
207open (e.g., xmixer), that module (and the modules on which it
208depends) may not be unloaded.
209
210For example, I use the following to remove my Soundblaster (rmmod
211in the reverse order in which I loaded the modules):
212
213/sbin/rmmod sb
214/sbin/rmmod uart401
215/sbin/rmmod sound
216/sbin/rmmod soundcore
217
218When using sound as a module, I typically put these commands
219in a script such as /root/soundoff.sh.
220
221
222Removing Sound for use with OSS:
223================================
224
225If you get really stuck or have a card that the kernel modules
226will not support, you can get a commercial sound driver from
227http://www.opensound.com. Before loading the commercial sound
228driver, you should do the following:
229
2301. remove sound modules (detailed above)
2312. remove the sound modules from /etc/modprobe.conf
2323. move the sound modules from /lib/modules/<kernel>/misc
233 (for example, I make a /lib/modules/<kernel>/misc/tmp
234 directory and copy the sound module files to that
235 directory).
236
237
238Multiple Sound Cards:
239=====================
240
241The sound drivers will support multiple sound cards and there
242are some great applications like multitrack that support them.
243Typically, you need two sound cards of different types. Note, this
244uses more precious interrupts and DMA channels and sometimes
245can be a configuration nightmare. I have heard reports of 3-4
246sound cards (typically I only use 2). You can sometimes use
247multiple PCI sound cards of the same type.
248
249On my machine I have two sound cards (cs4232 and Soundblaster Vibra
25016). By loading sound as modules, I can control which is the first
251sound device (/dev/dsp, /dev/audio, /dev/mixer) and which is
252the second. Normally, the cs4232 (Dell sound on the motherboard)
253would be the first sound device, but I prefer the Soundblaster.
254All you have to do is to load the one you want as /dev/dsp
255first (in my case "sb") and then load the other one
256(in my case "cs4232").
257
258If you have two cards of the same type that are jumpered
259cards or different PnP revisions, you may load the same
260module twice. For example, I have a SoundBlaster vibra 16
261and an older SoundBlaster 16 (jumpers). To load the module
262twice, you need to do the following:
263
2641. Copy the sound modules to a new name. For example
265 sb.o could be copied (or symlinked) to sb1.o for the
266 second SoundBlaster.
267
2682. Make a second entry in /etc/modprobe.conf, for example,
269 sound1 or sb1. This second entry should refer to the
270 new module names for example sb1, and should include
271 the I/O, etc. for the second sound card.
272
2733. Update your soundon.sh script, etc.
274
275Warning: I have never been able to get two PnP sound cards of the
276same type to load at the same time. I have tried this several times
277with the Soundblaster Vibra 16 cards. OSS has indicated that this
278is a PnP problem.... If anyone has any luck doing this, please
279send me an E-MAIL. PCI sound cards should not have this problem.a
280Since this was originally release, I have received a couple of
281mails from people who have accomplished this!
282
283NOTE: In Linux 2.4 the Sound Blaster driver (and only this one yet)
284supports multiple cards with one module by default.
285Read the file 'Soundblaster' in this directory for details.
286
287
288Sound Problems:
289===============
290
291First RTFM (including the troubleshooting section
292in the Sound-HOWTO).
293
2941) If you are having problems loading the modules (for
295 example, if you get device conflict errors) try the
296 following:
297
298 A) If you have Win95 or NT on the same computer,
299 write down what addresses, IRQ, and DMA channels
300 those were using for the same hardware. You probably
301 can use these addresses, IRQs, and DMA channels.
302 You should really do this BEFORE attempting to get
303 sound working!
304
305 B) Check (cat) /proc/interrupts, /proc/ioports,
306 and /proc/dma. Are you trying to use an address,
307 IRQ or DMA port that another device is using?
308
309 C) Check (cat) /proc/isapnp
310
311 D) Inspect your /var/log/messages file. Often that will
312 indicate what IRQ or IO port could not be obtained.
313
314 E) Try another port or IRQ. Note this may involve
315 using the PnP tools to move the sound card to
316 another location. Sometimes this is the only way
317 and it is more or less trial and error.
318
3192) If you get motor-boating (the same sound or part of a
320 sound clip repeated), you probably have either an IRQ
321 or DMA conflict. Move the card to another IRQ or DMA
322 port. This has happened to me when playing long files
323 when I had an IRQ conflict.
324
3253. If you get dropouts or pauses when playing high sample
326 rate files such as using mpg123 or x11amp/xmms, you may
327 have too slow of a CPU and may have to use the options to
328 play the files at 1/2 speed. For example, you may use
329 the -2 or -4 option on mpg123. You may also get this
330 when trying to play mpeg files stored on a CD-ROM
331 (my Toshiba T8000 PII/366 sometimes has this problem).
332
3334. If you get "cannot access device" errors, your /dev/dsp
334 files, etc. may be set to owner root, mode 600. You
335 may have to use the command:
336 chmod 666 /dev/dsp /dev/mixer /dev/audio
337
3385. If you get "device busy" errors, another program has the
339 sound device open. For example, if using the Enlightenment
340 sound daemon "esd", the "esd" program has the sound device.
341 If using "esd", please RTFM the docs on ESD. For example,
342 esddsp <program> may be used to play files via a non-esd
343 aware program.
344
3456) Ask for help on the sound list or send E-MAIL to the
346 sound driver author/maintainer.
347
3487) Turn on debug in drivers/sound/sound_config.h (DEB, DDB, MDB).
349
3508) If the system reports insufficient DMA memory then you may want to
351 load sound with the "dmabufs=1" option. Or in /etc/conf.modules add
352
353 preinstall sound dmabufs=1
354
355 This makes the sound system allocate its buffers and hang onto them.
356
357 You may also set persistent DMA when building a 2.4.x kernel.
358
359
360Configuring Sound:
361==================
362
363There are several ways of configuring your sound:
364
3651) On the kernel command line (when using the sound driver(s)
366 compiled in the kernel). Check the driver source and
367 documentation for details.
368
3692) On the command line when using insmod or in a bash script
370 using command line calls to load sound.
371
3723) In /etc/modprobe.conf when using modprobe.
373
3744) Via Red Hat's GPL'd /usr/sbin/sndconfig program (text based).
375
3765) Via the OSS soundconf program (with the commercial version
377 of the OSS driver.
378
3796) By just loading the module and let isapnp do everything relevant
380 for you. This works only with a few drivers yet and - of course -
381 only with isapnp hardware.
382
383And I am sure, several other ways.
384
385Anyone want to write a linuxconf module for configuring sound?
386
387
388Module Loading:
389===============
390
391When a sound card is first referenced and sound is modular, the sound system
392will ask for the sound devices to be loaded. Initially it requests that
393the driver for the sound system is loaded. It then will ask for
394sound-slot-0, where 0 is the first sound card. (sound-slot-1 the second and
395so on). Thus you can do
396
397alias sound-slot-0 sb
398
399To load a soundblaster at this point. If the slot loading does not provide
400the desired device - for example a soundblaster does not directly provide
401a midi synth in all cases then it will request "sound-service-0-n" where n
402is
403
404 0 Mixer
405
406 2 MIDI
407
408 3, 4 DSP audio
409
410
411For example, I use the following to load my Soundblaster PCI 128
412(ES 1371) card first, followed by my SoundBlaster Vibra 16 card,
413then by my TV card:
414
415# Load the Soundblaster PCI 128 as /dev/dsp, /dev/dsp1, /dev/mixer
416alias sound-slot-0 es1371
417
418# Load the Soundblaster Vibra 16 as /dev/dsp2, /dev/mixer1
419alias sound-slot-1 sb
420options sb io=0x240 irq=5 dma=1 dma16=5 mpu_io=0x330
421
422# Load the BTTV (TV card) as /dev/mixer2
423alias sound-slot-2 bttv
424alias sound-service-2-0 tvmixer
425
426pre-install bttv modprobe tuner ; modprobe tvmixer
427pre-install tvmixer modprobe msp3400; modprobe tvaudio
428options tuner debug=0 type=8
429options bttv card=0 radio=0 pll=0
430
431
432For More Information (RTFM):
433============================
4341) Information on kernel modules: manual pages for insmod and modprobe.
435
4362) Information on PnP, RTFM manual pages for isapnp.
437
4383) Sound-HOWTO and Sound-Playing-HOWTO.
439
4404) OSS's WWW site at http://www.opensound.com.
441
4425) All the files in Documentation/sound.
443
4446) The comments and code in linux/drivers/sound.
445
4467) The sndconfig and rhsound documentation from Red Hat.
447
4488) The Linux-sound mailing list: sound-list@redhat.com.
449
4509) Enlightenment documentation (for info on esd)
451 http://www.tux.org/~ricdude/EsounD.html.
452
45310) ALSA home page: http://www.alsa-project.org/
454
455
456Contact Information:
457====================
458Wade Hampton: (whampton@staffnet.com)
459
diff --git a/Documentation/sound/oss/MAD16 b/Documentation/sound/oss/MAD16
new file mode 100644
index 000000000000..865dbd848742
--- /dev/null
+++ b/Documentation/sound/oss/MAD16
@@ -0,0 +1,56 @@
1(This recipe has been edited to update the configuration symbols,
2 and change over to modprobe.conf for 2.6)
3
4From: Shaw Carruthers <shaw@shawc.demon.co.uk>
5
6I have been using mad16 sound for some time now with no problems, current
7kernel 2.1.89
8
9lsmod shows:
10
11mad16 5176 0
12sb 22044 0 [mad16]
13uart401 5576 0 [mad16 sb]
14ad1848 14176 1 [mad16]
15sound 61928 0 [mad16 sb uart401 ad1848]
16
17.config has:
18
19CONFIG_SOUND=m
20CONFIG_SOUND_ADLIB=m
21CONFIG_SOUND_MAD16=m
22CONFIG_SOUND_YM3812=m
23
24modprobe.conf has:
25
26alias char-major-14-* mad16
27options sb mad16=1
28options mad16 io=0x530 irq=7 dma=0 dma16=1 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
29
30
31To get the built in mixer to work this needs to be:
32
33options adlib_card io=0x388 # FM synthesizer
34options sb mad16=1
35options mad16 io=0x530 irq=7 dma=0 dma16=1 mpu_io=816 mpu_irq=5 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
36
37The addition of the "mpu_io=816 mpu_irq=5" to the mad16 options line is
38
39------------------------------------------------------------------------
40The mad16 module in addition supports the following options:
41
42option: meaning: default:
43joystick=0,1 disabled, enabled disabled
44cdtype=0x00,0x02,0x04, disabled, Sony CDU31A, disabled
45 0x06,0x08,0x0a Mitsumi, Panasonic,
46 Secondary IDE, Primary IDE
47cdport=0x340,0x320, 0x340
48 0x330,0x360
49cdirq=0,3,5,7,9,10,11 disabled, IRQ3, ... disabled
50cddma=0,5,6,7 disabled, DMA5, ... DMA5 for Mitsumi or IDE
51cddma=0,1,2,3 disabled, DMA1, ... DMA3 for Sony or Panasonic
52opl4=0,1 OPL3, OPL4 OPL3
53
54for more details see linux/drivers/sound/mad16.c
55
56Rui Sousa
diff --git a/Documentation/sound/oss/Maestro b/Documentation/sound/oss/Maestro
new file mode 100644
index 000000000000..4a80eb3f8e00
--- /dev/null
+++ b/Documentation/sound/oss/Maestro
@@ -0,0 +1,123 @@
1 An OSS/Lite Driver for the ESS Maestro family of sound cards
2
3 Zach Brown, December 1999
4
5Driver Status and Availability
6------------------------------
7
8The most recent version of this driver will hopefully always be available at
9 http://www.zabbo.net/maestro/
10
11I will try and maintain the most recent stable version of the driver
12in both the stable and development kernel lines.
13
14ESS Maestro Chip Family
15-----------------------
16
17There are 3 main variants of the ESS Maestro PCI sound chip. The first
18is the Maestro 1. It was originally produced by Platform Tech as the
19'AGOGO'. It can be recognized by Platform Tech's PCI ID 0x1285 with
200x0100 as the device ID. It was put on some sound boards and a few laptops.
21ESS bought the design and cleaned it up as the Maestro 2. This starts
22their marking with the ESS vendor ID 0x125D and the 'year' device IDs.
23The Maestro 2 claims 0x1968 while the Maestro 2e has 0x1978.
24
25The various families of Maestro are mostly identical as far as this
26driver is concerned. It doesn't touch the DSP parts that differ (though
27it could for FM synthesis).
28
29Driver OSS Behavior
30--------------------
31
32This OSS driver exports /dev/mixer and /dev/dsp to applications, which
33mostly adhere to the OSS spec. This driver doesn't register itself
34with /dev/sndstat, so don't expect information to appear there.
35
36The /dev/dsp device exported behaves almost as expected. Playback is
37supported in all the various lovely formats. 8/16bit stereo/mono from
388khz to 48khz, and mmap()ing for playback behaves. Capture/recording
39is limited due to oddities with the Maestro hardware. One can only
40record in 16bit stereo. For recording the maestro uses non interleaved
41stereo buffers so that mmap()ing the incoming data does not result in
42a ring buffer of LRLR data. mmap()ing of the read buffers is therefore
43disallowed until this can be cleaned up.
44
45/dev/mixer is an interface to the AC'97 codec on the Maestro. It is
46worth noting that there are a variety of AC'97s that can be wired to
47the Maestro. Which is used is entirely up to the hardware implementor.
48This should only be visible to the user by the presence, or lack, of
49'Bass' and 'Treble' sliders in the mixer. Not all AC'97s have them.
50
51The driver doesn't support MIDI or FM playback at the moment. Typically
52the Maestro is wired to an MPU MIDI chip, but some hardware implementations
53don't. We need to assemble a white list of hardware implementations that
54have MIDI wired properly before we can claim to support it safely.
55
56Compiling and Installing
57------------------------
58
59With the drivers inclusion into the kernel, compiling and installing
60is the same as most OSS/Lite modular sound drivers. Compilation
61of the driver is enabled through the CONFIG_SOUND_MAESTRO variable
62in the config system.
63
64It may be modular or statically linked. If it is modular it should be
65installed with the rest of the modules for the kernel on the system.
66Typically this will be in /lib/modules/ somewhere. 'alias sound maestro'
67should also be added to your module configs (typically /etc/conf.modules)
68if you're using modular OSS/Lite sound and want to default to using a
69maestro chip.
70
71As this is a PCI device, the module does not need to be informed of
72any IO or IRQ resources it should use, it devines these from the
73system. Sometimes, on sucky PCs, the BIOS fails to allocated resources
74for the maestro. This will result in a message like:
75 maestro: PCI subsystem reports IRQ 0, this might not be correct.
76from the kernel. Should this happen the sound chip most likely will
77not operate correctly. To solve this one has to dig through their BIOS
78(typically entered by hitting a hot key at boot time) and figure out
79what magic needs to happen so that the BIOS will reward the maestro with
80an IRQ. This operation is incredibly system specific, so you're on your
81own. Sometimes the magic lies in 'PNP Capable Operating System' settings.
82
83There are very few options to the driver. One is 'debug' which will
84tell the driver to print minimal debugging information as it runs. This
85can be collected with 'dmesg' or through the klogd daemon.
86
87The other, more interesting option, is 'dsps_order'. Typically at
88install time the driver will only register one available /dev/dsp device
89for its use. The 'dsps_order' module parameter allows for more devices
90to be allocated, as a power of two. Up to 4 devices can be registered
91( dsps_order=2 ). These devices act as fully distinct units and use
92separate channels in the maestro.
93
94Power Management
95----------------
96
97As of version 0.14, this driver has a minimal understanding of PCI
98Power Management. If it finds a valid power management capability
99on the PCI device it will attempt to use the power management
100functions of the maestro. It will only do this on Maestro 2Es and
101only on machines that are known to function well. You can
102force the use of power management by setting the 'use_pm' module
103option to 1, or can disable it entirely by setting it to 0.
104
105When using power management, the driver does a few things
106differently. It will keep the chip in a lower power mode
107when the module is inserted but /dev/dsp is not open. This
108allows the mixer to function but turns off the clocks
109on other parts of the chip. When /dev/dsp is opened the chip
110is brought into full power mode, and brought back down
111when it is closed. It also powers down the chip entirely
112when the module is removed or the machine is shutdown. This
113can have nonobvious consequences. CD audio may not work
114after a power managing driver is removed. Also, software that
115doesn't understand power management may not be able to talk
116to the powered down chip until the machine goes through a hard
117reboot to bring it back.
118
119.. more details ..
120------------------
121
122drivers/sound/maestro.c contains comments that hopefully explain
123the maestro implementation.
diff --git a/Documentation/sound/oss/Maestro3 b/Documentation/sound/oss/Maestro3
new file mode 100644
index 000000000000..a113718e8034
--- /dev/null
+++ b/Documentation/sound/oss/Maestro3
@@ -0,0 +1,92 @@
1 An OSS/Lite Driver for the ESS Maestro3 family of sound chips
2
3 Zach Brown, January 2001
4
5Driver Status and Availability
6------------------------------
7
8The most recent version of this driver will hopefully always be available at
9 http://www.zabbo.net/maestro3/
10
11I will try and maintain the most recent stable version of the driver
12in both the stable and development kernel lines.
13
14Historically I've sucked pretty hard at actually doing that, however.
15
16ESS Maestro3 Chip Family
17-----------------------
18
19The 'Maestro3' is much like the Maestro2 chip. The noted improvement
20is the removal of the silicon in the '2' that did PCM mixing. All that
21work is now done through a custom DSP called the ASSP, the Asynchronus
22Specific Signal Processor.
23
24The 'Allegro' is a baby version of the Maestro3. I'm not entirely clear
25on the extent of the differences, but the driver supports them both :)
26
27The 'Allegro' shows up as PCI ID 0x1988 and the Maestro3 as 0x1998,
28both under ESS's vendor ID of 0x125D. The Maestro3 can also show up as
290x199a when hardware strapping is used.
30
31The chip can also act as a multi function device. The modem IDs follow
32the audio multimedia device IDs. (so the modem part of an Allegro shows
33up as 0x1989)
34
35Driver OSS Behavior
36--------------------
37
38This OSS driver exports /dev/mixer and /dev/dsp to applications, which
39mostly adhere to the OSS spec. This driver doesn't register itself
40with /dev/sndstat, so don't expect information to appear there.
41
42The /dev/dsp device exported behaves as expected. Playback is
43supported in all the various lovely formats. 8/16bit stereo/mono from
448khz to 48khz, with both read()/write(), and mmap().
45
46/dev/mixer is an interface to the AC'97 codec on the Maestro3. It is
47worth noting that there are a variety of AC'97s that can be wired to
48the Maestro3. Which is used is entirely up to the hardware implementor.
49This should only be visible to the user by the presence, or lack, of
50'Bass' and 'Treble' sliders in the mixer. Not all AC'97s have them.
51The Allegro has an onchip AC'97.
52
53The driver doesn't support MIDI or FM playback at the moment.
54
55Compiling and Installing
56------------------------
57
58With the drivers inclusion into the kernel, compiling and installing
59is the same as most OSS/Lite modular sound drivers. Compilation
60of the driver is enabled through the CONFIG_SOUND_MAESTRO3 variable
61in the config system.
62
63It may be modular or statically linked. If it is modular it should be
64installed with the rest of the modules for the kernel on the system.
65Typically this will be in /lib/modules/ somewhere. 'alias sound-slot-0
66maestro3' should also be added to your module configs (typically
67/etc/modprobe.conf) if you're using modular OSS/Lite sound and want to
68default to using a maestro3 chip.
69
70There are very few options to the driver. One is 'debug' which will
71tell the driver to print minimal debugging information as it runs. This
72can be collected with 'dmesg' or through the klogd daemon.
73
74One is 'external_amp', which tells the driver to attempt to enable
75an external amplifier. This defaults to '1', you can tell the driver
76not to bother enabling such an amplifier by setting it to '0'.
77
78And the last is 'gpio_pin', which tells the driver which GPIO pin number
79the external amp uses (0-15), The Allegro uses 8 by default, all others 1.
80If everything loads correctly and seems to be working but you get no sound,
81try tweaking this value.
82
83Systems known to need a different value
84 Panasonic ToughBook CF-72: gpio_pin=13
85
86Power Management
87----------------
88
89This driver has a minimal understanding of PCI Power Management. It will
90try and power down the chip when the system is suspended, and power
91it up with it is resumed. It will also try and power down the chip
92when the machine is shut down.
diff --git a/Documentation/sound/oss/MultiSound b/Documentation/sound/oss/MultiSound
new file mode 100644
index 000000000000..e4a18bb7f73a
--- /dev/null
+++ b/Documentation/sound/oss/MultiSound
@@ -0,0 +1,1137 @@
1#! /bin/sh
2#
3# Turtle Beach MultiSound Driver Notes
4# -- Andrew Veliath <andrewtv@usa.net>
5#
6# Last update: September 10, 1998
7# Corresponding msnd driver: 0.8.3
8#
9# ** This file is a README (top part) and shell archive (bottom part).
10# The corresponding archived utility sources can be unpacked by
11# running `sh MultiSound' (the utilities are only needed for the
12# Pinnacle and Fiji cards). **
13#
14#
15# -=-=- Getting Firmware -=-=-
16# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17#
18# See the section `Obtaining and Creating Firmware Files' in this
19# document for instructions on obtaining the necessary firmware
20# files.
21#
22#
23# Supported Features
24# ~~~~~~~~~~~~~~~~~~
25#
26# Currently, full-duplex digital audio (/dev/dsp only, /dev/audio is
27# not currently available) and mixer functionality (/dev/mixer) are
28# supported (memory mapped digital audio is not yet supported).
29# Digital transfers and monitoring can be done as well if you have
30# the digital daughterboard (see the section on using the S/PDIF port
31# for more information).
32#
33# Support for the Turtle Beach MultiSound Hurricane architecture is
34# composed of the following modules (these can also operate compiled
35# into the kernel):
36#
37# msnd - MultiSound base (requires soundcore)
38#
39# msnd_classic - Base audio/mixer support for Classic, Monetery and
40# Tahiti cards
41#
42# msnd_pinnacle - Base audio/mixer support for Pinnacle and Fiji cards
43#
44#
45# Important Notes - Read Before Using
46# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47#
48# The firmware files are not included (may change in future). You
49# must obtain these images from Turtle Beach (they are included in
50# the MultiSound Development Kits), and place them in /etc/sound for
51# example, and give the full paths in the Linux configuration. If
52# you are compiling in support for the MultiSound driver rather than
53# using it as a module, these firmware files must be accessible
54# during kernel compilation.
55#
56# Please note these files must be binary files, not assembler. See
57# the section later in this document for instructions to obtain these
58# files.
59#
60#
61# Configuring Card Resources
62# ~~~~~~~~~~~~~~~~~~~~~~~~~~
63#
64# ** This section is very important, as your card may not work at all
65# or your machine may crash if you do not do this correctly. **
66#
67# * Classic/Monterey/Tahiti
68#
69# These cards are configured through the driver msnd_classic. You must
70# know the io port, then the driver will select the irq and memory resources
71# on the card. It is up to you to know if these are free locations or now,
72# a conflict can lock the machine up.
73#
74# * Pinnacle/Fiji
75#
76# The Pinnacle and Fiji cards have an extra config port, either
77# 0x250, 0x260 or 0x270. This port can be disabled to have the card
78# configured strictly through PnP, however you lose the ability to
79# access the IDE controller and joystick devices on this card when
80# using PnP. The included pinnaclecfg program in this shell archive
81# can be used to configure the card in non-PnP mode, and in PnP mode
82# you can use isapnptools. These are described briefly here.
83#
84# pinnaclecfg is not required; you can use the msnd_pinnacle module
85# to fully configure the card as well. However, pinnaclecfg can be
86# used to change the resource values of a particular device after the
87# msnd_pinnacle module has been loaded. If you are compiling the
88# driver into the kernel, you must set these values during compile
89# time, however other peripheral resource values can be changed with
90# the pinnaclecfg program after the kernel is loaded.
91#
92#
93# *** PnP mode
94#
95# Use pnpdump to obtain a sample configuration if you can; I was able
96# to obtain one with the command `pnpdump 1 0x203' -- this may vary
97# for you (running pnpdump by itself did not work for me). Then,
98# edit this file and use isapnp to uncomment and set the card values.
99# Use these values when inserting the msnd_pinnacle module. Using
100# this method, you can set the resources for the DSP and the Kurzweil
101# synth (Pinnacle). Since Linux does not directly support PnP
102# devices, you may have difficulty when using the card in PnP mode
103# when it the driver is compiled into the kernel. Using non-PnP mode
104# is preferable in this case.
105#
106# Here is an example mypinnacle.conf for isapnp that sets the card to
107# io base 0x210, irq 5 and mem 0xd8000, and also sets the Kurzweil
108# synth to 0x330 and irq 9 (may need editing for your system):
109#
110# (READPORT 0x0203)
111# (CSN 2)
112# (IDENTIFY *)
113#
114# # DSP
115# (CONFIGURE BVJ0440/-1 (LD 0
116# (INT 0 (IRQ 5 (MODE +E))) (IO 0 (BASE 0x0210)) (MEM 0 (BASE 0x0d8000))
117# (ACT Y)))
118#
119# # Kurzweil Synth (Pinnacle Only)
120# (CONFIGURE BVJ0440/-1 (LD 1
121# (IO 0 (BASE 0x0330)) (INT 0 (IRQ 9 (MODE +E)))
122# (ACT Y)))
123#
124# (WAITFORKEY)
125#
126#
127# *** Non-PnP mode
128#
129# The second way is by running the card in non-PnP mode. This
130# actually has some advantages in that you can access some other
131# devices on the card, such as the joystick and IDE controller. To
132# configure the card, unpack this shell archive and build the
133# pinnaclecfg program. Using this program, you can assign the
134# resource values to the card's devices, or disable the devices. As
135# an alternative to using pinnaclecfg, you can specify many of the
136# configuration values when loading the msnd_pinnacle module (or
137# during kernel configuration when compiling the driver into the
138# kernel).
139#
140# If you specify cfg=0x250 for the msnd_pinnacle module, it
141# automatically configure the card to the given io, irq and memory
142# values using that config port (the config port is jumper selectable
143# on the card to 0x250, 0x260 or 0x270).
144#
145# See the `msnd_pinnacle Additional Options' section below for more
146# information on these parameters (also, if you compile the driver
147# directly into the kernel, these extra parameters can be useful
148# here).
149#
150#
151# ** It is very easy to cause problems in your machine if you choose a
152# resource value which is incorrect. **
153#
154#
155# Examples
156# ~~~~~~~~
157#
158# * MultiSound Classic/Monterey/Tahiti:
159#
160# modprobe soundcore
161# insmod msnd
162# insmod msnd_classic io=0x290 irq=7 mem=0xd0000
163#
164# * MultiSound Pinnacle in PnP mode:
165#
166# modprobe soundcore
167# insmod msnd
168# isapnp mypinnacle.conf
169# insmod msnd_pinnacle io=0x210 irq=5 mem=0xd8000 <-- match mypinnacle.conf values
170#
171# * MultiSound Pinnacle in non-PnP mode (replace 0x250 with your configuration port,
172# one of 0x250, 0x260 or 0x270):
173#
174# insmod soundcore
175# insmod msnd
176# insmod msnd_pinnacle cfg=0x250 io=0x290 irq=5 mem=0xd0000
177#
178# * To use the MPU-compatible Kurzweil synth on the Pinnacle in PnP
179# mode, add the following (assumes you did `isapnp mypinnacle.conf'):
180#
181# insmod sound
182# insmod mpu401 io=0x330 irq=9 <-- match mypinnacle.conf values
183#
184# * To use the MPU-compatible Kurzweil synth on the Pinnacle in non-PnP
185# mode, add the following. Note how we first configure the peripheral's
186# resources, _then_ install a Linux driver for it:
187#
188# insmod sound
189# pinnaclecfg 0x250 mpu 0x330 9
190# insmod mpu401 io=0x330 irq=9
191#
192# -- OR you can use the following sequence without pinnaclecfg in non-PnP mode:
193#
194# insmod soundcore
195# insmod msnd
196# insmod msnd_pinnacle cfg=0x250 io=0x290 irq=5 mem=0xd0000 mpu_io=0x330 mpu_irq=9
197# insmod sound
198# insmod mpu401 io=0x330 irq=9
199#
200# * To setup the joystick port on the Pinnacle in non-PnP mode (though
201# you have to find the actual Linux joystick driver elsewhere), you
202# can use pinnaclecfg:
203#
204# pinnaclecfg 0x250 joystick 0x200
205#
206# -- OR you can configure this using msnd_pinnacle with the following:
207#
208# insmod soundcore
209# insmod msnd
210# insmod msnd_pinnacle cfg=0x250 io=0x290 irq=5 mem=0xd0000 joystick_io=0x200
211#
212#
213# msnd_classic, msnd_pinnacle Required Options
214# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215#
216# If the following options are not given, the module will not load.
217# Examine the kernel message log for informative error messages.
218# WARNING--probing isn't supported so try to make sure you have the
219# correct shared memory area, otherwise you may experience problems.
220#
221# io I/O base of DSP, e.g. io=0x210
222# irq IRQ number, e.g. irq=5
223# mem Shared memory area, e.g. mem=0xd8000
224#
225#
226# msnd_classic, msnd_pinnacle Additional Options
227# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
228#
229# fifosize The digital audio FIFOs, in kilobytes. If not
230# specified, the default will be used. Increasing
231# this value will reduce the chance of a FIFO
232# underflow at the expense of increasing overall
233# latency. For example, fifosize=512 will
234# allocate 512kB read and write FIFOs (1MB total).
235# While this may reduce dropouts, a heavy machine
236# load will undoubtedly starve the FIFO of data
237# and you will eventually get dropouts. One
238# option is to alter the scheduling priority of
239# the playback process, using `nice' or some form
240# of POSIX soft real-time scheduling.
241#
242# calibrate_signal Setting this to one calibrates the ADCs to the
243# signal, zero calibrates to the card (defaults
244# to zero).
245#
246#
247# msnd_pinnacle Additional Options
248# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
249#
250# digital Specify digital=1 to enable the S/PDIF input
251# if you have the digital daughterboard
252# adapter. This will enable access to the
253# DIGITAL1 input for the soundcard in the mixer.
254# Some mixer programs might have trouble setting
255# the DIGITAL1 source as an input. If you have
256# trouble, you can try the setdigital.c program
257# at the bottom of this document.
258#
259# cfg Non-PnP configuration port for the Pinnacle
260# and Fiji (typically 0x250, 0x260 or 0x270,
261# depending on the jumper configuration). If
262# this option is omitted, then it is assumed
263# that the card is in PnP mode, and that the
264# specified DSP resource values are already
265# configured with PnP (i.e. it won't attempt to
266# do any sort of configuration).
267#
268# When the Pinnacle is in non-PnP mode, you can use the following
269# options to configure particular devices. If a full specification
270# for a device is not given, then the device is not configured. Note
271# that you still must use a Linux driver for any of these devices
272# once their resources are setup (such as the Linux joystick driver,
273# or the MPU401 driver from OSS for the Kurzweil synth).
274#
275# mpu_io I/O port of MPU (on-board Kurzweil synth)
276# mpu_irq IRQ of MPU (on-board Kurzweil synth)
277# ide_io0 First I/O port of IDE controller
278# ide_io1 Second I/O port of IDE controller
279# ide_irq IRQ IDE controller
280# joystick_io I/O port of joystick
281#
282#
283# Obtaining and Creating Firmware Files
284# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
285#
286# For the Classic/Tahiti/Monterey
287# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
288#
289# Download to /tmp and unzip the following file from Turtle Beach:
290#
291# ftp://ftp.voyetra.com/pub/tbs/msndcl/msndvkit.zip
292#
293# When unzipped, unzip the file named MsndFiles.zip. Then copy the
294# following firmware files to /etc/sound (note the file renaming):
295#
296# cp DSPCODE/MSNDINIT.BIN /etc/sound/msndinit.bin
297# cp DSPCODE/MSNDPERM.REB /etc/sound/msndperm.bin
298#
299# When configuring the Linux kernel, specify /etc/sound/msndinit.bin and
300# /etc/sound/msndperm.bin for the two firmware files (Linux kernel
301# versions older than 2.2 do not ask for firmware paths, and are
302# hardcoded to /etc/sound).
303#
304# If you are compiling the driver into the kernel, these files must
305# be accessible during compilation, but will not be needed later.
306# The files must remain, however, if the driver is used as a module.
307#
308#
309# For the Pinnacle/Fiji
310# ~~~~~~~~~~~~~~~~~~~~~
311#
312# Download to /tmp and unzip the following file from Turtle Beach (be
313# sure to use the entire URL; some have had trouble navigating to the
314# URL):
315#
316# ftp://ftp.voyetra.com/pub/tbs/pinn/pnddk100.zip
317#
318# Unpack this shell archive, and run make in the created directory
319# (you need a C compiler and flex to build the utilities). This
320# should give you the executables conv, pinnaclecfg and setdigital.
321# conv is only used temporarily here to create the firmware files,
322# while pinnaclecfg is used to configure the Pinnacle or Fiji card in
323# non-PnP mode, and setdigital can be used to set the S/PDIF input on
324# the mixer (pinnaclecfg and setdigital should be copied to a
325# convenient place, possibly run during system initialization).
326#
327# To generating the firmware files with the `conv' program, we create
328# the binary firmware files by doing the following conversion
329# (assuming the archive unpacked into a directory named PINNDDK):
330#
331# ./conv < PINNDDK/dspcode/pndspini.asm > /etc/sound/pndspini.bin
332# ./conv < PINNDDK/dspcode/pndsperm.asm > /etc/sound/pndsperm.bin
333#
334# The conv (and conv.l) program is not needed after conversion and can
335# be safely deleted. Then, when configuring the Linux kernel, specify
336# /etc/sound/pndspini.bin and /etc/sound/pndsperm.bin for the two
337# firmware files (Linux kernel versions older than 2.2 do not ask for
338# firmware paths, and are hardcoded to /etc/sound).
339#
340# If you are compiling the driver into the kernel, these files must
341# be accessible during compilation, but will not be needed later.
342# The files must remain, however, if the driver is used as a module.
343#
344#
345# Using Digital I/O with the S/PDIF Port
346# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347#
348# If you have a Pinnacle or Fiji with the digital daughterboard and
349# want to set it as the input source, you can use this program if you
350# have trouble trying to do it with a mixer program (be sure to
351# insert the module with the digital=1 option, or say Y to the option
352# during compiled-in kernel operation). Upon selection of the S/PDIF
353# port, you should be able monitor and record from it.
354#
355# There is something to note about using the S/PDIF port. Digital
356# timing is taken from the digital signal, so if a signal is not
357# connected to the port and it is selected as recording input, you
358# will find PCM playback to be distorted in playback rate. Also,
359# attempting to record at a sampling rate other than the DAT rate may
360# be problematic (i.e. trying to record at 8000Hz when the DAT signal
361# is 44100Hz). If you have a problem with this, set the recording
362# input to analog if you need to record at a rate other than that of
363# the DAT rate.
364#
365#
366# -- Shell archive attached below, just run `sh MultiSound' to extract.
367# Contains Pinnacle/Fiji utilities to convert firmware, configure
368# in non-PnP mode, and select the DIGITAL1 input for the mixer.
369#
370#
371#!/bin/sh
372# This is a shell archive (produced by GNU sharutils 4.2).
373# To extract the files from this archive, save it to some FILE, remove
374# everything before the `!/bin/sh' line above, then type `sh FILE'.
375#
376# Made on 1998-12-04 10:07 EST by <andrewtv@ztransform.velsoft.com>.
377# Source directory was `/home/andrewtv/programming/pinnacle/pinnacle'.
378#
379# Existing files will *not* be overwritten unless `-c' is specified.
380#
381# This shar contains:
382# length mode name
383# ------ ---------- ------------------------------------------
384# 2046 -rw-rw-r-- MultiSound.d/setdigital.c
385# 10235 -rw-rw-r-- MultiSound.d/pinnaclecfg.c
386# 106 -rw-rw-r-- MultiSound.d/Makefile
387# 141 -rw-rw-r-- MultiSound.d/conv.l
388# 1472 -rw-rw-r-- MultiSound.d/msndreset.c
389#
390save_IFS="${IFS}"
391IFS="${IFS}:"
392gettext_dir=FAILED
393locale_dir=FAILED
394first_param="$1"
395for dir in $PATH
396do
397 if test "$gettext_dir" = FAILED && test -f $dir/gettext \
398 && ($dir/gettext --version >/dev/null 2>&1)
399 then
400 set `$dir/gettext --version 2>&1`
401 if test "$3" = GNU
402 then
403 gettext_dir=$dir
404 fi
405 fi
406 if test "$locale_dir" = FAILED && test -f $dir/shar \
407 && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
408 then
409 locale_dir=`$dir/shar --print-text-domain-dir`
410 fi
411done
412IFS="$save_IFS"
413if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
414then
415 echo=echo
416else
417 TEXTDOMAINDIR=$locale_dir
418 export TEXTDOMAINDIR
419 TEXTDOMAIN=sharutils
420 export TEXTDOMAIN
421 echo="$gettext_dir/gettext -s"
422fi
423touch -am 1231235999 $$.touch >/dev/null 2>&1
424if test ! -f 1231235999 && test -f $$.touch; then
425 shar_touch=touch
426else
427 shar_touch=:
428 echo
429 $echo 'WARNING: not restoring timestamps. Consider getting and'
430 $echo "installing GNU \`touch', distributed in GNU File Utilities..."
431 echo
432fi
433rm -f 1231235999 $$.touch
434#
435if mkdir _sh01426; then
436 $echo 'x -' 'creating lock directory'
437else
438 $echo 'failed to create lock directory'
439 exit 1
440fi
441# ============= MultiSound.d/setdigital.c ==============
442if test ! -d 'MultiSound.d'; then
443 $echo 'x -' 'creating directory' 'MultiSound.d'
444 mkdir 'MultiSound.d'
445fi
446if test -f 'MultiSound.d/setdigital.c' && test "$first_param" != -c; then
447 $echo 'x -' SKIPPING 'MultiSound.d/setdigital.c' '(file already exists)'
448else
449 $echo 'x -' extracting 'MultiSound.d/setdigital.c' '(text)'
450 sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/setdigital.c' &&
451/*********************************************************************
452X *
453X * setdigital.c - sets the DIGITAL1 input for a mixer
454X *
455X * Copyright (C) 1998 Andrew Veliath
456X *
457X * This program is free software; you can redistribute it and/or modify
458X * it under the terms of the GNU General Public License as published by
459X * the Free Software Foundation; either version 2 of the License, or
460X * (at your option) any later version.
461X *
462X * This program is distributed in the hope that it will be useful,
463X * but WITHOUT ANY WARRANTY; without even the implied warranty of
464X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
465X * GNU General Public License for more details.
466X *
467X * You should have received a copy of the GNU General Public License
468X * along with this program; if not, write to the Free Software
469X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
470X *
471X ********************************************************************/
472X
473#include <stdio.h>
474#include <unistd.h>
475#include <fcntl.h>
476#include <sys/types.h>
477#include <sys/stat.h>
478#include <sys/ioctl.h>
479#include <sys/soundcard.h>
480X
481int main(int argc, char *argv[])
482{
483X int fd;
484X unsigned long recmask, recsrc;
485X
486X if (argc != 2) {
487X fprintf(stderr, "usage: setdigital <mixer device>\n");
488X exit(1);
489X }
490X
491X if ((fd = open(argv[1], O_RDWR)) < 0) {
492X perror(argv[1]);
493X exit(1);
494X }
495X
496X if (ioctl(fd, SOUND_MIXER_READ_RECMASK, &recmask) < 0) {
497X fprintf(stderr, "error: ioctl read recording mask failed\n");
498X perror("ioctl");
499X close(fd);
500X exit(1);
501X }
502X
503X if (!(recmask & SOUND_MASK_DIGITAL1)) {
504X fprintf(stderr, "error: cannot find DIGITAL1 device in mixer\n");
505X close(fd);
506X exit(1);
507X }
508X
509X if (ioctl(fd, SOUND_MIXER_READ_RECSRC, &recsrc) < 0) {
510X fprintf(stderr, "error: ioctl read recording source failed\n");
511X perror("ioctl");
512X close(fd);
513X exit(1);
514X }
515X
516X recsrc |= SOUND_MASK_DIGITAL1;
517X
518X if (ioctl(fd, SOUND_MIXER_WRITE_RECSRC, &recsrc) < 0) {
519X fprintf(stderr, "error: ioctl write recording source failed\n");
520X perror("ioctl");
521X close(fd);
522X exit(1);
523X }
524X
525X close(fd);
526X
527X return 0;
528}
529SHAR_EOF
530 $shar_touch -am 1204092598 'MultiSound.d/setdigital.c' &&
531 chmod 0664 'MultiSound.d/setdigital.c' ||
532 $echo 'restore of' 'MultiSound.d/setdigital.c' 'failed'
533 if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
534 && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
535 md5sum -c << SHAR_EOF >/dev/null 2>&1 \
536 || $echo 'MultiSound.d/setdigital.c:' 'MD5 check failed'
537e87217fc3e71288102ba41fd81f71ec4 MultiSound.d/setdigital.c
538SHAR_EOF
539 else
540 shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/setdigital.c'`"
541 test 2046 -eq "$shar_count" ||
542 $echo 'MultiSound.d/setdigital.c:' 'original size' '2046,' 'current size' "$shar_count!"
543 fi
544fi
545# ============= MultiSound.d/pinnaclecfg.c ==============
546if test -f 'MultiSound.d/pinnaclecfg.c' && test "$first_param" != -c; then
547 $echo 'x -' SKIPPING 'MultiSound.d/pinnaclecfg.c' '(file already exists)'
548else
549 $echo 'x -' extracting 'MultiSound.d/pinnaclecfg.c' '(text)'
550 sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/pinnaclecfg.c' &&
551/*********************************************************************
552X *
553X * pinnaclecfg.c - Pinnacle/Fiji Device Configuration Program
554X *
555X * This is for NON-PnP mode only. For PnP mode, use isapnptools.
556X *
557X * This is Linux-specific, and must be run with root permissions.
558X *
559X * Part of the Turtle Beach MultiSound Sound Card Driver for Linux
560X *
561X * Copyright (C) 1998 Andrew Veliath
562X *
563X * This program is free software; you can redistribute it and/or modify
564X * it under the terms of the GNU General Public License as published by
565X * the Free Software Foundation; either version 2 of the License, or
566X * (at your option) any later version.
567X *
568X * This program is distributed in the hope that it will be useful,
569X * but WITHOUT ANY WARRANTY; without even the implied warranty of
570X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
571X * GNU General Public License for more details.
572X *
573X * You should have received a copy of the GNU General Public License
574X * along with this program; if not, write to the Free Software
575X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
576X *
577X ********************************************************************/
578X
579#include <stdio.h>
580#include <stdlib.h>
581#include <string.h>
582#include <errno.h>
583#include <unistd.h>
584#include <asm/io.h>
585#include <asm/types.h>
586X
587#define IREG_LOGDEVICE 0x07
588#define IREG_ACTIVATE 0x30
589#define LD_ACTIVATE 0x01
590#define LD_DISACTIVATE 0x00
591#define IREG_EECONTROL 0x3F
592#define IREG_MEMBASEHI 0x40
593#define IREG_MEMBASELO 0x41
594#define IREG_MEMCONTROL 0x42
595#define IREG_MEMRANGEHI 0x43
596#define IREG_MEMRANGELO 0x44
597#define MEMTYPE_8BIT 0x00
598#define MEMTYPE_16BIT 0x02
599#define MEMTYPE_RANGE 0x00
600#define MEMTYPE_HIADDR 0x01
601#define IREG_IO0_BASEHI 0x60
602#define IREG_IO0_BASELO 0x61
603#define IREG_IO1_BASEHI 0x62
604#define IREG_IO1_BASELO 0x63
605#define IREG_IRQ_NUMBER 0x70
606#define IREG_IRQ_TYPE 0x71
607#define IRQTYPE_HIGH 0x02
608#define IRQTYPE_LOW 0x00
609#define IRQTYPE_LEVEL 0x01
610#define IRQTYPE_EDGE 0x00
611X
612#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
613#define LOBYTE(w) ((BYTE)(w))
614#define MAKEWORD(low,hi) ((WORD)(((BYTE)(low))|(((WORD)((BYTE)(hi)))<<8)))
615X
616typedef __u8 BYTE;
617typedef __u16 USHORT;
618typedef __u16 WORD;
619X
620static int config_port = -1;
621X
622static int msnd_write_cfg(int cfg, int reg, int value)
623{
624X outb(reg, cfg);
625X outb(value, cfg + 1);
626X if (value != inb(cfg + 1)) {
627X fprintf(stderr, "error: msnd_write_cfg: I/O error\n");
628X return -EIO;
629X }
630X return 0;
631}
632X
633static int msnd_read_cfg(int cfg, int reg)
634{
635X outb(reg, cfg);
636X return inb(cfg + 1);
637}
638X
639static int msnd_write_cfg_io0(int cfg, int num, WORD io)
640{
641X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
642X return -EIO;
643X if (msnd_write_cfg(cfg, IREG_IO0_BASEHI, HIBYTE(io)))
644X return -EIO;
645X if (msnd_write_cfg(cfg, IREG_IO0_BASELO, LOBYTE(io)))
646X return -EIO;
647X return 0;
648}
649X
650static int msnd_read_cfg_io0(int cfg, int num, WORD *io)
651{
652X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
653X return -EIO;
654X
655X *io = MAKEWORD(msnd_read_cfg(cfg, IREG_IO0_BASELO),
656X msnd_read_cfg(cfg, IREG_IO0_BASEHI));
657X
658X return 0;
659}
660X
661static int msnd_write_cfg_io1(int cfg, int num, WORD io)
662{
663X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
664X return -EIO;
665X if (msnd_write_cfg(cfg, IREG_IO1_BASEHI, HIBYTE(io)))
666X return -EIO;
667X if (msnd_write_cfg(cfg, IREG_IO1_BASELO, LOBYTE(io)))
668X return -EIO;
669X return 0;
670}
671X
672static int msnd_read_cfg_io1(int cfg, int num, WORD *io)
673{
674X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
675X return -EIO;
676X
677X *io = MAKEWORD(msnd_read_cfg(cfg, IREG_IO1_BASELO),
678X msnd_read_cfg(cfg, IREG_IO1_BASEHI));
679X
680X return 0;
681}
682X
683static int msnd_write_cfg_irq(int cfg, int num, WORD irq)
684{
685X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
686X return -EIO;
687X if (msnd_write_cfg(cfg, IREG_IRQ_NUMBER, LOBYTE(irq)))
688X return -EIO;
689X if (msnd_write_cfg(cfg, IREG_IRQ_TYPE, IRQTYPE_EDGE))
690X return -EIO;
691X return 0;
692}
693X
694static int msnd_read_cfg_irq(int cfg, int num, WORD *irq)
695{
696X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
697X return -EIO;
698X
699X *irq = msnd_read_cfg(cfg, IREG_IRQ_NUMBER);
700X
701X return 0;
702}
703X
704static int msnd_write_cfg_mem(int cfg, int num, int mem)
705{
706X WORD wmem;
707X
708X mem >>= 8;
709X mem &= 0xfff;
710X wmem = (WORD)mem;
711X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
712X return -EIO;
713X if (msnd_write_cfg(cfg, IREG_MEMBASEHI, HIBYTE(wmem)))
714X return -EIO;
715X if (msnd_write_cfg(cfg, IREG_MEMBASELO, LOBYTE(wmem)))
716X return -EIO;
717X if (wmem && msnd_write_cfg(cfg, IREG_MEMCONTROL, (MEMTYPE_HIADDR | MEMTYPE_16BIT)))
718X return -EIO;
719X return 0;
720}
721X
722static int msnd_read_cfg_mem(int cfg, int num, int *mem)
723{
724X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
725X return -EIO;
726X
727X *mem = MAKEWORD(msnd_read_cfg(cfg, IREG_MEMBASELO),
728X msnd_read_cfg(cfg, IREG_MEMBASEHI));
729X *mem <<= 8;
730X
731X return 0;
732}
733X
734static int msnd_activate_logical(int cfg, int num)
735{
736X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
737X return -EIO;
738X if (msnd_write_cfg(cfg, IREG_ACTIVATE, LD_ACTIVATE))
739X return -EIO;
740X return 0;
741}
742X
743static int msnd_write_cfg_logical(int cfg, int num, WORD io0, WORD io1, WORD irq, int mem)
744{
745X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
746X return -EIO;
747X if (msnd_write_cfg_io0(cfg, num, io0))
748X return -EIO;
749X if (msnd_write_cfg_io1(cfg, num, io1))
750X return -EIO;
751X if (msnd_write_cfg_irq(cfg, num, irq))
752X return -EIO;
753X if (msnd_write_cfg_mem(cfg, num, mem))
754X return -EIO;
755X if (msnd_activate_logical(cfg, num))
756X return -EIO;
757X return 0;
758}
759X
760static int msnd_read_cfg_logical(int cfg, int num, WORD *io0, WORD *io1, WORD *irq, int *mem)
761{
762X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num))
763X return -EIO;
764X if (msnd_read_cfg_io0(cfg, num, io0))
765X return -EIO;
766X if (msnd_read_cfg_io1(cfg, num, io1))
767X return -EIO;
768X if (msnd_read_cfg_irq(cfg, num, irq))
769X return -EIO;
770X if (msnd_read_cfg_mem(cfg, num, mem))
771X return -EIO;
772X return 0;
773}
774X
775static void usage(void)
776{
777X fprintf(stderr,
778X "\n"
779X "pinnaclecfg 1.0\n"
780X "\n"
781X "usage: pinnaclecfg <config port> [device config]\n"
782X "\n"
783X "This is for use with the card in NON-PnP mode only.\n"
784X "\n"
785X "Available devices (not all available for Fiji):\n"
786X "\n"
787X " Device Description\n"
788X " -------------------------------------------------------------------\n"
789X " reset Reset all devices (i.e. disable)\n"
790X " show Display current device configurations\n"
791X "\n"
792X " dsp <io> <irq> <mem> Audio device\n"
793X " mpu <io> <irq> Internal Kurzweil synth\n"
794X " ide <io0> <io1> <irq> On-board IDE controller\n"
795X " joystick <io> Joystick port\n"
796X "\n");
797X exit(1);
798}
799X
800static int cfg_reset(void)
801{
802X int i;
803X
804X for (i = 0; i < 4; ++i)
805X msnd_write_cfg_logical(config_port, i, 0, 0, 0, 0);
806X
807X return 0;
808}
809X
810static int cfg_show(void)
811{
812X int i;
813X int count = 0;
814X
815X for (i = 0; i < 4; ++i) {
816X WORD io0, io1, irq;
817X int mem;
818X msnd_read_cfg_logical(config_port, i, &io0, &io1, &irq, &mem);
819X switch (i) {
820X case 0:
821X if (io0 || irq || mem) {
822X printf("dsp 0x%x %d 0x%x\n", io0, irq, mem);
823X ++count;
824X }
825X break;
826X case 1:
827X if (io0 || irq) {
828X printf("mpu 0x%x %d\n", io0, irq);
829X ++count;
830X }
831X break;
832X case 2:
833X if (io0 || io1 || irq) {
834X printf("ide 0x%x 0x%x %d\n", io0, io1, irq);
835X ++count;
836X }
837X break;
838X case 3:
839X if (io0) {
840X printf("joystick 0x%x\n", io0);
841X ++count;
842X }
843X break;
844X }
845X }
846X
847X if (count == 0)
848X fprintf(stderr, "no devices configured\n");
849X
850X return 0;
851}
852X
853static int cfg_dsp(int argc, char *argv[])
854{
855X int io, irq, mem;
856X
857X if (argc < 3 ||
858X sscanf(argv[0], "0x%x", &io) != 1 ||
859X sscanf(argv[1], "%d", &irq) != 1 ||
860X sscanf(argv[2], "0x%x", &mem) != 1)
861X usage();
862X
863X if (!(io == 0x290 ||
864X io == 0x260 ||
865X io == 0x250 ||
866X io == 0x240 ||
867X io == 0x230 ||
868X io == 0x220 ||
869X io == 0x210 ||
870X io == 0x3e0)) {
871X fprintf(stderr, "error: io must be one of "
872X "210, 220, 230, 240, 250, 260, 290, or 3E0\n");
873X usage();
874X }
875X
876X if (!(irq == 5 ||
877X irq == 7 ||
878X irq == 9 ||
879X irq == 10 ||
880X irq == 11 ||
881X irq == 12)) {
882X fprintf(stderr, "error: irq must be one of "
883X "5, 7, 9, 10, 11 or 12\n");
884X usage();
885X }
886X
887X if (!(mem == 0xb0000 ||
888X mem == 0xc8000 ||
889X mem == 0xd0000 ||
890X mem == 0xd8000 ||
891X mem == 0xe0000 ||
892X mem == 0xe8000)) {
893X fprintf(stderr, "error: mem must be one of "
894X "0xb0000, 0xc8000, 0xd0000, 0xd8000, 0xe0000 or 0xe8000\n");
895X usage();
896X }
897X
898X return msnd_write_cfg_logical(config_port, 0, io, 0, irq, mem);
899}
900X
901static int cfg_mpu(int argc, char *argv[])
902{
903X int io, irq;
904X
905X if (argc < 2 ||
906X sscanf(argv[0], "0x%x", &io) != 1 ||
907X sscanf(argv[1], "%d", &irq) != 1)
908X usage();
909X
910X return msnd_write_cfg_logical(config_port, 1, io, 0, irq, 0);
911}
912X
913static int cfg_ide(int argc, char *argv[])
914{
915X int io0, io1, irq;
916X
917X if (argc < 3 ||
918X sscanf(argv[0], "0x%x", &io0) != 1 ||
919X sscanf(argv[0], "0x%x", &io1) != 1 ||
920X sscanf(argv[1], "%d", &irq) != 1)
921X usage();
922X
923X return msnd_write_cfg_logical(config_port, 2, io0, io1, irq, 0);
924}
925X
926static int cfg_joystick(int argc, char *argv[])
927{
928X int io;
929X
930X if (argc < 1 ||
931X sscanf(argv[0], "0x%x", &io) != 1)
932X usage();
933X
934X return msnd_write_cfg_logical(config_port, 3, io, 0, 0, 0);
935}
936X
937int main(int argc, char *argv[])
938{
939X char *device;
940X int rv = 0;
941X
942X --argc; ++argv;
943X
944X if (argc < 2)
945X usage();
946X
947X sscanf(argv[0], "0x%x", &config_port);
948X if (config_port != 0x250 && config_port != 0x260 && config_port != 0x270) {
949X fprintf(stderr, "error: <config port> must be 0x250, 0x260 or 0x270\n");
950X exit(1);
951X }
952X if (ioperm(config_port, 2, 1)) {
953X perror("ioperm");
954X fprintf(stderr, "note: pinnaclecfg must be run as root\n");
955X exit(1);
956X }
957X device = argv[1];
958X
959X argc -= 2; argv += 2;
960X
961X if (strcmp(device, "reset") == 0)
962X rv = cfg_reset();
963X else if (strcmp(device, "show") == 0)
964X rv = cfg_show();
965X else if (strcmp(device, "dsp") == 0)
966X rv = cfg_dsp(argc, argv);
967X else if (strcmp(device, "mpu") == 0)
968X rv = cfg_mpu(argc, argv);
969X else if (strcmp(device, "ide") == 0)
970X rv = cfg_ide(argc, argv);
971X else if (strcmp(device, "joystick") == 0)
972X rv = cfg_joystick(argc, argv);
973X else {
974X fprintf(stderr, "error: unknown device %s\n", device);
975X usage();
976X }
977X
978X if (rv)
979X fprintf(stderr, "error: device configuration failed\n");
980X
981X return 0;
982}
983SHAR_EOF
984 $shar_touch -am 1204092598 'MultiSound.d/pinnaclecfg.c' &&
985 chmod 0664 'MultiSound.d/pinnaclecfg.c' ||
986 $echo 'restore of' 'MultiSound.d/pinnaclecfg.c' 'failed'
987 if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
988 && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
989 md5sum -c << SHAR_EOF >/dev/null 2>&1 \
990 || $echo 'MultiSound.d/pinnaclecfg.c:' 'MD5 check failed'
991366bdf27f0db767a3c7921d0a6db20fe MultiSound.d/pinnaclecfg.c
992SHAR_EOF
993 else
994 shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/pinnaclecfg.c'`"
995 test 10235 -eq "$shar_count" ||
996 $echo 'MultiSound.d/pinnaclecfg.c:' 'original size' '10235,' 'current size' "$shar_count!"
997 fi
998fi
999# ============= MultiSound.d/Makefile ==============
1000if test -f 'MultiSound.d/Makefile' && test "$first_param" != -c; then
1001 $echo 'x -' SKIPPING 'MultiSound.d/Makefile' '(file already exists)'
1002else
1003 $echo 'x -' extracting 'MultiSound.d/Makefile' '(text)'
1004 sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/Makefile' &&
1005CC = gcc
1006CFLAGS = -O
1007PROGS = setdigital msndreset pinnaclecfg conv
1008X
1009all: $(PROGS)
1010X
1011clean:
1012X rm -f $(PROGS)
1013SHAR_EOF
1014 $shar_touch -am 1204092398 'MultiSound.d/Makefile' &&
1015 chmod 0664 'MultiSound.d/Makefile' ||
1016 $echo 'restore of' 'MultiSound.d/Makefile' 'failed'
1017 if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
1018 && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
1019 md5sum -c << SHAR_EOF >/dev/null 2>&1 \
1020 || $echo 'MultiSound.d/Makefile:' 'MD5 check failed'
102176ca8bb44e3882edcf79c97df6c81845 MultiSound.d/Makefile
1022SHAR_EOF
1023 else
1024 shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/Makefile'`"
1025 test 106 -eq "$shar_count" ||
1026 $echo 'MultiSound.d/Makefile:' 'original size' '106,' 'current size' "$shar_count!"
1027 fi
1028fi
1029# ============= MultiSound.d/conv.l ==============
1030if test -f 'MultiSound.d/conv.l' && test "$first_param" != -c; then
1031 $echo 'x -' SKIPPING 'MultiSound.d/conv.l' '(file already exists)'
1032else
1033 $echo 'x -' extracting 'MultiSound.d/conv.l' '(text)'
1034 sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/conv.l' &&
1035%%
1036[ \n\t,\r]
1037\;.*
1038DB
1039[0-9A-Fa-f]+H { int n; sscanf(yytext, "%xH", &n); printf("%c", n); }
1040%%
1041int yywrap() { return 1; }
1042main() { yylex(); }
1043SHAR_EOF
1044 $shar_touch -am 0828231798 'MultiSound.d/conv.l' &&
1045 chmod 0664 'MultiSound.d/conv.l' ||
1046 $echo 'restore of' 'MultiSound.d/conv.l' 'failed'
1047 if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
1048 && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
1049 md5sum -c << SHAR_EOF >/dev/null 2>&1 \
1050 || $echo 'MultiSound.d/conv.l:' 'MD5 check failed'
1051d2411fc32cd71a00dcdc1f009e858dd2 MultiSound.d/conv.l
1052SHAR_EOF
1053 else
1054 shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/conv.l'`"
1055 test 141 -eq "$shar_count" ||
1056 $echo 'MultiSound.d/conv.l:' 'original size' '141,' 'current size' "$shar_count!"
1057 fi
1058fi
1059# ============= MultiSound.d/msndreset.c ==============
1060if test -f 'MultiSound.d/msndreset.c' && test "$first_param" != -c; then
1061 $echo 'x -' SKIPPING 'MultiSound.d/msndreset.c' '(file already exists)'
1062else
1063 $echo 'x -' extracting 'MultiSound.d/msndreset.c' '(text)'
1064 sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/msndreset.c' &&
1065/*********************************************************************
1066X *
1067X * msndreset.c - resets the MultiSound card
1068X *
1069X * Copyright (C) 1998 Andrew Veliath
1070X *
1071X * This program is free software; you can redistribute it and/or modify
1072X * it under the terms of the GNU General Public License as published by
1073X * the Free Software Foundation; either version 2 of the License, or
1074X * (at your option) any later version.
1075X *
1076X * This program is distributed in the hope that it will be useful,
1077X * but WITHOUT ANY WARRANTY; without even the implied warranty of
1078X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1079X * GNU General Public License for more details.
1080X *
1081X * You should have received a copy of the GNU General Public License
1082X * along with this program; if not, write to the Free Software
1083X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1084X *
1085X ********************************************************************/
1086X
1087#include <stdio.h>
1088#include <unistd.h>
1089#include <fcntl.h>
1090#include <sys/types.h>
1091#include <sys/stat.h>
1092#include <sys/ioctl.h>
1093#include <sys/soundcard.h>
1094X
1095int main(int argc, char *argv[])
1096{
1097X int fd;
1098X
1099X if (argc != 2) {
1100X fprintf(stderr, "usage: msndreset <mixer device>\n");
1101X exit(1);
1102X }
1103X
1104X if ((fd = open(argv[1], O_RDWR)) < 0) {
1105X perror(argv[1]);
1106X exit(1);
1107X }
1108X
1109X if (ioctl(fd, SOUND_MIXER_PRIVATE1, 0) < 0) {
1110X fprintf(stderr, "error: msnd ioctl reset failed\n");
1111X perror("ioctl");
1112X close(fd);
1113X exit(1);
1114X }
1115X
1116X close(fd);
1117X
1118X return 0;
1119}
1120SHAR_EOF
1121 $shar_touch -am 1204100698 'MultiSound.d/msndreset.c' &&
1122 chmod 0664 'MultiSound.d/msndreset.c' ||
1123 $echo 'restore of' 'MultiSound.d/msndreset.c' 'failed'
1124 if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
1125 && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
1126 md5sum -c << SHAR_EOF >/dev/null 2>&1 \
1127 || $echo 'MultiSound.d/msndreset.c:' 'MD5 check failed'
1128c52f876521084e8eb25e12e01dcccb8a MultiSound.d/msndreset.c
1129SHAR_EOF
1130 else
1131 shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/msndreset.c'`"
1132 test 1472 -eq "$shar_count" ||
1133 $echo 'MultiSound.d/msndreset.c:' 'original size' '1472,' 'current size' "$shar_count!"
1134 fi
1135fi
1136rm -fr _sh01426
1137exit 0
diff --git a/Documentation/sound/oss/NEWS b/Documentation/sound/oss/NEWS
new file mode 100644
index 000000000000..a81e0ef72ae9
--- /dev/null
+++ b/Documentation/sound/oss/NEWS
@@ -0,0 +1,42 @@
1Linux 2.4 Sound Changes
22000-September-25
3Christoph Hellwig, <hch@infradead.org>
4
5
6
7=== isapnp support
8
9The Linux 2.4 Kernel does have reliable in-kernel isapnp support.
10Some drivers (sb.o, ad1816.o awe_wave.o) do now support automatically
11detecting and configuring isapnp devices.
12If you have a not yet supported isapnp soundcard, mail me the content
13of '/proc/isapnp' on your system and some information about your card
14and its driver(s) so I can try to get isapnp working for it.
15
16
17
18=== soundcard resources on kernel commandline
19
20Before Linux 2.4 you had to specify the resources for sounddrivers
21statically linked into the kernel at compile time
22(in make config/menuconfig/xconfig). In Linux 2.4 the resources are
23now specified at the boot-time kernel commandline (e.g. the lilo
24'append=' line or everything that's after the kernel name in grub).
25Read the Configure.help entry for your card for the parameters.
26
27
28=== softoss is gone
29
30In Linux 2.4 the softoss in-kernel software synthesizer is no more aviable.
31Use a user space software synthesizer like timidity instead.
32
33
34
35=== /dev/sndstat and /proc/sound are gone
36
37In older Linux versions those files exported some information about the
38OSS/Free configuration to userspace. In Linux 2.3 they were removed because
39they did not support the growing number of pci soundcards and there were
40some general problems with this interface.
41
42
diff --git a/Documentation/sound/oss/NM256 b/Documentation/sound/oss/NM256
new file mode 100644
index 000000000000..b503217488b3
--- /dev/null
+++ b/Documentation/sound/oss/NM256
@@ -0,0 +1,280 @@
1=======================================================
2Documentation for the NeoMagic 256AV/256ZX sound driver
3=======================================================
4
5You're looking at version 1.1 of the driver. (Woohoo!) It has been
6successfully tested against the following laptop models:
7
8 Sony Z505S/Z505SX/Z505DX/Z505RX
9 Sony F150, F160, F180, F250, F270, F280, PCG-F26
10 Dell Latitude CPi, CPt (various submodels)
11
12There are a few caveats, which is why you should read the entirety of
13this document first.
14
15This driver was developed without any support or assistance from
16NeoMagic. There is no warranty, expressed, implied, or otherwise. It
17is free software in the public domain; feel free to use it, sell it,
18give it to your best friends, even claim that you wrote it (but why?!)
19but don't go whining to me, NeoMagic, Sony, Dell, or anyone else
20when it blows up your computer.
21
22Version 1.1 contains a change to try and detect non-AC97 versions of
23the hardware, and not install itself appropriately. It should also
24reinitialize the hardware on an APM resume event, assuming that APM
25was configured into your kernel.
26
27============
28Installation
29============
30
31Enable the sound drivers, the OSS sound drivers, and then the NM256
32driver. The NM256 driver *must* be configured as a module (it won't
33give you any other choice).
34
35Next, do the usual "make modules" and "make modules_install".
36Finally, insmod the soundcore, sound and nm256 modules.
37
38When the nm256 driver module is loaded, you should see a couple of
39confirmation messages in the kernel logfile indicating that it found
40the device (the device does *not* use any I/O ports or DMA channels).
41Now try playing a wav file, futz with the CD-ROM if you have one, etc.
42
43The NM256 is entirely a PCI-based device, and all the necessary
44information is automatically obtained from the card. It can only be
45configured as a module in a vain attempt to prevent people from
46hurting themselves. It works correctly if it shares an IRQ with
47another device (it normally shares IRQ 9 with the builtin eepro100
48ethernet on the Sony Z505 laptops).
49
50It does not run the card in any sort of compatibility mode. It will
51not work on laptops that have the SB16-compatible, AD1848-compatible
52or CS4232-compatible codec/mixer; you will want to use the appropriate
53compatible OSS driver with these chipsets. I cannot provide any
54assistance with machines using the SB16, AD1848 or CS4232 compatible
55versions. (The driver now attempts to detect the mixer version, and
56will refuse to load if it believes the hardware is not
57AC97-compatible.)
58
59The sound support is very basic, but it does include simultaneous
60playback and record capability. The mixer support is also quite
61simple, although this is in keeping with the rather limited
62functionality of the chipset.
63
64There is no hardware synthesizer available, as the Losedows OPL-3 and
65MIDI support is done via hardware emulation.
66
67Only three recording devices are available on the Sony: the
68microphone, the CD-ROM input, and the volume device (which corresponds
69to the stereo output). (Other devices may be available on other
70models of laptops.) The Z505 series does not have a builtin CD-ROM,
71so of course the CD-ROM input doesn't work. It does work on laptops
72with a builtin CD-ROM drive.
73
74The mixer device does not appear to have any tone controls, at least
75on the Z505 series. The mixer module checks for tone controls in the
76AC97 mixer, and will enable them if they are available.
77
78==============
79Known problems
80==============
81
82 * There are known problems with PCMCIA cards and the eepro100 ethernet
83 driver on the Z505S/Z505SX/Z505DX. Keep reading.
84
85 * There are also potential problems with using a virtual X display, and
86 also problems loading the module after the X server has been started.
87 Keep reading.
88
89 * The volume control isn't anywhere near linear. Sorry. This will be
90 fixed eventually, when I get sufficiently annoyed with it. (I doubt
91 it will ever be fixed now, since I've never gotten sufficiently
92 annoyed with it and nobody else seems to care.)
93
94 * There are reports that the CD-ROM volume is very low. Since I do not
95 have a CD-ROM equipped laptop, I cannot test this (it's kinda hard to
96 do remotely).
97
98 * Only 8 fixed-rate speeds are supported. This is mainly a chipset
99 limitation. It may be possible to support other speeds in the future.
100
101 * There is no support for the telephone mixer/codec. There is support
102 for a phonein/phoneout device in the mixer driver; whether or not
103 it does anything is anyone's guess. (Reports on this would be
104 appreciated. You'll have to figure out how to get the phone to
105 go off-hook before it'll work, tho.)
106
107 * This driver was not written with any cooperation or support from
108 NeoMagic. If you have any questions about this, see their website
109 for their official stance on supporting open source drivers.
110
111============
112Video memory
113============
114
115The NeoMagic sound engine uses a portion of the display memory to hold
116the sound buffer. (Crazy, eh?) The NeoMagic video BIOS sets up a
117special pointer at the top of video RAM to indicate where the top of
118the audio buffer should be placed.
119
120At the present time XFree86 is apparently not aware of this. It will
121thus write over either the pointer or the sound buffer with abandon.
122(Accelerated-X seems to do a better job here.)
123
124This implies a few things:
125
126 * Sometimes the NM256 driver has to guess at where the buffer
127 should be placed, especially if the module is loaded after the
128 X server is started. It's usually correct, but it will consistently
129 fail on the Sony F250.
130
131 * Virtual screens greater than 1024x768x16 under XFree86 are
132 problematic on laptops with only 2.5MB of screen RAM. This
133 includes all of the 256AV-equipped laptops. (Virtual displays
134 may or may not work on the 256ZX, which has at least 4MB of
135 video RAM.)
136
137If you start having problems with random noise being output either
138constantly (this is the usual symptom on the F250), or when windows
139are moved around (this is the usual symptom when using a virtual
140screen), the best fix is to
141
142 * Don't use a virtual frame buffer.
143 * Make sure you load the NM256 module before the X server is
144 started.
145
146On the F250, it is possible to force the driver to load properly even
147after the XFree86 server is started by doing:
148
149 insmod nm256 buffertop=0x25a800
150
151This forces the audio buffers to the correct offset in screen RAM.
152
153One user has reported a similar problem on the Sony F270, although
154others apparently aren't seeing any problems. His suggested command
155is
156
157 insmod nm256 buffertop=0x272800
158
159=================
160Official WWW site
161=================
162
163The official site for the NM256 driver is:
164
165 http://www.uglx.org/sony.html
166
167You should always be able to get the latest version of the driver there,
168and the driver will be supported for the foreseeable future.
169
170==============
171Z505RX and IDE
172==============
173
174There appears to be a problem with the IDE chipset on the Z505RX; one
175of the symptoms is that sound playback periodically hangs (when the
176disk is accessed). The user reporting the problem also reported that
177enabling all of the IDE chipset workarounds in the kernel solved the
178problem, tho obviously only one of them should be needed--if someone
179can give me more details I would appreciate it.
180
181==============================
182Z505S/Z505SX on-board Ethernet
183==============================
184
185If you're using the on-board Ethernet Pro/100 ethernet support on the Z505
186series, I strongly encourage you to download the latest eepro100 driver from
187Donald Becker's site:
188
189 ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/test/eepro100.c
190
191There was a reported problem on the Z505SX that if the ethernet
192interface is disabled and reenabled while the sound driver is loaded,
193the machine would lock up. I have included a workaround that is
194working satisfactorily. However, you may occasionally see a message
195about "Releasing interrupts, over 1000 bad interrupts" which indicates
196that the workaround is doing its job.
197
198==================================
199PCMCIA and the Z505S/Z505SX/Z505DX
200==================================
201
202There is also a known problem with the Sony Z505S and Z505SX hanging
203if a PCMCIA card is inserted while the ethernet driver is loaded, or
204in some cases if the laptop is suspended. This is caused by tons of
205spurious IRQ 9s, probably generated from the PCMCIA or ACPI bridges.
206
207There is currently no fix for the problem that works in every case.
208The only known workarounds are to disable the ethernet interface
209before inserting or removing a PCMCIA card, or with some cards
210disabling the PCMCIA card before ejecting it will also help the
211problem with the laptop hanging when the card is ejected.
212
213One user has reported that setting the tcic's cs_irq to some value
214other than 9 (like 11) fixed the problem. This doesn't work on my
215Z505S, however--changing the value causes the cardmgr to stop seeing
216card insertions and removals, cards don't seem to work correctly, and
217I still get hangs if a card is inserted when the kernel is booted.
218
219Using the latest ethernet driver and pcmcia package allows me to
220insert an Adaptec 1480A SlimScsi card without the laptop hanging,
221although I still have to shut down the card before ejecting or
222powering down the laptop. However, similar experiments with a DE-660
223ethernet card still result in hangs when the card is inserted. I am
224beginning to think that the interrupts are CardBus-related, since the
225Adaptec card is a CardBus card, and the DE-660 is not; however, I
226don't have any other CardBus cards to test with.
227
228======
229Thanks
230======
231
232First, I want to thank everyone (except NeoMagic of course) for their
233generous support and encouragement. I'd like to list everyone's name
234here that replied during the development phase, but the list is
235amazingly long.
236
237I will be rather unfair and single out a few people, however:
238
239 Justin Maurer, for being the first random net.person to try it,
240 and for letting me login to his Z505SX to get it working there
241
242 Edi Weitz for trying out several different versions, and giving
243 me a lot of useful feedback
244
245 Greg Rumple for letting me login remotely to get the driver
246 functional on the 256ZX, for his assistance on tracking
247 down all sorts of random stuff, and for trying out Accel-X
248
249 Zach Brown, for the initial AC97 mixer interface design
250
251 Jeff Garzik, for various helpful suggestions on the AC97
252 interface
253
254 "Mr. Bumpy" for feedback on the Z505RX
255
256 Bill Nottingham, for generous assistance in getting the mixer ID
257 code working
258
259=================
260Previous versions
261=================
262
263Versions prior to 0.3 (aka `noname') had problems with weird artifacts
264in the output and failed to set the recording rate properly. These
265problems have long since been fixed.
266
267Versions prior to 0.5 had problems with clicks in the output when
268anything other than 16-bit stereo sound was being played, and also had
269periodic clicks when recording.
270
271Version 0.7 first incorporated support for the NM256ZX chipset, which
272is found on some Dell Latitude laptops (the CPt, and apparently
273some CPi models as well). It also included the generic AC97
274mixer module.
275
276Version 0.75 renamed all the functions and files with slightly more
277generic names.
278
279Note that previous versions of this document claimed that recording was
2808-bit only; it actually has been working for 16-bits all along.
diff --git a/Documentation/sound/oss/OPL3 b/Documentation/sound/oss/OPL3
new file mode 100644
index 000000000000..2468ff827688
--- /dev/null
+++ b/Documentation/sound/oss/OPL3
@@ -0,0 +1,6 @@
1A pure OPL3 card is nice and easy to configure. Simply do
2
3insmod opl3 io=0x388
4
5Change the I/O address in the very unlikely case this card is differently
6configured
diff --git a/Documentation/sound/oss/OPL3-SA b/Documentation/sound/oss/OPL3-SA
new file mode 100644
index 000000000000..66a91835d918
--- /dev/null
+++ b/Documentation/sound/oss/OPL3-SA
@@ -0,0 +1,52 @@
1OPL3-SA1 sound driver (opl3sa.o)
2
3---
4Note: This howto only describes how to setup the OPL3-SA1 chip; this info
5does not apply to the SA2, SA3, or SA4.
6---
7
8The Yamaha OPL3-SA1 sound chip is usually found built into motherboards, and
9it's a decent little chip offering a WSS mode, a SB Pro emulation mode, MPU401
10and OPL3 FM Synth capabilities.
11
12You can enable inclusion of the driver via CONFIG_SOUND_OPL3SA1=m, or
13CONFIG_SOUND_OPL3SA1=y through 'make config/xconfig/menuconfig'.
14
15You'll need to know all of the relevant info (irq, dma, and io port) for the
16chip's WSS mode, since that is the mode the kernel sound driver uses, and of
17course you'll also need to know about where the MPU401 and OPL3 ports and
18IRQs are if you want to use those.
19
20Here's the skinny on how to load it as a module:
21
22 modprobe opl3sa io=0x530 irq=11 dma=0 dma2=1 mpu_io=0x330 mpu_irq=5
23
24Module options in detail:
25
26 io: This is the WSS's port base.
27 irq: This is the WSS's IRQ.
28 dma: This is the WSS's DMA line. In my BIOS setup screen this was
29 listed as "WSS Play DMA"
30 dma2: This is the WSS's secondary DMA line. My BIOS calls it the
31 "WSS capture DMA"
32
33 mpu_io: This is the MPU401's port base.
34 mpu_irq: This is the MPU401's IRQ.
35
36If you'd like to use the OPL3 FM Synthesizer, make sure you enable
37CONFIG_SOUND_YM3812 (in 'make config'). That'll build the opl3.o module.
38
39Then a simple 'insmod opl3 io=0x388', and you now have FM Synth.
40
41You can also use the SoftOSS software synthesizer instead of the builtin OPL3.
42Here's how:
43
44Say 'y' or 'm' to "SoftOSS software wave table engine" in make config.
45
46If you said yes, the software synth is available once you boot your new
47kernel.
48
49If you chose to build it as a module, just insmod the resulting softoss2.o
50
51Questions? Comments?
52<stiker@northlink.com>
diff --git a/Documentation/sound/oss/OPL3-SA2 b/Documentation/sound/oss/OPL3-SA2
new file mode 100644
index 000000000000..d8b6d2bbada6
--- /dev/null
+++ b/Documentation/sound/oss/OPL3-SA2
@@ -0,0 +1,210 @@
1Documentation for the OPL3-SA2, SA3, and SAx driver (opl3sa2.o)
2---------------------------------------------------------------
3
4Scott Murray, scott@spiteful.org
5January 7, 2001
6
7NOTE: All trade-marked terms mentioned below are properties of their
8 respective owners.
9
10
11Supported Devices
12-----------------
13
14This driver is for PnP soundcards based on the following Yamaha audio
15controller chipsets:
16
17YMF711 aka OPL3-SA2
18YMF715 and YMF719 aka OPL3-SA3
19
20Up until recently (December 2000), I'd thought the 719 to be a
21different chipset, the OPL3-SAx. After an email exhange with
22Yamaha, however, it turns out that the 719 is just a re-badged
23715, and the chipsets are identical. The chipset detection code
24has been updated to reflect this.
25
26Anyways, all of these chipsets implement the following devices:
27
28OPL3 FM synthesizer
29Soundblaster Pro
30Microsoft/Windows Sound System
31MPU401 MIDI interface
32
33Note that this driver uses the MSS device, and to my knowledge these
34chipsets enforce an either/or situation with the Soundblaster Pro
35device and the MSS device. Since the MSS device has better
36capabilities, I have implemented the driver to use it.
37
38
39Mixer Channels
40--------------
41
42Older versions of this driver (pre-December 2000) had two mixers,
43an OPL3-SA2 or SA3 mixer and a MSS mixer. The OPL3-SA[23] mixer
44device contained a superset of mixer channels consisting of its own
45channels and all of the MSS mixer channels. To simplify the driver
46considerably, and to partition functionality better, the OPL3-SA[23]
47mixer device now contains has its own specific mixer channels. They
48are:
49
50Volume - Hardware master volume control
51Bass - SA3 only, now supports left and right channels
52Treble - SA3 only, now supports left and right channels
53Microphone - Hardware microphone input volume control
54Digital1 - Yamaha 3D enhancement "Wide" mixer
55
56All other mixer channels (e.g. "PCM", "CD", etc.) now have to be
57controlled via the "MS Sound System (CS4231)" mixer. To facilitate
58this, the mixer device creation order has been switched so that
59the MSS mixer is created first. This allows accessing the majority
60of the useful mixer channels even via single mixer-aware tools
61such as "aumix".
62
63
64Plug 'n Play
65------------
66
67In previous kernels (2.2.x), some configuration was required to
68get the driver to talk to the card. Being the new millennium and
69all, the 2.4.x kernels now support auto-configuration if ISA PnP
70support is configured in. Theoretically, the driver even supports
71having more than one card in this case.
72
73With the addition of PnP support to the driver, two new parameters
74have been added to control it:
75
76isapnp - set to 0 to disable ISA PnP card detection
77
78multiple - set to 0 to disable multiple PnP card detection
79
80
81Optional Parameters
82-------------------
83
84Recent (December 2000) additions to the driver (based on a patch
85provided by Peter Englmaier) are two new parameters:
86
87ymode - Set Yamaha 3D enhancement mode:
88 0 = Desktop/Normal 5-12 cm speakers
89 1 = Notebook PC (1) 3 cm speakers
90 2 = Notebook PC (2) 1.5 cm speakers
91 3 = Hi-Fi 16-38 cm speakers
92
93loopback - Set A/D input source. Useful for echo cancellation:
94 0 = Mic Right channel (default)
95 1 = Mono output loopback
96
97The ymode parameter has been tested and does work. The loopback
98parameter, however, is untested. Any feedback on its usefulness
99would be appreciated.
100
101
102Manual Configuration
103--------------------
104
105If for some reason you decide not to compile ISA PnP support into
106your kernel, or disabled the driver's usage of it by setting the
107isapnp parameter as discussed above, then you will need to do some
108manual configuration. There are two ways of doing this. The most
109common is to use the isapnptools package to initialize the card, and
110use the kernel module form of the sound subsystem and sound drivers.
111Alternatively, some BIOS's allow manual configuration of installed
112PnP devices in a BIOS menu, which should allow using the non-modular
113sound drivers, i.e. built into the kernel.
114
115I personally use isapnp and modules, and do not have access to a PnP
116BIOS machine to test. If you have such a beast, configuring the
117driver to be built into the kernel should just work (thanks to work
118done by David Luyer <luyer@ucs.uwa.edu.au>). You will still need
119to specify settings, which can be done by adding:
120
121opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio>
122
123to the kernel command line. For example:
124
125opl3sa2=0x370,5,0,1,0x530,0x330
126
127If you are instead using the isapnp tools (as most people have been
128before Linux 2.4.x), follow the directions in their documentation to
129produce a configuration file. Here is the relevant excerpt I used to
130use for my SA3 card from my isapnp.conf:
131
132(CONFIGURE YMH0800/-1 (LD 0
133
134# NOTE: IO 0 is for the unused SoundBlaster part of the chipset.
135(IO 0 (BASE 0x0220))
136(IO 1 (BASE 0x0530))
137(IO 2 (BASE 0x0388))
138(IO 3 (BASE 0x0330))
139(IO 4 (BASE 0x0370))
140(INT 0 (IRQ 5 (MODE +E)))
141(DMA 0 (CHANNEL 0))
142(DMA 1 (CHANNEL 1))
143
144Here, note that:
145
146Port Acceptable Range Purpose
147---- ---------------- -------
148IO 0 0x0220 - 0x0280 SB base address, unused.
149IO 1 0x0530 - 0x0F48 MSS base address
150IO 2 0x0388 - 0x03F8 OPL3 base address
151IO 3 0x0300 - 0x0334 MPU base address
152IO 4 0x0100 - 0x0FFE card's own base address for its control I/O ports
153
154The IRQ and DMA values can be any that are considered acceptable for a
155MSS. Assuming you've got isapnp all happy, then you should be able to
156do something like the following (which matches up with the isapnp
157configuration above):
158
159modprobe mpu401
160modprobe ad1848
161modprobe opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=5 dma=0 dma2=1
162modprobe opl3 io=0x388
163
164See the section "Automatic Module Loading" below for how to set up
165/etc/modprobe.conf to automate this.
166
167An important thing to remember that the opl3sa2 module's io argument is
168for it's own control port, which handles the card's master mixer for
169volume (on all cards), and bass and treble (on SA3 cards).
170
171
172Troubleshooting
173---------------
174
175If all goes well and you see no error messages, you should be able to
176start using the sound capabilities of your system. If you get an
177error message while trying to insert the opl3sa2 module, then make
178sure that the values of the various arguments match what you specified
179in your isapnp configuration file, and that there is no conflict with
180another device for an I/O port or interrupt. Checking the contents of
181/proc/ioports and /proc/interrupts can be useful to see if you're
182butting heads with another device.
183
184If you still cannot get the module to load, look at the contents of
185your system log file, usually /var/log/messages. If you see the
186message "opl3sa2: Unknown Yamaha audio controller version", then you
187have a different chipset version than I've encountered so far. Look
188for all messages in the log file that start with "opl3sa2: " and see
189if they provide any clues. If you do not see the chipset version
190message, and none of the other messages present in the system log are
191helpful, email me some details and I'll try my best to help.
192
193
194Automatic Module Loading
195------------------------
196
197Lastly, if you're using modules and want to set up automatic module
198loading with kmod, the kernel module loader, here is the section I
199currently use in my modprobe.conf file:
200
201# Sound
202alias sound-slot-0 opl3sa2
203options opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=7 dma=0 dma2=3
204options opl3 io=0x388
205
206That's all it currently takes to get an OPL3-SA3 card working on my
207system. Once again, if you have any other problems, email me at the
208address listed above.
209
210Scott
diff --git a/Documentation/sound/oss/Opti b/Documentation/sound/oss/Opti
new file mode 100644
index 000000000000..c15af3c07d46
--- /dev/null
+++ b/Documentation/sound/oss/Opti
@@ -0,0 +1,222 @@
1Support for the OPTi 82C931 chip
2--------------------------------
3Note: parts of this README file apply also to other
4cards that use the mad16 driver.
5
6Some items in this README file are based on features
7added to the sound driver after Linux-2.1.91 was out.
8By the time of writing this I do not know which official
9kernel release will include these features.
10Please do not report inconsistencies on older Linux
11kernels.
12
13The OPTi 82C931 is supported in its non-PnP mode.
14Usually you do not need to set jumpers, etc. The sound driver
15will check the card status and if it is required it will
16force the card into a mode in which it can be programmed.
17
18If you have another OS installed on your computer it is recommended
19that Linux and the other OS use the same resources.
20
21Also, it is recommended that resources specified in /etc/modprobe.conf
22and resources specified in /etc/isapnp.conf agree.
23
24Compiling the sound driver
25--------------------------
26I highly recommend that you build a modularized sound driver.
27This document does not cover a sound-driver which is built in
28the kernel.
29
30Sound card support should be enabled as a module (chose m).
31Answer 'm' for these items:
32 Generic OPL2/OPL3 FM synthesizer support (CONFIG_SOUND_ADLIB)
33 Microsoft Sound System support (CONFIG_SOUND_MSS)
34 Support for OPTi MAD16 and/or Mozart based cards (CONFIG_SOUND_MAD16)
35 FM synthesizer (YM3812/OPL-3) support (CONFIG_SOUND_YM3812)
36
37The configuration menu may ask for addresses, IRQ lines or DMA
38channels. If the card is used as a module the module loading
39options will override these values.
40
41For the OPTi 931 you can answer 'n' to:
42 Support MIDI in older MAD16 based cards (requires SB) (CONFIG_SOUND_MAD16_OLDCARD)
43If you do need MIDI support in a Mozart or C928 based card you
44need to answer 'm' to the above question. In that case you will
45also need to answer 'm' to:
46 '100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support' (CONFIG_SOUND_SB)
47
48Go on and compile your kernel and modules. Install the modules. Run depmod -a.
49
50Using isapnptools
51-----------------
52In most systems with a PnP BIOS you do not need to use isapnp. The
53initialization provided by the BIOS is sufficient for the driver
54to pick up the card and continue initialization.
55
56If that fails, or if you have other PnP cards, you need to use isapnp
57to initialize the card.
58This was tested with isapnptools-1.11 but I recommend that you use
59isapnptools-1.13 (or newer). Run pnpdump to dump the information
60about your PnP cards. Then edit the resulting file and select
61the options of your choice. This file is normally installed as
62/etc/isapnp.conf.
63
64The driver has one limitation with respect to I/O port resources:
65IO3 base must be 0x0E0C. Although isapnp allows other ports, this
66address is hard-coded into the driver.
67
68Using kmod and autoloading the sound driver
69-------------------------------------------
70Comment: as of linux-2.1.90 kmod is replacing kerneld.
71The config file '/etc/modprobe.conf' is used as before.
72
73This is the sound part of my /etc/modprobe.conf file.
74Following that I will explain each line.
75
76alias mixer0 mad16
77alias audio0 mad16
78alias midi0 mad16
79alias synth0 opl3
80options sb mad16=1
81options mad16 irq=10 dma=0 dma16=1 io=0x530 joystick=1 cdtype=0
82options opl3 io=0x388
83install mad16 /sbin/modprobe -i mad16 && /sbin/ad1848_mixer_reroute 14 8 15 3 16 6
84
85If you have an MPU daughtercard or onboard MPU you will want to add to the
86"options mad16" line - eg
87
88options mad16 irq=5 dma=0 dma16=3 io=0x530 mpu_io=0x330 mpu_irq=9
89
90To set the I/O and IRQ of the MPU.
91
92
93Explain:
94
95alias mixer0 mad16
96alias audio0 mad16
97alias midi0 mad16
98alias synth0 opl3
99
100When any sound device is opened the kernel requests auto-loading
101of char-major-14. There is a built-in alias that translates this
102request to loading the main sound module.
103
104The sound module in its turn will request loading of a sub-driver
105for mixer, audio, midi or synthesizer device. The first 3 are
106supported by the mad16 driver. The synth device is supported
107by the opl3 driver.
108
109There is currently no way to autoload the sound device driver
110if more than one card is installed.
111
112options sb mad16=1
113
114This is left for historical reasons. If you enable the
115config option 'Support MIDI in older MAD16 based cards (requires SB)'
116or if you use an older mad16 driver it will force loading of the
117SoundBlaster driver. This option tells the SB driver not to look
118for a SB card but to wait for the mad16 driver.
119
120options mad16 irq=10 dma=0 dma16=1 io=0x530 joystick=1 cdtype=0
121options opl3 io=0x388
122
123post-install mad16 /sbin/ad1848_mixer_reroute 14 8 15 3 16 6
124
125This sets resources and options for the mad16 and opl3 drivers.
126I use two DMA channels (only one is required) to enable full duplex.
127joystick=1 enables the joystick port. cdtype=0 disables the cd port.
128You can also set mpu_io and mpu_irq in the mad16 options for the
129uart401 driver.
130
131This tells modprobe to run /sbin/ad1848_mixer_reroute after
132mad16 is successfully loaded and initialized. The source
133for ad1848_mixer_reroute is appended to the end of this readme
134file. It is impossible for the sound driver to know the actual
135connections to the mixer. The 3 inputs intended for cd, synth
136and line-in are mapped to the generic inputs line1, line2 and
137line3. This program reroutes these mixer channels to their
138right names (note the right mapping depends on the actual sound
139card that you use).
140The numeric parameters mean:
141 14=line1 8=cd - reroute line1 to the CD input.
142 15=line2 3=synth - reroute line2 to the synthesizer input.
143 16=line3 6=line - reroute line3 to the line input.
144For reference on other input names look at the file
145/usr/include/linux/soundcard.h.
146
147Using a joystick
148-----------------
149You must enable a joystick in the mad16 options. (also
150in /etc/isapnp.conf if you use it).
151Tested with regular analog joysticks.
152
153A CDROM drive connected to the sound card
154-----------------------------------------
155The 82C931 chip has support only for secondary ATAPI cdrom.
156(cdtype=8). Loading the mad16 driver resets the C931 chip
157and if a cdrom was already mounted it may cause a complete
158system hang. Do not use the sound card if you have an alternative.
159If you do use the sound card it is important that you load
160the mad16 driver (use "modprobe mad16" to prevent auto-unloading)
161before the cdrom is accessed the first time.
162
163Using the sound driver built-in to the kernel may help here, but...
164Most new systems have a PnP BIOS and also two IDE controllers.
165The IDE controller on the sound card may be needed only on older
166systems (which have only one IDE controller) but these systems
167also do not have a PnP BIOS - requiring isapnptools and a modularized
168driver.
169
170Known problems
171--------------
1721. See the section on "A CDROM drive connected to the sound card".
173
1742. On my system the codec cannot capture companded sound samples.
175 (eg., recording from /dev/audio). When any companded capture is
176 requested I get stereo-16 bit samples instead. Playback of
177 companded samples works well. Apparently this problem is not common
178 to all C931 based cards. I do not know how to identify cards that
179 have this problem.
180
181Source for ad1848_mixer_reroute.c
182---------------------------------
183#include <stdio.h>
184#include <fcntl.h>
185#include <linux/soundcard.h>
186
187static char *mixer_names[SOUND_MIXER_NRDEVICES] =
188 SOUND_DEVICE_LABELS;
189
190int
191main(int argc, char **argv) {
192 int val, from, to;
193 int i, fd;
194
195 fd = open("/dev/mixer", O_RDWR);
196 if(fd < 0) {
197 perror("/dev/mixer");
198 return 1;
199 }
200
201 for(i = 2; i < argc; i += 2) {
202 from = atoi(argv[i-1]);
203 to = atoi(argv[i]);
204
205 if(to == SOUND_MIXER_NONE)
206 fprintf(stderr, "%s: turning off mixer %s\n",
207 argv[0], mixer_names[to]);
208 else
209 fprintf(stderr, "%s: rerouting mixer %s to %s\n",
210 argv[0], mixer_names[from], mixer_names[to]);
211
212 val = from << 8 | to;
213
214 if(ioctl(fd, SOUND_MIXER_PRIVATE2, &val)) {
215 perror("AD1848 mixer reroute");
216 return 1;
217 }
218 }
219
220 return 0;
221}
222
diff --git a/Documentation/sound/oss/PAS16 b/Documentation/sound/oss/PAS16
new file mode 100644
index 000000000000..951b3dce51b4
--- /dev/null
+++ b/Documentation/sound/oss/PAS16
@@ -0,0 +1,163 @@
1Pro Audio Spectrum 16 for 2.3.99 and later
2=========================================
3by Thomas Molina (tmolina@home.com)
4last modified 3 Mar 2001
5Acknowledgement to Axel Boldt (boldt@math.ucsb.edu) for stuff taken
6from Configure.help, Riccardo Facchetti for stuff from README.OSS,
7and others whose names I could not find.
8
9This documentation is relevant for the PAS16 driver (pas2_card.c and
10friends) under kernel version 2.3.99 and later. If you are
11unfamiliar with configuring sound under Linux, please read the
12Sound-HOWTO, Documentation/sound/oss/Introduction and other
13relevant docs first.
14
15The following information is relevant information from README.OSS
16and legacy docs for the Pro Audio Spectrum 16 (PAS16):
17==================================================================
18
19The pas2_card.c driver supports the following cards --
20Pro Audio Spectrum 16 (PAS16) and compatibles:
21 Pro Audio Spectrum 16
22 Pro Audio Studio 16
23 Logitech Sound Man 16
24 NOTE! The original Pro Audio Spectrum as well as the PAS+ are not
25 and will not be supported by the driver.
26
27The sound driver configuration dialog
28-------------------------------------
29
30Sound configuration starts by making some yes/no questions. Be careful
31when answering to these questions since answering y to a question may
32prevent some later ones from being asked. For example don't answer y to
33the question about (PAS16) if you don't really have a PAS16. Sound
34configuration may also be made modular by answering m to configuration
35options presented.
36
37Note also that all questions may not be asked. The configuration program
38may disable some questions depending on the earlier choices. It may also
39select some options automatically as well.
40
41 "ProAudioSpectrum 16 support",
42 - Answer 'y'_ONLY_ if you have a Pro Audio Spectrum _16_,
43 Pro Audio Studio 16 or Logitech SoundMan 16 (be sure that
44 you read the above list correctly). Don't answer 'y' if you
45 have some other card made by Media Vision or Logitech since they
46 are not PAS16 compatible.
47 NOTE! Since 3.5-beta10 you need to enable SB support (next question)
48 if you want to use the SB emulation of PAS16. It's also possible to
49 the emulation if you want to use a true SB card together with PAS16
50 (there is another question about this that is asked later).
51
52 "Generic OPL2/OPL3 FM synthesizer support",
53 - Answer 'y' if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
54 The PAS16 has an OPL3-compatible FM chip.
55
56With PAS16 you can use two audio device files at the same time. /dev/dsp (and
57/dev/audio) is connected to the 8/16 bit native codec and the /dev/dsp1 (and
58/dev/audio1) is connected to the SB emulation (8 bit mono only).
59
60
61The new stuff for 2.3.99 and later
62============================================================================
63The following configuration options from Documentation/Configure.help
64are relevant to configuring the PAS16:
65
66Sound card support
67CONFIG_SOUND
68 If you have a sound card in your computer, i.e. if it can say more
69 than an occasional beep, say Y. Be sure to have all the information
70 about your sound card and its configuration down (I/O port,
71 interrupt and DMA channel), because you will be asked for it.
72
73 You want to read the Sound-HOWTO, available from
74 http://www.tldp.org/docs.html#howto . General information
75 about the modular sound system is contained in the files
76 Documentation/sound/oss/Introduction. The file
77 Documentation/sound/oss/README.OSS contains some slightly outdated but
78 still useful information as well.
79
80OSS sound modules
81CONFIG_SOUND_OSS
82 OSS is the Open Sound System suite of sound card drivers. They make
83 sound programming easier since they provide a common API. Say Y or M
84 here (the module will be called sound.o) if you haven't found a
85 driver for your sound card above, then pick your driver from the
86 list below.
87
88Persistent DMA buffers
89CONFIG_SOUND_DMAP
90 Linux can often have problems allocating DMA buffers for ISA sound
91 cards on machines with more than 16MB of RAM. This is because ISA
92 DMA buffers must exist below the 16MB boundary and it is quite
93 possible that a large enough free block in this region cannot be
94 found after the machine has been running for a while. If you say Y
95 here the DMA buffers (64Kb) will be allocated at boot time and kept
96 until the shutdown. This option is only useful if you said Y to
97 "OSS sound modules", above. If you said M to "OSS sound modules"
98 then you can get the persistent DMA buffer functionality by passing
99 the command-line argument "dmabuf=1" to the sound.o module.
100
101 Say y here for PAS16.
102
103ProAudioSpectrum 16 support
104CONFIG_SOUND_PAS
105 Answer Y only if you have a Pro Audio Spectrum 16, ProAudio Studio
106 16 or Logitech SoundMan 16 sound card. Don't answer Y if you have
107 some other card made by Media Vision or Logitech since they are not
108 PAS16 compatible. It is not necessary to enable the separate
109 Sound Blaster support; it is included in the PAS driver.
110
111 If you compile the driver into the kernel, you have to add
112 "pas2=<io>,<irq>,<dma>,<dma2>,<sbio>,<sbirq>,<sbdma>,<sbdma2>
113 to the kernel command line.
114
115FM Synthesizer (YM3812/OPL-3) support
116CONFIG_SOUND_YM3812
117 Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
118 Answering Y is usually a safe and recommended choice, however some
119 cards may have software (TSR) FM emulation. Enabling FM support with
120 these cards may cause trouble (I don't currently know of any such
121 cards, however).
122 Please read the file Documentation/sound/oss/OPL3 if your card has an
123 OPL3 chip.
124 If you compile the driver into the kernel, you have to add
125 "opl3=<io>" to the kernel command line.
126
127 If you compile your drivers into the kernel, you MUST configure
128 OPL3 support as a module for PAS16 support to work properly.
129 You can then get OPL3 functionality by issuing the command:
130 insmod opl3
131 In addition, you must either add the following line to
132 /etc/modprobe.conf:
133 options opl3 io=0x388
134 or else add the following line to /etc/lilo.conf:
135 opl3=0x388
136
137
138EXAMPLES
139===================================================================
140To use the PAS16 in my computer I have enabled the following sound
141configuration options:
142
143CONFIG_SOUND=y
144CONFIG_SOUND_OSS=y
145CONFIG_SOUND_TRACEINIT=y
146CONFIG_SOUND_DMAP=y
147CONFIG_SOUND_PAS=y
148CONFIG_SOUND_SB=n
149CONFIG_SOUND_YM3812=m
150
151I have also included the following append line in /etc/lilo.conf:
152append="pas2=0x388,10,3,-1,0x220,5,1,-1 sb=0x220,5,1,-1 opl3=0x388"
153
154The io address of 0x388 is default configuration on the PAS16. The
155irq of 10 and dma of 3 may not match your installation. The above
156configuration enables PAS16, 8-bit Soundblaster and OPL3
157functionality. If Soundblaster functionality is not desired, the
158following line would be appropriate:
159append="pas2=0x388,10,3,-1,0,-1,-1,-1 opl3=0x388"
160
161If sound is built totally modular, the above options may be
162specified in /etc/modprobe.conf for pas2, sb and opl3
163respectively.
diff --git a/Documentation/sound/oss/PSS b/Documentation/sound/oss/PSS
new file mode 100644
index 000000000000..187b9525e1f6
--- /dev/null
+++ b/Documentation/sound/oss/PSS
@@ -0,0 +1,41 @@
1The PSS cards and other ECHO based cards provide an onboard DSP with
2downloadable programs and also has an AD1848 "Microsoft Sound System"
3device. The PSS driver enables MSS and MPU401 modes of the card. SB
4is not enabled since it doesn't work concurrently with MSS.
5
6If you build this driver as a module then the driver takes the following
7parameters
8
9pss_io. The I/O base the PSS card is configured at (normally 0x220
10 or 0x240)
11
12mss_io The base address of the Microsoft Sound System interface.
13 This is normally 0x530, but may be 0x604 or other addresses.
14
15mss_irq The interrupt assigned to the Microsoft Sound System
16 emulation. IRQ's 3,5,7,9,10,11 and 12 are available. If you
17 get IRQ errors be sure to check the interrupt is set to
18 "ISA/Legacy" in the BIOS on modern machines.
19
20mss_dma The DMA channel used by the Microsoft Sound System.
21 This can be 0, 1, or 3. DMA 0 is not available on older
22 machines and will cause a crash on them.
23
24mpu_io The MPU emulation base address. This sets the base of the
25 synthesizer. It is typically 0x330 but can be altered.
26
27mpu_irq The interrupt to use for the synthesizer. It must differ
28 from the IRQ used by the Microsoft Sound System port.
29
30
31The mpu_io/mpu_irq fields are optional. If they are not specified the
32synthesizer parts are not configured.
33
34When the module is loaded it looks for a file called
35/etc/sound/pss_synth. This is the firmware file from the DOS install disks.
36This fil holds a general MIDI emulation. The file expected is called
37genmidi.ld on newer DOS driver install disks and synth.ld on older ones.
38
39You can also load alternative DSP algorithms into the card if you wish. One
40alternative driver can be found at http://www.mpg123.de/
41
diff --git a/Documentation/sound/oss/PSS-updates b/Documentation/sound/oss/PSS-updates
new file mode 100644
index 000000000000..c84dd7597e64
--- /dev/null
+++ b/Documentation/sound/oss/PSS-updates
@@ -0,0 +1,88 @@
1 This file contains notes for users of PSS sound cards who wish to use the
2newly added features of the newest version of this driver.
3
4 The major enhancements present in this new revision of this driver is the
5addition of two new module parameters that allow you to take full advantage of
6all the features present on your PSS sound card. These features include the
7ability to enable both the builtin CDROM and joystick ports.
8
9pss_enable_joystick
10
11 This parameter is basically a flag. A 0 will leave the joystick port
12disabled, while a non-zero value would enable the joystick port. The default
13setting is pss_enable_joystick=0 as this keeps this driver fully compatible
14with systems that were using previous versions of this driver. If you wish to
15enable the joystick port you will have to add pss_enable_joystick=1 as an
16argument to the driver. To actually use the joystick port you will then have
17to load the joystick driver itself. Just remember to load the joystick driver
18AFTER the pss sound driver.
19
20pss_cdrom_port
21
22 This parameter takes a port address as its parameter. Any available port
23address can be specified to enable the CDROM port, except for 0x0 and -1 as
24these values would leave the port disabled. Like the joystick port, the cdrom
25port will require that an appropriate CDROM driver be loaded before you can make
26use of the newly enabled CDROM port. Like the joystick port option above,
27remember to load the CDROM driver AFTER the pss sound driver. While it may
28differ on some PSS sound cards, all the PSS sound cards that I have seen have a
29builtin Wearnes CDROM port. If this is the case with your PSS sound card you
30should load aztcd with the appropriate port option that matches the port you
31assigned to the CDROM port when you loaded your pss sound driver. (ex.
32modprobe pss pss_cdrom_port=0x340 && modprobe aztcd aztcd=0x340) The default
33setting of this parameter leaves the CDROM port disabled to maintain full
34compatibility with systems using previous versions of this driver.
35
36 Other options have also been added for the added convenience and utility
37of the user. These options are only available if this driver is loaded as a
38module.
39
40pss_no_sound
41
42 This module parameter is a flag that can be used to tell the driver to
43just configure non-sound components. 0 configures all components, a non-0
44value will only attept to configure the CDROM and joystick ports. This
45parameter can be used by a user who only wished to use the builtin joystick
46and/or CDROM port(s) of his PSS sound card. If this driver is loaded with this
47parameter and with the parameter below set to true then a user can safely unload
48this driver with the following command "rmmod pss && rmmod ad1848 && rmmod
49mpu401 && rmmod sound && rmmod soundcore" and retain the full functionality of
50his CDROM and/or joystick port(s) while gaining back the memory previously used
51by the sound drivers. This default setting of this parameter is 0 to retain
52full behavioral compatibility with previous versions of this driver.
53
54pss_keep_settings
55
56 This parameter can be used to specify whether you want the driver to reset
57all emulations whenever its unloaded. This can be useful for those who are
58sharing resources (io ports, IRQ's, DMA's) between different ISA cards. This
59flag can also be useful in that future versions of this driver may reset all
60emulations by default on the driver's unloading (as it probably should), so
61specifying it now will ensure that all future versions of this driver will
62continue to work as expected. The default value of this parameter is 1 to
63retain full behavioral compatibility with previous versions of this driver.
64
65pss_firmware
66
67 This parameter can be used to specify the file containing the firmware
68code so that a user could tell the driver where that file is located instead
69of having to put it in a predefined location with a predefined name. The
70default setting of this parameter is "/etc/sound/pss_synth" as this was the
71path and filename the hardcoded value in the previous versions of this driver.
72
73Examples:
74
75# Normal PSS sound card system, loading of drivers.
76# Should be specified in an rc file (ex. Slackware uses /etc/rc.d/rc.modules).
77
78/sbin/modprobe pss pss_io=0x220 mpu_io=0x338 mpu_irq=9 mss_io=0x530 mss_irq=10 mss_dma=1 pss_cdrom_port=0x340 pss_enable_joystick=1
79/sbin/modprobe aztcd aztcd=0x340
80/sbin/modprobe joystick
81
82# System using the PSS sound card just for its CDROM and joystick ports.
83# Should be specified in an rc file (ex. Slackware uses /etc/rc.d/rc.modules).
84
85/sbin/modprobe pss pss_io=0x220 pss_cdrom_port=0x340 pss_enable_joystick=1 pss_no_sound=1
86/sbin/rmmod pss && /sbin/rmmod ad1848 && /sbin/rmmod mpu401 && /sbin/rmmod sound && /sbin/rmmod soundcore # This line not needed, but saves memory.
87/sbin/modprobe aztcd aztcd=0x340
88/sbin/modprobe joystick
diff --git a/Documentation/sound/oss/README.OSS b/Documentation/sound/oss/README.OSS
new file mode 100644
index 000000000000..fd42b05b2f55
--- /dev/null
+++ b/Documentation/sound/oss/README.OSS
@@ -0,0 +1,1456 @@
1Introduction
2------------
3
4This file is a collection of all the old Readme files distributed with
5OSS/Lite by Hannu Savolainen. Since the new Linux sound driver is founded
6on it I think these information may still be interesting for users that
7have to configure their sound system.
8
9Be warned: Alan Cox is the current maintainer of the Linux sound driver so if
10you have problems with it, please contact him or the current device-specific
11driver maintainer (e.g. for aedsp16 specific problems contact me). If you have
12patches, contributions or suggestions send them to Alan: I'm sure they are
13welcome.
14
15In this document you will find a lot of references about OSS/Lite or ossfree:
16they are gone forever. Keeping this in mind and with a grain of salt this
17document can be still interesting and very helpful.
18
19[ File edited 17.01.1999 - Riccardo Facchetti ]
20[ Edited miroSOUND section 19.04.2001 - Robert Siemer ]
21
22OSS/Free version 3.8 release notes
23----------------------------------
24
25Please read the SOUND-HOWTO (available from sunsite.unc.edu and other Linux FTP
26sites). It gives instructions about using sound with Linux. It's bit out of
27date but still very useful. Information about bug fixes and such things
28is available from the web page (see above).
29
30Please check http://www.opensound.com/pguide for more info about programming
31with OSS API.
32
33 ====================================================
34- THIS VERSION ____REQUIRES____ Linux 2.1.57 OR LATER.
35 ====================================================
36
37Packages "snd-util-3.8.tar.gz" and "snd-data-0.1.tar.Z"
38contain useful utilities to be used with this driver.
39See http://www.opensound.com/ossfree/getting.html for
40download instructions.
41
42If you are looking for the installation instructions, please
43look forward into this document.
44
45Supported sound cards
46---------------------
47
48See below.
49
50Contributors
51------------
52
53This driver contains code by several contributors. In addition several other
54persons have given useful suggestions. The following is a list of major
55contributors. (I could have forgotten some names.)
56
57 Craig Metz 1/2 of the PAS16 Mixer and PCM support
58 Rob Hooft Volume computation algorithm for the FM synth.
59 Mika Liljeberg uLaw encoding and decoding routines
60 Jeff Tranter Linux SOUND HOWTO document
61 Greg Lee Volume computation algorithm for the GUS and
62 lots of valuable suggestions.
63 Andy Warner ISC port
64 Jim Lowe,
65 Amancio Hasty Jr FreeBSD/NetBSD port
66 Anders Baekgaard Bug hunting and valuable suggestions.
67 Joerg Schubert SB16 DSP support (initial version).
68 Andrew Robinson Improvements to the GUS driver
69 Megens SA MIDI recording for SB and SB Pro (initial version).
70 Mikael Nordqvist Linear volume support for GUS and
71 nonblocking /dev/sequencer.
72 Ian Hartas SVR4.2 port
73 Markus Aroharju and
74 Risto Kankkunen Major contributions to the mixer support
75 of GUS v3.7.
76 Hunyue Yau Mixer support for SG NX Pro.
77 Marc Hoffman PSS support (initial version).
78 Rainer Vranken Initialization for Jazz16 (initial version).
79 Peter Trattler Initial version of loadable module support for Linux.
80 JRA Gibson 16 bit mode for Jazz16 (initial version)
81 Davor Jadrijevic MAD16 support (initial version)
82 Gregor Hoffleit Mozart support (initial version)
83 Riccardo Facchetti Audio Excel DSP 16 (aedsp16) support
84 James Hightower Spotting a tiny but important bug in CS423x support.
85 Denis Sablic OPTi 82C924 specific enhancements (non PnP mode)
86 Tim MacKenzie Full duplex support for OPTi 82C930.
87
88 Please look at lowlevel/README for more contributors.
89
90There are probably many other names missing. If you have sent me some
91patches and your name is not in the above list, please inform me.
92
93Sending your contributions or patches
94-------------------------------------
95
96First of all it's highly recommended to contact me before sending anything
97or before even starting to do any work. Tell me what you suggest to be
98changed or what you have planned to do. Also ensure you are using the
99very latest (development) version of OSS/Free since the change may already be
100implemented there. In general it's a major waste of time to try to improve a
101several months old version. Information about the latest version can be found
102from http://www.opensound.com/ossfree. In general there is no point in
103sending me patches relative to production kernels.
104
105Sponsors etc.
106-------------
107
108The following companies have greatly helped development of this driver
109in form of a free copy of their product:
110
111Novell, Inc. UnixWare personal edition + SDK
112The Santa Cruz Operation, Inc. A SCO OpenServer + SDK
113Ensoniq Corp, a SoundScape card and extensive amount of assistance
114MediaTrix Peripherals Inc, a AudioTrix Pro card + SDK
115Acer, Inc. a pair of AcerMagic S23 cards.
116
117In addition the following companies have provided me sufficient amount
118of technical information at least some of their products (free or $$$):
119
120Advanced Gravis Computer Technology Ltd.
121Media Vision Inc.
122Analog Devices Inc.
123Logitech Inc.
124Aztech Labs Inc.
125Crystal Semiconductor Corporation,
126Integrated Circuit Systems Inc.
127OAK Technology
128OPTi
129Turtle Beach
130miro
131Ad Lib Inc. ($$)
132Music Quest Inc. ($$)
133Creative Labs ($$$)
134
135If you have some problems
136=========================
137
138Read the sound HOWTO (sunsite.unc.edu:/pub/Linux/docs/...?).
139Also look at the home page (http://www.opensound.com/ossfree). It may
140contain info about some recent bug fixes.
141
142It's likely that you have some problems when trying to use the sound driver
143first time. Sound cards don't have standard configuration so there are no
144good default configuration to use. Please try to use same I/O, DMA and IRQ
145values for the sound card than with DOS.
146
147If you get an error message when trying to use the driver, please look
148at /var/adm/messages for more verbose error message.
149
150
151The following errors are likely with /dev/dsp and /dev/audio.
152
153 - "No such device or address".
154 This error indicates that there are no suitable hardware for the
155 device file or the sound driver has been compiled without support for
156 this particular device. For example /dev/audio and /dev/dsp will not
157 work if "digitized voice support" was not enabled during "make config".
158
159 - "Device or resource busy". Probably the IRQ (or DMA) channel
160 required by the sound card is in use by some other device/driver.
161
162 - "I/O error". Almost certainly (99%) it's an IRQ or DMA conflict.
163 Look at the kernel messages in /var/adm/notice for more info.
164
165 - "Invalid argument". The application is calling ioctl()
166 with impossible parameters. Check that the application is
167 for sound driver version 2.X or later.
168
169Linux installation
170==================
171
172IMPORTANT! Read this if you are installing a separately
173 distributed version of this driver.
174
175 Check that your kernel version works with this
176 release of the driver (see Readme). Also verify
177 that your current kernel version doesn't have more
178 recent sound driver version than this one. IT'S HIGHLY
179 RECOMMENDED THAT YOU USE THE SOUND DRIVER VERSION THAT
180 IS DISTRIBUTED WITH KERNEL SOURCES.
181
182- When installing separately distributed sound driver you should first
183 read the above notice. Then try to find proper directory where and how
184 to install the driver sources. You should not try to install a separately
185 distributed driver version if you are not able to find the proper way
186 yourself (in this case use the version that is distributed with kernel
187 sources). Remove old version of linux/drivers/sound directory before
188 installing new files.
189
190- To build the device files you need to run the enclosed shell script
191 (see below). You need to do this only when installing sound driver
192 first time or when upgrading to much recent version than the earlier
193 one.
194
195- Configure and compile Linux as normally (remember to include the
196 sound support during "make config"). Please refer to kernel documentation
197 for instructions about configuring and compiling kernel. File Readme.cards
198 contains card specific instructions for configuring this driver for
199 use with various sound cards.
200
201Boot time configuration (using lilo and insmod)
202-----------------------------------------------
203
204This information has been removed. Too many users didn't believe
205that it's really not necessary to use this method. Please look at
206Readme of sound driver version 3.0.1 if you still want to use this method.
207
208Problems
209--------
210
211Common error messages:
212
213- /dev/???????: No such file or directory.
214Run the script at the end of this file.
215
216- /dev/???????: No such device.
217You are not running kernel which contains the sound driver. When using
218modularized sound driver this error means that the sound driver is not
219loaded.
220
221- /dev/????: No such device or address.
222Sound driver didn't detect suitable card when initializing. Please look at
223Readme.cards for info about configuring the driver with your card. Also
224check for possible boot (insmod) time error messages in /var/adm/messages.
225
226- Other messages or problems
227Please check http://www.opensound.com/ossfree for more info.
228
229Configuring version 3.8 (for Linux) with some common sound cards
230================================================================
231
232This document describes configuring sound cards with the freeware version of
233Open Sound Systems (OSS/Free). Information about the commercial version
234(OSS/Linux) and its configuration is available from
235http://www.opensound.com/linux.html. Information presented here is
236not valid for OSS/Linux.
237
238If you are unsure about how to configure OSS/Free
239you can download the free evaluation version of OSS/Linux from the above
240address. There is a chance that it can autodetect your sound card. In this case
241you can use the information included in soundon.log when configuring OSS/Free.
242
243
244IMPORTANT! This document covers only cards that were "known" when
245 this driver version was released. Please look at
246 http://www.opensound.com/ossfree for info about
247 cards introduced recently.
248
249 When configuring the sound driver, you should carefully
250 check each sound configuration option (particularly
251 "Support for /dev/dsp and /dev/audio"). The default values
252 offered by these programs are not necessarily valid.
253
254
255THE BIGGEST MISTAKES YOU CAN MAKE
256=================================
257
2581. Assuming that the card is Sound Blaster compatible when it's not.
259--------------------------------------------------------------------
260
261The number one mistake is to assume that your card is compatible with
262Sound Blaster. Only the cards made by Creative Technology or which have
263one or more chips labeled by Creative are SB compatible. In addition there
264are few sound chipsets which are SB compatible in Linux such as ESS1688 or
265Jazz16. Note that SB compatibility in DOS/Windows does _NOT_ mean anything
266in Linux.
267
268IF YOU REALLY ARE 150% SURE YOU HAVE A SOUND BLASTER YOU CAN SKIP THE REST OF
269THIS CHAPTER.
270
271For most other "supposed to be SB compatible" cards you have to use other
272than SB drivers (see below). It is possible to get most sound cards to work
273in SB mode but in general it's a complete waste of time. There are several
274problems which you will encounter by using SB mode with cards that are not
275truly SB compatible:
276
277- The SB emulation is at most SB Pro (DSP version 3.x) which means that
278you get only 8 bit audio (there is always an another ("native") mode which
279gives the 16 bit capability). The 8 bit only operation is the reason why
280many users claim that sound quality in Linux is much worse than in DOS.
281In addition some applications require 16 bit mode and they produce just
282noise with a 8 bit only device.
283- The card may work only in some cases but refuse to work most of the
284time. The SB compatible mode always requires special initialization which is
285done by the DOS/Windows drivers. This kind of cards work in Linux after
286you have warm booted it after DOS but they don't work after cold boot
287(power on or reset).
288- You get the famous "DMA timed out" messages. Usually all SB clones have
289software selectable IRQ and DMA settings. If the (power on default) values
290currently used by the card don't match configuration of the driver you will
291get the above error message whenever you try to record or play. There are
292few other reasons to the DMA timeout message but using the SB mode seems
293to be the most common cause.
294
2952. Trying to use a PnP (Plug & Play) card just like an ordinary sound card
296--------------------------------------------------------------------------
297
298Plug & Play is a protocol defined by Intel and Microsoft. It lets operating
299systems to easily identify and reconfigure I/O ports, IRQs and DMAs of ISA
300cards. The problem with PnP cards is that the standard Linux doesn't currently
301(versions 2.1.x and earlier) don't support PnP. This means that you will have
302to use some special tricks (see later) to get a PnP card alive. Many PnP cards
303work after they have been initialized but this is not always the case.
304
305There are sometimes both PnP and non-PnP versions of the same sound card.
306The non-PnP version is the original model which usually has been discontinued
307more than an year ago. The PnP version has the same name but with "PnP"
308appended to it (sometimes not). This causes major confusion since the non-PnP
309model works with Linux but the PnP one doesn't.
310
311You should carefully check if "Plug & Play" or "PnP" is mentioned in the name
312of the card or in the documentation or package that came with the card.
313Everything described in the rest of this document is not necessarily valid for
314PnP models of sound cards even you have managed to wake up the card properly.
315Many PnP cards are simply too different from their non-PnP ancestors which are
316covered by this document.
317
318
319Cards that are not (fully) supported by this driver
320===================================================
321
322See http://www.opensound.com/ossfree for information about sound cards
323to be supported in future.
324
325
326How to use sound without recompiling kernel and/or sound driver
327===============================================================
328
329There is a commercial sound driver which comes in precompiled form and doesn't
330require recompiling of the kernel. See http://www.4Front-tech.com/oss.html for
331more info.
332
333
334Configuring PnP cards
335=====================
336
337New versions of most sound cards use the so-called ISA PnP protocol for
338soft configuring their I/O, IRQ, DMA and shared memory resources.
339Currently at least cards made by Creative Technology (SB32 and SB32AWE
340PnP), Gravis (GUS PnP and GUS PnP Pro), Ensoniq (Soundscape PnP) and
341Aztech (some Sound Galaxy models) use PnP technology. The CS4232/4236 audio
342chip by Crystal Semiconductor (Intel Atlantis, HP Pavilion and many other
343motherboards) is also based on PnP technology but there is a "native" driver
344available for it (see information about CS4232 later in this document).
345
346PnP sound cards (as well as most other PnP ISA cards) are not supported
347by this version of the driver . Proper
348support for them should be released during 97 once the kernel level
349PnP support is available.
350
351There is a method to get most of the PnP cards to work. The basic method
352is the following:
353
3541) Boot DOS so the card's DOS drivers have a chance to initialize it.
3552) _Cold_ boot to Linux by using "loadlin.exe". Hitting ctrl-alt-del
356works with older machines but causes a hard reset of all cards on recent
357(Pentium) machines.
3583) If you have the sound driver in Linux configured properly, the card should
359work now. "Proper" means that I/O, IRQ and DMA settings are the same as in
360DOS. The hard part is to find which settings were used. See the documentation of
361your card for more info.
362
363Windows 95 could work as well as DOS but running loadlin may be difficult.
364Probably you should "shut down" your machine to MS-DOS mode before running it.
365
366Some machines have a BIOS utility for setting PnP resources. This is a good
367way to configure some cards. In this case you don't need to boot DOS/Win95
368before starting Linux.
369
370Another way to initialize PnP cards without DOS/Win95 is a Linux based
371PnP isolation tool. When writing this there is a pre alpha test version
372of such a tool available from ftp://ftp.demon.co.uk/pub/unix/linux/utils. The
373file is called isapnptools-*. Please note that this tool is just a temporary
374solution which may be incompatible with future kernel versions having proper
375support for PnP cards. There are bugs in setting DMA channels in earlier
376versions of isapnptools so at least version 1.6 is required with sound cards.
377
378Yet another way to use PnP cards is to use (commercial) OSS/Linux drivers. See
379http://www.opensound.com/linux.html for more info. This is probably the way you
380should do it if you don't want to spend time recompiling the kernel and
381required tools.
382
383
384Read this before trying to configure the driver
385===============================================
386
387There are currently many cards that work with this driver. Some of the cards
388have native support while others work since they emulate some other
389card (usually SB, MSS/WSS and/or MPU401). The following cards have native
390support in the driver. Detailed instructions for configuring these cards
391will be given later in this document.
392
393Pro Audio Spectrum 16 (PAS16) and compatibles:
394 Pro Audio Spectrum 16
395 Pro Audio Studio 16
396 Logitech Sound Man 16
397 NOTE! The original Pro Audio Spectrum as well as the PAS+ are not
398 and will not be supported by the driver.
399
400Media Vision Jazz16 based cards
401 Pro Sonic 16
402 Logitech SoundMan Wave
403 (Other Jazz based cards should work but I don't have any reports
404 about them).
405
406Sound Blasters
407 SB 1.0 to 2.0
408 SB Pro
409 SB 16
410 SB32/64/AWE
411 Configure SB32/64/AWE just like SB16. See lowlevel/README.awe
412 for information about using the wave table synth.
413 NOTE! AWE63/Gold and 16/32/AWE "PnP" cards need to be activated
414 using isapnptools before they work with OSS/Free.
415 SB16 compatible cards by other manufacturers than Creative.
416 You have been fooled since there are _no_ SB16 compatible
417 cards on the market (as of May 1997). It's likely that your card
418 is compatible just with SB Pro but there is also a non-SB-
419 compatible 16 bit mode. Usually it's MSS/WSS but it could also
420 be a proprietary one like MV Jazz16 or ESS ES688. OPTi
421 MAD16 chips are very common in so called "SB 16 bit cards"
422 (try with the MAD16 driver).
423
424 ======================================================================
425 "Supposed to be SB compatible" cards.
426 Forget the SB compatibility and check for other alternatives
427 first. The only cards that work with the SB driver in
428 Linux have been made by Creative Technology (there is at least
429 one chip on the card with "CREATIVE" printed on it). The
430 only other SB compatible chips are ESS and Jazz16 chips
431 (maybe ALSxxx chips too but they probably don't work).
432 Most other "16 bit SB compatible" cards such as "OPTi/MAD16" or
433 "Crystal" are _NOT_ SB compatible in Linux.
434
435 Practically all sound cards have some kind of SB emulation mode
436 in addition to their native (16 bit) mode. In most cases this
437 (8 bit only) SB compatible mode doesn't work with Linux. If
438 you get it working it may cause problems with games and
439 applications which require 16 bit audio. Some 16 bit only
440 applications don't check if the card actually supports 16 bits.
441 They just dump 16 bit data to a 8 bit card which produces just
442 noise.
443
444 In most cases the 16 bit native mode is supported by Linux.
445 Use the SB mode with "clones" only if you don't find anything
446 better from the rest of this doc.
447 ======================================================================
448
449Gravis Ultrasound (GUS)
450 GUS
451 GUS + the 16 bit option
452 GUS MAX
453 GUS ACE (No MIDI port and audio recording)
454 GUS PnP (with RAM)
455
456MPU-401 and compatibles
457 The driver works both with the full (intelligent mode) MPU-401
458 cards (such as MPU IPC-T and MQX-32M) and with the UART only
459 dumb MIDI ports. MPU-401 is currently the most common MIDI
460 interface. Most sound cards are compatible with it. However,
461 don't enable MPU401 mode blindly. Many cards with native support
462 in the driver have their own MPU401 driver. Enabling the standard one
463 will cause a conflict with these cards. So check if your card is
464 in the list of supported cards before enabling MPU401.
465
466Windows Sound System (MSS/WSS)
467 Even when Microsoft has discontinued their own Sound System card
468 they managed to make it a standard. MSS compatible cards are based on
469 a codec chip which is easily available from at least two manufacturers
470 (AD1848 by Analog Devices and CS4231/CS4248 by Crystal Semiconductor).
471 Currently most sound cards are based on one of the MSS compatible codec
472 chips. The CS4231 is used in the high quality cards such as GUS MAX,
473 MediaTrix AudioTrix Pro and TB Tropez (GUS MAX is not MSS compatible).
474
475 Having a AD1848, CS4248 or CS4231 codec chip on the card is a good
476 sign. Even if the card is not MSS compatible, it could be easy to write
477 support for it. Note also that most MSS compatible cards
478 require special boot time initialization which may not be present
479 in the driver. Also, some MSS compatible cards have native support.
480 Enabling the MSS support with these cards is likely to
481 cause a conflict. So check if your card is listed in this file before
482 enabling the MSS support.
483
484Yamaha FM synthesizers (OPL2, OPL3 (not OPL3-SA) and OPL4)
485 Most sound cards have a FM synthesizer chip. The OPL2 is a 2
486 operator chip used in the original AdLib card. Currently it's used
487 only in the cheapest (8 bit mono) cards. The OPL3 is a 4 operator
488 FM chip which provides better sound quality and/or more available
489 voices than the OPL2. The OPL4 is a new chip that has an OPL3 and
490 a wave table synthesizer packed onto the same chip. The driver supports
491 just the OPL3 mode directly. Most cards with an OPL4 (like
492 SM Wave and AudioTrix Pro) support the OPL4 mode using MPU401
493 emulation. Writing a native OPL4 support is difficult
494 since Yamaha doesn't give information about their sample ROM chip.
495
496 Enable the generic OPL2/OPL3 FM synthesizer support if your
497 card has a FM chip made by Yamaha. Don't enable it if your card
498 has a software (TRS) based FM emulator.
499
500 ----------------------------------------------------------------
501 NOTE! OPL3-SA is different chip than the ordinary OPL3. In addition
502 to the FM synth this chip has also digital audio (WSS) and
503 MIDI (MPU401) capabilities. Support for OPL3-SA is described below.
504 ----------------------------------------------------------------
505
506Yamaha OPL3-SA1
507
508 Yamaha OPL3-SA1 (YMF701) is an audio controller chip used on some
509 (Intel) motherboards and on cheap sound cards. It should not be
510 confused with the original OPL3 chip (YMF278) which is entirely
511 different chip. OPL3-SA1 has support for MSS, MPU401 and SB Pro
512 (not used in OSS/Free) in addition to the OPL3 FM synth.
513
514 There are also chips called OPL3-SA2, OPL3-SA3, ..., OPL3SA-N. They
515 are PnP chips and will not work with the OPL3-SA1 driver. You should
516 use the standard MSS, MPU401 and OPL3 options with these chips and to
517 activate the card using isapnptools.
518
5194Front Technologies SoftOSS
520
521 SoftOSS is a software based wave table emulation which works with
522 any 16 bit stereo sound card. Due to its nature a fast CPU is
523 required (P133 is minimum). Although SoftOSS does _not_ use MMX
524 instructions it has proven out that recent processors (which appear
525 to have MMX) perform significantly better with SoftOSS than earlier
526 ones. For example a P166MMX beats a PPro200. SoftOSS should not be used
527 on 486 or 386 machines.
528
529 The amount of CPU load caused by SoftOSS can be controlled by
530 selecting the CONFIG_SOFTOSS_RATE and CONFIG_SOFTOSS_VOICES
531 parameters properly (they will be prompted by make config). It's
532 recommended to set CONFIG_SOFTOSS_VOICES to 32. If you have a
533 P166MMX or faster (PPro200 is not faster) you can set
534 CONFIG_SOFTOSS_RATE to 44100 (kHz). However with slower systems it
535 recommended to use sampling rates around 22050 or even 16000 kHz.
536 Selecting too high values for these parameters may hang your
537 system when playing MIDI files with hight degree of polyphony
538 (number of concurrently playing notes). It's also possible to
539 decrease CONFIG_SOFTOSS_VOICES. This makes it possible to use
540 higher sampling rates. However using fewer voices decreases
541 playback quality more than decreasing the sampling rate.
542
543 SoftOSS keeps the samples loaded on the system's RAM so much RAM is
544 required. SoftOSS should never be used on machines with less than 16 MB
545 of RAM since this is potentially dangerous (you may accidentally run out
546 of memory which probably crashes the machine).
547
548 SoftOSS implements the wave table API originally designed for GUS. For
549 this reason all applications designed for GUS should work (at least
550 after minor modifications). For example gmod/xgmod and playmidi -g are
551 known to work.
552
553 To work SoftOSS will require GUS compatible
554 patch files to be installed on the system (in /dos/ultrasnd/midi). You
555 can use the public domain MIDIA patchset available from several ftp
556 sites.
557
558 *********************************************************************
559 IMPORTANT NOTICE! The original patch set distributed with the Gravis
560 Ultrasound card is not in public domain (even though it's available from
561 some FTP sites). You should contact Voice Crystal (www.voicecrystal.com)
562 if you like to use these patches with SoftOSS included in OSS/Free.
563 *********************************************************************
564
565PSS based cards (AD1848 + ADSP-2115 + Echo ESC614 ASIC)
566 Analog Devices and Echo Speech have together defined a sound card
567 architecture based on the above chips. The DSP chip is used
568 for emulation of SB Pro, FM and General MIDI/MT32.
569
570 There are several cards based on this architecture. The most known
571 ones are Orchid SW32 and Cardinal DSP16.
572
573 The driver supports downloading DSP algorithms to these cards.
574
575 NOTE! You will have to use the "old" config script when configuring
576 PSS cards.
577
578MediaTrix AudioTrix Pro
579 The ATP card is built around a CS4231 codec and an OPL4 synthesizer
580 chips. The OPL4 mode is supported by a microcontroller running a
581 General MIDI emulator. There is also a SB 1.5 compatible playback mode.
582
583Ensoniq SoundScape and compatibles
584 Ensoniq has designed a sound card architecture based on the
585 OTTO synthesizer chip used in their professional MIDI synthesizers.
586 Several companies (including Ensoniq, Reveal and Spea) are selling
587 cards based on this architecture.
588
589 NOTE! The SoundScape PnP is not supported by OSS/Free. Ensoniq VIVO and
590 VIVO90 cards are not compatible with Soundscapes so the Soundscape
591 driver will not work with them. You may want to use OSS/Linux with these
592 cards.
593
594OPTi MAD16 and Mozart based cards
595 The Mozart (OAK OTI-601), MAD16 (OPTi 82C928), MAD16 Pro (OPTi 82C929),
596 OPTi 82C924/82C925 (in _non_ PnP mode) and OPTi 82C930 interface
597 chips are used in many different sound cards, including some
598 cards by Reveal miro and Turtle Beach (Tropez). The purpose of these
599 chips is to connect other audio components to the PC bus. The
600 interface chip performs address decoding for the other chips.
601 NOTE! Tropez Plus is not MAD16 but CS4232 based.
602 NOTE! MAD16 PnP cards (82C924, 82C925, 82C931) are not MAD16 compatible
603 in the PnP mode. You will have to use them in MSS mode after having
604 initialized them using isapnptools or DOS. 82C931 probably requires
605 initialization using DOS/Windows (running isapnptools is not enough).
606 It's possible to use 82C931 with OSS/Free by jumpering it to non-PnP
607 mode (provided that the card has a jumper for this). In non-PnP mode
608 82C931 is compatible with 82C930 and should work with the MAD16 driver
609 (without need to use isapnptools or DOS to initialize it). All OPTi
610 chips are supported by OSS/Linux (both in PnP and non-PnP modes).
611
612Audio Excel DSP16
613 Support for this card was written by Riccardo Faccetti
614 (riccardo@cdc8g5.cdc.polimi.it). The AEDSP16 driver included in
615 the lowlevel/ directory. To use it you should enable the
616 "Additional low level drivers" option.
617
618Crystal CS4232 and CS4236 based cards such as AcerMagic S23, TB Tropez _Plus_ and
619 many PC motherboards (Compaq, HP, Intel, ...)
620 CS4232 is a PnP multimedia chip which contains a CS3231A codec,
621 SB and MPU401 emulations. There is support for OPL3 too.
622 Unfortunately the MPU401 mode doesn't work (I don't know how to
623 initialize it). CS4236 is an enhanced (compatible) version of CS4232.
624 NOTE! Don't ever try to use isapnptools with CS4232 since this will just
625 freeze your machine (due to chip bugs). If you have problems in getting
626 CS4232 working you could try initializing it with DOS (CS4232C.EXE) and
627 then booting Linux using loadlin. CS4232C.EXE loads a secret firmware
628 patch which is not documented by Crystal.
629
630Turtle Beach Maui and Tropez "classic"
631 This driver version supports sample, patch and program loading commands
632 described in the Maui/Tropez User's manual.
633 There is now full initialization support too. The audio side of
634 the Tropez is based on the MAD16 chip (see above).
635 NOTE! Tropez Plus is different card than Tropez "classic" and will not
636 work fully in Linux. You can get audio features working by configuring
637 the card as a CS4232 based card (above).
638
639
640Jumpers and software configuration
641==================================
642
643Some of the earliest sound cards were jumper configurable. You have to
644configure the driver use I/O, IRQ and DMA settings
645that match the jumpers. Just few 8 bit cards are fully jumper
646configurable (SB 1.x/2.x, SB Pro and clones).
647Some cards made by Aztech have an EEPROM which contains the
648config info. These cards behave much like hardware jumpered cards.
649
650Most cards have jumper for the base I/O address but other parameters
651are software configurable. Sometimes there are few other jumpers too.
652
653Latest cards are fully software configurable or they are PnP ISA
654compatible. There are no jumpers on the board.
655
656The driver handles software configurable cards automatically. Just configure
657the driver to use I/O, IRQ and DMA settings which are known to work.
658You could usually use the same values than with DOS and/or Windows.
659Using different settings is possible but not recommended since it may cause
660some trouble (for example when warm booting from an OS to another or
661when installing new hardware to the machine).
662
663Sound driver sets the soft configurable parameters of the card automatically
664during boot. Usually you don't need to run any extra initialization
665programs when booting Linux but there are some exceptions. See the
666card-specific instructions below for more info.
667
668The drawback of software configuration is that the driver needs to know
669how the card must be initialized. It cannot initialize unknown cards
670even if they are otherwise compatible with some other cards (like SB,
671MPU401 or Windows Sound System).
672
673
674What if your card was not listed above?
675=======================================
676
677The first thing to do is to look at the major IC chips on the card.
678Many of the latest sound cards are based on some standard chips. If you
679are lucky, all of them could be supported by the driver. The most common ones
680are the OPTi MAD16, Mozart, SoundScape (Ensoniq) and the PSS architectures
681listed above. Also look at the end of this file for list of unsupported
682cards and the ones which could be supported later.
683
684The last resort is to send _exact_ name and model information of the card
685to me together with a list of the major IC chips (manufactured, model) to
686me. I could then try to check if your card looks like something familiar.
687
688There are many more cards in the world than listed above. The first thing to
689do with these cards is to check if they emulate some other card or interface
690such as SB, MSS and/or MPU401. In this case there is a chance to get the
691card to work by booting DOS before starting Linux (boot DOS, hit ctrl-alt-del
692and boot Linux without hard resetting the machine). In this method the
693DOS based driver initializes the hardware to use known I/O, IRQ and DMA
694settings. If sound driver is configured to use the same settings, everything
695should work OK.
696
697
698Configuring sound driver (with Linux)
699=====================================
700
701The sound driver is currently distributed as part of the Linux kernel. The
702files are in /usr/src/linux/drivers/sound/.
703
704****************************************************************************
705* ALWAYS USE THE SOUND DRIVER VERSION WHICH IS DISTRIBUTED WITH *
706* THE KERNEL SOURCE PACKAGE YOU ARE USING. SOME ALPHA AND BETA TEST *
707* VERSIONS CAN BE INSTALLED FROM A SEPARATELY DISTRIBUTED PACKAGE *
708* BUT CHECK THAT THE PACKAGE IS NOT MUCH OLDER (OR NEWER) THAN THE *
709* KERNEL YOU ARE USING. IT'S POSSIBLE THAT THE KERNEL/DRIVER *
710* INTERFACE CHANGES BETWEEN KERNEL RELEASES WHICH MAY CAUSE SOME *
711* INCOMPATIBILITY PROBLEMS. *
712* *
713* IN CASE YOU INSTALL A SEPARATELY DISTRIBUTED SOUND DRIVER VERSION, *
714* BE SURE TO REMOVE OR RENAME THE OLD SOUND DRIVER DIRECTORY BEFORE *
715* INSTALLING THE NEW ONE. LEAVING OLD FILES TO THE SOUND DRIVER *
716* DIRECTORY _WILL_ CAUSE PROBLEMS WHEN THE DRIVER IS USED OR *
717* COMPILED. *
718****************************************************************************
719
720To configure the driver, run "make config" in the kernel source directory
721(/usr/src/linux). Answer "y" or "m" to the question about Sound card support
722(after the questions about mouse, CD-ROM, ftape, etc. support). Questions
723about options for sound will then be asked.
724
725After configuring the kernel and sound driver and compile the kernel
726following instructions in the kernel README.
727
728The sound driver configuration dialog
729-------------------------------------
730
731Sound configuration starts by making some yes/no questions. Be careful
732when answering to these questions since answering y to a question may
733prevent some later ones from being asked. For example don't answer y to
734the first question (PAS16) if you don't really have a PAS16. Don't enable
735more cards than you really need since they just consume memory. Also
736some drivers (like MPU401) may conflict with your SCSI controller and
737prevent kernel from booting. If you card was in the list of supported
738cards (above), please look at the card specific config instructions
739(later in this file) before starting to configure. Some cards must be
740configured in way which is not obvious.
741
742So here is the beginning of the config dialog. Answer 'y' or 'n' to these
743questions. The default answer is shown so that (y/n) means 'y' by default and
744(n/y) means 'n'. To use the default value, just hit ENTER. But be careful
745since using the default _doesn't_ guarantee anything.
746
747Note also that all questions may not be asked. The configuration program
748may disable some questions depending on the earlier choices. It may also
749select some options automatically as well.
750
751 "ProAudioSpectrum 16 support",
752 - Answer 'y'_ONLY_ if you have a Pro Audio Spectrum _16_,
753 Pro Audio Studio 16 or Logitech SoundMan 16 (be sure that
754 you read the above list correctly). Don't answer 'y' if you
755 have some other card made by Media Vision or Logitech since they
756 are not PAS16 compatible.
757 NOTE! Since 3.5-beta10 you need to enable SB support (next question)
758 if you want to use the SB emulation of PAS16. It's also possible to
759 the emulation if you want to use a true SB card together with PAS16
760 (there is another question about this that is asked later).
761 "Sound Blaster support",
762 - Answer 'y' if you have an original SB card made by Creative Labs
763 or a full 100% hardware compatible clone (like Thunderboard or
764 SM Games). If your card was in the list of supported cards (above),
765 please look at the card specific instructions later in this file
766 before answering this question. For an unknown card you may answer
767 'y' if the card claims to be SB compatible.
768 Enable this option also with PAS16 (changed since v3.5-beta9).
769
770 Don't enable SB if you have a MAD16 or Mozart compatible card.
771
772 "Generic OPL2/OPL3 FM synthesizer support",
773 - Answer 'y' if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
774 Answering 'y' is usually a safe and recommended choice. However some
775 cards may have software (TSR) FM emulation. Enabling FM support
776 with these cards may cause trouble. However I don't currently know
777 such cards.
778 "Gravis Ultrasound support",
779 - Answer 'y' if you have GUS or GUS MAX. Answer 'n' if you don't
780 have GUS since the GUS driver consumes much memory.
781 Currently I don't have experiences with the GUS ACE so I don't
782 know what to answer with it.
783 "MPU-401 support (NOT for SB16)",
784 - Be careful with this question. The MPU401 interface is supported
785 by almost any sound card today. However some natively supported cards
786 have their own driver for MPU401. Enabling the MPU401 option with
787 these cards will cause a conflict. Also enabling MPU401 on a system
788 that doesn't really have a MPU401 could cause some trouble. If your
789 card was in the list of supported cards (above), please look at
790 the card specific instructions later in this file.
791
792 In MOST cases this MPU401 driver should only be used with "true"
793 MIDI-only MPU401 professional cards. In most other cases there
794 is another way to get the MPU401 compatible interface of a
795 sound card to work.
796 Support for the MPU401 compatible MIDI port of SB16, ESS1688
797 and MV Jazz16 cards is included in the SB driver. Use it instead
798 of this separate MPU401 driver with these cards. As well
799 Soundscape, PSS and Maui drivers include their own MPU401
800 options.
801
802 It's safe to answer 'y' if you have a true MPU401 MIDI interface
803 card.
804 "6850 UART Midi support",
805 - It's safe to answer 'n' to this question in all cases. The 6850
806 UART interface is so rarely used.
807 "PSS (ECHO-ADI2111) support",
808 - Answer 'y' only if you have Orchid SW32, Cardinal DSP16 or some
809 other card based on the PSS chipset (AD1848 codec + ADSP-2115
810 DSP chip + Echo ESC614 ASIC CHIP).
811 "16 bit sampling option of GUS (_NOT_ GUS MAX)",
812 - Answer 'y' if you have installed the 16 bit sampling daughtercard
813 to your GUS. Answer 'n' if you have GUS MAX. Enabling this option
814 disables GUS MAX support.
815 "GUS MAX support",
816 - Answer 'y' only if you have a GUS MAX.
817 "Microsoft Sound System support",
818 - Again think carefully before answering 'y' to this question. It's
819 safe to answer 'y' in case you have the original Windows Sound
820 System card made by Microsoft or Aztech SG 16 Pro (or NX16 Pro).
821 Also you may answer 'y' in case your card was not listed earlier
822 in this file. For cards having native support in the driver, consult
823 the card specific instructions later in this file. Some drivers
824 have their own MSS support and enabling this option will cause a
825 conflict.
826 Note! The MSS driver permits configuring two DMA channels. This is a
827 "nonstandard" feature and works only with very few cards (if any).
828 In most cases the second DMA channel should be disabled or set to
829 the same channel than the first one. Trying to configure two separate
830 channels with cards that don't support this feature will prevent
831 audio (at least recording) from working.
832 "Ensoniq Soundscape support",
833 - Answer 'y' if you have a sound card based on the Ensoniq SoundScape
834 chipset. Such cards are being manufactured at least by Ensoniq,
835 Spea and Reveal (note that Reveal makes other cards also). The oldest
836 cards made by Spea don't work properly with Linux.
837 Soundscape PnP as well as Ensoniq VIVO work only with the commercial
838 OSS/Linux version.
839 "MediaTrix AudioTrix Pro support",
840 - Answer 'y' if you have the AudioTrix Pro.
841 "Support for MAD16 and/or Mozart based cards",
842 - Answer y if your card has a Mozart (OAK OTI-601) or MAD16
843 (OPTi 82C928, 82C929, 82C924/82C925 or 82C930) audio interface chip.
844 These chips are
845 currently quite common so it's possible that many no-name cards
846 have one of them. In addition the MAD16 chip is used in some
847 cards made by known manufacturers such as Turtle Beach (Tropez),
848 Reveal (some models) and Diamond (some recent models).
849 Note OPTi 82C924 and 82C925 are MAD16 compatible only in non PnP
850 mode (jumper selectable on many cards).
851 "Support for TB Maui"
852 - This enables TB Maui specific initialization. Works with TB Maui
853 and TB Tropez (may not work with Tropez Plus).
854
855
856Then the configuration program asks some y/n questions about the higher
857level services. It's recommended to answer 'y' to each of these questions.
858Answer 'n' only if you know you will not need the option.
859
860 "MIDI interface support",
861 - Answering 'n' disables /dev/midi## devices and access to any
862 MIDI ports using /dev/sequencer and /dev/music. This option
863 also affects any MPU401 and/or General MIDI compatible devices.
864 "FM synthesizer (YM3812/OPL-3) support",
865 - Answer 'y' here.
866 "/dev/sequencer support",
867 - Answering 'n' disables /dev/sequencer and /dev/music.
868
869Entering the I/O, IRQ and DMA config parameters
870-----------------------------------------------
871
872After the above questions the configuration program prompts for the
873card specific configuration information. Usually just a set of
874I/O address, IRQ and DMA numbers are asked. With some cards the program
875asks for some files to be used during initialization of the card. For example
876many cards have a DSP chip or microprocessor which must be initialized by
877downloading a program (microcode) file to the card.
878
879Instructions for answering these questions are given in the next section.
880
881
882Card specific information
883=========================
884
885This section gives additional instructions about configuring some cards.
886Please refer manual of your card for valid I/O, IRQ and DMA numbers. Using
887the same settings with DOS/Windows and Linux is recommended. Using
888different values could cause some problems when switching between
889different operating systems.
890
891Sound Blasters (the original ones by Creative)
892---------------------------------------------
893
894NOTE! Check if you have a PnP Sound Blaster (cards sold after summer 1995
895 are almost certainly PnP ones). With PnP cards you should use isapnptools
896 to activate them (see above).
897
898It's possible to configure these cards to use different I/O, IRQ and
899DMA settings. Since the possible/default settings have changed between various
900models, you have to consult manual of your card for the proper ones. It's
901a good idea to use the same values than with DOS/Windows. With SB and SB Pro
902it's the only choice. SB16 has software selectable IRQ and DMA channels but
903using different values with DOS and Linux is likely to cause troubles. The
904DOS driver is not able to reset the card properly after warm boot from Linux
905if Linux has used different IRQ or DMA values.
906
907The original (steam) Sound Blaster (versions 1.x and 2.x) use always
908DMA1. There is no way to change it.
909
910The SB16 needs two DMA channels. A 8 bit one (1 or 3) is required for
9118 bit operation and a 16 bit one (5, 6 or 7) for the 16 bit mode. In theory
912it's possible to use just one (8 bit) DMA channel by answering the 8 bit
913one when the configuration program asks for the 16 bit one. This may work
914in some systems but is likely to cause terrible noise on some other systems.
915
916It's possible to use two SB16/32/64 at the same time. To do this you should
917first configure OSS/Free for one card. Then edit local.h manually and define
918SB2_BASE, SB2_IRQ, SB2_DMA and SB2_DMA2 for the second one. You can't get
919the OPL3, MIDI and EMU8000 devices of the second card to work. If you are
920going to use two PnP Sound Blasters, ensure that they are of different model
921and have different PnP IDs. There is no way to get two cards with the same
922card ID and serial number to work. The easiest way to check this is trying
923if isapnptools can see both cards or just one.
924
925NOTE! Don't enable the SM Games option (asked by the configuration program)
926 if you are not 101% sure that your card is a Logitech Soundman Games
927 (not a SM Wave or SM16).
928
929SB Clones
930---------
931
932First of all: There are no SB16 clones. There are SB Pro clones with a
93316 bit mode which is not SB16 compatible. The most likely alternative is that
934the 16 bit mode means MSS/WSS.
935
936There are just a few fully 100% hardware SB or SB Pro compatible cards.
937I know just Thunderboard and SM Games. Other cards require some kind of
938hardware initialization before they become SB compatible. Check if your card
939was listed in the beginning of this file. In this case you should follow
940instructions for your card later in this file.
941
942For other not fully SB clones you may try initialization using DOS in
943the following way:
944
945 - Boot DOS so that the card specific driver gets run.
946 - Hit ctrl-alt-del (or use loadlin) to boot Linux. Don't
947 switch off power or press the reset button.
948 - If you use the same I/O, IRQ and DMA settings in Linux, the
949 card should work.
950
951If your card is both SB and MSS compatible, I recommend using the MSS mode.
952Most cards of this kind are not able to work in the SB and the MSS mode
953simultaneously. Using the MSS mode provides 16 bit recording and playback.
954
955ProAudioSpectrum 16 and compatibles
956-----------------------------------
957
958PAS16 has a SB emulation chip which can be used together with the native
959(16 bit) mode of the card. To enable this emulation you should configure
960the driver to have SB support too (this has been changed since version
9613.5-beta9 of this driver).
962
963With current driver versions it's also possible to use PAS16 together with
964another SB compatible card. In this case you should configure SB support
965for the other card and to disable the SB emulation of PAS16 (there is a
966separate questions about this).
967
968With PAS16 you can use two audio device files at the same time. /dev/dsp (and
969/dev/audio) is connected to the 8/16 bit native codec and the /dev/dsp1 (and
970/dev/audio1) is connected to the SB emulation (8 bit mono only).
971
972Gravis Ultrasound
973-----------------
974
975There are many different revisions of the Ultrasound card (GUS). The
976earliest ones (pre 3.7) don't have a hardware mixer. With these cards
977the driver uses a software emulation for synth and pcm playbacks. It's
978also possible to switch some of the inputs (line in, mic) off by setting
979mixer volume of the channel level below 10%. For recording you have
980to select the channel as a recording source and to use volume above 10%.
981
982GUS 3.7 has a hardware mixer.
983
984GUS MAX and the 16 bit sampling daughtercard have a CS4231 codec chip which
985also contains a mixer.
986
987Configuring GUS is simple. Just enable the GUS support and GUS MAX or
988the 16 bit daughtercard if you have them. Note that enabling the daughter
989card disables GUS MAX driver.
990
991NOTE for owners of the 16 bit daughtercard: By default the daughtercard
992uses /dev/dsp (and /dev/audio). Command "ln -sf /dev/dsp1 /dev/dsp"
993selects the daughter card as the default device.
994
995With just the standard GUS enabled the configuration program prompts
996for the I/O, IRQ and DMA numbers for the card. Use the same values than
997with DOS.
998
999With the daughter card option enabled you will be prompted for the I/O,
1000IRQ and DMA numbers for the daughter card. You have to use different I/O
1001and DMA values than for the standard GUS. The daughter card permits
1002simultaneous recording and playback. Use /dev/dsp (the daughtercard) for
1003recording and /dev/dsp1 (GUS GF1) for playback.
1004
1005GUS MAX uses the same I/O address and IRQ settings than the original GUS
1006(GUS MAX = GUS + a CS4231 codec). In addition an extra DMA channel may be used.
1007Using two DMA channels permits simultaneous playback using two devices
1008(dev/dsp0 and /dev/dsp1). The second DMA channel is required for
1009full duplex audio.
1010To enable the second DMA channels, give a valid DMA channel when the config
1011program asks for the GUS MAX DMA (entering -1 disables the second DMA).
1012Using 16 bit DMA channels (5,6 or 7) is recommended.
1013
1014If you have problems in recording with GUS MAX, you could try to use
1015just one 8 bit DMA channel. Recording will not work with one DMA
1016channel if it's a 16 bit one.
1017
1018Microphone input of GUS MAX is connected to mixer in little bit nonstandard
1019way. There is actually two microphone volume controls. Normal "mic" controls
1020only recording level. Mixer control "speaker" is used to control volume of
1021microphone signal connected directly to line/speaker out. So just decrease
1022volume of "speaker" if you have problems with microphone feedback.
1023
1024GUS ACE works too but any attempt to record or to use the MIDI port
1025will fail.
1026
1027GUS PnP (with RAM) is partially supported but it needs to be initialized using
1028DOS or isapnptools before starting the driver.
1029
1030MPU401 and Windows Sound System
1031-------------------------------
1032
1033Again. Don't enable these options in case your card is listed
1034somewhere else in this file.
1035
1036Configuring these cards is obvious (or it should be). With MSS
1037you should probably enable the OPL3 synth also since
1038most MSS compatible cards have it. However check that this is true
1039before enabling OPL3.
1040
1041Sound driver supports more than one MPU401 compatible cards at the same time
1042but the config program asks config info for just the first of them.
1043Adding the second or third MPU interfaces must be done manually by
1044editing sound/local.h (after running the config program). Add defines for
1045MPU2_BASE & MPU2_IRQ (and MPU3_BASE & MPU3_IRQ) to the file.
1046
1047CAUTION!
1048
1049The default I/O base of Adaptec AHA-1542 SCSI controller is 0x330 which
1050is also the default of the MPU401 driver. Don't configure the sound driver to
1051use 0x330 as the MPU401 base if you have a AHA1542. The kernel will not boot
1052if you make this mistake.
1053
1054PSS
1055---
1056
1057Even the PSS cards are compatible with SB, MSS and MPU401, you must not
1058enable these options when configuring the driver. The configuration
1059program handles these options itself. (You may use the SB, MPU and MSS options
1060together with PSS if you have another card on the system).
1061
1062The PSS driver enables MSS and MPU401 modes of the card. SB is not enabled
1063since it doesn't work concurrently with MSS. The driver loads also a
1064DSP algorithm which is used to for the general MIDI emulation. The
1065algorithm file (.ld) is read by the config program and written to a
1066file included when the pss.c is compiled. For this reason the config
1067program asks if you want to download the file. Use the genmidi.ld file
1068distributed with the DOS/Windows drivers of the card (don't use the mt32.ld).
1069With some cards the file is called 'synth.ld'. You must have access to
1070the file when configuring the driver. The easiest way is to mount the DOS
1071partition containing the file with Linux.
1072
1073It's possible to load your own DSP algorithms and run them with the card.
1074Look at the directory pss_test of snd-util-3.0.tar.gz for more info.
1075
1076AudioTrix Pro
1077-------------
1078
1079You have to enable the OPL3 and SB (not SB Pro or SB16) drivers in addition
1080to the native AudioTrix driver. Don't enable MSS or MPU drivers.
1081
1082Configuring ATP is little bit tricky since it uses so many I/O, IRQ and
1083DMA numbers. Using the same values than with DOS/Win is a good idea. Don't
1084attempt to use the same IRQ or DMA channels twice.
1085
1086The SB mode of ATP is implemented so the ATP driver just enables SB
1087in the proper address. The SB driver handles the rest. You have to configure
1088both the SB driver and the SB mode of ATP to use the same IRQ, DMA and I/O
1089settings.
1090
1091Also the ATP has a microcontroller for the General MIDI emulation (OPL4).
1092For this reason the driver asks for the name of a file containing the
1093microcode (TRXPRO.HEX). This file is usually located in the directory
1094where the DOS drivers were installed. You must have access to this file
1095when configuring the driver.
1096
1097If you have the effects daughtercard, it must be initialized by running
1098the setfx program of snd-util-3.0.tar.gz package. This step is not required
1099when using the (future) binary distribution version of the driver.
1100
1101Ensoniq SoundScape
1102------------------
1103
1104NOTE! The new PnP SoundScape is not supported yet. Soundscape compatible
1105 cards made by Reveal don't work with Linux. They use older revision
1106 of the Soundscape chipset which is not fully compatible with
1107 newer cards made by Ensoniq.
1108
1109The SoundScape driver handles initialization of MSS and MPU supports
1110itself so you don't need to enable other drivers than SoundScape
1111(enable also the /dev/dsp, /dev/sequencer and MIDI supports).
1112
1113!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1114!!!!! !!!!
1115!!!!! NOTE! Before version 3.5-beta6 there WERE two sets of audio !!!!
1116!!!!! device files (/dev/dsp0 and /dev/dsp1). The first one WAS !!!!
1117!!!!! used only for card initialization and the second for audio !!!!
1118!!!!! purposes. It WAS required to change /dev/dsp (a symlink) to !!!!
1119!!!!! point to /dev/dsp1. !!!!
1120!!!!! !!!!
1121!!!!! This is not required with OSS versions 3.5-beta6 and later !!!!
1122!!!!! since there is now just one audio device file. Please !!!!
1123!!!!! change /dev/dsp to point back to /dev/dsp0 if you are !!!!
1124!!!!! upgrading from an earlier driver version using !!!!
1125!!!!! (cd /dev;rm dsp;ln -s dsp0 dsp). !!!!
1126!!!!! !!!!
1127!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1128
1129The configuration program asks one DMA channel and two interrupts. One IRQ
1130and one DMA is used by the MSS codec. The second IRQ is required for the
1131MPU401 mode (you have to use different IRQs for both purposes).
1132There were earlier two DMA channels for SoundScape but the current driver
1133version requires just one.
1134
1135The SoundScape card has a Motorola microcontroller which must initialized
1136_after_ boot (the driver doesn't initialize it during boot).
1137The initialization is done by running the 'ssinit' program which is
1138distributed in the snd-util-3.0.tar.gz package. You have to edit two
1139defines in the ssinit.c and then compile the program. You may run ssinit
1140manually (after each boot) or add it to /etc/rc.d/rc.local.
1141
1142The ssinit program needs the microcode file that comes with the DOS/Windows
1143driver of the card. You will need to use version 1.30.00 or later
1144of the microcode file (sndscape.co0 or sndscape.co1 depending on
1145your card model). THE OLD sndscape.cod WILL NOT WORK. IT WILL HANG YOUR
1146MACHINE. The only way to get the new microcode file is to download
1147and install the DOS/Windows driver from ftp://ftp.ensoniq.com/pub.
1148
1149Then you have to select the proper microcode file to use: soundscape.co0
1150is the right one for most cards and sndscape.co1 is for few (older) cards
1151made by Reveal and/or Spea. The driver has capability to detect the card
1152version during boot. Look at the boot log messages in /var/adm/messages
1153and locate the sound driver initialization message for the SoundScape
1154card. If the driver displays string <Ensoniq Soundscape (old)>, you have
1155an old card and you will need to use sndscape.co1. For other cards use
1156soundscape.co0. New Soundscape revisions such as Elite and PnP use
1157code files with higher numbers (.co2, .co3, etc.).
1158
1159NOTE! Ensoniq Soundscape VIVO is not compatible with other Soundscape cards.
1160 Currently it's possible to use it in Linux only with OSS/Linux
1161 drivers.
1162
1163Check /var/adm/messages after running ssinit. The driver prints
1164the board version after downloading the microcode file. That version
1165number must match the number in the name of the microcode file (extension).
1166
1167Running ssinit with a wrong version of the sndscape.co? file is not
1168dangerous as long as you don't try to use a file called sndscape.cod.
1169If you have initialized the card using a wrong microcode file (sounds
1170are terrible), just modify ssinit.c to use another microcode file and try
1171again. It's possible to use an earlier version of sndscape.co[01] but it
1172may sound weird.
1173
1174MAD16 (Pro) and Mozart
1175----------------------
1176
1177You need to enable just the MAD16 /Mozart support when configuring
1178the driver. _Don't_ enable SB, MPU401 or MSS. However you will need the
1179/dev/audio, /dev/sequencer and MIDI supports.
1180
1181Mozart and OPTi 82C928 (the original MAD16) chips don't support
1182MPU401 mode so enter just 0 when the configuration program asks the
1183MPU/MIDI I/O base. The MAD16 Pro (OPTi 82C929) and 82C930 chips have MPU401
1184mode.
1185
1186TB Tropez is based on the 82C929 chip. It has two MIDI ports.
1187The one connected to the MAD16 chip is the second one (there is a second
1188MIDI connector/pins somewhere??). If you have not connected the second MIDI
1189port, just disable the MIDI port of MAD16. The 'Maui' compatible synth of
1190Tropez is jumper configurable and not connected to the MAD16 chip (the
1191Maui driver can be used with it).
1192
1193Some MAD16 based cards may cause feedback, whistle or terrible noise if the
1194line3 mixer channel is turned too high. This happens at least with Shuttle
1195Sound System. Current driver versions set volume of line3 low enough so
1196this should not be a problem.
1197
1198If you have a MAD16 card which have an OPL4 (FM + Wave table) synthesizer
1199chip (_not_ an OPL3), you have to append a line containing #define MAD16_OPL4
1200to the file linux/drivers/sound/local.h (after running make config).
1201
1202MAD16 cards having a CS4231 codec support full duplex mode. This mode
1203can be enabled by configuring the card to use two DMA channels. Possible
1204DMA channel pairs are: 0&1, 1&0 and 3&0.
1205
1206NOTE! Cards having an OPTi 82C924/82C925 chip work with OSS/Free only in
1207non-PnP mode (usually jumper selectable). The PnP mode is supported only
1208by OSS/Linux.
1209
1210MV Jazz (ProSonic)
1211------------------
1212
1213The Jazz16 driver is just a hack made to the SB Pro driver. However it works
1214fairly well. You have to enable SB, SB Pro (_not_ SB16) and MPU401 supports
1215when configuring the driver. The configuration program asks later if you
1216want support for MV Jazz16 based cards (after asking SB base address). Answer
1217'y' here and the driver asks the second (16 bit) DMA channel.
1218
1219The Jazz16 driver uses the MPU401 driver in a way which will cause
1220problems if you have another MPU401 compatible card. In this case you must
1221give address of the Jazz16 based MPU401 interface when the config
1222program prompts for the MPU401 information. Then look at the MPU401
1223specific section for instructions about configuring more than one MPU401 cards.
1224
1225Logitech Soundman Wave
1226----------------------
1227
1228Read the above MV Jazz specific instructions first.
1229
1230The Logitech SoundMan Wave (don't confuse this with the SM16 or SM Games) is
1231a MV Jazz based card which has an additional OPL4 based wave table
1232synthesizer. The OPL4 chip is handled by an on board microcontroller
1233which must be initialized during boot. The config program asks if
1234you have a SM Wave immediately after asking the second DMA channel of jazz16.
1235If you answer 'y', the config program will ask name of the file containing
1236code to be loaded to the microcontroller. The file is usually called
1237MIDI0001.BIN and it's located in the DOS/Windows driver directory. The file
1238may also be called as TSUNAMI.BIN or something else (older cards?).
1239
1240The OPL4 synth will be inaccessible without loading the microcontroller code.
1241
1242Also remember to enable SB MPU401 support if you want to use the OPL4 mode.
1243(Don't enable the 'normal' MPU401 device as with some earlier driver
1244versions (pre 3.5-alpha8)).
1245
1246NOTE! Don't answer 'y' when the driver asks about SM Games support
1247 (the next question after the MIDI0001.BIN name). However
1248 answering 'y' doesn't cause damage your computer so don't panic.
1249
1250Sound Galaxies
1251--------------
1252
1253There are many different Sound Galaxy cards made by Aztech. The 8 bit
1254ones are fully SB or SB Pro compatible and there should be no problems
1255with them.
1256
1257The older 16 bit cards (SG Pro16, SG NX Pro16, Nova and Lyra) have
1258an EEPROM chip for storing the configuration data. There is a microcontroller
1259which initializes the card to match the EEPROM settings when the machine
1260is powered on. These cards actually behave just like they have jumpers
1261for all of the settings. Configure driver for MSS, MPU, SB/SB Pro and OPL3
1262supports with these cards.
1263
1264There are some new Sound Galaxies in the market. I have no experience with
1265them so read the card's manual carefully.
1266
1267ESS ES1688 and ES688 'AudioDrive' based cards
1268---------------------------------------------
1269
1270Support for these two ESS chips is embedded in the SB driver.
1271Configure these cards just like SB. Enable the 'SB MPU401 MIDI port'
1272if you want to use MIDI features of ES1688. ES688 doesn't have MPU mode
1273so you don't need to enable it (the driver uses normal SB MIDI automatically
1274with ES688).
1275
1276NOTE! ESS cards are not compatible with MSS/WSS so don't worry if MSS support
1277of OSS doesn't work with it.
1278
1279There are some ES1688/688 based sound cards and (particularly) motherboards
1280which use software configurable I/O port relocation feature of the chip.
1281This ESS proprietary feature is supported only by OSS/Linux.
1282
1283There are ES1688 based cards which use different interrupt pin assignment than
1284recommended by ESS (5, 7, 9/2 and 10). In this case all IRQs don't work.
1285At least a card called (Pearl?) Hypersound 16 supports IRQ 15 but it doesn't
1286work.
1287
1288ES1868 is a PnP chip which is (supposed to be) compatible with ESS1688
1289probably works with OSS/Free after initialization using isapnptools.
1290
1291Reveal cards
1292------------
1293
1294There are several different cards made/marketed by Reveal. Some of them
1295are compatible with SoundScape and some use the MAD16 chip. You may have
1296to look at the card and try to identify its origin.
1297
1298Diamond
1299-------
1300
1301The oldest (Sierra Aria based) sound cards made by Diamond are not supported
1302(they may work if the card is initialized using DOS). The recent (LX?)
1303models are based on the MAD16 chip which is supported by the driver.
1304
1305Audio Excel DSP16
1306-----------------
1307
1308Support for this card is currently not functional. A new driver for it
1309should be available later this year.
1310
1311PCMCIA cards
1312------------
1313
1314Sorry, can't help. Some cards may work and some don't.
1315
1316TI TM4000M notebooks
1317--------------------
1318
1319These computers have a built in sound support based on the Jazz chipset.
1320Look at the instructions for MV Jazz (above). It's also important to note
1321that there is something wrong with the mouse port and sound at least on
1322some TM models. Don't enable the "C&T 82C710 mouse port support" when
1323configuring Linux. Having it enabled is likely to cause mysterious problems
1324and kernel failures when sound is used.
1325
1326miroSOUND
1327---------
1328
1329The miroSOUND PCM1-pro, PCM12 and PCM20 radio has been used
1330successfully. These cards are based on the MAD16, OPL4, and CS4231A chips
1331and everything said in the section about MAD16 cards applies here,
1332too. The only major difference between the PCMxx and other MAD16 cards
1333is that instead of the mixer in the CS4231 codec a separate mixer
1334controlled by an on-board 80C32 microcontroller is used. Control of
1335the mixer takes place via the ACI (miro's audio control interface)
1336protocol that is implemented in a separate lowlevel driver. Make sure
1337you compile this ACI driver together with the normal MAD16 support
1338when you use a miroSOUND PCMxx card. The ACI mixer is controlled by
1339/dev/mixer and the CS4231 mixer by /dev/mixer1 (depends on load
1340time). Only in special cases you want to change something regularly on
1341the CS4231 mixer.
1342
1343The miroSOUND PCM12 and PCM20 radio is capable of full duplex
1344operation (simultaneous PCM replay and recording), which allows you to
1345implement nice real-time signal processing audio effect software and
1346network telephones. The ACI mixer has to be switched into the "solo"
1347mode for duplex operation in order to avoid feedback caused by the
1348mixer (input hears output signal). You can de-/activate this mode
1349through toggleing the record button for the wave controller with an
1350OSS-mixer.
1351
1352The PCM20 contains a radio tuner, which is also controlled by
1353ACI. This radio tuner is supported by the ACI driver together with the
1354miropcm20.o module. Also the 7-band equalizer is integrated
1355(limited by the OSS-design). Developement has started and maybe
1356finished for the RDS decoder on this card, too. You will be able to
1357read RadioText, the Programme Service name, Programme TYpe and
1358others. Even the v4l radio module benefits from it with a refined
1359strength value. See aci.[ch] and miropcm20*.[ch] for more details.
1360
1361The following configuration parameters have worked fine for the PCM12
1362in Markus Kuhn's system, many other configurations might work, too:
1363CONFIG_MAD16_BASE=0x530, CONFIG_MAD16_IRQ=11, CONFIG_MAD16_DMA=3,
1364CONFIG_MAD16_DMA2=0, CONFIG_MAD16_MPU_BASE=0x330, CONFIG_MAD16_MPU_IRQ=10,
1365DSP_BUFFSIZE=65536, SELECTED_SOUND_OPTIONS=0x00281000.
1366
1367Bas van der Linden is using his PCM1-pro with a configuration that
1368differs in: CONFIG_MAD16_IRQ=7, CONFIG_MAD16_DMA=1, CONFIG_MAD16_MPU_IRQ=9
1369
1370Compaq Deskpro XL
1371-----------------
1372
1373The builtin sound hardware of Compaq Deskpro XL is now supported.
1374You need to configure the driver with MSS and OPL3 supports enabled.
1375In addition you need to manually edit linux/drivers/sound/local.h and
1376to add a line containing "#define DESKPROXL" if you used
1377make menuconfig/xconfig.
1378
1379Others?
1380-------
1381
1382Since there are so many different sound cards, it's likely that I have
1383forgotten to mention many of them. Please inform me if you know yet another
1384card which works with Linux, please inform me (or is anybody else
1385willing to maintain a database of supported cards (just like in XF86)?).
1386
1387Cards not supported yet
1388=======================
1389
1390Please check the version of sound driver you are using before
1391complaining that your card is not supported. It's possible you are
1392using a driver version which was released months before your card was
1393introduced.
1394
1395First of all, there is an easy way to make most sound cards work with Linux.
1396Just use the DOS based driver to initialize the card to a known state, then use
1397loadlin.exe to boot Linux. If Linux is configured to use the same I/O, IRQ and
1398DMA numbers as DOS, the card could work.
1399(ctrl-alt-del can be used in place of loadlin.exe but it doesn't work with
1400new motherboards). This method works also with all/most PnP sound cards.
1401
1402Don't get fooled with SB compatibility. Most cards are compatible with
1403SB but that may require a TSR which is not possible with Linux. If
1404the card is compatible with MSS, it's a better choice. Some cards
1405don't work in the SB and MSS modes at the same time.
1406
1407Then there are cards which are no longer manufactured and/or which
1408are relatively rarely used (such as the 8 bit ProAudioSpectrum
1409models). It's extremely unlikely that such cards ever get supported.
1410Adding support for a new card requires much work and increases time
1411required in maintaining the driver (some changes need to be done
1412to all low level drivers and be tested too, maybe with multiple
1413operating systems). For this reason I have made a decision to not support
1414obsolete cards. It's possible that someone else makes a separately
1415distributed driver (diffs) for the card.
1416
1417Writing a driver for a new card is not possible if there are no
1418programming information available about the card. If you don't
1419find your new card from this file, look from the home page
1420(http://www.opensound.com/ossfree). Then please contact
1421manufacturer of the card and ask if they have (or are willing to)
1422released technical details of the card. Do this before contacting me. I
1423can only answer 'no' if there are no programming information available.
1424
1425I have made decision to not accept code based on reverse engineering
1426to the driver. There are three main reasons: First I don't want to break
1427relationships to sound card manufacturers. The second reason is that
1428maintaining and supporting a driver without any specs will be a pain.
1429The third reason is that companies have freedom to refuse selling their
1430products to other than Windows users.
1431
1432Some companies don't give low level technical information about their
1433products to public or at least their require signing a NDA. It's not
1434possible to implement a freeware driver for them. However it's possible
1435that support for such cards become available in the commercial version
1436of this driver (see http://www.4Front-tech.com/oss.html for more info).
1437
1438There are some common audio chipsets that are not supported yet. For example
1439Sierra Aria and IBM Mwave. It's possible that these architectures
1440get some support in future but I can't make any promises. Just look
1441at the home page (http://www.opensound.com/ossfree/new_cards.html)
1442for latest info.
1443
1444Information about unsupported sound cards and chipsets is welcome as well
1445as free copies of sound cards, SDKs and operating systems.
1446
1447If you have any corrections and/or comments, please contact me.
1448
1449Hannu Savolainen
1450hannu@opensound.com
1451
1452Personal home page: http://www.compusonic.fi/~hannu
1453home page of OSS/Free: http://www.opensound.com/ossfree
1454
1455home page of commercial OSS
1456(Open Sound System) drivers: http://www.opensound.com/oss.html
diff --git a/Documentation/sound/oss/README.awe b/Documentation/sound/oss/README.awe
new file mode 100644
index 000000000000..80054cd8fcde
--- /dev/null
+++ b/Documentation/sound/oss/README.awe
@@ -0,0 +1,218 @@
1================================================================
2 AWE32 Sound Driver for Linux / FreeBSD
3 version 0.4.3; Nov. 1, 1998
4
5 Takashi Iwai <iwai@ww.uni-erlangen.de>
6================================================================
7
8* GENERAL NOTES
9
10This is a sound driver extension for SoundBlaster AWE32 and other
11compatible cards (AWE32-PnP, SB32, SB32-PnP, AWE64 & etc) to enable
12the wave synth operations. The driver is provided for Linux 1.2.x
13and 2.[012].x kernels, as well as FreeBSD, on Intel x86 and DEC
14Alpha systems.
15
16This driver was written by Takashi Iwai <iwai@ww.uni-erlangen.de>,
17and provided "as is". The original source (awedrv-0.4.3.tar.gz) and
18binary packages are available on the following URL:
19 http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/
20Note that since the author is apart from this web site, the update is
21not frequent now.
22
23
24* NOTE TO LINUX USERS
25
26To enable this driver on linux-2.[01].x kernels, you need turn on
27"AWE32 synth" options in sound menu when configure your linux kernel
28and modules. The precise installation procedure is described in the
29AWE64-Mini-HOWTO and linux-kernel/Documetation/sound/AWE32.
30
31If you're using PnP cards, the card must be initialized before loading
32the sound driver. There're several options to do this:
33 - Initialize the card via ISA PnP tools, and load the sound module.
34 - Initialize the card on DOS, and load linux by loadlin.exe
35 - Use PnP kernel driver (for Linux-2.x.x)
36The detailed instruction for the solution using isapnp tools is found
37in many documents like above. A brief instruction is also included in
38the installation document of this package.
39For PnP driver project, please refer to the following URL:
40 http://www-jcr.lmh.ox.ac.uk/~pnp/
41
42
43* USING THE DRIVER
44
45The awedrv has several different playing modes to realize easy channel
46allocation for MIDI songs. To hear the exact sound quality, you need
47to obtain the extended sequencer program, drvmidi or playmidi-2.5.
48
49For playing MIDI files, you *MUST* load the soundfont file on the
50driver previously by sfxload utility. Otherwise you'll here no sounds
51at all! All the utilities and driver source packages are found in the
52above URL. The sfxload program is included in the package
53awesfx-0.4.3.tgz. Binary packages are available there, too. See the
54instruction in each package for installation.
55
56Loading a soundfont file is very simple. Just execute the command
57
58 % sfxload synthgm.sbk
59
60Then, sfxload transfers the file "synthgm.sbk" to the driver.
61Both SF1 and SF2 formats are accepted.
62
63Now you can hear midi musics by a midi player.
64
65 % drvmidi foo.mid
66
67If you run MIDI player after MOD player, you need to load soundfont
68files again, since MOD player programs clear the previous loaded
69samples by their own data.
70
71If you have only 512kb on the sound card, I recommend to use dynamic
72sample loading via -L option of drvmidi. 2MB GM/GS soundfont file is
73available in most midi files.
74
75 % sfxload synthgm
76 % drvmidi -L 2mbgmgs foo.mid
77
78This makes a big difference (believe me)! For more details, please
79refer to the FAQ list which is available on the URL above.
80
81The current chorus, reverb and equalizer status can be changed by
82aweset utility program (included in awesfx package). Note that
83some awedrv-native programs (like drvmidi and xmp) will change the
84current settings by themselves. The aweset program is effective
85only for other programs like playmidi.
86
87Enjoy.
88
89
90* COMPILE FLAGS
91
92Compile conditions are defined in awe_config.h.
93
94[Compatibility Conditions]
95The following flags are defined automatically when using installation
96shell script.
97
98- AWE_MODULE_SUPPORT
99 indicates your Linux kernel supports module for each sound card
100 (in recent 2.1 or 2.2 kernels and unofficial patched 2.0 kernels
101 as distributed in the RH5.0 package).
102 This flag is automatically set when you're using 2.1.x kernels.
103 You can pass the base address and memory size via the following
104 module options,
105 io = base I/O port address (eg. 0x620)
106 memsize = DRAM size in kilobytes (eg. 512)
107 As default, AWE driver probes these values automatically.
108
109
110[Hardware Conditions]
111You DON'T have to define the following two values.
112Define them only when the driver couldn't detect the card properly.
113
114- AWE_DEFAULT_BASE_ADDR (default: not defined)
115 specifies the base port address of your AWE32 card.
116 0 means to autodetect the address.
117
118- AWE_DEFAULT_MEM_SIZE (default: not defined)
119 specifies the memory size of your AWE32 card in kilobytes.
120 -1 means to autodetect its size.
121
122
123[Sample Table Size]
124From ver.0.4.0, sample tables are allocated dynamically (except
125Linux-1.2.x system), so you need NOT to touch these parameters.
126Linux-1.2.x users may need to increase these values to appropriate size
127if the sound card is equipped with more DRAM.
128
129- AWE_MAX_SF_LISTS, AWE_MAX_SAMPLES, AWE_MAX_INFOS
130
131
132[Other Conditions]
133
134- AWE_ALWAYS_INIT_FM (default: not defined)
135 indicates the AWE driver always initialize FM passthrough even
136 without DRAM on board. Emu8000 chip has a restriction for playing
137 samples on DRAM that at least two channels must be occupied as
138 passthrough channels.
139
140- AWE_DEBUG_ON (default: defined)
141 turns on debugging messages if defined.
142
143- AWE_HAS_GUS_COMPATIBILITY (default: defined)
144 Enables GUS compatibility mode if defined, reading GUS patches and
145 GUS control commands. Define this option to use GMOD or other
146 GUS module players.
147
148- CONFIG_AWE32_MIDIEMU (default: defined)
149 Adds a MIDI emulation device by Emu8000 wavetable. The emulation
150 device can be accessed as an external MIDI, and sends the MIDI
151 control codes directly. XG and GS sysex/NRPN are accepted.
152 No MIDI input is supported.
153
154- CONFIG_AWE32_MIXER (default: not defined)
155 Adds a mixer device for AWE32 bass/treble equalizer control.
156 You can access this device using /dev/mixer?? (usually mixer01).
157
158- AWE_USE_NEW_VOLUME_CALC (default: defined)
159 Use the new method to calculate the volume change as compatible
160 with DOS/Win drivers. This option can be toggled via aweset
161 program, or drvmidi player.
162
163- AWE_CHECK_VTARGET (default: defined)
164 Check the current volume target value when searching for an
165 empty channel to allocate a new voice. This is experimentally
166 implemented in this version. (probably, this option doesn't
167 affect the sound quality severely...)
168
169- AWE_ALLOW_SAMPLE_SHARING (default: defined)
170 Allow sample sharing for differently loaded patches.
171 This function is available only together with awesfx-0.4.3p3.
172 Note that this is still an experimental option.
173
174- DEF_FM_CHORUS_DEPTH (default: 0x10)
175 The default strength to be sent to the chorus effect engine.
176 From 0 to 0xff. Larger numbers may often cause weird sounds.
177
178- DEF_FM_REVERB_DEPTH (default: 0x10)
179 The default strength to be sent to the reverb effect engine.
180 From 0 to 0xff. Larger numbers may often cause weird sounds.
181
182
183* ACKNOWLEDGMENTS
184
185Thanks to Witold Jachimczyk (witek@xfactor.wpi.edu) for much advice
186on programming of AWE32. Much code is brought from his AWE32-native
187MOD player, ALMP.
188The port of awedrv to FreeBSD is done by Randall Hopper
189(rhh@ct.picker.com).
190The new volume calculation routine was derived from Mark Weaver's
191ADIP compatible routines.
192I also thank linux-awe-ml members for their efforts
193to reboot their system many times :-)
194
195
196* TODO'S
197
198- Complete DOS/Win compatibility
199- DSP-like output
200
201
202* COPYRIGHT
203
204Copyright (C) 1996-1998 Takashi Iwai
205
206This program is free software; you can redistribute it and/or modify
207it under the terms of the GNU General Public License as published by
208the Free Software Foundation; either version 2 of the License, or
209(at your option) any later version.
210
211This program is distributed in the hope that it will be useful,
212but WITHOUT ANY WARRANTY; without even the implied warranty of
213MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
214GNU General Public License for more details.
215
216You should have received a copy of the GNU General Public License
217along with this program; if not, write to the Free Software
218Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/Documentation/sound/oss/README.modules b/Documentation/sound/oss/README.modules
new file mode 100644
index 000000000000..e691d74e1e5e
--- /dev/null
+++ b/Documentation/sound/oss/README.modules
@@ -0,0 +1,106 @@
1Building a modular sound driver
2================================
3
4 The following information is current as of linux-2.1.85. Check the other
5readme files, especially README.OSS, for information not specific to
6making sound modular.
7
8 First, configure your kernel. This is an idea of what you should be
9setting in the sound section:
10
11<M> Sound card support
12
13<M> 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
14
15 I have SoundBlaster. Select your card from the list.
16
17<M> Generic OPL2/OPL3 FM synthesizer support
18<M> FM synthesizer (YM3812/OPL-3) support
19
20 If you don't set these, you will probably find you can play .wav files
21but not .midi. As the help for them says, set them unless you know your
22card does not use one of these chips for FM support.
23
24 Once you are configured, make zlilo, modules, modules_install; reboot.
25Note that it is no longer necessary or possible to configure sound in the
26drivers/sound dir. Now one simply configures and makes one's kernel and
27modules in the usual way.
28
29 Then, add to your /etc/modprobe.conf something like:
30
31alias char-major-14-* sb
32install sb /sbin/modprobe -i sb && /sbin/modprobe adlib_card
33options sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330
34options adlib_card io=0x388 # FM synthesizer
35
36 Alternatively, if you have compiled in kernel level ISAPnP support:
37
38alias char-major-14 sb
39post-install sb /sbin/modprobe "-k" "adlib_card"
40options adlib_card io=0x388
41
42 The effect of this is that the sound driver and all necessary bits and
43pieces autoload on demand, assuming you use kerneld (a sound choice) and
44autoclean when not in use. Also, options for the device drivers are
45set. They will not work without them. Change as appropriate for your card.
46If you are not yet using the very cool kerneld, you will have to "modprobe
47-k sb" yourself to get things going. Eventually things may be fixed so
48that this kludgery is not necessary; for the time being, it seems to work
49well.
50
51 Replace 'sb' with the driver for your card, and give it the right
52options. To find the filename of the driver, look in
53/lib/modules/<kernel-version>/misc. Mine looks like:
54
55adlib_card.o # This is the generic OPLx driver
56opl3.o # The OPL3 driver
57sb.o # <<The SoundBlaster driver. Yours may differ.>>
58sound.o # The sound driver
59uart401.o # Used by sb, maybe other cards
60
61 Whichever card you have, try feeding it the options that would be the
62default if you were making the driver wired, not as modules. You can
63look at function referred to by module_init() for the card to see what
64args are expected.
65
66 Note that at present there is no way to configure the io, irq and other
67parameters for the modular drivers as one does for the wired drivers.. One
68needs to pass the modules the necessary parameters as arguments, either
69with /etc/modprobe.conf or with command-line args to modprobe, e.g.
70
71modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330
72modprobe adlib_card io=0x388
73
74 recommend using /etc/modprobe.conf.
75
76Persistent DMA Buffers:
77
78The sound modules normally allocate DMA buffers during open() and
79deallocate them during close(). Linux can often have problems allocating
80DMA buffers for ISA cards on machines with more than 16MB RAM. This is
81because ISA DMA buffers must exist below the 16MB boundary and it is quite
82possible that we can't find a large enough free block in this region after
83the machine has been running for any amount of time. The way to avoid this
84problem is to allocate the DMA buffers during module load and deallocate
85them when the module is unloaded. For this to be effective we need to load
86the sound modules right after the kernel boots, either manually or by an
87init script, and keep them around until we shut down. This is a little
88wasteful of RAM, but it guarantees that sound always works.
89
90To make the sound driver use persistent DMA buffers we need to pass the
91sound.o module a "dmabuf=1" command-line argument. This is normally done
92in /etc/modprobe.conf like so:
93
94options sound dmabuf=1
95
96If you have 16MB or less RAM or a PCI sound card, this is wasteful and
97unnecessary. It is possible that machine with 16MB or less RAM will find
98this option useful, but if your machine is so memory-starved that it
99cannot find a 64K block free, you will be wasting even more RAM by keeping
100the sound modules loaded and the DMA buffers allocated when they are not
101needed. The proper solution is to upgrade your RAM. But you do also have
102this improper solution as well. Use it wisely.
103
104 I'm afraid I know nothing about anything but my setup, being more of a
105text-mode guy anyway. If you have options for other cards or other helpful
106hints, send them to me, Jim Bray, jb@as220.org, http://as220.org/jb.
diff --git a/Documentation/sound/oss/README.ymfsb b/Documentation/sound/oss/README.ymfsb
new file mode 100644
index 000000000000..af8a7d3a4e8e
--- /dev/null
+++ b/Documentation/sound/oss/README.ymfsb
@@ -0,0 +1,107 @@
1Legacy audio driver for YMF7xx PCI cards.
2
3
4FIRST OF ALL
5============
6
7 This code references YAMAHA's sample codes and data sheets.
8 I respect and thank for all people they made open the informations
9 about YMF7xx cards.
10
11 And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s
12 old VIA 82Cxxx driver (via82cxxx.c). I also respect him.
13
14
15DISCLIMER
16=========
17
18 This driver is currently at early ALPHA stage. It may cause serious
19 damage to your computer when used.
20 PLEASE USE IT AT YOUR OWN RISK.
21
22
23ABOUT THIS DRIVER
24=================
25
26 This code enables you to use your YMF724[A-F], YMF740[A-C], YMF744, YMF754
27 cards. When enabled, your card acts as "SoundBlaster Pro" compatible card.
28 It can only play 22.05kHz / 8bit / Stereo samples, control external MIDI
29 port.
30 If you want to use your card as recent "16-bit" card, you should use
31 Alsa or OSS/Linux driver. Of course you can write native PCI driver for
32 your cards :)
33
34
35USAGE
36=====
37
38 # modprobe ymfsb (options)
39
40
41OPTIONS FOR MODULE
42==================
43
44 io : SB base address (0x220, 0x240, 0x260, 0x280)
45 synth_io : OPL3 base address (0x388, 0x398, 0x3a0, 0x3a8)
46 dma : DMA number (0,1,3)
47 master_volume: AC'97 PCM out Vol (0-100)
48 spdif_out : SPDIF-out flag (0:disable 1:enable)
49
50 These options will change in future...
51
52
53FREQUENCY
54=========
55
56 When playing sounds via this driver, you will hear its pitch is slightly
57 lower than original sounds. Since this driver recognizes your card acts
58 with 21.739kHz sample rates rather than 22.050kHz (I think it must be
59 hardware restriction). So many players become tone deafness.
60 To prevent this, you should express some options to your sound player
61 that specify correct sample frequency. For example, to play your MP3 file
62 correctly with mpg123, specify the frequency like following:
63
64 % mpg123 -r 21739 foo.mp3
65
66
67SPDIF OUT
68=========
69
70 With installing modules with option 'spdif_out=1', you can enjoy your
71 sounds from SPDIF-out of your card (if it had).
72 Its Fs is fixed to 48kHz (It never means the sample frequency become
73 up to 48kHz. All sounds via SPDIF-out also 22kHz samples). So your
74 digital-in capable components has to be able to handle 48kHz Fs.
75
76
77COPYING
78=======
79
80 This program is free software; you can redistribute it and/or modify
81 it under the terms of the GNU General Public License as published by
82 the Free Software Foundation; either version 2, or (at your option)
83 any later version.
84
85 This program is distributed in the hope that it will be useful, but
86 WITHOUT ANY WARRANTY; without even the implied warranty of
87 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
88 General Public License for more details.
89
90 You should have received a copy of the GNU General Public License
91 along with this program; if not, write to the Free Software
92 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
93
94
95TODO
96====
97 * support for multiple cards
98 (set the different SB_IO,MPU_IO,OPL_IO for each cards)
99
100 * support for OPL (dmfm) : There will be no requirements... :-<
101
102
103AUTHOR
104======
105
106 Daisuke Nagano <breeze.nagano@nifty.ne.jp>
107
diff --git a/Documentation/sound/oss/SoundPro b/Documentation/sound/oss/SoundPro
new file mode 100644
index 000000000000..9d4db1f29d3c
--- /dev/null
+++ b/Documentation/sound/oss/SoundPro
@@ -0,0 +1,105 @@
1Documentation for the SoundPro CMI8330 extensions in the WSS driver (ad1848.o)
2------------------------------------------------------------------------------
3
4( Be sure to read Documentation/sound/oss/CMI8330 too )
5
6Ion Badulescu, ionut@cs.columbia.edu
7February 24, 1999
8
9(derived from the OPL3-SA2 documentation by Scott Murray)
10
11The SoundPro CMI8330 (ISA) is a chip usually found on some Taiwanese
12motherboards. The official name in the documentation is CMI8330, SoundPro
13is the nickname and the big inscription on the chip itself.
14
15The chip emulates a WSS as well as a SB16, but it has certain differences
16in the mixer section which require separate support. It also emulates an
17MPU401 and an OPL3 synthesizer, so you probably want to enable support
18for these, too.
19
20The chip identifies itself as an AD1848, but its mixer is significantly
21more advanced than the original AD1848 one. If your system works with
22either WSS or SB16 and you are having problems with some mixer controls
23(no CD audio, no line-in, etc), you might want to give this driver a try.
24Detection should work, but it hasn't been widely tested, so it might still
25mis-identify the chip. You can still force soundpro=1 in the modprobe
26parameters for ad1848. Please let me know if it happens to you, so I can
27adjust the detection routine.
28
29The chip is capable of doing full-duplex, but since the driver sees it as an
30AD1848, it cannot take advantage of this. Moreover, the full-duplex mode is
31not achievable through the WSS interface, b/c it needs a dma16 line which is
32assigned only to the SB16 subdevice (with isapnp). Windows documentation
33says the user must use WSS Playback and SB16 Recording for full-duplex, so
34it might be possible to do the same thing under Linux. You can try loading
35up both ad1848 and sb then use one for playback and the other for
36recording. I don't know if this works, b/c I haven't tested it. Anyway, if
37you try it, be very careful: the SB16 mixer *mostly* works, but certain
38settings can have unexpected effects. Use the WSS mixer for best results.
39
40There is also a PCI SoundPro chip. I have not seen this chip, so I have
41no idea if the driver will work with it. I suspect it won't.
42
43As with PnP cards, some configuration is required. There are two ways
44of doing this. The most common is to use the isapnptools package to
45initialize the card, and use the kernel module form of the sound
46subsystem and sound drivers. Alternatively, some BIOS's allow manual
47configuration of installed PnP devices in a BIOS menu, which should
48allow using the non-modular sound drivers, i.e. built into the kernel.
49Since in this latter case you cannot use module parameters, you will
50have to enable support for the SoundPro at compile time.
51
52The IRQ and DMA values can be any that are considered acceptable for a
53WSS. Assuming you've got isapnp all happy, then you should be able to
54do something like the following (which *must* match the isapnp/BIOS
55configuration):
56
57modprobe ad1848 io=0x530 irq=11 dma=0 soundpro=1
58-and maybe-
59modprobe sb io=0x220 irq=5 dma=1 dma16=5
60
61-then-
62modprobe mpu401 io=0x330 irq=9
63modprobe opl3 io=0x388
64
65If all goes well and you see no error messages, you should be able to
66start using the sound capabilities of your system. If you get an
67error message while trying to insert the module(s), then make
68sure that the values of the various arguments match what you specified
69in your isapnp configuration file, and that there is no conflict with
70another device for an I/O port or interrupt. Checking the contents of
71/proc/ioports and /proc/interrupts can be useful to see if you're
72butting heads with another device.
73
74If you do not see the chipset version message, and none of the other
75messages present in the system log are helpful, try adding 'debug=1'
76to the ad1848 parameters, email me the syslog results and I'll do
77my best to help.
78
79Lastly, if you're using modules and want to set up automatic module
80loading with kmod, the kernel module loader, here is the section I
81currently use in my conf.modules file:
82
83# Sound
84post-install sound modprobe -k ad1848; modprobe -k mpu401; modprobe -k opl3
85options ad1848 io=0x530 irq=11 dma=0
86options sb io=0x220 irq=5 dma=1 dma16=5
87options mpu401 io=0x330 irq=9
88options opl3 io=0x388
89
90The above ensures that ad1848 will be loaded whenever the sound system
91is being used.
92
93Good luck.
94
95Ion
96
97NOT REALLY TESTED:
98- recording
99- recording device selection
100- full-duplex
101
102TODO:
103- implement mixer support for surround, loud, digital CD switches.
104- come up with a scheme which allows recording volumes for each subdevice.
105This is a major OSS API change.
diff --git a/Documentation/sound/oss/Soundblaster b/Documentation/sound/oss/Soundblaster
new file mode 100644
index 000000000000..b288d464ba8b
--- /dev/null
+++ b/Documentation/sound/oss/Soundblaster
@@ -0,0 +1,53 @@
1modprobe sound
2insmod uart401
3insmod sb ...
4
5This loads the driver for the Sound Blaster and assorted clones. Cards that
6are covered by other drivers should not be using this driver.
7
8The Sound Blaster module takes the following arguments
9
10io I/O address of the Sound Blaster chip (0x220,0x240,0x260,0x280)
11irq IRQ of the Sound Blaster chip (5,7,9,10)
12dma 8-bit DMA channel for the Sound Blaster (0,1,3)
13dma16 16-bit DMA channel for SB16 and equivalent cards (5,6,7)
14mpu_io I/O for MPU chip if present (0x300,0x330)
15
16sm_games=1 Set if you have a Logitech soundman games
17acer=1 Set this to detect cards in some ACER notebooks
18mwave_bug=1 Set if you are trying to use this driver with mwave (see on)
19type Use this to specify a specific card type
20
21The following arguments are taken if ISAPnP support is compiled in
22
23isapnp=0 Set this to disable ISAPnP detection (use io=0xXXX etc. above)
24multiple=0 Set to disable detection of multiple Soundblaster cards.
25 Consider it a bug if this option is needed, and send in a
26 report.
27pnplegacy=1 Set this to be able to use a PnP card(s) along with a single
28 non-PnP (legacy) card. Above options for io, irq, etc. are
29 needed, and will apply only to the legacy card.
30reverse=1 Reverses the order of the search in the PnP table.
31uart401=1 Set to enable detection of mpu devices on some clones.
32isapnpjump=n Jumps to slot n in the driver's PnP table. Use the source,
33 Luke.
34
35You may well want to load the opl3 driver for synth music on most SB and
36clone SB devices
37
38insmod opl3 io=0x388
39
40Using Mwave
41
42To make this driver work with Mwave you must set mwave_bug. You also need
43to warm boot from DOS/Windows with the required firmware loaded under this
44OS. IBM are being difficult about documenting how to load this firmware.
45
46Avance Logic ALS007
47
48This card is supported; see the separate file ALS007 for full details.
49
50Avance Logic ALS100
51
52This card is supported; setup should be as for a standard Sound Blaster 16.
53The driver will identify the audio device as a "Sound Blaster 16 (ALS-100)".
diff --git a/Documentation/sound/oss/Tropez+ b/Documentation/sound/oss/Tropez+
new file mode 100644
index 000000000000..b93a6b734fc0
--- /dev/null
+++ b/Documentation/sound/oss/Tropez+
@@ -0,0 +1,26 @@
1From: Paul Barton-Davis <pbd@op.net>
2
3Here is the configuration I use with a Tropez+ and my modular
4driver:
5
6 alias char-major-14 wavefront
7 alias synth0 wavefront
8 alias mixer0 cs4232
9 alias audio0 cs4232
10 pre-install wavefront modprobe "-k" "cs4232"
11 post-install wavefront modprobe "-k" "opl3"
12 options wavefront io=0x200 irq=9
13 options cs4232 synthirq=9 synthio=0x200 io=0x530 irq=5 dma=1 dma2=0
14 options opl3 io=0x388
15
16Things to note:
17
18 the wavefront options "io" and "irq" ***MUST*** match the "synthio"
19 and "synthirq" cs4232 options.
20
21 you can do without the opl3 module if you don't
22 want to use the OPL/[34] synth on the soundcard
23
24 the opl3 io parameter is conventionally not adjustable.
25
26Please see drivers/sound/README.wavefront for more details.
diff --git a/Documentation/sound/oss/VIA-chipset b/Documentation/sound/oss/VIA-chipset
new file mode 100644
index 000000000000..37865234e54d
--- /dev/null
+++ b/Documentation/sound/oss/VIA-chipset
@@ -0,0 +1,43 @@
1Running sound cards on VIA chipsets
2
3o There are problems with VIA chipsets and sound cards that appear to
4 lock the hardware solidly. Test programs under DOS have verified the
5 problem exists on at least some (but apparently not all) VIA boards
6
7o VIA have so far failed to bother to answer support mail on the subject
8 so if you are a VIA engineer feeling aggrieved as you read this
9 document go chase your own people. If there is a workaround please
10 let us know so we can implement it.
11
12
13Certain patterns of ISA DMA access used for most PC sound cards cause the
14VIA chipsets to lock up. From the collected reports this appears to cover a
15wide range of boards. Some also lock up with sound cards under Win* as well.
16
17Linux implements a workaround providing your chipset is PCI and you compiled
18with PCI Quirks enabled. If so you will see a message
19 "Activating ISA DMA bug workarounds"
20
21during booting. If you have a VIA PCI chipset that hangs when you use the
22sound and is not generating this message even with PCI quirks enabled
23please report the information to the linux-kernel list (see REPORTING-BUGS).
24
25If you are one of the tiny number of unfortunates with a 486 ISA/VLB VIA
26chipset board you need to do the following to build a special kernel for
27your board
28
29 edit linux/include/asm-i386/dma.h
30
31change
32
33#define isa_dma_bridge_buggy (0)
34
35to
36
37#define isa_dma_bridge_buggy (1)
38
39and rebuild a kernel without PCI quirk support.
40
41
42Other than this particular glitch the VIA [M]VP* chipsets appear to work
43perfectly with Linux.
diff --git a/Documentation/sound/oss/VIBRA16 b/Documentation/sound/oss/VIBRA16
new file mode 100644
index 000000000000..68a5a46beb88
--- /dev/null
+++ b/Documentation/sound/oss/VIBRA16
@@ -0,0 +1,80 @@
1Sound Blaster 16X Vibra addendum
2--------------------------------
3by Marius Ilioaea <mariusi@protv.ro>
4 Stefan Laudat <stefan@asit.ro>
5
6Sat Mar 6 23:55:27 EET 1999
7
8 Hello again,
9
10 Playing with a SB Vibra 16x soundcard we found it very difficult
11to setup because the kernel reported a lot of DMA errors and wouldn't
12simply play any sound.
13 A good starting point is that the vibra16x chip full-duplex facility
14is neither still exploited by the sb driver found in the linux kernel
15(tried it with a 2.2.2-ac7), nor in the commercial OSS package (it reports
16it as half-duplex soundcard). Oh, I almost forgot, the RedHat sndconfig
17failed detecting it ;)
18 So, the big problem still remains, because the sb module wants a
198-bit and a 16-bit dma, which we could not allocate for vibra... it supports
20only two 8-bit dma channels, the second one will be passed to the module
21as a 16 bit channel, the kernel will yield about that but everything will
22be okay, trust us.
23 The only inconvenient you may find is that you will have
24some sound playing jitters if you have HDD dma support enabled - but this
25will happen with almost all soundcards...
26
27 A fully working isapnp.conf is just here:
28
29<snip here>
30
31(READPORT 0x0203)
32(ISOLATE PRESERVE)
33(IDENTIFY *)
34(VERBOSITY 2)
35(CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
36# SB 16 and OPL3 devices
37(CONFIGURE CTL00f0/-1 (LD 0
38(INT 0 (IRQ 5 (MODE +E)))
39(DMA 0 (CHANNEL 1))
40(DMA 1 (CHANNEL 3))
41(IO 0 (SIZE 16) (BASE 0x0220))
42(IO 2 (SIZE 4) (BASE 0x0388))
43(NAME "CTL00f0/-1[0]{Audio }")
44(ACT Y)
45))
46
47# Joystick device - only if you need it :-/
48
49(CONFIGURE CTL00f0/-1 (LD 1
50(IO 0 (SIZE 1) (BASE 0x0200))
51(NAME "CTL00f0/-1[1]{Game }")
52(ACT Y)
53))
54(WAITFORKEY)
55
56<end of snipping>
57
58 So, after a good kernel modules compilation and a 'depmod -a kernel_ver'
59you may want to:
60
61modprobe sb io=0x220 irq=5 dma=1 dma16=3
62
63 Or, take the hard way:
64
65modprobe soundcore
66modprobe sound
67modprobe uart401
68modprobe sb io=0x220 irq=5 dma=1 dma16=3
69# do you need MIDI?
70modprobe opl3=0x388
71
72 Just in case, the kernel sound support should be:
73
74CONFIG_SOUND=m
75CONFIG_SOUND_OSS=m
76CONFIG_SOUND_SB=m
77
78 Enjoy your new noisy Linux box! ;)
79
80
diff --git a/Documentation/sound/oss/WaveArtist b/Documentation/sound/oss/WaveArtist
new file mode 100644
index 000000000000..f4f3407cd818
--- /dev/null
+++ b/Documentation/sound/oss/WaveArtist
@@ -0,0 +1,170 @@
1
2 (the following is from the armlinux CVS)
3
4 WaveArtist mixer and volume levels can be accessed via these commands:
5
6 nn30 read registers nn, where nn = 00 - 09 for mixer settings
7 0a - 13 for channel volumes
8 mm31 write the volume setting in pairs, where mm = (nn - 10) / 2
9 rr32 write the mixer settings in pairs, where rr = nn/2
10 xx33 reset all settings to default
11 0y34 select mono source, y=0 = left, y=1 = right
12
13 bits
14 nn 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
16 00 | 0 | 0 0 1 1 | left line mixer gain | left aux1 mixer gain |lmute|
17----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
18 01 | 0 | 0 1 0 1 | left aux2 mixer gain | right 2 left mic gain |mmute|
19----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
20 02 | 0 | 0 1 1 1 | left mic mixer gain | left mic | left mixer gain |dith |
21----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
22 03 | 0 | 1 0 0 1 | left mixer input select |lrfg | left ADC gain |
23----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
24 04 | 0 | 1 0 1 1 | right line mixer gain | right aux1 mixer gain |rmute|
25----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
26 05 | 0 | 1 1 0 1 | right aux2 mixer gain | left 2 right mic gain |test |
27----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
28 06 | 0 | 1 1 1 1 | right mic mixer gain | right mic |right mixer gain |rbyps|
29----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
30 07 | 1 | 0 0 0 1 | right mixer select |rrfg | right ADC gain |
31----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
32 08 | 1 | 0 0 1 1 | mono mixer gain |right ADC mux sel|left ADC mux sel |
33----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
34 09 | 1 | 0 1 0 1 |loopb|left linout|loop|ADCch|TxFch|OffCD|test |loopb|loopb|osamp|
35----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
36 0a | 0 | left PCM channel volume |
37----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
38 0b | 0 | right PCM channel volume |
39----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
40 0c | 0 | left FM channel volume |
41----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
42 0d | 0 | right FM channel volume |
43----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
44 0e | 0 | left wavetable channel volume |
45----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
46 0f | 0 | right wavetable channel volume |
47----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
48 10 | 0 | left PCM expansion channel volume |
49----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
50 11 | 0 | right PCM expansion channel volume |
51----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
52 12 | 0 | left FM expansion channel volume |
53----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
54 13 | 0 | right FM expansion channel volume |
55----+---+------------+-----+-----+-----+----+-----+-----+-----+-----+-----+-----+-----+
56
57 lmute: left mute
58 mmute: mono mute
59 dith: dithds
60 lrfg:
61 rmute: right mute
62 rbyps: right bypass
63 rrfg:
64 ADCch:
65 TxFch:
66 OffCD:
67 osamp:
68
69 And the following diagram is derived from the description in the CVS archive:
70
71 MIC L (mouthpiece)
72 +------+
73 -->PreAmp>-\
74 +--^---+ |
75 | |
76 r2b4-5 | +--------+
77 /----*-------------------------------->5 |
78 | | |
79 | /----------------------------------->4 |
80 | | | |
81 | | /--------------------------------->3 1of5 | +---+
82 | | | | mux >-->AMP>--> ADC L
83 | | | /------------------------------->2 | +-^-+
84 | | | | | | |
85 Line | | | | +----+ +------+ +---+ /---->1 | r3b3-0
86 ------------*->mute>--> Gain >--> | | | |
87 L | | | +----+ +------+ | | | *->0 |
88 | | | | | | +---^----+
89 Aux2 | | | +----+ +------+ | | | |
90 ----------*--->mute>--> Gain >--> M | | r8b0-2
91 L | | +----+ +------+ | | |
92 | | | | \------\
93 Aux1 | | +----+ +------+ | | |
94 --------*----->mute>--> Gain >--> I | |
95 L | +----+ +------+ | | |
96 | | | |
97 | +----+ +------+ | | +---+ |
98 *------->mute>--> Gain >--> X >-->AMP>--*
99 | +----+ +------+ | | +-^-+ |
100 | | | | |
101 | +----+ +------+ | | r2b1-3 |
102 | /----->mute>--> Gain >--> E | |
103 | | +----+ +------+ | | |
104 | | | | |
105 | | +----+ +------+ | | |
106 | | /--->mute>--> Gain >--> R | |
107 | | | +----+ +------+ | | |
108 | | | | | | r9b8-9
109 | | | +----+ +------+ | | | |
110 | | | /->mute>--> Gain >--> | | +---v---+
111 | | | | +----+ +------+ +---+ /-*->0 |
112 DAC | | | | | | |
113 ------------*----------------------------------->? | +----+
114 L | | | | | Mux >-->mute>--> L output
115 | | | | /->? | +--^-+
116 | | | | | | | |
117 | | | /--------->? | r0b0
118 | | | | | | +-------+
119 | | | | | |
120 Mono | | | | | | +-------+
121 ----------* | \---> | +----+
122 | | | | | | Mix >-->mute>--> Mono output
123 | | | | *-> | +--^-+
124 | | | | | +-------+ |
125 | | | | | r1b0
126 DAC | | | | | +-------+
127 ------------*-------------------------*--------->1 | +----+
128 R | | | | | | Mux >-->mute>--> R output
129 | | | | +----+ +------+ +---+ *->0 | +--^-+
130 | | | \->mute>--> Gain >--> | | +---^---+ |
131 | | | +----+ +------+ | | | | r5b0
132 | | | | | | r6b0
133 | | | +----+ +------+ | | |
134 | | \--->mute>--> Gain >--> M | |
135 | | +----+ +------+ | | |
136 | | | | |
137 | | +----+ +------+ | | |
138 | *----->mute>--> Gain >--> I | |
139 | | +----+ +------+ | | |
140 | | | | |
141 | | +----+ +------+ | | +---+ |
142 \------->mute>--> Gain >--> X >-->AMP>--*
143 | +----+ +------+ | | +-^-+ |
144 /--/ | | | |
145 Aux1 | +----+ +------+ | | r6b1-3 |
146 -------*------>mute>--> Gain >--> E | |
147 R | | +----+ +------+ | | |
148 | | | | |
149 Aux2 | | +----+ +------+ | | /------/
150 ---------*---->mute>--> Gain >--> R | |
151 R | | | +----+ +------+ | | |
152 | | | | | | +--------+
153 Line | | | +----+ +------+ | | | *->0 |
154 -----------*-->mute>--> Gain >--> | | | |
155 R | | | | +----+ +------+ +---+ \---->1 |
156 | | | | | |
157 | | | \-------------------------------->2 | +---+
158 | | | | Mux >-->AMP>--> ADC R
159 | | \---------------------------------->3 | +-^-+
160 | | | | |
161 | \------------------------------------>4 | r7b3-0
162 | | |
163 \-----*-------------------------------->5 |
164 | +---^----+
165 r6b4-5 | |
166 | | r8b3-5
167 +--v---+ |
168 -->PreAmp>-/
169 +------+
170 MIC R (electret mic)
diff --git a/Documentation/sound/oss/Wavefront b/Documentation/sound/oss/Wavefront
new file mode 100644
index 000000000000..16f57ea43052
--- /dev/null
+++ b/Documentation/sound/oss/Wavefront
@@ -0,0 +1,339 @@
1 An OSS/Free Driver for WaveFront soundcards
2 (Turtle Beach Maui, Tropez, Tropez Plus)
3
4 Paul Barton-Davis, July 1998
5
6 VERSION 0.2.5
7
8Driver Status
9-------------
10
11Requires: Kernel 2.1.106 or later (the driver is included with kernels
122.1.109 and above)
13
14As of 7/22/1998, this driver is currently in *BETA* state. This means
15that it compiles and runs, and that I use it on my system (Linux
162.1.106) with some reasonably demanding applications and uses. I
17believe the code is approaching an initial "finished" state that
18provides bug-free support for the Tropez Plus.
19
20Please note that to date, the driver has ONLY been tested on a Tropez
21Plus. I would very much like to hear (and help out) people with Tropez
22and Maui cards, since I think the driver can support those cards as
23well.
24
25Finally, the driver has not been tested (or even compiled) as a static
26(non-modular) part of the kernel. Alan Cox's good work in modularizing
27OSS/Free for Linux makes this rather unnecessary.
28
29Some Questions
30--------------
31
32**********************************************************************
330) What does this driver do that the maui driver did not ?
34**********************************************************************
35
36* can fully initialize a WaveFront card from cold boot - no DOS
37 utilities needed
38* working patch/sample/program loading and unloading (the maui
39 driver didn't document how to make this work, and assumed
40 user-level preparation of the patch data for writing
41 to the board. ick.)
42* full user-level access to all WaveFront commands
43* for the Tropez Plus, (primitive) control of the YSS225 FX processor
44* Virtual MIDI mode supported - 2 MIDI devices accessible via the
45 WaveFront's MPU401/UART emulation. One
46 accesses the WaveFront synth, the other accesses the
47 external MIDI connector. Full MIDI read/write semantics
48 for both devices.
49* OSS-compliant /dev/sequencer interface for the WaveFront synth,
50 including native and GUS-format patch downloading.
51* semi-intelligent patch management (prototypical at this point)
52
53**********************************************************************
541) What to do about MIDI interfaces ?
55**********************************************************************
56
57The Tropez Plus (and perhaps other WF cards) can in theory support up
58to 2 physical MIDI interfaces. One of these is connected to the
59ICS2115 chip (the WaveFront synth itself) and is controlled by
60MPU/UART-401 emulation code running as part of the WaveFront OS. The
61other is controlled by the CS4232 chip present on the board. However,
62physical access to the CS4232 connector is difficult, and it is
63unlikely (though not impossible) that you will want to use it.
64
65An older version of this driver introduced an additional kernel config
66variable which controlled whether or not the CS4232 MIDI interface was
67configured. Because of Alan Cox's work on modularizing the sound
68drivers, and now backporting them to 2.0.34 kernels, there seems to be
69little reason to support "static" configuration variables, and so this
70has been abandoned in favor of *only* module parameters. Specifying
71"mpuio" and "mpuirq" for the cs4232 parameter will result in the
72CS4232 MIDI interface being configured; leaving them unspecified will
73leave it unconfigured (and thus unusable).
74
75BTW, I have heard from one Tropez+ user that the CS4232 interface is
76more reliable than the ICS2115 one. I have had no problems with the
77latter, and I don't have the right cable to test the former one
78out. Reports welcome.
79
80**********************************************************************
812) Why does line XXX of the code look like this .... ?
82**********************************************************************
83
84Either because it's not finished yet, or because you're a better coder
85than I am, or because you don't understand some aspect of how the card
86or the code works.
87
88I absolutely welcome comments, criticisms and suggestions about the
89design and implementation of the driver.
90
91**********************************************************************
923) What files are included ?
93**********************************************************************
94
95 drivers/sound/README.wavefront -- this file
96
97 drivers/sound/wavefront.patch -- patches for the 2.1.106 sound drivers
98 needed to make the rest of this work
99 DO NOT USE IF YOU'VE APPLIED THEM
100 BEFORE, OR HAVE 2.1.109 OR ABOVE
101
102 drivers/sound/wavfront.c -- the driver
103 drivers/sound/ys225.h -- data declarations for FX config
104 drivers/sound/ys225.c -- data definitions for FX config
105 drivers/sound/wf_midi.c -- the "uart401" driver
106 to support virtual MIDI mode.
107 include/wavefront.h -- the header file
108 Documentation/sound/oss/Tropez+ -- short docs on configuration
109
110**********************************************************************
1114) How do I compile/install/use it ?
112**********************************************************************
113
114PART ONE: install the source code into your sound driver directory
115
116 cd <top-of-your-2.1.106-code-base-e.g.-/usr/src/linux>
117 tar -zxvf <where-you-put/wavefront.tar.gz>
118
119PART TWO: apply the patches
120
121 DO THIS ONLY IF YOU HAVE A KERNEL VERSION BELOW 2.1.109
122 AND HAVE NOT ALREADY INSTALLED THE PATCH(ES).
123
124 cd drivers/sound
125 patch < wavefront.patch
126
127PART THREE: configure your kernel
128
129 cd <top of your kernel tree>
130 make xconfig (or whichever config option you use)
131
132 - choose YES for Sound Support
133 - choose MODULE (M) for OSS Sound Modules
134 - choose MODULE(M) to YM3812/OPL3 support
135 - choose MODULE(M) for WaveFront support
136 - choose MODULE(M) for CS4232 support
137
138 - choose "N" for everything else (unless you have other
139 soundcards you want support for)
140
141
142 make boot
143 .
144 .
145 .
146 <whatever you normally do for a kernel install>
147 make modules
148 .
149 .
150 .
151 make modules_install
152
153Here's my autoconf.h SOUND section:
154
155/*
156 * Sound
157 */
158#define CONFIG_SOUND 1
159#undef CONFIG_SOUND_OSS
160#define CONFIG_SOUND_OSS_MODULE 1
161#undef CONFIG_SOUND_PAS
162#undef CONFIG_SOUND_SB
163#undef CONFIG_SOUND_ADLIB
164#undef CONFIG_SOUND_GUS
165#undef CONFIG_SOUND_MPU401
166#undef CONFIG_SOUND_PSS
167#undef CONFIG_SOUND_MSS
168#undef CONFIG_SOUND_SSCAPE
169#undef CONFIG_SOUND_TRIX
170#undef CONFIG_SOUND_MAD16
171#undef CONFIG_SOUND_WAVEFRONT
172#define CONFIG_SOUND_WAVEFRONT_MODULE 1
173#undef CONFIG_SOUND_CS4232
174#define CONFIG_SOUND_CS4232_MODULE 1
175#undef CONFIG_SOUND_MAUI
176#undef CONFIG_SOUND_SGALAXY
177#undef CONFIG_SOUND_OPL3SA1
178#undef CONFIG_SOUND_SOFTOSS
179#undef CONFIG_SOUND_YM3812
180#define CONFIG_SOUND_YM3812_MODULE 1
181#undef CONFIG_SOUND_VMIDI
182#undef CONFIG_SOUND_UART6850
183/*
184 * Additional low level sound drivers
185 */
186#undef CONFIG_LOWLEVEL_SOUND
187
188************************************************************
1896) How do I configure my card ?
190************************************************************
191
192You need to edit /etc/modprobe.conf. Here's mine (edited to show the
193relevant details):
194
195 # Sound system
196 alias char-major-14-* wavefront
197 alias synth0 wavefront
198 alias mixer0 cs4232
199 alias audio0 cs4232
200 install wavefront /sbin/modprobe cs4232 && /sbin/modprobe -i wavefront && /sbin/modprobe opl3
201 options wavefront io=0x200 irq=9
202 options cs4232 synthirq=9 synthio=0x200 io=0x530 irq=5 dma=1 dma2=0
203 options opl3 io=0x388
204
205Things to note:
206
207 the wavefront options "io" and "irq" ***MUST*** match the "synthio"
208 and "synthirq" cs4232 options.
209
210 you can do without the opl3 module if you don't
211 want to use the OPL/[34] FM synth on the soundcard
212
213 the opl3 io parameter is conventionally not adjustable.
214 In theory, any not-in-use IO port address would work, but
215 just use 0x388 and stick with the crowd.
216
217**********************************************************************
2187) What about firmware ?
219**********************************************************************
220
221Turtle Beach have not given me permission to distribute their firmware
222for the ICS2115. However, if you have a WaveFront card, then you
223almost certainly have the firmware, and if not, its freely available
224on their website, at:
225
226 http://www.tbeach.com/tbs/downloads/scardsdown.htm#tropezplus
227
228The file is called WFOS2001.MOT (for the Tropez+).
229
230This driver, however, doesn't use the pure firmware as distributed,
231but instead relies on a somewhat processed form of it. You can
232generate this very easily. Following an idea from Andrew Veliath's
233Pinnacle driver, the following flex program will generate the
234processed version:
235
236---- cut here -------------------------
237%option main
238%%
239^S[28].*\r$ printf ("%c%.*s", yyleng-1,yyleng-1,yytext);
240<<EOF>> { fputc ('\0', stdout); return; }
241\n {}
242. {}
243---- cut here -------------------------
244
245To use it, put the above in file (say, ws.l) compile it like this:
246
247 shell> flex -ows.c ws.l
248 shell> cc -o ws ws.c
249
250and then use it like this:
251
252 ws < my-copy-of-the-oswf.mot-file > /etc/sound/wavefront.os
253
254If you put it somewhere else, you'll always have to use the wf_ospath
255module parameter (see below) or alter the source code.
256
257**********************************************************************
2587) How do I get it working ?
259**********************************************************************
260
261Optionally, you can reboot with the "new" kernel (even though the only
262changes have really been made to a module).
263
264Then, as root do:
265
266 modprobe wavefront
267
268You should get something like this in /var/log/messages:
269
270 WaveFront: firmware 1.20 already loaded.
271
272or
273
274 WaveFront: no response to firmware probe, assume raw.
275
276then:
277
278 WaveFront: waiting for memory configuration ...
279 WaveFront: hardware version 1.64
280 WaveFront: available DRAM 8191k
281 WaveFront: 332 samples used (266 real, 13 aliases, 53 multi), 180 empty
282 WaveFront: 128 programs slots in use
283 WaveFront: 256 patch slots filled, 142 in use
284
285The whole process takes about 16 seconds, the longest waits being
286after reporting the hardware version (during the firmware download),
287and after reporting program status (during patch status inquiry). Its
288shorter (about 10 secs) if the firmware is already loaded (i.e. only
289warm reboots since the last firmware load).
290
291The "available DRAM" line will vary depending on how much added RAM
292your card has. Mine has 8MB.
293
294To check basically functionality, use play(1) or splay(1) to send a
295.WAV or other audio file through the audio portion. Then use playmidi
296to play a General MIDI file. Try the "-D 0" to hear the
297difference between sending MIDI to the WaveFront and using the OPL/3,
298which is the default (I think ...). If you have an external synth(s)
299hooked to the soundcard, you can use "-e" to route to the
300external synth(s) (in theory, -D 1 should work as well, but I think
301there is a bug in playmidi which prevents this from doing what it
302should).
303
304**********************************************************************
3058) What are the module parameters ?
306**********************************************************************
307
308Its best to read wavefront.c for this, but here is a summary:
309
310integers:
311 wf_raw - if set, ignore apparent presence of firmware
312 loaded onto the ICS2115, reset the whole
313 board, and initialize it from scratch. (default = 0)
314
315 fx_raw - if set, always initialize the YSS225 processor
316 on the Tropez plus. (default = 1)
317
318 < The next 4 are basically for kernel hackers to allow
319 tweaking the driver for testing purposes. >
320
321 wait_usecs - loop timer used when waiting for
322 status conditions on the board.
323 The default is 150.
324
325 debug_default - debugging flags. See sound/wavefront.h
326 for WF_DEBUG_* values. Default is zero.
327 Setting this allows you to debug the
328 driver during module installation.
329strings:
330 ospath - path to get to the pre-processed OS firmware.
331 (default: /etc/sound/wavefront.os)
332
333**********************************************************************
3349) Who should I contact if I have problems?
335**********************************************************************
336
337Just me: Paul Barton-Davis <pbd@op.net>
338
339
diff --git a/Documentation/sound/oss/btaudio b/Documentation/sound/oss/btaudio
new file mode 100644
index 000000000000..1a693e69d44b
--- /dev/null
+++ b/Documentation/sound/oss/btaudio
@@ -0,0 +1,92 @@
1
2Intro
3=====
4
5people start bugging me about this with questions, looks like I
6should write up some documentation for this beast. That way I
7don't have to answer that much mails I hope. Yes, I'm lazy...
8
9
10You might have noticed that the bt878 grabber cards have actually
11_two_ PCI functions:
12
13$ lspci
14[ ... ]
1500:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02)
1600:0a.1 Multimedia controller: Brooktree Corporation Bt878 (rev 02)
17[ ... ]
18
19The first does video, it is backward compatible to the bt848. The second
20does audio. btaudio is a driver for the second function. It's a sound
21driver which can be used for recording sound (and _only_ recording, no
22playback). As most TV cards come with a short cable which can be plugged
23into your sound card's line-in you probably don't need this driver if all
24you want to do is just watching TV...
25
26
27Driver Status
28=============
29
30Still somewhat experimental. The driver should work stable, i.e. it
31should'nt crash your box. It might not work as expected, have bugs,
32not being fully OSS API compilant, ...
33
34Latest versions are available from http://bytesex.org/bttv/, the
35driver is in the bttv tarball. Kernel patches might be available too,
36have a look at http://bytesex.org/bttv/listing.html.
37
38The chip knows two different modes. btaudio registers two dsp
39devices, one for each mode. They can not be used at the same time.
40
41
42Digital audio mode
43==================
44
45The chip gives you 16 bit stereo sound. The sample rate depends on
46the external source which feeds the bt878 with digital sound via I2S
47interface. There is a insmod option (rate) to tell the driver which
48sample rate the hardware uses (32000 is the default).
49
50One possible source for digital sound is the msp34xx audio processor
51chip which provides digital sound via I2S with 32 kHz sample rate. My
52Hauppauge board works this way.
53
54The Osprey-200 reportly gives you digital sound with 44100 Hz sample
55rate. It is also possible that you get no sound at all.
56
57
58analog mode (A/D)
59=================
60
61You can tell the driver to use this mode with the insmod option "analog=1".
62The chip has three analog inputs. Consequently you'll get a mixer device
63to control these.
64
65The analog mode supports mono only. Both 8 + 16 bit. Both are _signed_
66int, which is uncommon for the 8 bit case. Sample rate range is 119 kHz
67to 448 kHz. Yes, the number of digits is correct. The driver supports
68downsampling by powers of two, so you can ask for more usual sample rates
69like 44 kHz too.
70
71With my Hauppauge I get noisy sound on the second input (mapped to line2
72by the mixer device). Others get a useable signal on line1.
73
74
75some examples
76=============
77
78* read audio data from btaudio (dsp2), send to es1730 (dsp,dsp1):
79 $ sox -w -r 32000 -t ossdsp /dev/dsp2 -t ossdsp /dev/dsp
80
81* read audio data from btaudio, send to esound daemon (which might be
82 running on another host):
83 $ sox -c 2 -w -r 32000 -t ossdsp /dev/dsp2 -t sw - | esdcat -r 32000
84 $ sox -c 1 -w -r 32000 -t ossdsp /dev/dsp2 -t sw - | esdcat -m -r 32000
85
86
87Have fun,
88
89 Gerd
90
91--
92Gerd Knorr <kraxel@bytesex.org>
diff --git a/Documentation/sound/oss/cs46xx b/Documentation/sound/oss/cs46xx
new file mode 100644
index 000000000000..88d6cf8b39f3
--- /dev/null
+++ b/Documentation/sound/oss/cs46xx
@@ -0,0 +1,138 @@
1
2Documentation for the Cirrus Logic/Crystal SoundFusion cs46xx/cs4280 audio
3controller chips (2001/05/11)
4
5The cs46xx audio driver supports the DSP line of Cirrus controllers.
6Specifically, the cs4610, cs4612, cs4614, cs4622, cs4624, cs4630 and the cs4280
7products. This driver uses the generic ac97_codec driver for AC97 codec
8support.
9
10
11Features:
12
13Full Duplex Playback/Capture supported from 8k-48k.
1416Bit Signed LE & 8Bit Unsigned, with Mono or Stereo supported.
15
16APM/PM - 2.2.x PM is enabled and functional. APM can also
17be enabled for 2.4.x by modifying the CS46XX_ACPI_SUPPORT macro
18definition.
19
20DMA playback buffer size is configurable from 16k (defaultorder=2) up to 2Meg
21(defaultorder=11). DMA capture buffer size is fixed at a single 4k page as
22two 2k fragments.
23
24MMAP seems to work well with QuakeIII, and test XMMS plugin.
25
26Myth2 works, but the polling logic is not fully correct, but is functional.
27
28The 2.4.4-ac6 gameport code in the cs461x joystick driver has been tested
29with a Microsoft Sidewinder joystick (cs461x.o and sidewinder.o). This
30audio driver must be loaded prior to the joystick driver to enable the
31DSP task image supporting the joystick device.
32
33
34Limitations:
35
36SPDIF is currently not supported.
37
38Primary codec support only. No secondary codec support is implemented.
39
40
41
42NOTES:
43
44Hercules Game Theatre XP - the EGPIO2 pin controls the external Amp,
45and has been tested.
46Module parameter hercules_egpio_disable set to 1, will force a 0 to EGPIODR
47to disable the external amplifier.
48
49VTB Santa Cruz - the GPIO7/GPIO8 on the Secondary Codec control
50the external amplifier for the "back" speakers, since we do not
51support the secondary codec then this external amp is not
52turned on. The primary codec external amplifier is supported but
53note that the AC97 EAPD bit is inverted logic (amp_voyetra()).
54
55DMA buffer size - there are issues with many of the Linux applications
56concerning the optimal buffer size. Several applications request a
57certain fragment size and number and then do not verify that the driver
58has the ability to support the requested configuration.
59SNDCTL_DSP_SETFRAGMENT ioctl is used to request a fragment size and
60number of fragments. Some applications exit if an error is returned
61on this particular ioctl. Therefore, in alignment with the other OSS audio
62drivers, no error is returned when a SETFRAGs IOCTL is received, but the
63values passed from the app are not used in any buffer calculation
64(ossfragshift/ossmaxfrags are not used).
65Use the "defaultorder=N" module parameter to change the buffer size if
66you have an application that requires a specific number of fragments
67or a specific buffer size (see below).
68
69Debug Interface
70---------------
71There is an ioctl debug interface to allow runtime modification of the
72debug print levels. This debug interface code can be disabled from the
73compilation process with commenting the following define:
74#define CSDEBUG_INTERFACE 1
75There is also a debug print methodolgy to select printf statements from
76different areas of the driver. A debug print level is also used to allow
77additional printfs to be active. Comment out the following line in the
78driver to disable compilation of the CS_DBGOUT print statements:
79#define CSDEBUG 1
80
81Please see the definitions for cs_debuglevel and cs_debugmask for additional
82information on the debug levels and sections.
83
84There is also a csdbg executable to allow runtime manipulation of these
85parameters. for a copy email: twoller@crystal.cirrus.com
86
87
88
89MODULE_PARMS definitions
90------------------------
91MODULE_PARM(defaultorder, "i");
92defaultorder=N
93where N is a value from 1 to 12
94The buffer order determines the size of the dma buffer for the driver.
95under Linux, a smaller buffer allows more responsiveness from many of the
96applications (e.g. games). A larger buffer allows some of the apps (esound)
97to not underrun the dma buffer as easily. As default, use 32k (order=3)
98rather than 64k as some of the games work more responsively.
99(2^N) * PAGE_SIZE = allocated buffer size
100
101MODULE_PARM(cs_debuglevel, "i");
102MODULE_PARM(cs_debugmask, "i");
103cs_debuglevel=N
104cs_debugmask=0xMMMMMMMM
105where N is a value from 0 (no debug printfs), to 9 (maximum)
1060xMMMMMMMM is a debug mask corresponding to the CS_xxx bits (see driver source).
107
108MODULE_PARM(hercules_egpio_disable, "i");
109hercules_egpio_disable=N
110where N is a 0 (enable egpio), or a 1 (disable egpio support)
111
112MODULE_PARM(initdelay, "i");
113initdelay=N
114This value is used to determine the millescond delay during the initialization
115code prior to powering up the PLL. On laptops this value can be used to
116assist with errors on resume, mostly with IBM laptops. Basically, if the
117system is booted under battery power then the mdelay()/udelay() functions fail to
118properly delay the required time. Also, if the system is booted under AC power
119and then the power removed, the mdelay()/udelay() functions will not delay properly.
120
121MODULE_PARM(powerdown, "i");
122powerdown=N
123where N is 0 (disable any powerdown of the internal blocks) or 1 (enable powerdown)
124
125
126MODULE_PARM(external_amp, "i");
127external_amp=1
128if N is set to 1, then force enabling the EAPD support in the primary AC97 codec.
129override the detection logic and force the external amp bit in the AC97 0x26 register
130to be reset (0). EAPD should be 0 for powerup, and 1 for powerdown. The VTB Santa Cruz
131card has inverted logic, so there is a special function for these cards.
132
133MODULE_PARM(thinkpad, "i");
134thinkpad=1
135if N is set to 1, then force enabling the clkrun functionality.
136Currently, when the part is being used, then clkrun is disabled for the entire system,
137but re-enabled when the driver is released or there is no outstanding open count.
138
diff --git a/Documentation/sound/oss/es1370 b/Documentation/sound/oss/es1370
new file mode 100644
index 000000000000..7b38b1a096a3
--- /dev/null
+++ b/Documentation/sound/oss/es1370
@@ -0,0 +1,70 @@
1/proc/sound, /dev/sndstat
2-------------------------
3
4/proc/sound and /dev/sndstat is not supported by the
5driver. To find out whether the driver succeeded loading,
6check the kernel log (dmesg).
7
8
9ALaw/uLaw sample formats
10------------------------
11
12This driver does not support the ALaw/uLaw sample formats.
13ALaw is the default mode when opening a sound device
14using OSS/Free. The reason for the lack of support is
15that the hardware does not support these formats, and adding
16conversion routines to the kernel would lead to very ugly
17code in the presence of the mmap interface to the driver.
18And since xquake uses mmap, mmap is considered important :-)
19and no sane application uses ALaw/uLaw these days anyway.
20In short, playing a Sun .au file as follows:
21
22cat my_file.au > /dev/dsp
23
24does not work. Instead, you may use the play script from
25Chris Bagwell's sox-12.14 package (available from the URL
26below) to play many different audio file formats.
27The script automatically determines the audio format
28and does do audio conversions if necessary.
29http://home.sprynet.com/sprynet/cbagwell/projects.html
30
31
32Blocking vs. nonblocking IO
33---------------------------
34
35Unlike OSS/Free this driver honours the O_NONBLOCK file flag
36not only during open, but also during read and write.
37This is an effort to make the sound driver interface more
38regular. Timidity has problems with this; a patch
39is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
40(Timidity patched will also run on OSS/Free).
41
42
43MIDI UART
44---------
45
46The driver supports a simple MIDI UART interface, with
47no ioctl's supported.
48
49
50MIDI synthesizer
51----------------
52
53This soundcard does not have any hardware MIDI synthesizer;
54MIDI synthesis has to be done in software. To allow this
55the driver/soundcard supports two PCM (/dev/dsp) interfaces.
56The second one goes to the mixer "synth" setting and supports
57only a limited set of sampling rates (44100, 22050, 11025, 5512).
58By setting lineout to 1 on the driver command line
59(eg. insmod es1370 lineout=1) it is even possible on some
60cards to convert the LINEIN jack into a second LINEOUT jack, thus
61making it possible to output four independent audio channels!
62
63There is a freely available software package that allows
64MIDI file playback on this soundcard called Timidity.
65See http://www.cgs.fi/~tt/timidity/.
66
67
68
69Thomas Sailer
70t.sailer@alumni.ethz.ch
diff --git a/Documentation/sound/oss/es1371 b/Documentation/sound/oss/es1371
new file mode 100644
index 000000000000..c3151266771c
--- /dev/null
+++ b/Documentation/sound/oss/es1371
@@ -0,0 +1,64 @@
1/proc/sound, /dev/sndstat
2-------------------------
3
4/proc/sound and /dev/sndstat is not supported by the
5driver. To find out whether the driver succeeded loading,
6check the kernel log (dmesg).
7
8
9ALaw/uLaw sample formats
10------------------------
11
12This driver does not support the ALaw/uLaw sample formats.
13ALaw is the default mode when opening a sound device
14using OSS/Free. The reason for the lack of support is
15that the hardware does not support these formats, and adding
16conversion routines to the kernel would lead to very ugly
17code in the presence of the mmap interface to the driver.
18And since xquake uses mmap, mmap is considered important :-)
19and no sane application uses ALaw/uLaw these days anyway.
20In short, playing a Sun .au file as follows:
21
22cat my_file.au > /dev/dsp
23
24does not work. Instead, you may use the play script from
25Chris Bagwell's sox-12.14 package (available from the URL
26below) to play many different audio file formats.
27The script automatically determines the audio format
28and does do audio conversions if necessary.
29http://home.sprynet.com/sprynet/cbagwell/projects.html
30
31
32Blocking vs. nonblocking IO
33---------------------------
34
35Unlike OSS/Free this driver honours the O_NONBLOCK file flag
36not only during open, but also during read and write.
37This is an effort to make the sound driver interface more
38regular. Timidity has problems with this; a patch
39is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
40(Timidity patched will also run on OSS/Free).
41
42
43MIDI UART
44---------
45
46The driver supports a simple MIDI UART interface, with
47no ioctl's supported.
48
49
50MIDI synthesizer
51----------------
52
53This soundcard does not have any hardware MIDI synthesizer;
54MIDI synthesis has to be done in software. To allow this
55the driver/soundcard supports two PCM (/dev/dsp) interfaces.
56
57There is a freely available software package that allows
58MIDI file playback on this soundcard called Timidity.
59See http://www.cgs.fi/~tt/timidity/.
60
61
62
63Thomas Sailer
64t.sailer@alumni.ethz.ch
diff --git a/Documentation/sound/oss/mwave b/Documentation/sound/oss/mwave
new file mode 100644
index 000000000000..858334bb46b0
--- /dev/null
+++ b/Documentation/sound/oss/mwave
@@ -0,0 +1,185 @@
1 How to try to survive an IBM Mwave under Linux SB drivers
2
3
4+ IBM have now released documentation of sorts and Torsten is busy
5 trying to make the Mwave work. This is not however a trivial task.
6
7----------------------------------------------------------------------------
8
9OK, first thing - the IRQ problem IS a problem, whether the test is bypassed or
10not. It is NOT a Linux problem, but an MWAVE problem that is fixed with the
11latest MWAVE patches. So, in other words, don't bypass the test for MWAVES!
12
13I have Windows 95 on /dev/hda1, swap on /dev/hda2, and Red Hat 5 on /dev/hda3.
14
15The steps, then:
16
17 Boot to Linux.
18 Mount Windows 95 file system (assume mount point = /dos95).
19 mkdir /dos95/linux
20 mkdir /dos95/linux/boot
21 mkdir /dos95/linux/boot/parms
22
23 Copy the kernel, any initrd image, and loadlin to /dos95/linux/boot/.
24
25 Reboot to Windows 95.
26
27 Edit C:/msdos.sys and add or change the following:
28
29 Logo=0
30 BootGUI=0
31
32 Note that msdos.sys is a text file but it needs to be made 'unhidden',
33 readable and writable before it can be edited. This can be done with
34 DOS' "attrib" command.
35
36 Edit config.sys to have multiple config menus. I have one for windows 95 and
37 five for Linux, like this:
38------------
39[menu]
40menuitem=W95, Windows 95
41menuitem=LINTP, Linux - ThinkPad
42menuitem=LINTP3, Linux - ThinkPad Console
43menuitem=LINDOC, Linux - Docked
44menuitem=LINDOC3, Linux - Docked Console
45menuitem=LIN1, Linux - Single User Mode
46REM menudefault=W95,10
47
48[W95]
49
50[LINTP]
51
52[LINDOC]
53
54[LINTP3]
55
56[LINDOC3]
57
58[LIN1]
59
60[COMMON]
61FILES=30
62REM Please read README.TXT in C:\MWW subdirectory before changing the DOS= statement.
63DOS=HIGH,UMB
64DEVICE=C:\MWW\MANAGER\MWD50430.EXE
65SHELL=c:\command.com /e:2048
66-------------------
67
68The important things are the SHELL and DEVICE statements.
69
70 Then change autoexec.bat. Basically everything in there originally should be
71 done ONLY when Windows 95 is booted. Then you add new things specifically
72 for Linux. Mine is as follows
73
74---------------
75@ECHO OFF
76if "%CONFIG%" == "W95" goto W95
77
78REM
79REM Linux stuff
80REM
81SET MWPATH=C:\MWW\DLL;C:\MWW\MWGAMES;C:\MWW\DSP
82SET BLASTER=A220 I5 D1
83SET MWROOT=C:\MWW
84SET LIBPATH=C:\MWW\DLL
85SET PATH=C:\WINDOWS;C:\MWW\DLL;
86CALL MWAVE START NOSHOW
87c:\linux\boot\loadlin.exe @c:\linux\boot\parms\%CONFIG%.par
88
89:W95
90REM
91REM Windows 95 stuff
92REM
93c:\toolkit\guard
94SET MSINPUT=C:\MSINPUT
95SET MWPATH=C:\MWW\DLL;C:\MWW\MWGAMES;C:\MWW\DSP
96REM The following is used by DOS games to recognize Sound Blaster hardware.
97REM If hardware settings are changed, please change this line as well.
98REM See the Mwave README file for instructions.
99SET BLASTER=A220 I5 D1
100SET MWROOT=C:\MWW
101SET LIBPATH=C:\MWW\DLL
102SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;E:\ORAWIN95\BIN;f:\msdev\bin;e:\v30\bin.dbg;v:\devt\v30\bin;c:\JavaSDK\Bin;C:\MWW\DLL;
103SET INCLUDE=f:\MSDEV\INCLUDE;F:\MSDEV\MFC\INCLUDE
104SET LIB=F:\MSDEV\LIB;F:\MSDEV\MFC\LIB
105win
106
107------------------------
108
109Now build a file in c:\linux\boot\parms for each Linux config that you have.
110
111For example, my LINDOC3 config is for a docked Thinkpad at runlevel 3 with no
112initrd image, and has a parameter file named LINDOC3.PAR in c:\linux\boot\parms:
113
114-----------------------
115# LOADLIN @param_file image=other_image root=/dev/other
116#
117# Linux Console in docking station
118#
119c:\linux\boot\zImage.krn # First value must be filename of Linux kernel.
120root=/dev/hda3 # device which gets mounted as root FS
121ro # Other kernel arguments go here.
122apm=off
123doc=yes
1243
125-----------------------
126
127The doc=yes parameter is an environment variable used by my init scripts, not
128a kernel argument.
129
130However, the apm=off parameter IS a kernel argument! APM, at least in my setup,
131causes the kernel to crash when loaded via loadlin (but NOT when loaded via
132LILO). The APM stuff COULD be forced out of the kernel via the kernel compile
133options. Instead, I got an unofficial patch to the APM drivers that allows them
134to be dynamically deactivated via kernel arguments. Whatever you chose to
135document, APM, it seems, MUST be off for setups like mine.
136
137Now make sure C:\MWW\MWCONFIG.REF looks like this:
138
139----------------------
140[NativeDOS]
141Default=SB1.5
142SBInputSource=CD
143SYNTH=FM
144QSound=OFF
145Reverb=OFF
146Chorus=OFF
147ReverbDepth=5
148ChorusDepth=5
149SBInputVolume=5
150SBMainVolume=10
151SBWaveVolume=10
152SBSynthVolume=10
153WaveTableVolume=10
154AudioPowerDriver=ON
155
156[FastCFG]
157Show=No
158HideOption=Off
159-----------------------------
160
161OR the Default= line COULD be
162
163Default=SBPRO
164
165Reboot to Windows 95 and choose Linux. When booted, use sndconfig to configure
166the sound modules and voilà - ThinkPad sound with Linux.
167
168Now the gotchas - you can either have CD sound OR Mixers but not both. That's a
169problem with the SB1.5 (CD sound) or SBPRO (Mixers) settings. No one knows why
170this is!
171
172For some reason MPEG3 files, when played through mpg123, sound like they
173are playing at 1/8th speed - not very useful! If you have ANY insight
174on why this second thing might be happening, I would be grateful.
175
176===========================================================
177 _/ _/_/_/_/
178 _/_/ _/_/ _/
179 _/ _/_/ _/_/_/_/ Martin John Bartlett
180 _/ _/ _/ _/ (martin@nitram.demon.co.uk)
181_/ _/_/_/_/
182 _/
183_/ _/
184 _/_/
185===========================================================
diff --git a/Documentation/sound/oss/rme96xx b/Documentation/sound/oss/rme96xx
new file mode 100644
index 000000000000..87d7b7b65fa1
--- /dev/null
+++ b/Documentation/sound/oss/rme96xx
@@ -0,0 +1,767 @@
1Beta release of the rme96xx (driver for RME 96XX cards like the
2"Hammerfall" and the "Hammerfall light")
3
4Important: The driver module has to be installed on a freshly rebooted system,
5otherwise the driver might not be able to acquire its buffers.
6
7features:
8
9 - OSS programming interface (i.e. runs with standard OSS soundsoftware)
10 - OSS/Multichannel interface (OSS multichannel is done by just aquiring
11 more than 2 channels). The driver does not use more than one device
12 ( yet .. this feature may be implemented later )
13 - more than one RME card supported
14
15The driver uses a specific multichannel interface, which I will document
16when the driver gets stable. (take a look at the defines in rme96xx.h,
17which adds blocked multichannel formats i.e instead of
18lrlrlrlr --> llllrrrr etc.
19
20Use the "rmectrl" programm to look at the status of the card ..
21or use xrmectrl, a GUI interface for the ctrl program.
22
23What you can do with the rmectrl program is to set the stereo device for
24OSS emulation (e.g. if you use SPDIF out).
25
26You do:
27
28./ctrl offset 24 24
29
30which makes the stereo device use channels 25 and 26.
31
32Guenter Geiger <geiger@epy.co.at>
33
34copy the first part of the attached source code into rmectrl.c
35and the second part into xrmectrl (or get the program from
36http://gige.xdv.org/pages/soft/pages/rme)
37
38to compile: gcc -o rmectrl rmectrl.c
39------------------------------ snip ------------------------------------
40
41#include <stdio.h>
42#include <sys/types.h>
43#include <sys/stat.h>
44#include <sys/ioctl.h>
45#include <fcntl.h>
46#include <linux/soundcard.h>
47#include <math.h>
48#include <unistd.h>
49#include <stdlib.h>
50#include "rme96xx.h"
51
52/*
53 remctrl.c
54 (C) 2000 Guenter Geiger <geiger@debian.org>
55 HP20020201 - Heiko Purnhagen <purnhage@tnt.uni-hannover.de>
56*/
57
58/* # define DEVICE_NAME "/dev/mixer" */
59# define DEVICE_NAME "/dev/mixer1"
60
61
62void usage(void)
63{
64 fprintf(stderr,"usage: rmectrl [/dev/mixer<n>] [command [options]]\n\n");
65 fprintf(stderr,"where command is one of:\n");
66 fprintf(stderr," help show this help\n");
67 fprintf(stderr," status show status bits\n");
68 fprintf(stderr," control show control bits\n");
69 fprintf(stderr," mix show mixer/offset status\n");
70 fprintf(stderr," master <n> set sync master\n");
71 fprintf(stderr," pro <n> set spdif out pro\n");
72 fprintf(stderr," emphasis <n> set spdif out emphasis\n");
73 fprintf(stderr," dolby <n> set spdif out no audio\n");
74 fprintf(stderr," optout <n> set spdif out optical\n");
75 fprintf(stderr," wordclock <n> set sync wordclock\n");
76 fprintf(stderr," spdifin <n> set spdif in (0=optical,1=coax,2=intern)\n");
77 fprintf(stderr," syncref <n> set sync source (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n");
78 fprintf(stderr," adat1cd <n> set ADAT1 on internal CD\n");
79 fprintf(stderr," offset <devnr> <in> <out> set dev (0..3) offset (0..25)\n");
80 exit(-1);
81}
82
83
84int main(int argc, char* argv[])
85{
86 int cards;
87 int ret;
88 int i;
89 double ft;
90 int fd, fdwr;
91 int param,orig;
92 rme_status_t stat;
93 rme_ctrl_t ctrl;
94 char *device;
95 int argidx;
96
97 if (argc < 2)
98 usage();
99
100 if (*argv[1]=='/') {
101 device = argv[1];
102 argidx = 2;
103 }
104 else {
105 device = DEVICE_NAME;
106 argidx = 1;
107 }
108
109 fprintf(stdout,"mixer device %s\n",device);
110 if ((fd = open(device,O_RDONLY)) < 0) {
111 fprintf(stdout,"opening device failed\n");
112 exit(-1);
113 }
114
115 if ((fdwr = open(device,O_WRONLY)) < 0) {
116 fprintf(stdout,"opening device failed\n");
117 exit(-1);
118 }
119
120 if (argc < argidx+1)
121 usage();
122
123 if (!strcmp(argv[argidx],"help"))
124 usage();
125 if (!strcmp(argv[argidx],"-h"))
126 usage();
127 if (!strcmp(argv[argidx],"--help"))
128 usage();
129
130 if (!strcmp(argv[argidx],"status")) {
131 ioctl(fd,SOUND_MIXER_PRIVATE2,&stat);
132 fprintf(stdout,"stat.irq %d\n",stat.irq);
133 fprintf(stdout,"stat.lockmask %d\n",stat.lockmask);
134 fprintf(stdout,"stat.sr48 %d\n",stat.sr48);
135 fprintf(stdout,"stat.wclock %d\n",stat.wclock);
136 fprintf(stdout,"stat.bufpoint %d\n",stat.bufpoint);
137 fprintf(stdout,"stat.syncmask %d\n",stat.syncmask);
138 fprintf(stdout,"stat.doublespeed %d\n",stat.doublespeed);
139 fprintf(stdout,"stat.tc_busy %d\n",stat.tc_busy);
140 fprintf(stdout,"stat.tc_out %d\n",stat.tc_out);
141 fprintf(stdout,"stat.crystalrate %d (0=64k 3=96k 4=88.2k 5=48k 6=44.1k 7=32k)\n",stat.crystalrate);
142 fprintf(stdout,"stat.spdif_error %d\n",stat.spdif_error);
143 fprintf(stdout,"stat.bufid %d\n",stat.bufid);
144 fprintf(stdout,"stat.tc_valid %d\n",stat.tc_valid);
145 exit (0);
146 }
147
148 if (!strcmp(argv[argidx],"control")) {
149 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
150 fprintf(stdout,"ctrl.start %d\n",ctrl.start);
151 fprintf(stdout,"ctrl.latency %d (0=64 .. 7=8192)\n",ctrl.latency);
152 fprintf(stdout,"ctrl.master %d\n",ctrl.master);
153 fprintf(stdout,"ctrl.ie %d\n",ctrl.ie);
154 fprintf(stdout,"ctrl.sr48 %d\n",ctrl.sr48);
155 fprintf(stdout,"ctrl.spare %d\n",ctrl.spare);
156 fprintf(stdout,"ctrl.doublespeed %d\n",ctrl.doublespeed);
157 fprintf(stdout,"ctrl.pro %d\n",ctrl.pro);
158 fprintf(stdout,"ctrl.emphasis %d\n",ctrl.emphasis);
159 fprintf(stdout,"ctrl.dolby %d\n",ctrl.dolby);
160 fprintf(stdout,"ctrl.opt_out %d\n",ctrl.opt_out);
161 fprintf(stdout,"ctrl.wordclock %d\n",ctrl.wordclock);
162 fprintf(stdout,"ctrl.spdif_in %d (0=optical,1=coax,2=intern)\n",ctrl.spdif_in);
163 fprintf(stdout,"ctrl.sync_ref %d (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n",ctrl.sync_ref);
164 fprintf(stdout,"ctrl.spdif_reset %d\n",ctrl.spdif_reset);
165 fprintf(stdout,"ctrl.spdif_select %d\n",ctrl.spdif_select);
166 fprintf(stdout,"ctrl.spdif_clock %d\n",ctrl.spdif_clock);
167 fprintf(stdout,"ctrl.spdif_write %d\n",ctrl.spdif_write);
168 fprintf(stdout,"ctrl.adat1_cd %d\n",ctrl.adat1_cd);
169 exit (0);
170 }
171
172 if (!strcmp(argv[argidx],"mix")) {
173 rme_mixer mix;
174 int i;
175
176 for (i=0; i<4; i++) {
177 mix.devnr = i;
178 ioctl(fd,SOUND_MIXER_PRIVATE1,&mix);
179 if (mix.devnr == i) {
180 fprintf(stdout,"devnr %d\n",mix.devnr);
181 fprintf(stdout,"mix.i_offset %2d (0-25)\n",mix.i_offset);
182 fprintf(stdout,"mix.o_offset %2d (0-25)\n",mix.o_offset);
183 }
184 }
185 exit (0);
186 }
187
188/* the control flags */
189
190 if (argc < argidx+2)
191 usage();
192
193 if (!strcmp(argv[argidx],"master")) {
194 int val = atoi(argv[argidx+1]);
195 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
196 printf("master = %d\n",val);
197 ctrl.master = val;
198 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
199 exit (0);
200 }
201
202 if (!strcmp(argv[argidx],"pro")) {
203 int val = atoi(argv[argidx+1]);
204 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
205 printf("pro = %d\n",val);
206 ctrl.pro = val;
207 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
208 exit (0);
209 }
210
211 if (!strcmp(argv[argidx],"emphasis")) {
212 int val = atoi(argv[argidx+1]);
213 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
214 printf("emphasis = %d\n",val);
215 ctrl.emphasis = val;
216 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
217 exit (0);
218 }
219
220 if (!strcmp(argv[argidx],"dolby")) {
221 int val = atoi(argv[argidx+1]);
222 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
223 printf("dolby = %d\n",val);
224 ctrl.dolby = val;
225 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
226 exit (0);
227 }
228
229 if (!strcmp(argv[argidx],"optout")) {
230 int val = atoi(argv[argidx+1]);
231 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
232 printf("optout = %d\n",val);
233 ctrl.opt_out = val;
234 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
235 exit (0);
236 }
237
238 if (!strcmp(argv[argidx],"wordclock")) {
239 int val = atoi(argv[argidx+1]);
240 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
241 printf("wordclock = %d\n",val);
242 ctrl.wordclock = val;
243 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
244 exit (0);
245 }
246
247 if (!strcmp(argv[argidx],"spdifin")) {
248 int val = atoi(argv[argidx+1]);
249 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
250 printf("spdifin = %d\n",val);
251 ctrl.spdif_in = val;
252 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
253 exit (0);
254 }
255
256 if (!strcmp(argv[argidx],"syncref")) {
257 int val = atoi(argv[argidx+1]);
258 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
259 printf("syncref = %d\n",val);
260 ctrl.sync_ref = val;
261 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
262 exit (0);
263 }
264
265 if (!strcmp(argv[argidx],"adat1cd")) {
266 int val = atoi(argv[argidx+1]);
267 ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
268 printf("adat1cd = %d\n",val);
269 ctrl.adat1_cd = val;
270 ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
271 exit (0);
272 }
273
274/* setting offset */
275
276 if (argc < argidx+4)
277 usage();
278
279 if (!strcmp(argv[argidx],"offset")) {
280 rme_mixer mix;
281
282 mix.devnr = atoi(argv[argidx+1]);
283
284 mix.i_offset = atoi(argv[argidx+2]);
285 mix.o_offset = atoi(argv[argidx+3]);
286 ioctl(fdwr,SOUND_MIXER_PRIVATE1,&mix);
287 fprintf(stdout,"devnr %d\n",mix.devnr);
288 fprintf(stdout,"mix.i_offset to %d\n",mix.i_offset);
289 fprintf(stdout,"mix.o_offset to %d\n",mix.o_offset);
290 exit (0);
291 }
292
293 usage();
294 exit (0); /* to avoid warning */
295}
296
297
298---------------------------- <snip> --------------------------------
299#!/usr/bin/wish
300
301# xrmectrl
302# (C) 2000 Guenter Geiger <geiger@debian.org>
303# HP20020201 - Heiko Purnhagen <purnhage@tnt.uni-hannover.de>
304
305#set defaults "-relief ridged"
306set CTRLPROG "./rmectrl"
307if {$argc} {
308 set CTRLPROG "$CTRLPROG $argv"
309}
310puts "CTRLPROG $CTRLPROG"
311
312frame .butts
313button .butts.exit -text "Exit" -command "exit" -relief ridge
314#button .butts.state -text "State" -command "get_all"
315
316pack .butts.exit -side left
317pack .butts -side bottom
318
319
320#
321# STATUS
322#
323
324frame .status
325
326# Sampling Rate
327
328frame .status.sr
329label .status.sr.text -text "Sampling Rate" -justify left
330radiobutton .status.sr.441 -selectcolor red -text "44.1 kHz" -width 10 -anchor nw -variable srate -value 44100 -font times
331radiobutton .status.sr.480 -selectcolor red -text "48 kHz" -width 10 -anchor nw -variable srate -value 48000 -font times
332radiobutton .status.sr.882 -selectcolor red -text "88.2 kHz" -width 10 -anchor nw -variable srate -value 88200 -font times
333radiobutton .status.sr.960 -selectcolor red -text "96 kHz" -width 10 -anchor nw -variable srate -value 96000 -font times
334
335pack .status.sr.text .status.sr.441 .status.sr.480 .status.sr.882 .status.sr.960 -side top -padx 3
336
337# Lock
338
339frame .status.lock
340label .status.lock.text -text "Lock" -justify left
341checkbutton .status.lock.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatlock1 -font times
342checkbutton .status.lock.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatlock2 -font times
343checkbutton .status.lock.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatlock3 -font times
344
345pack .status.lock.text .status.lock.adat1 .status.lock.adat2 .status.lock.adat3 -side top -padx 3
346
347# Sync
348
349frame .status.sync
350label .status.sync.text -text "Sync" -justify left
351checkbutton .status.sync.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatsync1 -font times
352checkbutton .status.sync.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatsync2 -font times
353checkbutton .status.sync.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatsync3 -font times
354
355pack .status.sync.text .status.sync.adat1 .status.sync.adat2 .status.sync.adat3 -side top -padx 3
356
357# Timecode
358
359frame .status.tc
360label .status.tc.text -text "Timecode" -justify left
361checkbutton .status.tc.busy -selectcolor red -text "busy" -anchor nw -width 10 -variable tcbusy -font times
362checkbutton .status.tc.out -selectcolor red -text "out" -anchor nw -width 10 -variable tcout -font times
363checkbutton .status.tc.valid -selectcolor red -text "valid" -anchor nw -width 10 -variable tcvalid -font times
364
365pack .status.tc.text .status.tc.busy .status.tc.out .status.tc.valid -side top -padx 3
366
367# SPDIF In
368
369frame .status.spdif
370label .status.spdif.text -text "SPDIF In" -justify left
371label .status.spdif.sr -text "--.- kHz" -anchor n -width 10 -font times
372checkbutton .status.spdif.error -selectcolor red -text "Input Lock" -anchor nw -width 10 -variable spdiferr -font times
373
374pack .status.spdif.text .status.spdif.sr .status.spdif.error -side top -padx 3
375
376pack .status.sr .status.lock .status.sync .status.tc .status.spdif -side left -fill x -anchor n -expand 1
377
378
379#
380# CONTROL
381#
382
383proc setprof {} {
384 global CTRLPROG
385 global spprof
386 exec $CTRLPROG pro $spprof
387}
388
389proc setemph {} {
390 global CTRLPROG
391 global spemph
392 exec $CTRLPROG emphasis $spemph
393}
394
395proc setnoaud {} {
396 global CTRLPROG
397 global spnoaud
398 exec $CTRLPROG dolby $spnoaud
399}
400
401proc setoptical {} {
402 global CTRLPROG
403 global spoptical
404 exec $CTRLPROG optout $spoptical
405}
406
407proc setspdifin {} {
408 global CTRLPROG
409 global spdifin
410 exec $CTRLPROG spdifin [expr $spdifin - 1]
411}
412
413proc setsyncsource {} {
414 global CTRLPROG
415 global syncsource
416 exec $CTRLPROG syncref [expr $syncsource -1]
417}
418
419
420proc setmaster {} {
421 global CTRLPROG
422 global master
423 exec $CTRLPROG master $master
424}
425
426proc setwordclock {} {
427 global CTRLPROG
428 global wordclock
429 exec $CTRLPROG wordclock $wordclock
430}
431
432proc setadat1cd {} {
433 global CTRLPROG
434 global adat1cd
435 exec $CTRLPROG adat1cd $adat1cd
436}
437
438
439frame .control
440
441# SPDIF In & SPDIF Out
442
443
444frame .control.spdif
445
446frame .control.spdif.in
447label .control.spdif.in.text -text "SPDIF In" -justify left
448radiobutton .control.spdif.in.input1 -text "Optical" -anchor nw -width 13 -variable spdifin -value 1 -command setspdifin -selectcolor blue -font times
449radiobutton .control.spdif.in.input2 -text "Coaxial" -anchor nw -width 13 -variable spdifin -value 2 -command setspdifin -selectcolor blue -font times
450radiobutton .control.spdif.in.input3 -text "Intern " -anchor nw -width 13 -variable spdifin -command setspdifin -value 3 -selectcolor blue -font times
451
452checkbutton .control.spdif.in.adat1cd -text "ADAT1 Intern" -anchor nw -width 13 -variable adat1cd -command setadat1cd -selectcolor blue -font times
453
454pack .control.spdif.in.text .control.spdif.in.input1 .control.spdif.in.input2 .control.spdif.in.input3 .control.spdif.in.adat1cd
455
456label .control.spdif.space
457
458frame .control.spdif.out
459label .control.spdif.out.text -text "SPDIF Out" -justify left
460checkbutton .control.spdif.out.pro -text "Professional" -anchor nw -width 13 -variable spprof -command setprof -selectcolor blue -font times
461checkbutton .control.spdif.out.emphasis -text "Emphasis" -anchor nw -width 13 -variable spemph -command setemph -selectcolor blue -font times
462checkbutton .control.spdif.out.dolby -text "NoAudio" -anchor nw -width 13 -variable spnoaud -command setnoaud -selectcolor blue -font times
463checkbutton .control.spdif.out.optout -text "Optical Out" -anchor nw -width 13 -variable spoptical -command setoptical -selectcolor blue -font times
464
465pack .control.spdif.out.optout .control.spdif.out.dolby .control.spdif.out.emphasis .control.spdif.out.pro .control.spdif.out.text -side bottom
466
467pack .control.spdif.in .control.spdif.space .control.spdif.out -side top -fill y -padx 3 -expand 1
468
469# Sync Mode & Sync Source
470
471frame .control.sync
472frame .control.sync.mode
473label .control.sync.mode.text -text "Sync Mode" -justify left
474checkbutton .control.sync.mode.master -text "Master" -anchor nw -width 13 -variable master -command setmaster -selectcolor blue -font times
475checkbutton .control.sync.mode.wc -text "Wordclock" -anchor nw -width 13 -variable wordclock -command setwordclock -selectcolor blue -font times
476
477pack .control.sync.mode.text .control.sync.mode.master .control.sync.mode.wc
478
479label .control.sync.space
480
481frame .control.sync.src
482label .control.sync.src.text -text "Sync Source" -justify left
483radiobutton .control.sync.src.input1 -text "ADAT1" -anchor nw -width 13 -variable syncsource -value 1 -command setsyncsource -selectcolor blue -font times
484radiobutton .control.sync.src.input2 -text "ADAT2" -anchor nw -width 13 -variable syncsource -value 2 -command setsyncsource -selectcolor blue -font times
485radiobutton .control.sync.src.input3 -text "ADAT3" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 3 -selectcolor blue -font times
486radiobutton .control.sync.src.input4 -text "SPDIF" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 4 -selectcolor blue -font times
487
488pack .control.sync.src.input4 .control.sync.src.input3 .control.sync.src.input2 .control.sync.src.input1 .control.sync.src.text -side bottom
489
490pack .control.sync.mode .control.sync.space .control.sync.src -side top -fill y -padx 3 -expand 1
491
492label .control.space -text "" -width 10
493
494# Buffer Size
495
496frame .control.buf
497label .control.buf.text -text "Buffer Size (Latency)" -justify left
498radiobutton .control.buf.b1 -selectcolor red -text "64 (1.5 ms)" -width 13 -anchor nw -variable ssrate -value 1 -font times
499radiobutton .control.buf.b2 -selectcolor red -text "128 (3 ms)" -width 13 -anchor nw -variable ssrate -value 2 -font times
500radiobutton .control.buf.b3 -selectcolor red -text "256 (6 ms)" -width 13 -anchor nw -variable ssrate -value 3 -font times
501radiobutton .control.buf.b4 -selectcolor red -text "512 (12 ms)" -width 13 -anchor nw -variable ssrate -value 4 -font times
502radiobutton .control.buf.b5 -selectcolor red -text "1024 (23 ms)" -width 13 -anchor nw -variable ssrate -value 5 -font times
503radiobutton .control.buf.b6 -selectcolor red -text "2048 (46 ms)" -width 13 -anchor nw -variable ssrate -value 6 -font times
504radiobutton .control.buf.b7 -selectcolor red -text "4096 (93 ms)" -width 13 -anchor nw -variable ssrate -value 7 -font times
505radiobutton .control.buf.b8 -selectcolor red -text "8192 (186 ms)" -width 13 -anchor nw -variable ssrate -value 8 -font times
506
507pack .control.buf.text .control.buf.b1 .control.buf.b2 .control.buf.b3 .control.buf.b4 .control.buf.b5 .control.buf.b6 .control.buf.b7 .control.buf.b8 -side top -padx 3
508
509# Offset
510
511frame .control.offset
512
513frame .control.offset.in
514label .control.offset.in.text -text "Offset In" -justify left
515label .control.offset.in.off0 -text "dev\#0: -" -anchor nw -width 10 -font times
516label .control.offset.in.off1 -text "dev\#1: -" -anchor nw -width 10 -font times
517label .control.offset.in.off2 -text "dev\#2: -" -anchor nw -width 10 -font times
518label .control.offset.in.off3 -text "dev\#3: -" -anchor nw -width 10 -font times
519
520pack .control.offset.in.text .control.offset.in.off0 .control.offset.in.off1 .control.offset.in.off2 .control.offset.in.off3
521
522label .control.offset.space
523
524frame .control.offset.out
525label .control.offset.out.text -text "Offset Out" -justify left
526label .control.offset.out.off0 -text "dev\#0: -" -anchor nw -width 10 -font times
527label .control.offset.out.off1 -text "dev\#1: -" -anchor nw -width 10 -font times
528label .control.offset.out.off2 -text "dev\#2: -" -anchor nw -width 10 -font times
529label .control.offset.out.off3 -text "dev\#3: -" -anchor nw -width 10 -font times
530
531pack .control.offset.out.off3 .control.offset.out.off2 .control.offset.out.off1 .control.offset.out.off0 .control.offset.out.text -side bottom
532
533pack .control.offset.in .control.offset.space .control.offset.out -side top -fill y -padx 3 -expand 1
534
535
536pack .control.spdif .control.sync .control.space .control.buf .control.offset -side left -fill both -anchor n -expand 1
537
538
539label .statustext -text Status -justify center -relief ridge
540label .controltext -text Control -justify center -relief ridge
541
542label .statusspace
543label .controlspace
544
545pack .statustext .status .statusspace .controltext .control .controlspace -side top -anchor nw -fill both -expand 1
546
547
548proc get_bit {output sstr} {
549 set idx1 [string last [concat $sstr 1] $output]
550 set idx1 [expr $idx1 != -1]
551 return $idx1
552}
553
554proc get_val {output sstr} {
555 set val [string wordend $output [string last $sstr $output]]
556 set val [string range $output $val [expr $val+1]]
557 return $val
558}
559
560proc get_val2 {output sstr} {
561 set val [string wordend $output [string first $sstr $output]]
562 set val [string range $output $val [expr $val+2]]
563 return $val
564}
565
566proc get_control {} {
567 global spprof
568 global spemph
569 global spnoaud
570 global spoptical
571 global spdifin
572 global ssrate
573 global master
574 global wordclock
575 global syncsource
576 global CTRLPROG
577
578 set f [open "| $CTRLPROG control" r+]
579 set ooo [read $f 1000]
580 close $f
581# puts $ooo
582
583 set spprof [ get_bit $ooo "pro"]
584 set spemph [ get_bit $ooo "emphasis"]
585 set spnoaud [ get_bit $ooo "dolby"]
586 set spoptical [ get_bit $ooo "opt_out"]
587 set spdifin [ expr [ get_val $ooo "spdif_in"] + 1]
588 set ssrate [ expr [ get_val $ooo "latency"] + 1]
589 set master [ expr [ get_val $ooo "master"]]
590 set wordclock [ expr [ get_val $ooo "wordclock"]]
591 set syncsource [ expr [ get_val $ooo "sync_ref"] + 1]
592}
593
594proc get_status {} {
595 global srate
596 global ctrlcom
597
598 global adatlock1
599 global adatlock2
600 global adatlock3
601
602 global adatsync1
603 global adatsync2
604 global adatsync3
605
606 global tcbusy
607 global tcout
608 global tcvalid
609
610 global spdiferr
611 global crystal
612 global .status.spdif.text
613 global CTRLPROG
614
615
616 set f [open "| $CTRLPROG status" r+]
617 set ooo [read $f 1000]
618 close $f
619# puts $ooo
620
621# samplerate
622
623 set idx1 [string last "sr48 1" $ooo]
624 set idx2 [string last "doublespeed 1" $ooo]
625 if {$idx1 >= 0} {
626 set fact1 48000
627 } else {
628 set fact1 44100
629 }
630
631 if {$idx2 >= 0} {
632 set fact2 2
633 } else {
634 set fact2 1
635 }
636 set srate [expr $fact1 * $fact2]
637# ADAT lock
638
639 set val [get_val $ooo lockmask]
640 set adatlock1 0
641 set adatlock2 0
642 set adatlock3 0
643 if {[expr $val & 1]} {
644 set adatlock3 1
645 }
646 if {[expr $val & 2]} {
647 set adatlock2 1
648 }
649 if {[expr $val & 4]} {
650 set adatlock1 1
651 }
652
653# ADAT sync
654 set val [get_val $ooo syncmask]
655 set adatsync1 0
656 set adatsync2 0
657 set adatsync3 0
658
659 if {[expr $val & 1]} {
660 set adatsync3 1
661 }
662 if {[expr $val & 2]} {
663 set adatsync2 1
664 }
665 if {[expr $val & 4]} {
666 set adatsync1 1
667 }
668
669# TC busy
670
671 set tcbusy [get_bit $ooo "busy"]
672 set tcout [get_bit $ooo "out"]
673 set tcvalid [get_bit $ooo "valid"]
674 set spdiferr [expr [get_bit $ooo "spdif_error"] == 0]
675
676# 000=64kHz, 100=88.2kHz, 011=96kHz
677# 111=32kHz, 110=44.1kHz, 101=48kHz
678
679 set val [get_val $ooo crystalrate]
680
681 set crystal "--.- kHz"
682 if {$val == 0} {
683 set crystal "64 kHz"
684 }
685 if {$val == 4} {
686 set crystal "88.2 kHz"
687 }
688 if {$val == 3} {
689 set crystal "96 kHz"
690 }
691 if {$val == 7} {
692 set crystal "32 kHz"
693 }
694 if {$val == 6} {
695 set crystal "44.1 kHz"
696 }
697 if {$val == 5} {
698 set crystal "48 kHz"
699 }
700 .status.spdif.sr configure -text $crystal
701}
702
703proc get_offset {} {
704 global inoffset
705 global outoffset
706 global CTRLPROG
707
708 set f [open "| $CTRLPROG mix" r+]
709 set ooo [read $f 1000]
710 close $f
711# puts $ooo
712
713 if { [string match "*devnr*" $ooo] } {
714 set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
715 set val [get_val2 $ooo i_offset]
716 .control.offset.in.off0 configure -text "dev\#0: $val"
717 set val [get_val2 $ooo o_offset]
718 .control.offset.out.off0 configure -text "dev\#0: $val"
719 } else {
720 .control.offset.in.off0 configure -text "dev\#0: -"
721 .control.offset.out.off0 configure -text "dev\#0: -"
722 }
723 if { [string match "*devnr*" $ooo] } {
724 set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
725 set val [get_val2 $ooo i_offset]
726 .control.offset.in.off1 configure -text "dev\#1: $val"
727 set val [get_val2 $ooo o_offset]
728 .control.offset.out.off1 configure -text "dev\#1: $val"
729 } else {
730 .control.offset.in.off1 configure -text "dev\#1: -"
731 .control.offset.out.off1 configure -text "dev\#1: -"
732 }
733 if { [string match "*devnr*" $ooo] } {
734 set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
735 set val [get_val2 $ooo i_offset]
736 .control.offset.in.off2 configure -text "dev\#2: $val"
737 set val [get_val2 $ooo o_offset]
738 .control.offset.out.off2 configure -text "dev\#2: $val"
739 } else {
740 .control.offset.in.off2 configure -text "dev\#2: -"
741 .control.offset.out.off2 configure -text "dev\#2: -"
742 }
743 if { [string match "*devnr*" $ooo] } {
744 set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
745 set val [get_val2 $ooo i_offset]
746 .control.offset.in.off3 configure -text "dev\#3: $val"
747 set val [get_val2 $ooo o_offset]
748 .control.offset.out.off3 configure -text "dev\#3: $val"
749 } else {
750 .control.offset.in.off3 configure -text "dev\#3: -"
751 .control.offset.out.off3 configure -text "dev\#3: -"
752 }
753}
754
755
756proc get_all {} {
757get_status
758get_control
759get_offset
760}
761
762# main
763while {1} {
764 after 200
765 get_all
766 update
767}
diff --git a/Documentation/sound/oss/solo1 b/Documentation/sound/oss/solo1
new file mode 100644
index 000000000000..6f53d407d027
--- /dev/null
+++ b/Documentation/sound/oss/solo1
@@ -0,0 +1,70 @@
1Recording
2---------
3
4Recording does not work on the author's card, but there
5is at least one report of it working on later silicon.
6The chip behaves differently than described in the data sheet,
7likely due to a chip bug. Working around this would require
8the help of ESS (for example by publishing an errata sheet),
9but ESS has not done so so far.
10
11Also, the chip only supports 24 bit addresses for recording,
12which means it cannot work on some Alpha mainboards.
13
14
15/proc/sound, /dev/sndstat
16-------------------------
17
18/proc/sound and /dev/sndstat is not supported by the
19driver. To find out whether the driver succeeded loading,
20check the kernel log (dmesg).
21
22
23ALaw/uLaw sample formats
24------------------------
25
26This driver does not support the ALaw/uLaw sample formats.
27ALaw is the default mode when opening a sound device
28using OSS/Free. The reason for the lack of support is
29that the hardware does not support these formats, and adding
30conversion routines to the kernel would lead to very ugly
31code in the presence of the mmap interface to the driver.
32And since xquake uses mmap, mmap is considered important :-)
33and no sane application uses ALaw/uLaw these days anyway.
34In short, playing a Sun .au file as follows:
35
36cat my_file.au > /dev/dsp
37
38does not work. Instead, you may use the play script from
39Chris Bagwell's sox-12.14 package (or later, available from the URL
40below) to play many different audio file formats.
41The script automatically determines the audio format
42and does do audio conversions if necessary.
43http://home.sprynet.com/sprynet/cbagwell/projects.html
44
45
46Blocking vs. nonblocking IO
47---------------------------
48
49Unlike OSS/Free this driver honours the O_NONBLOCK file flag
50not only during open, but also during read and write.
51This is an effort to make the sound driver interface more
52regular. Timidity has problems with this; a patch
53is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
54(Timidity patched will also run on OSS/Free).
55
56
57MIDI UART
58---------
59
60The driver supports a simple MIDI UART interface, with
61no ioctl's supported.
62
63
64MIDI synthesizer
65----------------
66
67The card has an OPL compatible FM synthesizer.
68
69Thomas Sailer
70t.sailer@alumni.ethz.ch
diff --git a/Documentation/sound/oss/sonicvibes b/Documentation/sound/oss/sonicvibes
new file mode 100644
index 000000000000..84dee2e0b37d
--- /dev/null
+++ b/Documentation/sound/oss/sonicvibes
@@ -0,0 +1,81 @@
1/proc/sound, /dev/sndstat
2-------------------------
3
4/proc/sound and /dev/sndstat is not supported by the
5driver. To find out whether the driver succeeded loading,
6check the kernel log (dmesg).
7
8
9ALaw/uLaw sample formats
10------------------------
11
12This driver does not support the ALaw/uLaw sample formats.
13ALaw is the default mode when opening a sound device
14using OSS/Free. The reason for the lack of support is
15that the hardware does not support these formats, and adding
16conversion routines to the kernel would lead to very ugly
17code in the presence of the mmap interface to the driver.
18And since xquake uses mmap, mmap is considered important :-)
19and no sane application uses ALaw/uLaw these days anyway.
20In short, playing a Sun .au file as follows:
21
22cat my_file.au > /dev/dsp
23
24does not work. Instead, you may use the play script from
25Chris Bagwell's sox-12.14 package (available from the URL
26below) to play many different audio file formats.
27The script automatically determines the audio format
28and does do audio conversions if necessary.
29http://home.sprynet.com/sprynet/cbagwell/projects.html
30
31
32Blocking vs. nonblocking IO
33---------------------------
34
35Unlike OSS/Free this driver honours the O_NONBLOCK file flag
36not only during open, but also during read and write.
37This is an effort to make the sound driver interface more
38regular. Timidity has problems with this; a patch
39is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
40(Timidity patched will also run on OSS/Free).
41
42
43MIDI UART
44---------
45
46The driver supports a simple MIDI UART interface, with
47no ioctl's supported.
48
49
50MIDI synthesizer
51----------------
52
53The card both has an OPL compatible FM synthesizer as well as
54a wavetable synthesizer.
55
56I haven't managed so far to get the OPL synth running.
57
58Using the wavetable synthesizer requires allocating
591-4MB of physically contiguous memory, which isn't possible
60currently on Linux without ugly hacks like the bigphysarea
61patch. Therefore, the driver doesn't support wavetable
62synthesis.
63
64
65No support from S3
66------------------
67
68I do not get any support from S3. Therefore, the driver
69still has many problems. For example, although the manual
70states that the chip should be able to access the sample
71buffer anywhere in 32bit address space, I haven't managed to
72get it working with buffers above 16M. Therefore, the card
73has the same disadvantages as ISA soundcards.
74
75Given that the card is also very noisy, and if you haven't
76already bought it, you should strongly opt for one of the
77comparatively priced Ensoniq products.
78
79
80Thomas Sailer
81t.sailer@alumni.ethz.ch
diff --git a/Documentation/sound/oss/ultrasound b/Documentation/sound/oss/ultrasound
new file mode 100644
index 000000000000..32cd50478b36
--- /dev/null
+++ b/Documentation/sound/oss/ultrasound
@@ -0,0 +1,30 @@
1modprobe sound
2insmod ad1848
3insmod gus io=* irq=* dma=* ...
4
5This loads the driver for the Gravis Ultrasound family of sound cards.
6
7The gus module takes the following arguments
8
9io I/O address of the Ultrasound card (eg. io=0x220)
10irq IRQ of the Sound Blaster card
11dma DMA channel for the Sound Blaster
12dma16 2nd DMA channel, only needed for full duplex operation
13type 1 for PnP card
14gus16 1 for using 16 bit sampling daughter board
15no_wave_dma Set to disable DMA usage for wavetable (see note)
16db16 ???
17
18
19no_wave_dma option
20
21This option defaults to a value of 0, which allows the Ultrasound wavetable
22DSP to use DMA for for playback and downloading samples. This is the same
23as the old behaviour. If set to 1, no DMA is needed for downloading samples,
24and allows owners of a GUS MAX to make use of simultaneous digital audio
25(/dev/dsp), MIDI, and wavetable playback.
26
27
28If you have problems in recording with GUS MAX, you could try to use
29just one 8 bit DMA channel. Recording will not work with one DMA
30channel if it's a 16 bit one.
diff --git a/Documentation/sound/oss/vwsnd b/Documentation/sound/oss/vwsnd
new file mode 100644
index 000000000000..a6ea0a1df9e4
--- /dev/null
+++ b/Documentation/sound/oss/vwsnd
@@ -0,0 +1,293 @@
1vwsnd - Sound driver for the Silicon Graphics 320 and 540 Visual
2Workstations' onboard audio.
3
4Copyright 1999 Silicon Graphics, Inc. All rights reserved.
5
6
7At the time of this writing, March 1999, there are two models of
8Visual Workstation, the 320 and the 540. This document only describes
9those models. Future Visual Workstation models may have different
10sound capabilities, and this driver will probably not work on those
11boxes.
12
13The Visual Workstation has an Analog Devices AD1843 "SoundComm" audio
14codec chip. The AD1843 is accessed through the Cobalt I/O ASIC, also
15known as Lithium. This driver programs both both chips.
16
17==============================================================================
18QUICK CONFIGURATION
19
20 # insmod soundcore
21 # insmod vwsnd
22
23==============================================================================
24I/O CONNECTIONS
25
26On the Visual Workstation, only three of the AD1843 inputs are hooked
27up. The analog line in jacks are connected to the AD1843's AUX1
28input. The CD audio lines are connected to the AD1843's AUX2 input.
29The microphone jack is connected to the AD1843's MIC input. The mic
30jack is mono, but the signal is delivered to both the left and right
31MIC inputs. You can record in stereo from the mic input, but you will
32get the same signal on both channels (within the limits of A/D
33accuracy). Full scale on the Line input is +/- 2.0 V. Full scale on
34the MIC input is 20 dB less, or +/- 0.2 V.
35
36The AD1843's LOUT1 outputs are connected to the Line Out jacks. The
37AD1843's HPOUT outputs are connected to the speaker/headphone jack.
38LOUT2 is not connected. Line out's maximum level is +/- 2.0 V peak to
39peak. The speaker/headphone out's maximum is +/- 4.0 V peak to peak.
40
41The AD1843's PCM input channel and one of its output channels (DAC1)
42are connected to Lithium. The other output channel (DAC2) is not
43connected.
44
45==============================================================================
46CAPABILITIES
47
48The AD1843 has PCM input and output (Pulse Code Modulation, also known
49as wavetable). PCM input and output can be mono or stereo in any of
50four formats. The formats are 16 bit signed and 8 bit unsigned,
51u-Law, and A-Law format. Any sample rate from 4 KHz to 49 KHz is
52available, in 1 Hz increments.
53
54The AD1843 includes an analog mixer that can mix all three input
55signals (line, mic and CD) into the analog outputs. The mixer has a
56separate gain control and mute switch for each input.
57
58There are two outputs, line out and speaker/headphone out. They
59always produce the same signal, and the speaker always has 3 dB more
60gain than the line out. The speaker/headphone output can be muted,
61but this driver does not export that function.
62
63The hardware can sync audio to the video clock, but this driver does
64not have a way to specify syncing to video.
65
66==============================================================================
67PROGRAMMING
68
69This section explains the API supported by the driver. Also see the
70Open Sound Programming Guide at http://www.opensound.com/pguide/ .
71This section assumes familiarity with that document.
72
73The driver has two interfaces, an I/O interface and a mixer interface.
74There is no MIDI or sequencer capability.
75
76==============================================================================
77PROGRAMMING PCM I/O
78
79The I/O interface is usually accessed as /dev/audio or /dev/dsp.
80Using the standard Open Sound System (OSS) ioctl calls, the sample
81rate, number of channels, and sample format may be set within the
82limitations described above. The driver supports triggering. It also
83supports getting the input and output pointers with one-sample
84accuracy.
85
86The SNDCTL_DSP_GETCAP ioctl returns these capabilities.
87
88 DSP_CAP_DUPLEX - driver supports full duplex.
89
90 DSP_CAP_TRIGGER - driver supports triggering.
91
92 DSP_CAP_REALTIME - values returned by SNDCTL_DSP_GETIPTR
93 and SNDCTL_DSP_GETOPTR are accurate to a few samples.
94
95Memory mapping (mmap) is not implemented.
96
97The driver permits subdivided fragment sizes from 64 to 4096 bytes.
98The number of fragments can be anything from 3 fragments to however
99many fragments fit into 124 kilobytes. It is up to the user to
100determine how few/small fragments can be used without introducing
101glitches with a given workload. Linux is not realtime, so we can't
102promise anything. (sigh...)
103
104When this driver is switched into or out of mu-Law or A-Law mode on
105output, it may produce an audible click. This is unavoidable. To
106prevent clicking, use signed 16-bit mode instead, and convert from
107mu-Law or A-Law format in software.
108
109==============================================================================
110PROGRAMMING THE MIXER INTERFACE
111
112The mixer interface is usually accessed as /dev/mixer. It is accessed
113through ioctls. The mixer allows the application to control gain or
114mute several audio signal paths, and also allows selection of the
115recording source.
116
117Each of the constants described here can be read using the
118MIXER_READ(SOUND_MIXER_xxx) ioctl. Those that are not read-only can
119also be written using the MIXER_WRITE(SOUND_MIXER_xxx) ioctl. In most
120cases, <sys/soundcard.h> defines constants SOUND_MIXER_READ_xxx and
121SOUND_MIXER_WRITE_xxx which work just as well.
122
123SOUND_MIXER_CAPS Read-only
124
125This is a mask of optional driver capabilities that are implemented.
126This driver's only capability is SOUND_CAP_EXCL_INPUT, which means
127that only one recording source can be active at a time.
128
129SOUND_MIXER_DEVMASK Read-only
130
131This is a mask of the sound channels. This driver's channels are PCM,
132LINE, MIC, CD, and RECLEV.
133
134SOUND_MIXER_STEREODEVS Read-only
135
136This is a mask of which sound channels are capable of stereo. All
137channels are capable of stereo. (But see caveat on MIC input in I/O
138CONNECTIONS section above).
139
140SOUND_MIXER_OUTMASK Read-only
141
142This is a mask of channels that route inputs through to outputs.
143Those are LINE, MIC, and CD.
144
145SOUND_MIXER_RECMASK Read-only
146
147This is a mask of channels that can be recording sources. Those are
148PCM, LINE, MIC, CD.
149
150SOUND_MIXER_PCM Default: 0x5757 (0 dB)
151
152This is the gain control for PCM output. The left and right channel
153gain are controlled independently. This gain control has 64 levels,
154which range from -82.5 dB to +12.0 dB in 1.5 dB steps. Those 64
155levels are mapped onto 100 levels at the ioctl, see below.
156
157SOUND_MIXER_LINE Default: 0x4a4a (0 dB)
158
159This is the gain control for mixing the Line In source into the
160outputs. The left and right channel gain are controlled
161independently. This gain control has 32 levels, which range from
162-34.5 dB to +12.0 dB in 1.5 dB steps. Those 32 levels are mapped onto
163100 levels at the ioctl, see below.
164
165SOUND_MIXER_MIC Default: 0x4a4a (0 dB)
166
167This is the gain control for mixing the MIC source into the outputs.
168The left and right channel gain are controlled independently. This
169gain control has 32 levels, which range from -34.5 dB to +12.0 dB in
1701.5 dB steps. Those 32 levels are mapped onto 100 levels at the
171ioctl, see below.
172
173SOUND_MIXER_CD Default: 0x4a4a (0 dB)
174
175This is the gain control for mixing the CD audio source into the
176outputs. The left and right channel gain are controlled
177independently. This gain control has 32 levels, which range from
178-34.5 dB to +12.0 dB in 1.5 dB steps. Those 32 levels are mapped onto
179100 levels at the ioctl, see below.
180
181SOUND_MIXER_RECLEV Default: 0 (0 dB)
182
183This is the gain control for PCM input (RECording LEVel). The left
184and right channel gain are controlled independently. This gain
185control has 16 levels, which range from 0 dB to +22.5 dB in 1.5 dB
186steps. Those 16 levels are mapped onto 100 levels at the ioctl, see
187below.
188
189SOUND_MIXER_RECSRC Default: SOUND_MASK_LINE
190
191This is a mask of currently selected PCM input sources (RECording
192SouRCes). Because the AD1843 can only have a single recording source
193at a time, only one bit at a time can be set in this mask. The
194allowable values are SOUND_MASK_PCM, SOUND_MASK_LINE, SOUND_MASK_MIC,
195or SOUND_MASK_CD. Selecting SOUND_MASK_PCM sets up internal
196resampling which is useful for loopback testing and for hardware
197sample rate conversion. But software sample rate conversion is
198probably faster, so I don't know how useful that is.
199
200SOUND_MIXER_OUTSRC DEFAULT: SOUND_MASK_LINE|SOUND_MASK_MIC|SOUND_MASK_CD
201
202This is a mask of sources that are currently passed through to the
203outputs. Those sources whose bits are not set are muted.
204
205==============================================================================
206GAIN CONTROL
207
208There are five gain controls listed above. Each has 16, 32, or 64
209steps. Each control has 1.5 dB of gain per step. Each control is
210stereo.
211
212The OSS defines the argument to a channel gain ioctl as having two
213components, left and right, each of which ranges from 0 to 100. The
214two components are packed into the same word, with the left side gain
215in the least significant byte, and the right side gain in the second
216least significant byte. In C, we would say this.
217
218 #include <assert.h>
219
220 ...
221
222 assert(leftgain >= 0 && leftgain <= 100);
223 assert(rightgain >= 0 && rightgain <= 100);
224 arg = leftgain | rightgain << 8;
225
226So each OSS gain control has 101 steps. But the hardware has 16, 32,
227or 64 steps. The hardware steps are spread across the 101 OSS steps
228nearly evenly. The conversion formulas are like this, given N equals
22916, 32, or 64.
230
231 int round = N/2 - 1;
232 OSS_gain_steps = (hw_gain_steps * 100 + round) / (N - 1);
233 hw_gain_steps = (OSS_gain_steps * (N - 1) + round) / 100;
234
235Here is a snippet of C code that will return the left and right gain
236of any channel in dB. Pass it one of the predefined gain_desc_t
237structures to access any of the five channels' gains.
238
239 typedef struct gain_desc {
240 float min_gain;
241 float gain_step;
242 int nbits;
243 int chan;
244 } gain_desc_t;
245
246 const gain_desc_t gain_pcm = { -82.5, 1.5, 6, SOUND_MIXER_PCM };
247 const gain_desc_t gain_line = { -34.5, 1.5, 5, SOUND_MIXER_LINE };
248 const gain_desc_t gain_mic = { -34.5, 1.5, 5, SOUND_MIXER_MIC };
249 const gain_desc_t gain_cd = { -34.5, 1.5, 5, SOUND_MIXER_CD };
250 const gain_desc_t gain_reclev = { 0.0, 1.5, 4, SOUND_MIXER_RECLEV };
251
252 int get_gain_dB(int fd, const gain_desc_t *gp,
253 float *left, float *right)
254 {
255 int word;
256 int lg, rg;
257 int mask = (1 << gp->nbits) - 1;
258
259 if (ioctl(fd, MIXER_READ(gp->chan), &word) != 0)
260 return -1; /* fail */
261 lg = word & 0xFF;
262 rg = word >> 8 & 0xFF;
263 lg = (lg * mask + mask / 2) / 100;
264 rg = (rg * mask + mask / 2) / 100;
265 *left = gp->min_gain + gp->gain_step * lg;
266 *right = gp->min_gain + gp->gain_step * rg;
267 return 0;
268 }
269
270And here is the corresponding routine to set a channel's gain in dB.
271
272 int set_gain_dB(int fd, const gain_desc_t *gp, float left, float right)
273 {
274 float max_gain =
275 gp->min_gain + (1 << gp->nbits) * gp->gain_step;
276 float round = gp->gain_step / 2;
277 int mask = (1 << gp->nbits) - 1;
278 int word;
279 int lg, rg;
280
281 if (left < gp->min_gain || right < gp->min_gain)
282 return EINVAL;
283 lg = (left - gp->min_gain + round) / gp->gain_step;
284 rg = (right - gp->min_gain + round) / gp->gain_step;
285 if (lg >= (1 << gp->nbits) || rg >= (1 << gp->nbits))
286 return EINVAL;
287 lg = (100 * lg + mask / 2) / mask;
288 rg = (100 * rg + mask / 2) / mask;
289 word = lg | rg << 8;
290
291 return ioctl(fd, MIXER_WRITE(gp->chan), &word);
292 }
293