diff options
Diffstat (limited to 'Documentation/sound/oss')
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 @@ | |||
1 | Documentation for the AD1816(A) sound driver | ||
2 | ============================================ | ||
3 | |||
4 | Installation: | ||
5 | ------------- | ||
6 | |||
7 | To get your AD1816(A) based sound card work, you'll have to enable support for | ||
8 | experimental code ("Prompt for development and/or incomplete code/drivers") | ||
9 | and isapnp ("Plug and Play support", "ISA Plug and Play support"). Enable | ||
10 | "Sound card support", "OSS modules support" and "Support for AD1816(A) based | ||
11 | cards (EXPERIMENTAL)" in the sound configuration menu, too. Now build, install | ||
12 | and reboot the new kernel as usual. | ||
13 | |||
14 | Features: | ||
15 | --------- | ||
16 | |||
17 | List 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 | |||
26 | Supported cards: | ||
27 | ---------------- | ||
28 | |||
29 | The 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 | |||
42 | Cards listed in brackets are not supported reliable. If you have such a card | ||
43 | you should add the extra parameter: | ||
44 | options=1 | ||
45 | when loading the ad1816 module via modprobe. | ||
46 | |||
47 | |||
48 | Troubleshooting: | ||
49 | ---------------- | ||
50 | |||
51 | First of all you should check, if the driver has been loaded | ||
52 | properly. | ||
53 | |||
54 | If loading of the driver succeeds, but playback/capture fails, check | ||
55 | if you used the correct values for irq, dma and dma2 when loading the module. | ||
56 | If one of them is wrong you usually get the following error message: | ||
57 | |||
58 | Nov 6 17:06:13 tek01 kernel: Sound: DMA (output) timed out - IRQ/DRQ config error? | ||
59 | |||
60 | If playback/capture is too fast or to slow, you should have a look at | ||
61 | the clock chip of your sound card. The AD1816 was designed for a 33MHz | ||
62 | oscillator, however most sound card manufacturer use slightly | ||
63 | different oscillators as they are cheaper than 33MHz oscillators. If | ||
64 | you have such a card you have to adjust the ad1816_clockfreq parameter | ||
65 | above. For example: For a card using a 32.875MHz oscillator use | ||
66 | ad1816_clockfreq=32875 instead of ad1816_clockfreq=33000. | ||
67 | |||
68 | |||
69 | Updates, bugfixes and bugreports: | ||
70 | -------------------------------- | ||
71 | |||
72 | As the driver is still experimental and under development, you should | ||
73 | watch out for updates. Updates of the driver are available on the | ||
74 | Internet from one of my home pages: | ||
75 | http://www.student.informatik.tu-darmstadt.de/~tek/projects/linux.html | ||
76 | or: | ||
77 | http://www.tu-darmstadt.de/~tek01/projects/linux.html | ||
78 | |||
79 | Bugreports, bugfixes and related questions should be sent via E-Mail to: | ||
80 | tek@rbg.informatik.tu-darmstadt.de | ||
81 | |||
82 | Thorsten Knabe <tek@rbg.informatik.tu-darmstadt.de> | ||
83 | Christoph 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 @@ | |||
1 | ALS-007/ALS-100/ALS-200 based sound cards | ||
2 | ========================================= | ||
3 | |||
4 | Support for sound cards based around the Avance Logic | ||
5 | ALS-007/ALS-100/ALS-200 chip is included. These chips are a single | ||
6 | chip PnP sound solution which is mostly hardware compatible with the | ||
7 | Sound Blaster 16 card, with most differences occurring in the use of | ||
8 | the mixer registers. For this reason the ALS code is integrated | ||
9 | as part of the Sound Blaster 16 driver (adding only 800 bytes to the | ||
10 | SB16 driver). | ||
11 | |||
12 | To use an ALS sound card under Linux, enable the following options as | ||
13 | modules 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 | ||
18 | Since the ALS-007/100/200 are PnP cards, ISAPnP support should probably be | ||
19 | compiled in. If kernel level PnP support is not included, isapnptools will | ||
20 | be required to configure the card before the sound modules are loaded. | ||
21 | |||
22 | When using kernel level ISAPnP, the kernel should correctly identify and | ||
23 | configure all resources required by the card when the "sb" module is | ||
24 | inserted. Note that the ALS-007 does not have a 16 bit DMA channel and that | ||
25 | the MPU401 interface on this card uses a different interrupt to the audio | ||
26 | section. This should all be correctly configured by the kernel; if problems | ||
27 | with the MPU401 interface surface, try using the standalone MPU401 module, | ||
28 | passing "0" as the "sb" module's "mpu_io" module parameter to prevent the | ||
29 | soundblaster driver attempting to register the MPU401 itself. The onboard | ||
30 | synth device can be accessed using the "opl3" module. | ||
31 | |||
32 | If isapnptools is used to wake up the sound card (as in 2.2.x), the settings | ||
33 | of the card's resources should be passed to the kernel modules ("sb", "opl3" | ||
34 | and "mpu401") using the module parameters. When configuring an ALS-007, be | ||
35 | sure to specify different IRQs for the audio and MPU401 sections - this card | ||
36 | requires they be different. For "sb", "io", "irq" and "dma" should be set | ||
37 | to the same values used to configure the audio section of the card with | ||
38 | isapnp. "dma16" should be explicitly set to "-1" for an ALS-007 since this | ||
39 | card does not have a 16 bit dma channel; if not specified the kernel will | ||
40 | default 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 | ||
42 | also agree with the setting used by isapnp. To get the MPU401 interface | ||
43 | working on an ALS-007 card, the "mpu401" module will be required since this | ||
44 | card uses separate IRQs for the audio and MPU401 sections and there is no | ||
45 | parameter available to pass a different IRQ to the "sb" driver (whose | ||
46 | inbuilt MPU401 driver would otherwise be fine). Insert the mpu401 module | ||
47 | passing appropriate values using the "io" and "irq" parameters. | ||
48 | |||
49 | The 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 | |||
59 | Jonathan Woithe | ||
60 | jwoithe@physics.adelaide.edu.au | ||
61 | 30 March 1998 | ||
62 | |||
63 | Modified 2000-02-26 by Dave Forrest, drf5n@virginia.edu to add ALS100/ALS200 | ||
64 | Modified 2000-04-10 by Paul Laufer, pelaufer@csupomona.edu to add ISAPnP info. | ||
65 | Modified 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 | |||
3 | This documentation is devoted to the Creative Sound Blaster AWE32, AWE64 and | ||
4 | SB32. | ||
5 | |||
6 | 1) 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 | |||
9 | 2) 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 | |||
28 | 3) 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 | |||
50 | 4) 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 | |||
76 | Last 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 @@ | |||
1 | Driver | ||
2 | ------ | ||
3 | |||
4 | Informations about Audio Excel DSP 16 driver can be found in the source | ||
5 | file aedsp16.c | ||
6 | Please, read the head of the source before using it. It contain useful | ||
7 | informations. | ||
8 | |||
9 | Configuration | ||
10 | ------------- | ||
11 | |||
12 | The Audio Excel configuration, is now done with the standard Linux setup. | ||
13 | You have to configure the sound card (Sound Blaster or Microsoft Sound System) | ||
14 | and, if you want it, the Roland MPU-401 (do not use the Sound Blaster MPU-401, | ||
15 | SB-MPU401) in the main driver menu. Activate the lowlevel drivers then select | ||
16 | the Audio Excel hardware that you want to initialize. Check the IRQ/DMA/MIRQ | ||
17 | of the Audio Excel initialization: it must be the same as the SBPRO (or MSS) | ||
18 | setup. If the parameters are different, correct it. | ||
19 | I you own a Gallant's audio card based on SC-6600, activate the SC-6600 support. | ||
20 | If you want to change the configuration of the sound board, be sure to | ||
21 | check off all the configuration items before re-configure it. | ||
22 | |||
23 | Module parameters | ||
24 | ----------------- | ||
25 | To use this driver as a module, you must configure some module parameters, to | ||
26 | set up I/O addresses, IRQ lines and DMA channels. Some parameters are | ||
27 | mandatory while some others are optional. Here a list of parameters you can | ||
28 | use with this module: | ||
29 | |||
30 | Name Description | ||
31 | ==== =========== | ||
32 | MANDATORY | ||
33 | io I/O base address (0x220 or 0x240) | ||
34 | irq irq line (5, 7, 9, 10 or 11) | ||
35 | dma dma channel (0, 1 or 3) | ||
36 | |||
37 | OPTIONAL | ||
38 | mss_base I/O base address for activate MSS mode (default SBPRO) | ||
39 | (0x530 or 0xE80) | ||
40 | mpu_base I/O base address for activate MPU-401 mode | ||
41 | (0x300, 0x310, 0x320 or 0x330) | ||
42 | mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0) | ||
43 | |||
44 | The /etc/modprobe.conf will have lines like this: | ||
45 | |||
46 | options opl3 io=0x388 | ||
47 | options ad1848 io=0x530 irq=11 dma=3 | ||
48 | options aedsp16 io=0x220 irq=11 dma=3 mss_base=0x530 | ||
49 | |||
50 | Where the aedsp16 options are the options for this driver while opl3 and | ||
51 | ad1848 are the corresponding options for the MSS and OPL3 modules. | ||
52 | |||
53 | Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly | ||
54 | the sound card. Installation dependencies must be written in the modprobe.conf | ||
55 | file: | ||
56 | |||
57 | install ad1848 /sbin/modprobe aedsp16 && /sbin/modprobe -i ad1848 | ||
58 | install opl3 /sbin/modprobe aedsp16 && /sbin/modprobe -i opl3 | ||
59 | |||
60 | Then you must load the sound modules stack in this order: | ||
61 | sound -> aedsp16 -> [ ad1848, opl3 ] | ||
62 | |||
63 | With the above configuration, loading ad1848 or opl3 modules, will | ||
64 | automatically load all the sound stack. | ||
65 | |||
66 | Sound cards supported | ||
67 | --------------------- | ||
68 | This driver supports the SC-6000 and SC-6600 based Gallant's sound card. | ||
69 | It don't support the Audio Excel DSP 16 III (try the SC-6600 code). | ||
70 | I'm working on the III version of the card: if someone have useful | ||
71 | informations about it, please let me know. | ||
72 | For all the non-supported audio cards, you have to boot MS-DOS (or WIN95) | ||
73 | activating the audio card with the MS-DOS device driver, then you have to | ||
74 | <ctrl>-<alt>-<del> and boot Linux. | ||
75 | Follow these steps: | ||
76 | |||
77 | 1) 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 | ||
80 | 2) Install your new kernel as the default boot kernel. | ||
81 | 3) Boot MS-DOS and configure the audio card with the boot time device | ||
82 | driver, for MSS irq10 dma3 in our example. | ||
83 | 4) <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 | |||
87 | Reports 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 | |||
99 | Last revised: 20 August 1998 | ||
100 | Riccardo Facchetti | ||
101 | fizban@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 @@ | |||
1 | Documentation for CMI 8330 (SoundPRO) | ||
2 | ------------------------------------- | ||
3 | Alessandro Zummo <azummo@ita.flashnet.it> | ||
4 | |||
5 | ( Be sure to read Documentation/sound/oss/SoundPro too ) | ||
6 | |||
7 | |||
8 | This adapter is now directly supported by the sb driver. | ||
9 | |||
10 | The only thing you have to do is to compile the kernel sound | ||
11 | support as a module and to enable kernel ISAPnP support, | ||
12 | as shown below. | ||
13 | |||
14 | |||
15 | CONFIG_SOUND=m | ||
16 | CONFIG_SOUND_SB=m | ||
17 | |||
18 | CONFIG_PNP=y | ||
19 | CONFIG_ISAPNP=y | ||
20 | |||
21 | |||
22 | and optionally: | ||
23 | |||
24 | |||
25 | CONFIG_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 | |||
35 | Then you can do | ||
36 | |||
37 | modprobe sb | ||
38 | |||
39 | and everything will be (hopefully) configured. | ||
40 | |||
41 | You should get something similar in syslog: | ||
42 | |||
43 | sb: CMI8330 detected. | ||
44 | sb: CMI8330 sb base located at 0x220 | ||
45 | sb: CMI8330 mpu base located at 0x330 | ||
46 | sb: CMI8330 mail reports to Alessandro Zummo <azummo@ita.flashnet.it> | ||
47 | sb: ISAPnP reports CMI 8330 SoundPRO at i/o 0x220, irq 7, dma 1,5 | ||
48 | |||
49 | |||
50 | |||
51 | |||
52 | The old documentation file follows for reference | ||
53 | purposes. | ||
54 | |||
55 | |||
56 | How to enable CMI 8330 (SOUNDPRO) soundchip on Linux | ||
57 | ------------------------------------------ | ||
58 | Stefan 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 | ||
64 | you 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 | |||
68 | CONFIG_SOUND=m | ||
69 | CONFIG_SOUND_OSS=m | ||
70 | CONFIG_SOUND_SB=m | ||
71 | CONFIG_SOUND_ADLIB=m | ||
72 | CONFIG_SOUND_MPU401=m | ||
73 | # Mikro$chaft sound system (kinda useful here ;)) | ||
74 | CONFIG_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 | |||
146 | Alma Chao <elysian@ethereal.torsion.org> suggests the following /etc/modprobe.conf: | ||
147 | |||
148 | alias sound ad1848 | ||
149 | alias synth0 opl3 | ||
150 | options ad1848 io=0x530 irq=7 dma=0 soundpro=1 | ||
151 | options 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 @@ | |||
1 | Audio driver for CM8338/CM8738 chips by Chen-Li Tien | ||
2 | |||
3 | |||
4 | HARDWARE SUPPORTED | ||
5 | ================================================================================ | ||
6 | C-Media CMI8338 | ||
7 | C-Media CMI8738 | ||
8 | On-board C-Media chips | ||
9 | |||
10 | |||
11 | STEPS 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 | |||
42 | INSTALL 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 | |||
66 | DRIVER 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 @@ | |||
1 | To configure the Crystal CS423x sound chip and activate its DSP functions, | ||
2 | modules may be loaded in this order: | ||
3 | |||
4 | modprobe sound | ||
5 | insmod ad1848 | ||
6 | insmod uart401 | ||
7 | insmod cs4232 io=* irq=* dma=* dma2=* | ||
8 | |||
9 | This 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 | |||
15 | On some cards, the board attempts to do non-PnP setup, and fails. If you | ||
16 | have problems, use Linux' PnP facilities. | ||
17 | |||
18 | To get MIDI facilities add | ||
19 | |||
20 | insmod opl3 io=* | ||
21 | |||
22 | where "io" is the I/O address of the OPL3 synthesizer. This will be shown | ||
23 | in /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 @@ | |||
1 | Documentation for the ESS AudioDrive chips | ||
2 | |||
3 | In 2.4 kernels the SoundBlaster driver not only tries to detect an ESS chip, it | ||
4 | tries to detect the type of ESS chip too. The correct detection of the chip | ||
5 | doesn'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 | ||
7 | means: only detect ES688 and ES1688. | ||
8 | |||
9 | All ESS chips now have a recording level setting. This is a need-to-have for | ||
10 | people who want to use their ESS for recording sound. | ||
11 | |||
12 | Every chip that's detected as a later-than-es1688 chip has a 6 bits logarithmic | ||
13 | master volume control. | ||
14 | |||
15 | Every chip that's detected as a ES1887 now has Full Duplex support. Made a | ||
16 | little testprogram that shows that is works, haven't seen a real program that | ||
17 | needs this however. | ||
18 | |||
19 | For ESS chips an additional parameter "esstype" can be specified. This controls | ||
20 | the (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. | ||
23 | 0 Try to auto-detect the chip (may fail for ES1688) | ||
24 | 688 The chip will be treated as ES688 | ||
25 | 1688 ,, ,, ,, ,, ,, ,, ES1688 | ||
26 | 1868 ,, ,, ,, ,, ,, ,, ES1868 | ||
27 | 1869 ,, ,, ,, ,, ,, ,, ES1869 | ||
28 | 1788 ,, ,, ,, ,, ,, ,, ES1788 | ||
29 | 1887 ,, ,, ,, ,, ,, ,, ES1887 | ||
30 | 1888 ,, ,, ,, ,, ,, ,, ES1888 | ||
31 | |||
32 | Because Full Duplex is supported for ES1887 you can specify a second DMA | ||
33 | channel 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 @@ | |||
1 | Documentation for the ESS1868F AudioDrive PnP sound card | ||
2 | |||
3 | The ESS1868 sound card is a PnP ESS1688-compatible 16-bit sound card. | ||
4 | |||
5 | It should be automatically detected by the Linux Kernel isapnp support when you | ||
6 | load 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 | |||
18 | NOTE: this is only needed when not using the kernel isapnp support! | ||
19 | |||
20 | For configuring the sound card's I/O addresses, IRQ and DMA, here is a | ||
21 | sample 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 *) | ||
35 | at the beginning and the | ||
36 | (WAITFORKEY) | ||
37 | at the end.) | ||
38 | |||
39 | In this setup, the main card I/O is 0x0220, FM synthesizer is 0x0388, and | ||
40 | the MPU-401 MIDI port is located at 0x0330. IRQ is IRQ 5, DMA is channel 1. | ||
41 | |||
42 | After configuring the sound card via isapnp, to use the card you must load | ||
43 | the 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 | |||
54 | opl3 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 | |||
9 | If you're using PnP cards, the initialization of PnP is required | ||
10 | before 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. | ||
14 | In this document, only the case 1 case is treated. | ||
15 | |||
16 | ---------------------------------------------------------------- | ||
17 | * Installation on Red Hat 5.0 Sound Driver | ||
18 | |||
19 | Please use install-rh.sh under RedHat5.0 directory. | ||
20 | DO NOT USE install.sh below. | ||
21 | See 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 | |||
134 | Good 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 @@ | |||
1 | Introduction Notes on Modular Sound Drivers and Soundcore | ||
2 | Wade Hampton | ||
3 | 2/14/2001 | ||
4 | |||
5 | Purpose: | ||
6 | ======== | ||
7 | This document provides some general notes on the modular | ||
8 | sound drivers and their configuration, along with the | ||
9 | support modules sound.o and soundcore.o. | ||
10 | |||
11 | Note, some of this probably should be added to the Sound-HOWTO! | ||
12 | |||
13 | Note, soundlow.o was present with 2.2 kernels but is not | ||
14 | required for 2.4.x kernels. References have been removed | ||
15 | to this. | ||
16 | |||
17 | |||
18 | Copying: | ||
19 | ======== | ||
20 | none | ||
21 | |||
22 | |||
23 | History: | ||
24 | ======== | ||
25 | 0.1.0 11/20/1998 First version, draft | ||
26 | 1.0.0 11/1998 Alan Cox changes, incorporation in 2.2.0 | ||
27 | as Documentation/sound/oss/Introduction | ||
28 | 1.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. | ||
32 | 1.1.1 19991031 Added notes on sound-slot- and sound-service. | ||
33 | (Alan Cox) | ||
34 | 1.1.2 20000920 Modified for Kernel 2.4 (Christoph Hellwig) | ||
35 | 1.1.3 20010214 Minor notes and corrections (Wade Hampton) | ||
36 | Added examples of sound-slot-0, etc. | ||
37 | |||
38 | |||
39 | Modular Sound Drivers: | ||
40 | ====================== | ||
41 | |||
42 | Thanks 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 | |||
48 | the standard Linux kernels support a modular sound driver. From | ||
49 | Alan'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 | |||
56 | The modular sound drivers may be loaded via insmod or modprobe. | ||
57 | To support all the various sound modules, there are two general | ||
58 | support 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 | |||
66 | For the specific sound modules (e.g., sb.o for the Soundblaster), | ||
67 | read the documentation on that module to determine what options | ||
68 | are available, for example IRQ, address, DMA. | ||
69 | |||
70 | Warning, the options for different cards sometime use different names | ||
71 | for the same or a similar feature (dma1= versus dma16=). As a last | ||
72 | resort, inspect the code (search for MODULE_PARM). | ||
73 | |||
74 | Notes: | ||
75 | |||
76 | 1. 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 | |||
82 | 2. 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 | |||
87 | 3. 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 | |||
96 | Building the Modules: | ||
97 | ===================== | ||
98 | |||
99 | This document does not provide full details on building the | ||
100 | kernel, etc. The notes below apply only to making the kernel | ||
101 | sound modules. If this conflicts with the kernel's README, | ||
102 | the README takes precedence. | ||
103 | |||
104 | 1. 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 | |||
109 | 2. Select the Sound option and a dialog will be displayed. | ||
110 | |||
111 | 3. Select M (module) for "Sound card support". | ||
112 | |||
113 | 4. 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 | |||
117 | 5. Make the kernel (e.g., make bzImage), and install the kernel. | ||
118 | |||
119 | 6. Make the modules and install them (make modules; make modules_install). | ||
120 | |||
121 | Note, for 2.5.x kernels, make sure you have the newer module-init-tools | ||
122 | installed or modules will not be loaded properly. 2.5.x requires an | ||
123 | updated module-init-tools. | ||
124 | |||
125 | |||
126 | Plug and Play (PnP: | ||
127 | =================== | ||
128 | |||
129 | If the sound card is an ISA PnP card, isapnp may be used | ||
130 | to configure the card. See the file isapnp.txt in the | ||
131 | directory one level up (e.g., /usr/src/linux/Documentation). | ||
132 | |||
133 | Also the 2.4.x kernels provide PnP capabilities, see the | ||
134 | file NEWS in this directory. | ||
135 | |||
136 | PCI sound cards are highly recommended, as they are far | ||
137 | easier to configure and from what I have read, they use | ||
138 | less resources and are more CPU efficient. | ||
139 | |||
140 | |||
141 | INSMOD: | ||
142 | ======= | ||
143 | |||
144 | If loading via insmod, the common modules must be loaded in the | ||
145 | order below BEFORE loading the other sound modules. The card-specific | ||
146 | modules may then be loaded (most require parameters). For example, | ||
147 | I use the following via a shell script to load my SoundBlaster: | ||
148 | |||
149 | SB_BASE=0x240 | ||
150 | SB_IRQ=9 | ||
151 | SB_DMA=3 | ||
152 | SB_DMA2=5 | ||
153 | SB_MPU=0x300 | ||
154 | # | ||
155 | echo Starting sound | ||
156 | /sbin/insmod soundcore | ||
157 | /sbin/insmod sound | ||
158 | # | ||
159 | echo 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 | |||
163 | When using sound as a module, I typically put these commands | ||
164 | in a file such as /root/soundon.sh. | ||
165 | |||
166 | |||
167 | MODPROBE: | ||
168 | ========= | ||
169 | |||
170 | If loading via modprobe, these common files are automatically loaded | ||
171 | when requested by modprobe. For example, my /etc/modprobe.conf contains: | ||
172 | |||
173 | alias sound sb | ||
174 | options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300 | ||
175 | |||
176 | All you need to do to load the module is: | ||
177 | |||
178 | /sbin/modprobe sb | ||
179 | |||
180 | |||
181 | Sound Status: | ||
182 | ============= | ||
183 | |||
184 | The 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 | ||
188 | such as the es1370/1 (see the es1370/1 files in this directory) | ||
189 | as they do not automatically support uLaw on /dev/audio.] | ||
190 | |||
191 | The status of the modules and which modules depend on | ||
192 | which 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 | |||
202 | Removing Sound: | ||
203 | =============== | ||
204 | |||
205 | Sound may be removed by using /sbin/rmmod in the reverse order | ||
206 | in which you load the modules. Note, if a program has a sound device | ||
207 | open (e.g., xmixer), that module (and the modules on which it | ||
208 | depends) may not be unloaded. | ||
209 | |||
210 | For example, I use the following to remove my Soundblaster (rmmod | ||
211 | in 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 | |||
218 | When using sound as a module, I typically put these commands | ||
219 | in a script such as /root/soundoff.sh. | ||
220 | |||
221 | |||
222 | Removing Sound for use with OSS: | ||
223 | ================================ | ||
224 | |||
225 | If you get really stuck or have a card that the kernel modules | ||
226 | will not support, you can get a commercial sound driver from | ||
227 | http://www.opensound.com. Before loading the commercial sound | ||
228 | driver, you should do the following: | ||
229 | |||
230 | 1. remove sound modules (detailed above) | ||
231 | 2. remove the sound modules from /etc/modprobe.conf | ||
232 | 3. 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 | |||
238 | Multiple Sound Cards: | ||
239 | ===================== | ||
240 | |||
241 | The sound drivers will support multiple sound cards and there | ||
242 | are some great applications like multitrack that support them. | ||
243 | Typically, you need two sound cards of different types. Note, this | ||
244 | uses more precious interrupts and DMA channels and sometimes | ||
245 | can be a configuration nightmare. I have heard reports of 3-4 | ||
246 | sound cards (typically I only use 2). You can sometimes use | ||
247 | multiple PCI sound cards of the same type. | ||
248 | |||
249 | On my machine I have two sound cards (cs4232 and Soundblaster Vibra | ||
250 | 16). By loading sound as modules, I can control which is the first | ||
251 | sound device (/dev/dsp, /dev/audio, /dev/mixer) and which is | ||
252 | the second. Normally, the cs4232 (Dell sound on the motherboard) | ||
253 | would be the first sound device, but I prefer the Soundblaster. | ||
254 | All you have to do is to load the one you want as /dev/dsp | ||
255 | first (in my case "sb") and then load the other one | ||
256 | (in my case "cs4232"). | ||
257 | |||
258 | If you have two cards of the same type that are jumpered | ||
259 | cards or different PnP revisions, you may load the same | ||
260 | module twice. For example, I have a SoundBlaster vibra 16 | ||
261 | and an older SoundBlaster 16 (jumpers). To load the module | ||
262 | twice, you need to do the following: | ||
263 | |||
264 | 1. 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 | |||
268 | 2. 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 | |||
273 | 3. Update your soundon.sh script, etc. | ||
274 | |||
275 | Warning: I have never been able to get two PnP sound cards of the | ||
276 | same type to load at the same time. I have tried this several times | ||
277 | with the Soundblaster Vibra 16 cards. OSS has indicated that this | ||
278 | is a PnP problem.... If anyone has any luck doing this, please | ||
279 | send me an E-MAIL. PCI sound cards should not have this problem.a | ||
280 | Since this was originally release, I have received a couple of | ||
281 | mails from people who have accomplished this! | ||
282 | |||
283 | NOTE: In Linux 2.4 the Sound Blaster driver (and only this one yet) | ||
284 | supports multiple cards with one module by default. | ||
285 | Read the file 'Soundblaster' in this directory for details. | ||
286 | |||
287 | |||
288 | Sound Problems: | ||
289 | =============== | ||
290 | |||
291 | First RTFM (including the troubleshooting section | ||
292 | in the Sound-HOWTO). | ||
293 | |||
294 | 1) 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 | |||
319 | 2) 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 | |||
325 | 3. 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 | |||
333 | 4. 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 | |||
338 | 5. 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 | |||
345 | 6) Ask for help on the sound list or send E-MAIL to the | ||
346 | sound driver author/maintainer. | ||
347 | |||
348 | 7) Turn on debug in drivers/sound/sound_config.h (DEB, DDB, MDB). | ||
349 | |||
350 | 8) 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 | |||
360 | Configuring Sound: | ||
361 | ================== | ||
362 | |||
363 | There are several ways of configuring your sound: | ||
364 | |||
365 | 1) 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 | |||
369 | 2) On the command line when using insmod or in a bash script | ||
370 | using command line calls to load sound. | ||
371 | |||
372 | 3) In /etc/modprobe.conf when using modprobe. | ||
373 | |||
374 | 4) Via Red Hat's GPL'd /usr/sbin/sndconfig program (text based). | ||
375 | |||
376 | 5) Via the OSS soundconf program (with the commercial version | ||
377 | of the OSS driver. | ||
378 | |||
379 | 6) 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 | |||
383 | And I am sure, several other ways. | ||
384 | |||
385 | Anyone want to write a linuxconf module for configuring sound? | ||
386 | |||
387 | |||
388 | Module Loading: | ||
389 | =============== | ||
390 | |||
391 | When a sound card is first referenced and sound is modular, the sound system | ||
392 | will ask for the sound devices to be loaded. Initially it requests that | ||
393 | the driver for the sound system is loaded. It then will ask for | ||
394 | sound-slot-0, where 0 is the first sound card. (sound-slot-1 the second and | ||
395 | so on). Thus you can do | ||
396 | |||
397 | alias sound-slot-0 sb | ||
398 | |||
399 | To load a soundblaster at this point. If the slot loading does not provide | ||
400 | the desired device - for example a soundblaster does not directly provide | ||
401 | a midi synth in all cases then it will request "sound-service-0-n" where n | ||
402 | is | ||
403 | |||
404 | 0 Mixer | ||
405 | |||
406 | 2 MIDI | ||
407 | |||
408 | 3, 4 DSP audio | ||
409 | |||
410 | |||
411 | For example, I use the following to load my Soundblaster PCI 128 | ||
412 | (ES 1371) card first, followed by my SoundBlaster Vibra 16 card, | ||
413 | then by my TV card: | ||
414 | |||
415 | # Load the Soundblaster PCI 128 as /dev/dsp, /dev/dsp1, /dev/mixer | ||
416 | alias sound-slot-0 es1371 | ||
417 | |||
418 | # Load the Soundblaster Vibra 16 as /dev/dsp2, /dev/mixer1 | ||
419 | alias sound-slot-1 sb | ||
420 | options sb io=0x240 irq=5 dma=1 dma16=5 mpu_io=0x330 | ||
421 | |||
422 | # Load the BTTV (TV card) as /dev/mixer2 | ||
423 | alias sound-slot-2 bttv | ||
424 | alias sound-service-2-0 tvmixer | ||
425 | |||
426 | pre-install bttv modprobe tuner ; modprobe tvmixer | ||
427 | pre-install tvmixer modprobe msp3400; modprobe tvaudio | ||
428 | options tuner debug=0 type=8 | ||
429 | options bttv card=0 radio=0 pll=0 | ||
430 | |||
431 | |||
432 | For More Information (RTFM): | ||
433 | ============================ | ||
434 | 1) Information on kernel modules: manual pages for insmod and modprobe. | ||
435 | |||
436 | 2) Information on PnP, RTFM manual pages for isapnp. | ||
437 | |||
438 | 3) Sound-HOWTO and Sound-Playing-HOWTO. | ||
439 | |||
440 | 4) OSS's WWW site at http://www.opensound.com. | ||
441 | |||
442 | 5) All the files in Documentation/sound. | ||
443 | |||
444 | 6) The comments and code in linux/drivers/sound. | ||
445 | |||
446 | 7) The sndconfig and rhsound documentation from Red Hat. | ||
447 | |||
448 | 8) The Linux-sound mailing list: sound-list@redhat.com. | ||
449 | |||
450 | 9) Enlightenment documentation (for info on esd) | ||
451 | http://www.tux.org/~ricdude/EsounD.html. | ||
452 | |||
453 | 10) ALSA home page: http://www.alsa-project.org/ | ||
454 | |||
455 | |||
456 | Contact Information: | ||
457 | ==================== | ||
458 | Wade 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 | |||
4 | From: Shaw Carruthers <shaw@shawc.demon.co.uk> | ||
5 | |||
6 | I have been using mad16 sound for some time now with no problems, current | ||
7 | kernel 2.1.89 | ||
8 | |||
9 | lsmod shows: | ||
10 | |||
11 | mad16 5176 0 | ||
12 | sb 22044 0 [mad16] | ||
13 | uart401 5576 0 [mad16 sb] | ||
14 | ad1848 14176 1 [mad16] | ||
15 | sound 61928 0 [mad16 sb uart401 ad1848] | ||
16 | |||
17 | .config has: | ||
18 | |||
19 | CONFIG_SOUND=m | ||
20 | CONFIG_SOUND_ADLIB=m | ||
21 | CONFIG_SOUND_MAD16=m | ||
22 | CONFIG_SOUND_YM3812=m | ||
23 | |||
24 | modprobe.conf has: | ||
25 | |||
26 | alias char-major-14-* mad16 | ||
27 | options sb mad16=1 | ||
28 | options 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 | |||
31 | To get the built in mixer to work this needs to be: | ||
32 | |||
33 | options adlib_card io=0x388 # FM synthesizer | ||
34 | options sb mad16=1 | ||
35 | options 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 | |||
37 | The addition of the "mpu_io=816 mpu_irq=5" to the mad16 options line is | ||
38 | |||
39 | ------------------------------------------------------------------------ | ||
40 | The mad16 module in addition supports the following options: | ||
41 | |||
42 | option: meaning: default: | ||
43 | joystick=0,1 disabled, enabled disabled | ||
44 | cdtype=0x00,0x02,0x04, disabled, Sony CDU31A, disabled | ||
45 | 0x06,0x08,0x0a Mitsumi, Panasonic, | ||
46 | Secondary IDE, Primary IDE | ||
47 | cdport=0x340,0x320, 0x340 | ||
48 | 0x330,0x360 | ||
49 | cdirq=0,3,5,7,9,10,11 disabled, IRQ3, ... disabled | ||
50 | cddma=0,5,6,7 disabled, DMA5, ... DMA5 for Mitsumi or IDE | ||
51 | cddma=0,1,2,3 disabled, DMA1, ... DMA3 for Sony or Panasonic | ||
52 | opl4=0,1 OPL3, OPL4 OPL3 | ||
53 | |||
54 | for more details see linux/drivers/sound/mad16.c | ||
55 | |||
56 | Rui 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 | |||
5 | Driver Status and Availability | ||
6 | ------------------------------ | ||
7 | |||
8 | The most recent version of this driver will hopefully always be available at | ||
9 | http://www.zabbo.net/maestro/ | ||
10 | |||
11 | I will try and maintain the most recent stable version of the driver | ||
12 | in both the stable and development kernel lines. | ||
13 | |||
14 | ESS Maestro Chip Family | ||
15 | ----------------------- | ||
16 | |||
17 | There are 3 main variants of the ESS Maestro PCI sound chip. The first | ||
18 | is 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 | ||
20 | 0x0100 as the device ID. It was put on some sound boards and a few laptops. | ||
21 | ESS bought the design and cleaned it up as the Maestro 2. This starts | ||
22 | their marking with the ESS vendor ID 0x125D and the 'year' device IDs. | ||
23 | The Maestro 2 claims 0x1968 while the Maestro 2e has 0x1978. | ||
24 | |||
25 | The various families of Maestro are mostly identical as far as this | ||
26 | driver is concerned. It doesn't touch the DSP parts that differ (though | ||
27 | it could for FM synthesis). | ||
28 | |||
29 | Driver OSS Behavior | ||
30 | -------------------- | ||
31 | |||
32 | This OSS driver exports /dev/mixer and /dev/dsp to applications, which | ||
33 | mostly adhere to the OSS spec. This driver doesn't register itself | ||
34 | with /dev/sndstat, so don't expect information to appear there. | ||
35 | |||
36 | The /dev/dsp device exported behaves almost as expected. Playback is | ||
37 | supported in all the various lovely formats. 8/16bit stereo/mono from | ||
38 | 8khz to 48khz, and mmap()ing for playback behaves. Capture/recording | ||
39 | is limited due to oddities with the Maestro hardware. One can only | ||
40 | record in 16bit stereo. For recording the maestro uses non interleaved | ||
41 | stereo buffers so that mmap()ing the incoming data does not result in | ||
42 | a ring buffer of LRLR data. mmap()ing of the read buffers is therefore | ||
43 | disallowed until this can be cleaned up. | ||
44 | |||
45 | /dev/mixer is an interface to the AC'97 codec on the Maestro. It is | ||
46 | worth noting that there are a variety of AC'97s that can be wired to | ||
47 | the Maestro. Which is used is entirely up to the hardware implementor. | ||
48 | This 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 | |||
51 | The driver doesn't support MIDI or FM playback at the moment. Typically | ||
52 | the Maestro is wired to an MPU MIDI chip, but some hardware implementations | ||
53 | don't. We need to assemble a white list of hardware implementations that | ||
54 | have MIDI wired properly before we can claim to support it safely. | ||
55 | |||
56 | Compiling and Installing | ||
57 | ------------------------ | ||
58 | |||
59 | With the drivers inclusion into the kernel, compiling and installing | ||
60 | is the same as most OSS/Lite modular sound drivers. Compilation | ||
61 | of the driver is enabled through the CONFIG_SOUND_MAESTRO variable | ||
62 | in the config system. | ||
63 | |||
64 | It may be modular or statically linked. If it is modular it should be | ||
65 | installed with the rest of the modules for the kernel on the system. | ||
66 | Typically this will be in /lib/modules/ somewhere. 'alias sound maestro' | ||
67 | should also be added to your module configs (typically /etc/conf.modules) | ||
68 | if you're using modular OSS/Lite sound and want to default to using a | ||
69 | maestro chip. | ||
70 | |||
71 | As this is a PCI device, the module does not need to be informed of | ||
72 | any IO or IRQ resources it should use, it devines these from the | ||
73 | system. Sometimes, on sucky PCs, the BIOS fails to allocated resources | ||
74 | for the maestro. This will result in a message like: | ||
75 | maestro: PCI subsystem reports IRQ 0, this might not be correct. | ||
76 | from the kernel. Should this happen the sound chip most likely will | ||
77 | not 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 | ||
79 | what magic needs to happen so that the BIOS will reward the maestro with | ||
80 | an IRQ. This operation is incredibly system specific, so you're on your | ||
81 | own. Sometimes the magic lies in 'PNP Capable Operating System' settings. | ||
82 | |||
83 | There are very few options to the driver. One is 'debug' which will | ||
84 | tell the driver to print minimal debugging information as it runs. This | ||
85 | can be collected with 'dmesg' or through the klogd daemon. | ||
86 | |||
87 | The other, more interesting option, is 'dsps_order'. Typically at | ||
88 | install time the driver will only register one available /dev/dsp device | ||
89 | for its use. The 'dsps_order' module parameter allows for more devices | ||
90 | to 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 | ||
92 | separate channels in the maestro. | ||
93 | |||
94 | Power Management | ||
95 | ---------------- | ||
96 | |||
97 | As of version 0.14, this driver has a minimal understanding of PCI | ||
98 | Power Management. If it finds a valid power management capability | ||
99 | on the PCI device it will attempt to use the power management | ||
100 | functions of the maestro. It will only do this on Maestro 2Es and | ||
101 | only on machines that are known to function well. You can | ||
102 | force the use of power management by setting the 'use_pm' module | ||
103 | option to 1, or can disable it entirely by setting it to 0. | ||
104 | |||
105 | When using power management, the driver does a few things | ||
106 | differently. It will keep the chip in a lower power mode | ||
107 | when the module is inserted but /dev/dsp is not open. This | ||
108 | allows the mixer to function but turns off the clocks | ||
109 | on other parts of the chip. When /dev/dsp is opened the chip | ||
110 | is brought into full power mode, and brought back down | ||
111 | when it is closed. It also powers down the chip entirely | ||
112 | when the module is removed or the machine is shutdown. This | ||
113 | can have nonobvious consequences. CD audio may not work | ||
114 | after a power managing driver is removed. Also, software that | ||
115 | doesn't understand power management may not be able to talk | ||
116 | to the powered down chip until the machine goes through a hard | ||
117 | reboot to bring it back. | ||
118 | |||
119 | .. more details .. | ||
120 | ------------------ | ||
121 | |||
122 | drivers/sound/maestro.c contains comments that hopefully explain | ||
123 | the 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 | |||
5 | Driver Status and Availability | ||
6 | ------------------------------ | ||
7 | |||
8 | The most recent version of this driver will hopefully always be available at | ||
9 | http://www.zabbo.net/maestro3/ | ||
10 | |||
11 | I will try and maintain the most recent stable version of the driver | ||
12 | in both the stable and development kernel lines. | ||
13 | |||
14 | Historically I've sucked pretty hard at actually doing that, however. | ||
15 | |||
16 | ESS Maestro3 Chip Family | ||
17 | ----------------------- | ||
18 | |||
19 | The 'Maestro3' is much like the Maestro2 chip. The noted improvement | ||
20 | is the removal of the silicon in the '2' that did PCM mixing. All that | ||
21 | work is now done through a custom DSP called the ASSP, the Asynchronus | ||
22 | Specific Signal Processor. | ||
23 | |||
24 | The 'Allegro' is a baby version of the Maestro3. I'm not entirely clear | ||
25 | on the extent of the differences, but the driver supports them both :) | ||
26 | |||
27 | The 'Allegro' shows up as PCI ID 0x1988 and the Maestro3 as 0x1998, | ||
28 | both under ESS's vendor ID of 0x125D. The Maestro3 can also show up as | ||
29 | 0x199a when hardware strapping is used. | ||
30 | |||
31 | The chip can also act as a multi function device. The modem IDs follow | ||
32 | the audio multimedia device IDs. (so the modem part of an Allegro shows | ||
33 | up as 0x1989) | ||
34 | |||
35 | Driver OSS Behavior | ||
36 | -------------------- | ||
37 | |||
38 | This OSS driver exports /dev/mixer and /dev/dsp to applications, which | ||
39 | mostly adhere to the OSS spec. This driver doesn't register itself | ||
40 | with /dev/sndstat, so don't expect information to appear there. | ||
41 | |||
42 | The /dev/dsp device exported behaves as expected. Playback is | ||
43 | supported in all the various lovely formats. 8/16bit stereo/mono from | ||
44 | 8khz 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 | ||
47 | worth noting that there are a variety of AC'97s that can be wired to | ||
48 | the Maestro3. Which is used is entirely up to the hardware implementor. | ||
49 | This 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. | ||
51 | The Allegro has an onchip AC'97. | ||
52 | |||
53 | The driver doesn't support MIDI or FM playback at the moment. | ||
54 | |||
55 | Compiling and Installing | ||
56 | ------------------------ | ||
57 | |||
58 | With the drivers inclusion into the kernel, compiling and installing | ||
59 | is the same as most OSS/Lite modular sound drivers. Compilation | ||
60 | of the driver is enabled through the CONFIG_SOUND_MAESTRO3 variable | ||
61 | in the config system. | ||
62 | |||
63 | It may be modular or statically linked. If it is modular it should be | ||
64 | installed with the rest of the modules for the kernel on the system. | ||
65 | Typically this will be in /lib/modules/ somewhere. 'alias sound-slot-0 | ||
66 | maestro3' should also be added to your module configs (typically | ||
67 | /etc/modprobe.conf) if you're using modular OSS/Lite sound and want to | ||
68 | default to using a maestro3 chip. | ||
69 | |||
70 | There are very few options to the driver. One is 'debug' which will | ||
71 | tell the driver to print minimal debugging information as it runs. This | ||
72 | can be collected with 'dmesg' or through the klogd daemon. | ||
73 | |||
74 | One is 'external_amp', which tells the driver to attempt to enable | ||
75 | an external amplifier. This defaults to '1', you can tell the driver | ||
76 | not to bother enabling such an amplifier by setting it to '0'. | ||
77 | |||
78 | And the last is 'gpio_pin', which tells the driver which GPIO pin number | ||
79 | the external amp uses (0-15), The Allegro uses 8 by default, all others 1. | ||
80 | If everything loads correctly and seems to be working but you get no sound, | ||
81 | try tweaking this value. | ||
82 | |||
83 | Systems known to need a different value | ||
84 | Panasonic ToughBook CF-72: gpio_pin=13 | ||
85 | |||
86 | Power Management | ||
87 | ---------------- | ||
88 | |||
89 | This driver has a minimal understanding of PCI Power Management. It will | ||
90 | try and power down the chip when the system is suspended, and power | ||
91 | it up with it is resumed. It will also try and power down the chip | ||
92 | when 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 | # | ||
390 | save_IFS="${IFS}" | ||
391 | IFS="${IFS}:" | ||
392 | gettext_dir=FAILED | ||
393 | locale_dir=FAILED | ||
394 | first_param="$1" | ||
395 | for dir in $PATH | ||
396 | do | ||
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 | ||
411 | done | ||
412 | IFS="$save_IFS" | ||
413 | if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED | ||
414 | then | ||
415 | echo=echo | ||
416 | else | ||
417 | TEXTDOMAINDIR=$locale_dir | ||
418 | export TEXTDOMAINDIR | ||
419 | TEXTDOMAIN=sharutils | ||
420 | export TEXTDOMAIN | ||
421 | echo="$gettext_dir/gettext -s" | ||
422 | fi | ||
423 | touch -am 1231235999 $$.touch >/dev/null 2>&1 | ||
424 | if test ! -f 1231235999 && test -f $$.touch; then | ||
425 | shar_touch=touch | ||
426 | else | ||
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 | ||
432 | fi | ||
433 | rm -f 1231235999 $$.touch | ||
434 | # | ||
435 | if mkdir _sh01426; then | ||
436 | $echo 'x -' 'creating lock directory' | ||
437 | else | ||
438 | $echo 'failed to create lock directory' | ||
439 | exit 1 | ||
440 | fi | ||
441 | # ============= MultiSound.d/setdigital.c ============== | ||
442 | if test ! -d 'MultiSound.d'; then | ||
443 | $echo 'x -' 'creating directory' 'MultiSound.d' | ||
444 | mkdir 'MultiSound.d' | ||
445 | fi | ||
446 | if test -f 'MultiSound.d/setdigital.c' && test "$first_param" != -c; then | ||
447 | $echo 'x -' SKIPPING 'MultiSound.d/setdigital.c' '(file already exists)' | ||
448 | else | ||
449 | $echo 'x -' extracting 'MultiSound.d/setdigital.c' '(text)' | ||
450 | sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/setdigital.c' && | ||
451 | /********************************************************************* | ||
452 | X * | ||
453 | X * setdigital.c - sets the DIGITAL1 input for a mixer | ||
454 | X * | ||
455 | X * Copyright (C) 1998 Andrew Veliath | ||
456 | X * | ||
457 | X * This program is free software; you can redistribute it and/or modify | ||
458 | X * it under the terms of the GNU General Public License as published by | ||
459 | X * the Free Software Foundation; either version 2 of the License, or | ||
460 | X * (at your option) any later version. | ||
461 | X * | ||
462 | X * This program is distributed in the hope that it will be useful, | ||
463 | X * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
464 | X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
465 | X * GNU General Public License for more details. | ||
466 | X * | ||
467 | X * You should have received a copy of the GNU General Public License | ||
468 | X * along with this program; if not, write to the Free Software | ||
469 | X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
470 | X * | ||
471 | X ********************************************************************/ | ||
472 | X | ||
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> | ||
480 | X | ||
481 | int main(int argc, char *argv[]) | ||
482 | { | ||
483 | X int fd; | ||
484 | X unsigned long recmask, recsrc; | ||
485 | X | ||
486 | X if (argc != 2) { | ||
487 | X fprintf(stderr, "usage: setdigital <mixer device>\n"); | ||
488 | X exit(1); | ||
489 | X } | ||
490 | X | ||
491 | X if ((fd = open(argv[1], O_RDWR)) < 0) { | ||
492 | X perror(argv[1]); | ||
493 | X exit(1); | ||
494 | X } | ||
495 | X | ||
496 | X if (ioctl(fd, SOUND_MIXER_READ_RECMASK, &recmask) < 0) { | ||
497 | X fprintf(stderr, "error: ioctl read recording mask failed\n"); | ||
498 | X perror("ioctl"); | ||
499 | X close(fd); | ||
500 | X exit(1); | ||
501 | X } | ||
502 | X | ||
503 | X if (!(recmask & SOUND_MASK_DIGITAL1)) { | ||
504 | X fprintf(stderr, "error: cannot find DIGITAL1 device in mixer\n"); | ||
505 | X close(fd); | ||
506 | X exit(1); | ||
507 | X } | ||
508 | X | ||
509 | X if (ioctl(fd, SOUND_MIXER_READ_RECSRC, &recsrc) < 0) { | ||
510 | X fprintf(stderr, "error: ioctl read recording source failed\n"); | ||
511 | X perror("ioctl"); | ||
512 | X close(fd); | ||
513 | X exit(1); | ||
514 | X } | ||
515 | X | ||
516 | X recsrc |= SOUND_MASK_DIGITAL1; | ||
517 | X | ||
518 | X if (ioctl(fd, SOUND_MIXER_WRITE_RECSRC, &recsrc) < 0) { | ||
519 | X fprintf(stderr, "error: ioctl write recording source failed\n"); | ||
520 | X perror("ioctl"); | ||
521 | X close(fd); | ||
522 | X exit(1); | ||
523 | X } | ||
524 | X | ||
525 | X close(fd); | ||
526 | X | ||
527 | X return 0; | ||
528 | } | ||
529 | SHAR_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' | ||
537 | e87217fc3e71288102ba41fd81f71ec4 MultiSound.d/setdigital.c | ||
538 | SHAR_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 | ||
544 | fi | ||
545 | # ============= MultiSound.d/pinnaclecfg.c ============== | ||
546 | if test -f 'MultiSound.d/pinnaclecfg.c' && test "$first_param" != -c; then | ||
547 | $echo 'x -' SKIPPING 'MultiSound.d/pinnaclecfg.c' '(file already exists)' | ||
548 | else | ||
549 | $echo 'x -' extracting 'MultiSound.d/pinnaclecfg.c' '(text)' | ||
550 | sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/pinnaclecfg.c' && | ||
551 | /********************************************************************* | ||
552 | X * | ||
553 | X * pinnaclecfg.c - Pinnacle/Fiji Device Configuration Program | ||
554 | X * | ||
555 | X * This is for NON-PnP mode only. For PnP mode, use isapnptools. | ||
556 | X * | ||
557 | X * This is Linux-specific, and must be run with root permissions. | ||
558 | X * | ||
559 | X * Part of the Turtle Beach MultiSound Sound Card Driver for Linux | ||
560 | X * | ||
561 | X * Copyright (C) 1998 Andrew Veliath | ||
562 | X * | ||
563 | X * This program is free software; you can redistribute it and/or modify | ||
564 | X * it under the terms of the GNU General Public License as published by | ||
565 | X * the Free Software Foundation; either version 2 of the License, or | ||
566 | X * (at your option) any later version. | ||
567 | X * | ||
568 | X * This program is distributed in the hope that it will be useful, | ||
569 | X * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
570 | X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
571 | X * GNU General Public License for more details. | ||
572 | X * | ||
573 | X * You should have received a copy of the GNU General Public License | ||
574 | X * along with this program; if not, write to the Free Software | ||
575 | X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
576 | X * | ||
577 | X ********************************************************************/ | ||
578 | X | ||
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> | ||
586 | X | ||
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 | ||
611 | X | ||
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))) | ||
615 | X | ||
616 | typedef __u8 BYTE; | ||
617 | typedef __u16 USHORT; | ||
618 | typedef __u16 WORD; | ||
619 | X | ||
620 | static int config_port = -1; | ||
621 | X | ||
622 | static int msnd_write_cfg(int cfg, int reg, int value) | ||
623 | { | ||
624 | X outb(reg, cfg); | ||
625 | X outb(value, cfg + 1); | ||
626 | X if (value != inb(cfg + 1)) { | ||
627 | X fprintf(stderr, "error: msnd_write_cfg: I/O error\n"); | ||
628 | X return -EIO; | ||
629 | X } | ||
630 | X return 0; | ||
631 | } | ||
632 | X | ||
633 | static int msnd_read_cfg(int cfg, int reg) | ||
634 | { | ||
635 | X outb(reg, cfg); | ||
636 | X return inb(cfg + 1); | ||
637 | } | ||
638 | X | ||
639 | static int msnd_write_cfg_io0(int cfg, int num, WORD io) | ||
640 | { | ||
641 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
642 | X return -EIO; | ||
643 | X if (msnd_write_cfg(cfg, IREG_IO0_BASEHI, HIBYTE(io))) | ||
644 | X return -EIO; | ||
645 | X if (msnd_write_cfg(cfg, IREG_IO0_BASELO, LOBYTE(io))) | ||
646 | X return -EIO; | ||
647 | X return 0; | ||
648 | } | ||
649 | X | ||
650 | static int msnd_read_cfg_io0(int cfg, int num, WORD *io) | ||
651 | { | ||
652 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
653 | X return -EIO; | ||
654 | X | ||
655 | X *io = MAKEWORD(msnd_read_cfg(cfg, IREG_IO0_BASELO), | ||
656 | X msnd_read_cfg(cfg, IREG_IO0_BASEHI)); | ||
657 | X | ||
658 | X return 0; | ||
659 | } | ||
660 | X | ||
661 | static int msnd_write_cfg_io1(int cfg, int num, WORD io) | ||
662 | { | ||
663 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
664 | X return -EIO; | ||
665 | X if (msnd_write_cfg(cfg, IREG_IO1_BASEHI, HIBYTE(io))) | ||
666 | X return -EIO; | ||
667 | X if (msnd_write_cfg(cfg, IREG_IO1_BASELO, LOBYTE(io))) | ||
668 | X return -EIO; | ||
669 | X return 0; | ||
670 | } | ||
671 | X | ||
672 | static int msnd_read_cfg_io1(int cfg, int num, WORD *io) | ||
673 | { | ||
674 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
675 | X return -EIO; | ||
676 | X | ||
677 | X *io = MAKEWORD(msnd_read_cfg(cfg, IREG_IO1_BASELO), | ||
678 | X msnd_read_cfg(cfg, IREG_IO1_BASEHI)); | ||
679 | X | ||
680 | X return 0; | ||
681 | } | ||
682 | X | ||
683 | static int msnd_write_cfg_irq(int cfg, int num, WORD irq) | ||
684 | { | ||
685 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
686 | X return -EIO; | ||
687 | X if (msnd_write_cfg(cfg, IREG_IRQ_NUMBER, LOBYTE(irq))) | ||
688 | X return -EIO; | ||
689 | X if (msnd_write_cfg(cfg, IREG_IRQ_TYPE, IRQTYPE_EDGE)) | ||
690 | X return -EIO; | ||
691 | X return 0; | ||
692 | } | ||
693 | X | ||
694 | static int msnd_read_cfg_irq(int cfg, int num, WORD *irq) | ||
695 | { | ||
696 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
697 | X return -EIO; | ||
698 | X | ||
699 | X *irq = msnd_read_cfg(cfg, IREG_IRQ_NUMBER); | ||
700 | X | ||
701 | X return 0; | ||
702 | } | ||
703 | X | ||
704 | static int msnd_write_cfg_mem(int cfg, int num, int mem) | ||
705 | { | ||
706 | X WORD wmem; | ||
707 | X | ||
708 | X mem >>= 8; | ||
709 | X mem &= 0xfff; | ||
710 | X wmem = (WORD)mem; | ||
711 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
712 | X return -EIO; | ||
713 | X if (msnd_write_cfg(cfg, IREG_MEMBASEHI, HIBYTE(wmem))) | ||
714 | X return -EIO; | ||
715 | X if (msnd_write_cfg(cfg, IREG_MEMBASELO, LOBYTE(wmem))) | ||
716 | X return -EIO; | ||
717 | X if (wmem && msnd_write_cfg(cfg, IREG_MEMCONTROL, (MEMTYPE_HIADDR | MEMTYPE_16BIT))) | ||
718 | X return -EIO; | ||
719 | X return 0; | ||
720 | } | ||
721 | X | ||
722 | static int msnd_read_cfg_mem(int cfg, int num, int *mem) | ||
723 | { | ||
724 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
725 | X return -EIO; | ||
726 | X | ||
727 | X *mem = MAKEWORD(msnd_read_cfg(cfg, IREG_MEMBASELO), | ||
728 | X msnd_read_cfg(cfg, IREG_MEMBASEHI)); | ||
729 | X *mem <<= 8; | ||
730 | X | ||
731 | X return 0; | ||
732 | } | ||
733 | X | ||
734 | static int msnd_activate_logical(int cfg, int num) | ||
735 | { | ||
736 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
737 | X return -EIO; | ||
738 | X if (msnd_write_cfg(cfg, IREG_ACTIVATE, LD_ACTIVATE)) | ||
739 | X return -EIO; | ||
740 | X return 0; | ||
741 | } | ||
742 | X | ||
743 | static int msnd_write_cfg_logical(int cfg, int num, WORD io0, WORD io1, WORD irq, int mem) | ||
744 | { | ||
745 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
746 | X return -EIO; | ||
747 | X if (msnd_write_cfg_io0(cfg, num, io0)) | ||
748 | X return -EIO; | ||
749 | X if (msnd_write_cfg_io1(cfg, num, io1)) | ||
750 | X return -EIO; | ||
751 | X if (msnd_write_cfg_irq(cfg, num, irq)) | ||
752 | X return -EIO; | ||
753 | X if (msnd_write_cfg_mem(cfg, num, mem)) | ||
754 | X return -EIO; | ||
755 | X if (msnd_activate_logical(cfg, num)) | ||
756 | X return -EIO; | ||
757 | X return 0; | ||
758 | } | ||
759 | X | ||
760 | static int msnd_read_cfg_logical(int cfg, int num, WORD *io0, WORD *io1, WORD *irq, int *mem) | ||
761 | { | ||
762 | X if (msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) | ||
763 | X return -EIO; | ||
764 | X if (msnd_read_cfg_io0(cfg, num, io0)) | ||
765 | X return -EIO; | ||
766 | X if (msnd_read_cfg_io1(cfg, num, io1)) | ||
767 | X return -EIO; | ||
768 | X if (msnd_read_cfg_irq(cfg, num, irq)) | ||
769 | X return -EIO; | ||
770 | X if (msnd_read_cfg_mem(cfg, num, mem)) | ||
771 | X return -EIO; | ||
772 | X return 0; | ||
773 | } | ||
774 | X | ||
775 | static void usage(void) | ||
776 | { | ||
777 | X fprintf(stderr, | ||
778 | X "\n" | ||
779 | X "pinnaclecfg 1.0\n" | ||
780 | X "\n" | ||
781 | X "usage: pinnaclecfg <config port> [device config]\n" | ||
782 | X "\n" | ||
783 | X "This is for use with the card in NON-PnP mode only.\n" | ||
784 | X "\n" | ||
785 | X "Available devices (not all available for Fiji):\n" | ||
786 | X "\n" | ||
787 | X " Device Description\n" | ||
788 | X " -------------------------------------------------------------------\n" | ||
789 | X " reset Reset all devices (i.e. disable)\n" | ||
790 | X " show Display current device configurations\n" | ||
791 | X "\n" | ||
792 | X " dsp <io> <irq> <mem> Audio device\n" | ||
793 | X " mpu <io> <irq> Internal Kurzweil synth\n" | ||
794 | X " ide <io0> <io1> <irq> On-board IDE controller\n" | ||
795 | X " joystick <io> Joystick port\n" | ||
796 | X "\n"); | ||
797 | X exit(1); | ||
798 | } | ||
799 | X | ||
800 | static int cfg_reset(void) | ||
801 | { | ||
802 | X int i; | ||
803 | X | ||
804 | X for (i = 0; i < 4; ++i) | ||
805 | X msnd_write_cfg_logical(config_port, i, 0, 0, 0, 0); | ||
806 | X | ||
807 | X return 0; | ||
808 | } | ||
809 | X | ||
810 | static int cfg_show(void) | ||
811 | { | ||
812 | X int i; | ||
813 | X int count = 0; | ||
814 | X | ||
815 | X for (i = 0; i < 4; ++i) { | ||
816 | X WORD io0, io1, irq; | ||
817 | X int mem; | ||
818 | X msnd_read_cfg_logical(config_port, i, &io0, &io1, &irq, &mem); | ||
819 | X switch (i) { | ||
820 | X case 0: | ||
821 | X if (io0 || irq || mem) { | ||
822 | X printf("dsp 0x%x %d 0x%x\n", io0, irq, mem); | ||
823 | X ++count; | ||
824 | X } | ||
825 | X break; | ||
826 | X case 1: | ||
827 | X if (io0 || irq) { | ||
828 | X printf("mpu 0x%x %d\n", io0, irq); | ||
829 | X ++count; | ||
830 | X } | ||
831 | X break; | ||
832 | X case 2: | ||
833 | X if (io0 || io1 || irq) { | ||
834 | X printf("ide 0x%x 0x%x %d\n", io0, io1, irq); | ||
835 | X ++count; | ||
836 | X } | ||
837 | X break; | ||
838 | X case 3: | ||
839 | X if (io0) { | ||
840 | X printf("joystick 0x%x\n", io0); | ||
841 | X ++count; | ||
842 | X } | ||
843 | X break; | ||
844 | X } | ||
845 | X } | ||
846 | X | ||
847 | X if (count == 0) | ||
848 | X fprintf(stderr, "no devices configured\n"); | ||
849 | X | ||
850 | X return 0; | ||
851 | } | ||
852 | X | ||
853 | static int cfg_dsp(int argc, char *argv[]) | ||
854 | { | ||
855 | X int io, irq, mem; | ||
856 | X | ||
857 | X if (argc < 3 || | ||
858 | X sscanf(argv[0], "0x%x", &io) != 1 || | ||
859 | X sscanf(argv[1], "%d", &irq) != 1 || | ||
860 | X sscanf(argv[2], "0x%x", &mem) != 1) | ||
861 | X usage(); | ||
862 | X | ||
863 | X if (!(io == 0x290 || | ||
864 | X io == 0x260 || | ||
865 | X io == 0x250 || | ||
866 | X io == 0x240 || | ||
867 | X io == 0x230 || | ||
868 | X io == 0x220 || | ||
869 | X io == 0x210 || | ||
870 | X io == 0x3e0)) { | ||
871 | X fprintf(stderr, "error: io must be one of " | ||
872 | X "210, 220, 230, 240, 250, 260, 290, or 3E0\n"); | ||
873 | X usage(); | ||
874 | X } | ||
875 | X | ||
876 | X if (!(irq == 5 || | ||
877 | X irq == 7 || | ||
878 | X irq == 9 || | ||
879 | X irq == 10 || | ||
880 | X irq == 11 || | ||
881 | X irq == 12)) { | ||
882 | X fprintf(stderr, "error: irq must be one of " | ||
883 | X "5, 7, 9, 10, 11 or 12\n"); | ||
884 | X usage(); | ||
885 | X } | ||
886 | X | ||
887 | X if (!(mem == 0xb0000 || | ||
888 | X mem == 0xc8000 || | ||
889 | X mem == 0xd0000 || | ||
890 | X mem == 0xd8000 || | ||
891 | X mem == 0xe0000 || | ||
892 | X mem == 0xe8000)) { | ||
893 | X fprintf(stderr, "error: mem must be one of " | ||
894 | X "0xb0000, 0xc8000, 0xd0000, 0xd8000, 0xe0000 or 0xe8000\n"); | ||
895 | X usage(); | ||
896 | X } | ||
897 | X | ||
898 | X return msnd_write_cfg_logical(config_port, 0, io, 0, irq, mem); | ||
899 | } | ||
900 | X | ||
901 | static int cfg_mpu(int argc, char *argv[]) | ||
902 | { | ||
903 | X int io, irq; | ||
904 | X | ||
905 | X if (argc < 2 || | ||
906 | X sscanf(argv[0], "0x%x", &io) != 1 || | ||
907 | X sscanf(argv[1], "%d", &irq) != 1) | ||
908 | X usage(); | ||
909 | X | ||
910 | X return msnd_write_cfg_logical(config_port, 1, io, 0, irq, 0); | ||
911 | } | ||
912 | X | ||
913 | static int cfg_ide(int argc, char *argv[]) | ||
914 | { | ||
915 | X int io0, io1, irq; | ||
916 | X | ||
917 | X if (argc < 3 || | ||
918 | X sscanf(argv[0], "0x%x", &io0) != 1 || | ||
919 | X sscanf(argv[0], "0x%x", &io1) != 1 || | ||
920 | X sscanf(argv[1], "%d", &irq) != 1) | ||
921 | X usage(); | ||
922 | X | ||
923 | X return msnd_write_cfg_logical(config_port, 2, io0, io1, irq, 0); | ||
924 | } | ||
925 | X | ||
926 | static int cfg_joystick(int argc, char *argv[]) | ||
927 | { | ||
928 | X int io; | ||
929 | X | ||
930 | X if (argc < 1 || | ||
931 | X sscanf(argv[0], "0x%x", &io) != 1) | ||
932 | X usage(); | ||
933 | X | ||
934 | X return msnd_write_cfg_logical(config_port, 3, io, 0, 0, 0); | ||
935 | } | ||
936 | X | ||
937 | int main(int argc, char *argv[]) | ||
938 | { | ||
939 | X char *device; | ||
940 | X int rv = 0; | ||
941 | X | ||
942 | X --argc; ++argv; | ||
943 | X | ||
944 | X if (argc < 2) | ||
945 | X usage(); | ||
946 | X | ||
947 | X sscanf(argv[0], "0x%x", &config_port); | ||
948 | X if (config_port != 0x250 && config_port != 0x260 && config_port != 0x270) { | ||
949 | X fprintf(stderr, "error: <config port> must be 0x250, 0x260 or 0x270\n"); | ||
950 | X exit(1); | ||
951 | X } | ||
952 | X if (ioperm(config_port, 2, 1)) { | ||
953 | X perror("ioperm"); | ||
954 | X fprintf(stderr, "note: pinnaclecfg must be run as root\n"); | ||
955 | X exit(1); | ||
956 | X } | ||
957 | X device = argv[1]; | ||
958 | X | ||
959 | X argc -= 2; argv += 2; | ||
960 | X | ||
961 | X if (strcmp(device, "reset") == 0) | ||
962 | X rv = cfg_reset(); | ||
963 | X else if (strcmp(device, "show") == 0) | ||
964 | X rv = cfg_show(); | ||
965 | X else if (strcmp(device, "dsp") == 0) | ||
966 | X rv = cfg_dsp(argc, argv); | ||
967 | X else if (strcmp(device, "mpu") == 0) | ||
968 | X rv = cfg_mpu(argc, argv); | ||
969 | X else if (strcmp(device, "ide") == 0) | ||
970 | X rv = cfg_ide(argc, argv); | ||
971 | X else if (strcmp(device, "joystick") == 0) | ||
972 | X rv = cfg_joystick(argc, argv); | ||
973 | X else { | ||
974 | X fprintf(stderr, "error: unknown device %s\n", device); | ||
975 | X usage(); | ||
976 | X } | ||
977 | X | ||
978 | X if (rv) | ||
979 | X fprintf(stderr, "error: device configuration failed\n"); | ||
980 | X | ||
981 | X return 0; | ||
982 | } | ||
983 | SHAR_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' | ||
991 | 366bdf27f0db767a3c7921d0a6db20fe MultiSound.d/pinnaclecfg.c | ||
992 | SHAR_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 | ||
998 | fi | ||
999 | # ============= MultiSound.d/Makefile ============== | ||
1000 | if test -f 'MultiSound.d/Makefile' && test "$first_param" != -c; then | ||
1001 | $echo 'x -' SKIPPING 'MultiSound.d/Makefile' '(file already exists)' | ||
1002 | else | ||
1003 | $echo 'x -' extracting 'MultiSound.d/Makefile' '(text)' | ||
1004 | sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/Makefile' && | ||
1005 | CC = gcc | ||
1006 | CFLAGS = -O | ||
1007 | PROGS = setdigital msndreset pinnaclecfg conv | ||
1008 | X | ||
1009 | all: $(PROGS) | ||
1010 | X | ||
1011 | clean: | ||
1012 | X rm -f $(PROGS) | ||
1013 | SHAR_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' | ||
1021 | 76ca8bb44e3882edcf79c97df6c81845 MultiSound.d/Makefile | ||
1022 | SHAR_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 | ||
1028 | fi | ||
1029 | # ============= MultiSound.d/conv.l ============== | ||
1030 | if test -f 'MultiSound.d/conv.l' && test "$first_param" != -c; then | ||
1031 | $echo 'x -' SKIPPING 'MultiSound.d/conv.l' '(file already exists)' | ||
1032 | else | ||
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 | \;.* | ||
1038 | DB | ||
1039 | [0-9A-Fa-f]+H { int n; sscanf(yytext, "%xH", &n); printf("%c", n); } | ||
1040 | %% | ||
1041 | int yywrap() { return 1; } | ||
1042 | main() { yylex(); } | ||
1043 | SHAR_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' | ||
1051 | d2411fc32cd71a00dcdc1f009e858dd2 MultiSound.d/conv.l | ||
1052 | SHAR_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 | ||
1058 | fi | ||
1059 | # ============= MultiSound.d/msndreset.c ============== | ||
1060 | if test -f 'MultiSound.d/msndreset.c' && test "$first_param" != -c; then | ||
1061 | $echo 'x -' SKIPPING 'MultiSound.d/msndreset.c' '(file already exists)' | ||
1062 | else | ||
1063 | $echo 'x -' extracting 'MultiSound.d/msndreset.c' '(text)' | ||
1064 | sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/msndreset.c' && | ||
1065 | /********************************************************************* | ||
1066 | X * | ||
1067 | X * msndreset.c - resets the MultiSound card | ||
1068 | X * | ||
1069 | X * Copyright (C) 1998 Andrew Veliath | ||
1070 | X * | ||
1071 | X * This program is free software; you can redistribute it and/or modify | ||
1072 | X * it under the terms of the GNU General Public License as published by | ||
1073 | X * the Free Software Foundation; either version 2 of the License, or | ||
1074 | X * (at your option) any later version. | ||
1075 | X * | ||
1076 | X * This program is distributed in the hope that it will be useful, | ||
1077 | X * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1078 | X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1079 | X * GNU General Public License for more details. | ||
1080 | X * | ||
1081 | X * You should have received a copy of the GNU General Public License | ||
1082 | X * along with this program; if not, write to the Free Software | ||
1083 | X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
1084 | X * | ||
1085 | X ********************************************************************/ | ||
1086 | X | ||
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> | ||
1094 | X | ||
1095 | int main(int argc, char *argv[]) | ||
1096 | { | ||
1097 | X int fd; | ||
1098 | X | ||
1099 | X if (argc != 2) { | ||
1100 | X fprintf(stderr, "usage: msndreset <mixer device>\n"); | ||
1101 | X exit(1); | ||
1102 | X } | ||
1103 | X | ||
1104 | X if ((fd = open(argv[1], O_RDWR)) < 0) { | ||
1105 | X perror(argv[1]); | ||
1106 | X exit(1); | ||
1107 | X } | ||
1108 | X | ||
1109 | X if (ioctl(fd, SOUND_MIXER_PRIVATE1, 0) < 0) { | ||
1110 | X fprintf(stderr, "error: msnd ioctl reset failed\n"); | ||
1111 | X perror("ioctl"); | ||
1112 | X close(fd); | ||
1113 | X exit(1); | ||
1114 | X } | ||
1115 | X | ||
1116 | X close(fd); | ||
1117 | X | ||
1118 | X return 0; | ||
1119 | } | ||
1120 | SHAR_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' | ||
1128 | c52f876521084e8eb25e12e01dcccb8a MultiSound.d/msndreset.c | ||
1129 | SHAR_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 | ||
1135 | fi | ||
1136 | rm -fr _sh01426 | ||
1137 | exit 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 @@ | |||
1 | Linux 2.4 Sound Changes | ||
2 | 2000-September-25 | ||
3 | Christoph Hellwig, <hch@infradead.org> | ||
4 | |||
5 | |||
6 | |||
7 | === isapnp support | ||
8 | |||
9 | The Linux 2.4 Kernel does have reliable in-kernel isapnp support. | ||
10 | Some drivers (sb.o, ad1816.o awe_wave.o) do now support automatically | ||
11 | detecting and configuring isapnp devices. | ||
12 | If you have a not yet supported isapnp soundcard, mail me the content | ||
13 | of '/proc/isapnp' on your system and some information about your card | ||
14 | and its driver(s) so I can try to get isapnp working for it. | ||
15 | |||
16 | |||
17 | |||
18 | === soundcard resources on kernel commandline | ||
19 | |||
20 | Before Linux 2.4 you had to specify the resources for sounddrivers | ||
21 | statically linked into the kernel at compile time | ||
22 | (in make config/menuconfig/xconfig). In Linux 2.4 the resources are | ||
23 | now specified at the boot-time kernel commandline (e.g. the lilo | ||
24 | 'append=' line or everything that's after the kernel name in grub). | ||
25 | Read the Configure.help entry for your card for the parameters. | ||
26 | |||
27 | |||
28 | === softoss is gone | ||
29 | |||
30 | In Linux 2.4 the softoss in-kernel software synthesizer is no more aviable. | ||
31 | Use a user space software synthesizer like timidity instead. | ||
32 | |||
33 | |||
34 | |||
35 | === /dev/sndstat and /proc/sound are gone | ||
36 | |||
37 | In older Linux versions those files exported some information about the | ||
38 | OSS/Free configuration to userspace. In Linux 2.3 they were removed because | ||
39 | they did not support the growing number of pci soundcards and there were | ||
40 | some 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 | ======================================================= | ||
2 | Documentation for the NeoMagic 256AV/256ZX sound driver | ||
3 | ======================================================= | ||
4 | |||
5 | You're looking at version 1.1 of the driver. (Woohoo!) It has been | ||
6 | successfully 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 | |||
12 | There are a few caveats, which is why you should read the entirety of | ||
13 | this document first. | ||
14 | |||
15 | This driver was developed without any support or assistance from | ||
16 | NeoMagic. There is no warranty, expressed, implied, or otherwise. It | ||
17 | is free software in the public domain; feel free to use it, sell it, | ||
18 | give it to your best friends, even claim that you wrote it (but why?!) | ||
19 | but don't go whining to me, NeoMagic, Sony, Dell, or anyone else | ||
20 | when it blows up your computer. | ||
21 | |||
22 | Version 1.1 contains a change to try and detect non-AC97 versions of | ||
23 | the hardware, and not install itself appropriately. It should also | ||
24 | reinitialize the hardware on an APM resume event, assuming that APM | ||
25 | was configured into your kernel. | ||
26 | |||
27 | ============ | ||
28 | Installation | ||
29 | ============ | ||
30 | |||
31 | Enable the sound drivers, the OSS sound drivers, and then the NM256 | ||
32 | driver. The NM256 driver *must* be configured as a module (it won't | ||
33 | give you any other choice). | ||
34 | |||
35 | Next, do the usual "make modules" and "make modules_install". | ||
36 | Finally, insmod the soundcore, sound and nm256 modules. | ||
37 | |||
38 | When the nm256 driver module is loaded, you should see a couple of | ||
39 | confirmation messages in the kernel logfile indicating that it found | ||
40 | the device (the device does *not* use any I/O ports or DMA channels). | ||
41 | Now try playing a wav file, futz with the CD-ROM if you have one, etc. | ||
42 | |||
43 | The NM256 is entirely a PCI-based device, and all the necessary | ||
44 | information is automatically obtained from the card. It can only be | ||
45 | configured as a module in a vain attempt to prevent people from | ||
46 | hurting themselves. It works correctly if it shares an IRQ with | ||
47 | another device (it normally shares IRQ 9 with the builtin eepro100 | ||
48 | ethernet on the Sony Z505 laptops). | ||
49 | |||
50 | It does not run the card in any sort of compatibility mode. It will | ||
51 | not work on laptops that have the SB16-compatible, AD1848-compatible | ||
52 | or CS4232-compatible codec/mixer; you will want to use the appropriate | ||
53 | compatible OSS driver with these chipsets. I cannot provide any | ||
54 | assistance with machines using the SB16, AD1848 or CS4232 compatible | ||
55 | versions. (The driver now attempts to detect the mixer version, and | ||
56 | will refuse to load if it believes the hardware is not | ||
57 | AC97-compatible.) | ||
58 | |||
59 | The sound support is very basic, but it does include simultaneous | ||
60 | playback and record capability. The mixer support is also quite | ||
61 | simple, although this is in keeping with the rather limited | ||
62 | functionality of the chipset. | ||
63 | |||
64 | There is no hardware synthesizer available, as the Losedows OPL-3 and | ||
65 | MIDI support is done via hardware emulation. | ||
66 | |||
67 | Only three recording devices are available on the Sony: the | ||
68 | microphone, the CD-ROM input, and the volume device (which corresponds | ||
69 | to the stereo output). (Other devices may be available on other | ||
70 | models of laptops.) The Z505 series does not have a builtin CD-ROM, | ||
71 | so of course the CD-ROM input doesn't work. It does work on laptops | ||
72 | with a builtin CD-ROM drive. | ||
73 | |||
74 | The mixer device does not appear to have any tone controls, at least | ||
75 | on the Z505 series. The mixer module checks for tone controls in the | ||
76 | AC97 mixer, and will enable them if they are available. | ||
77 | |||
78 | ============== | ||
79 | Known 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 | ============ | ||
112 | Video memory | ||
113 | ============ | ||
114 | |||
115 | The NeoMagic sound engine uses a portion of the display memory to hold | ||
116 | the sound buffer. (Crazy, eh?) The NeoMagic video BIOS sets up a | ||
117 | special pointer at the top of video RAM to indicate where the top of | ||
118 | the audio buffer should be placed. | ||
119 | |||
120 | At the present time XFree86 is apparently not aware of this. It will | ||
121 | thus write over either the pointer or the sound buffer with abandon. | ||
122 | (Accelerated-X seems to do a better job here.) | ||
123 | |||
124 | This 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 | |||
137 | If you start having problems with random noise being output either | ||
138 | constantly (this is the usual symptom on the F250), or when windows | ||
139 | are moved around (this is the usual symptom when using a virtual | ||
140 | screen), 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 | |||
146 | On the F250, it is possible to force the driver to load properly even | ||
147 | after the XFree86 server is started by doing: | ||
148 | |||
149 | insmod nm256 buffertop=0x25a800 | ||
150 | |||
151 | This forces the audio buffers to the correct offset in screen RAM. | ||
152 | |||
153 | One user has reported a similar problem on the Sony F270, although | ||
154 | others apparently aren't seeing any problems. His suggested command | ||
155 | is | ||
156 | |||
157 | insmod nm256 buffertop=0x272800 | ||
158 | |||
159 | ================= | ||
160 | Official WWW site | ||
161 | ================= | ||
162 | |||
163 | The official site for the NM256 driver is: | ||
164 | |||
165 | http://www.uglx.org/sony.html | ||
166 | |||
167 | You should always be able to get the latest version of the driver there, | ||
168 | and the driver will be supported for the foreseeable future. | ||
169 | |||
170 | ============== | ||
171 | Z505RX and IDE | ||
172 | ============== | ||
173 | |||
174 | There appears to be a problem with the IDE chipset on the Z505RX; one | ||
175 | of the symptoms is that sound playback periodically hangs (when the | ||
176 | disk is accessed). The user reporting the problem also reported that | ||
177 | enabling all of the IDE chipset workarounds in the kernel solved the | ||
178 | problem, tho obviously only one of them should be needed--if someone | ||
179 | can give me more details I would appreciate it. | ||
180 | |||
181 | ============================== | ||
182 | Z505S/Z505SX on-board Ethernet | ||
183 | ============================== | ||
184 | |||
185 | If you're using the on-board Ethernet Pro/100 ethernet support on the Z505 | ||
186 | series, I strongly encourage you to download the latest eepro100 driver from | ||
187 | Donald Becker's site: | ||
188 | |||
189 | ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/test/eepro100.c | ||
190 | |||
191 | There was a reported problem on the Z505SX that if the ethernet | ||
192 | interface is disabled and reenabled while the sound driver is loaded, | ||
193 | the machine would lock up. I have included a workaround that is | ||
194 | working satisfactorily. However, you may occasionally see a message | ||
195 | about "Releasing interrupts, over 1000 bad interrupts" which indicates | ||
196 | that the workaround is doing its job. | ||
197 | |||
198 | ================================== | ||
199 | PCMCIA and the Z505S/Z505SX/Z505DX | ||
200 | ================================== | ||
201 | |||
202 | There is also a known problem with the Sony Z505S and Z505SX hanging | ||
203 | if a PCMCIA card is inserted while the ethernet driver is loaded, or | ||
204 | in some cases if the laptop is suspended. This is caused by tons of | ||
205 | spurious IRQ 9s, probably generated from the PCMCIA or ACPI bridges. | ||
206 | |||
207 | There is currently no fix for the problem that works in every case. | ||
208 | The only known workarounds are to disable the ethernet interface | ||
209 | before inserting or removing a PCMCIA card, or with some cards | ||
210 | disabling the PCMCIA card before ejecting it will also help the | ||
211 | problem with the laptop hanging when the card is ejected. | ||
212 | |||
213 | One user has reported that setting the tcic's cs_irq to some value | ||
214 | other than 9 (like 11) fixed the problem. This doesn't work on my | ||
215 | Z505S, however--changing the value causes the cardmgr to stop seeing | ||
216 | card insertions and removals, cards don't seem to work correctly, and | ||
217 | I still get hangs if a card is inserted when the kernel is booted. | ||
218 | |||
219 | Using the latest ethernet driver and pcmcia package allows me to | ||
220 | insert an Adaptec 1480A SlimScsi card without the laptop hanging, | ||
221 | although I still have to shut down the card before ejecting or | ||
222 | powering down the laptop. However, similar experiments with a DE-660 | ||
223 | ethernet card still result in hangs when the card is inserted. I am | ||
224 | beginning to think that the interrupts are CardBus-related, since the | ||
225 | Adaptec card is a CardBus card, and the DE-660 is not; however, I | ||
226 | don't have any other CardBus cards to test with. | ||
227 | |||
228 | ====== | ||
229 | Thanks | ||
230 | ====== | ||
231 | |||
232 | First, I want to thank everyone (except NeoMagic of course) for their | ||
233 | generous support and encouragement. I'd like to list everyone's name | ||
234 | here that replied during the development phase, but the list is | ||
235 | amazingly long. | ||
236 | |||
237 | I 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 | ================= | ||
260 | Previous versions | ||
261 | ================= | ||
262 | |||
263 | Versions prior to 0.3 (aka `noname') had problems with weird artifacts | ||
264 | in the output and failed to set the recording rate properly. These | ||
265 | problems have long since been fixed. | ||
266 | |||
267 | Versions prior to 0.5 had problems with clicks in the output when | ||
268 | anything other than 16-bit stereo sound was being played, and also had | ||
269 | periodic clicks when recording. | ||
270 | |||
271 | Version 0.7 first incorporated support for the NM256ZX chipset, which | ||
272 | is found on some Dell Latitude laptops (the CPt, and apparently | ||
273 | some CPi models as well). It also included the generic AC97 | ||
274 | mixer module. | ||
275 | |||
276 | Version 0.75 renamed all the functions and files with slightly more | ||
277 | generic names. | ||
278 | |||
279 | Note that previous versions of this document claimed that recording was | ||
280 | 8-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 @@ | |||
1 | A pure OPL3 card is nice and easy to configure. Simply do | ||
2 | |||
3 | insmod opl3 io=0x388 | ||
4 | |||
5 | Change the I/O address in the very unlikely case this card is differently | ||
6 | configured | ||
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 @@ | |||
1 | OPL3-SA1 sound driver (opl3sa.o) | ||
2 | |||
3 | --- | ||
4 | Note: This howto only describes how to setup the OPL3-SA1 chip; this info | ||
5 | does not apply to the SA2, SA3, or SA4. | ||
6 | --- | ||
7 | |||
8 | The Yamaha OPL3-SA1 sound chip is usually found built into motherboards, and | ||
9 | it's a decent little chip offering a WSS mode, a SB Pro emulation mode, MPU401 | ||
10 | and OPL3 FM Synth capabilities. | ||
11 | |||
12 | You can enable inclusion of the driver via CONFIG_SOUND_OPL3SA1=m, or | ||
13 | CONFIG_SOUND_OPL3SA1=y through 'make config/xconfig/menuconfig'. | ||
14 | |||
15 | You'll need to know all of the relevant info (irq, dma, and io port) for the | ||
16 | chip's WSS mode, since that is the mode the kernel sound driver uses, and of | ||
17 | course you'll also need to know about where the MPU401 and OPL3 ports and | ||
18 | IRQs are if you want to use those. | ||
19 | |||
20 | Here'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 | |||
24 | Module 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 | |||
36 | If you'd like to use the OPL3 FM Synthesizer, make sure you enable | ||
37 | CONFIG_SOUND_YM3812 (in 'make config'). That'll build the opl3.o module. | ||
38 | |||
39 | Then a simple 'insmod opl3 io=0x388', and you now have FM Synth. | ||
40 | |||
41 | You can also use the SoftOSS software synthesizer instead of the builtin OPL3. | ||
42 | Here's how: | ||
43 | |||
44 | Say 'y' or 'm' to "SoftOSS software wave table engine" in make config. | ||
45 | |||
46 | If you said yes, the software synth is available once you boot your new | ||
47 | kernel. | ||
48 | |||
49 | If you chose to build it as a module, just insmod the resulting softoss2.o | ||
50 | |||
51 | Questions? 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 @@ | |||
1 | Documentation for the OPL3-SA2, SA3, and SAx driver (opl3sa2.o) | ||
2 | --------------------------------------------------------------- | ||
3 | |||
4 | Scott Murray, scott@spiteful.org | ||
5 | January 7, 2001 | ||
6 | |||
7 | NOTE: All trade-marked terms mentioned below are properties of their | ||
8 | respective owners. | ||
9 | |||
10 | |||
11 | Supported Devices | ||
12 | ----------------- | ||
13 | |||
14 | This driver is for PnP soundcards based on the following Yamaha audio | ||
15 | controller chipsets: | ||
16 | |||
17 | YMF711 aka OPL3-SA2 | ||
18 | YMF715 and YMF719 aka OPL3-SA3 | ||
19 | |||
20 | Up until recently (December 2000), I'd thought the 719 to be a | ||
21 | different chipset, the OPL3-SAx. After an email exhange with | ||
22 | Yamaha, however, it turns out that the 719 is just a re-badged | ||
23 | 715, and the chipsets are identical. The chipset detection code | ||
24 | has been updated to reflect this. | ||
25 | |||
26 | Anyways, all of these chipsets implement the following devices: | ||
27 | |||
28 | OPL3 FM synthesizer | ||
29 | Soundblaster Pro | ||
30 | Microsoft/Windows Sound System | ||
31 | MPU401 MIDI interface | ||
32 | |||
33 | Note that this driver uses the MSS device, and to my knowledge these | ||
34 | chipsets enforce an either/or situation with the Soundblaster Pro | ||
35 | device and the MSS device. Since the MSS device has better | ||
36 | capabilities, I have implemented the driver to use it. | ||
37 | |||
38 | |||
39 | Mixer Channels | ||
40 | -------------- | ||
41 | |||
42 | Older versions of this driver (pre-December 2000) had two mixers, | ||
43 | an OPL3-SA2 or SA3 mixer and a MSS mixer. The OPL3-SA[23] mixer | ||
44 | device contained a superset of mixer channels consisting of its own | ||
45 | channels and all of the MSS mixer channels. To simplify the driver | ||
46 | considerably, and to partition functionality better, the OPL3-SA[23] | ||
47 | mixer device now contains has its own specific mixer channels. They | ||
48 | are: | ||
49 | |||
50 | Volume - Hardware master volume control | ||
51 | Bass - SA3 only, now supports left and right channels | ||
52 | Treble - SA3 only, now supports left and right channels | ||
53 | Microphone - Hardware microphone input volume control | ||
54 | Digital1 - Yamaha 3D enhancement "Wide" mixer | ||
55 | |||
56 | All other mixer channels (e.g. "PCM", "CD", etc.) now have to be | ||
57 | controlled via the "MS Sound System (CS4231)" mixer. To facilitate | ||
58 | this, the mixer device creation order has been switched so that | ||
59 | the MSS mixer is created first. This allows accessing the majority | ||
60 | of the useful mixer channels even via single mixer-aware tools | ||
61 | such as "aumix". | ||
62 | |||
63 | |||
64 | Plug 'n Play | ||
65 | ------------ | ||
66 | |||
67 | In previous kernels (2.2.x), some configuration was required to | ||
68 | get the driver to talk to the card. Being the new millennium and | ||
69 | all, the 2.4.x kernels now support auto-configuration if ISA PnP | ||
70 | support is configured in. Theoretically, the driver even supports | ||
71 | having more than one card in this case. | ||
72 | |||
73 | With the addition of PnP support to the driver, two new parameters | ||
74 | have been added to control it: | ||
75 | |||
76 | isapnp - set to 0 to disable ISA PnP card detection | ||
77 | |||
78 | multiple - set to 0 to disable multiple PnP card detection | ||
79 | |||
80 | |||
81 | Optional Parameters | ||
82 | ------------------- | ||
83 | |||
84 | Recent (December 2000) additions to the driver (based on a patch | ||
85 | provided by Peter Englmaier) are two new parameters: | ||
86 | |||
87 | ymode - 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 | |||
93 | loopback - Set A/D input source. Useful for echo cancellation: | ||
94 | 0 = Mic Right channel (default) | ||
95 | 1 = Mono output loopback | ||
96 | |||
97 | The ymode parameter has been tested and does work. The loopback | ||
98 | parameter, however, is untested. Any feedback on its usefulness | ||
99 | would be appreciated. | ||
100 | |||
101 | |||
102 | Manual Configuration | ||
103 | -------------------- | ||
104 | |||
105 | If for some reason you decide not to compile ISA PnP support into | ||
106 | your kernel, or disabled the driver's usage of it by setting the | ||
107 | isapnp parameter as discussed above, then you will need to do some | ||
108 | manual configuration. There are two ways of doing this. The most | ||
109 | common is to use the isapnptools package to initialize the card, and | ||
110 | use the kernel module form of the sound subsystem and sound drivers. | ||
111 | Alternatively, some BIOS's allow manual configuration of installed | ||
112 | PnP devices in a BIOS menu, which should allow using the non-modular | ||
113 | sound drivers, i.e. built into the kernel. | ||
114 | |||
115 | I personally use isapnp and modules, and do not have access to a PnP | ||
116 | BIOS machine to test. If you have such a beast, configuring the | ||
117 | driver to be built into the kernel should just work (thanks to work | ||
118 | done by David Luyer <luyer@ucs.uwa.edu.au>). You will still need | ||
119 | to specify settings, which can be done by adding: | ||
120 | |||
121 | opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio> | ||
122 | |||
123 | to the kernel command line. For example: | ||
124 | |||
125 | opl3sa2=0x370,5,0,1,0x530,0x330 | ||
126 | |||
127 | If you are instead using the isapnp tools (as most people have been | ||
128 | before Linux 2.4.x), follow the directions in their documentation to | ||
129 | produce a configuration file. Here is the relevant excerpt I used to | ||
130 | use 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 | |||
144 | Here, note that: | ||
145 | |||
146 | Port Acceptable Range Purpose | ||
147 | ---- ---------------- ------- | ||
148 | IO 0 0x0220 - 0x0280 SB base address, unused. | ||
149 | IO 1 0x0530 - 0x0F48 MSS base address | ||
150 | IO 2 0x0388 - 0x03F8 OPL3 base address | ||
151 | IO 3 0x0300 - 0x0334 MPU base address | ||
152 | IO 4 0x0100 - 0x0FFE card's own base address for its control I/O ports | ||
153 | |||
154 | The IRQ and DMA values can be any that are considered acceptable for a | ||
155 | MSS. Assuming you've got isapnp all happy, then you should be able to | ||
156 | do something like the following (which matches up with the isapnp | ||
157 | configuration above): | ||
158 | |||
159 | modprobe mpu401 | ||
160 | modprobe ad1848 | ||
161 | modprobe opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=5 dma=0 dma2=1 | ||
162 | modprobe opl3 io=0x388 | ||
163 | |||
164 | See the section "Automatic Module Loading" below for how to set up | ||
165 | /etc/modprobe.conf to automate this. | ||
166 | |||
167 | An important thing to remember that the opl3sa2 module's io argument is | ||
168 | for it's own control port, which handles the card's master mixer for | ||
169 | volume (on all cards), and bass and treble (on SA3 cards). | ||
170 | |||
171 | |||
172 | Troubleshooting | ||
173 | --------------- | ||
174 | |||
175 | If all goes well and you see no error messages, you should be able to | ||
176 | start using the sound capabilities of your system. If you get an | ||
177 | error message while trying to insert the opl3sa2 module, then make | ||
178 | sure that the values of the various arguments match what you specified | ||
179 | in your isapnp configuration file, and that there is no conflict with | ||
180 | another 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 | ||
182 | butting heads with another device. | ||
183 | |||
184 | If you still cannot get the module to load, look at the contents of | ||
185 | your system log file, usually /var/log/messages. If you see the | ||
186 | message "opl3sa2: Unknown Yamaha audio controller version", then you | ||
187 | have a different chipset version than I've encountered so far. Look | ||
188 | for all messages in the log file that start with "opl3sa2: " and see | ||
189 | if they provide any clues. If you do not see the chipset version | ||
190 | message, and none of the other messages present in the system log are | ||
191 | helpful, email me some details and I'll try my best to help. | ||
192 | |||
193 | |||
194 | Automatic Module Loading | ||
195 | ------------------------ | ||
196 | |||
197 | Lastly, if you're using modules and want to set up automatic module | ||
198 | loading with kmod, the kernel module loader, here is the section I | ||
199 | currently use in my modprobe.conf file: | ||
200 | |||
201 | # Sound | ||
202 | alias sound-slot-0 opl3sa2 | ||
203 | options opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=7 dma=0 dma2=3 | ||
204 | options opl3 io=0x388 | ||
205 | |||
206 | That's all it currently takes to get an OPL3-SA3 card working on my | ||
207 | system. Once again, if you have any other problems, email me at the | ||
208 | address listed above. | ||
209 | |||
210 | Scott | ||
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 @@ | |||
1 | Support for the OPTi 82C931 chip | ||
2 | -------------------------------- | ||
3 | Note: parts of this README file apply also to other | ||
4 | cards that use the mad16 driver. | ||
5 | |||
6 | Some items in this README file are based on features | ||
7 | added to the sound driver after Linux-2.1.91 was out. | ||
8 | By the time of writing this I do not know which official | ||
9 | kernel release will include these features. | ||
10 | Please do not report inconsistencies on older Linux | ||
11 | kernels. | ||
12 | |||
13 | The OPTi 82C931 is supported in its non-PnP mode. | ||
14 | Usually you do not need to set jumpers, etc. The sound driver | ||
15 | will check the card status and if it is required it will | ||
16 | force the card into a mode in which it can be programmed. | ||
17 | |||
18 | If you have another OS installed on your computer it is recommended | ||
19 | that Linux and the other OS use the same resources. | ||
20 | |||
21 | Also, it is recommended that resources specified in /etc/modprobe.conf | ||
22 | and resources specified in /etc/isapnp.conf agree. | ||
23 | |||
24 | Compiling the sound driver | ||
25 | -------------------------- | ||
26 | I highly recommend that you build a modularized sound driver. | ||
27 | This document does not cover a sound-driver which is built in | ||
28 | the kernel. | ||
29 | |||
30 | Sound card support should be enabled as a module (chose m). | ||
31 | Answer '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 | |||
37 | The configuration menu may ask for addresses, IRQ lines or DMA | ||
38 | channels. If the card is used as a module the module loading | ||
39 | options will override these values. | ||
40 | |||
41 | For the OPTi 931 you can answer 'n' to: | ||
42 | Support MIDI in older MAD16 based cards (requires SB) (CONFIG_SOUND_MAD16_OLDCARD) | ||
43 | If you do need MIDI support in a Mozart or C928 based card you | ||
44 | need to answer 'm' to the above question. In that case you will | ||
45 | also need to answer 'm' to: | ||
46 | '100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support' (CONFIG_SOUND_SB) | ||
47 | |||
48 | Go on and compile your kernel and modules. Install the modules. Run depmod -a. | ||
49 | |||
50 | Using isapnptools | ||
51 | ----------------- | ||
52 | In most systems with a PnP BIOS you do not need to use isapnp. The | ||
53 | initialization provided by the BIOS is sufficient for the driver | ||
54 | to pick up the card and continue initialization. | ||
55 | |||
56 | If that fails, or if you have other PnP cards, you need to use isapnp | ||
57 | to initialize the card. | ||
58 | This was tested with isapnptools-1.11 but I recommend that you use | ||
59 | isapnptools-1.13 (or newer). Run pnpdump to dump the information | ||
60 | about your PnP cards. Then edit the resulting file and select | ||
61 | the options of your choice. This file is normally installed as | ||
62 | /etc/isapnp.conf. | ||
63 | |||
64 | The driver has one limitation with respect to I/O port resources: | ||
65 | IO3 base must be 0x0E0C. Although isapnp allows other ports, this | ||
66 | address is hard-coded into the driver. | ||
67 | |||
68 | Using kmod and autoloading the sound driver | ||
69 | ------------------------------------------- | ||
70 | Comment: as of linux-2.1.90 kmod is replacing kerneld. | ||
71 | The config file '/etc/modprobe.conf' is used as before. | ||
72 | |||
73 | This is the sound part of my /etc/modprobe.conf file. | ||
74 | Following that I will explain each line. | ||
75 | |||
76 | alias mixer0 mad16 | ||
77 | alias audio0 mad16 | ||
78 | alias midi0 mad16 | ||
79 | alias synth0 opl3 | ||
80 | options sb mad16=1 | ||
81 | options mad16 irq=10 dma=0 dma16=1 io=0x530 joystick=1 cdtype=0 | ||
82 | options opl3 io=0x388 | ||
83 | install mad16 /sbin/modprobe -i mad16 && /sbin/ad1848_mixer_reroute 14 8 15 3 16 6 | ||
84 | |||
85 | If you have an MPU daughtercard or onboard MPU you will want to add to the | ||
86 | "options mad16" line - eg | ||
87 | |||
88 | options mad16 irq=5 dma=0 dma16=3 io=0x530 mpu_io=0x330 mpu_irq=9 | ||
89 | |||
90 | To set the I/O and IRQ of the MPU. | ||
91 | |||
92 | |||
93 | Explain: | ||
94 | |||
95 | alias mixer0 mad16 | ||
96 | alias audio0 mad16 | ||
97 | alias midi0 mad16 | ||
98 | alias synth0 opl3 | ||
99 | |||
100 | When any sound device is opened the kernel requests auto-loading | ||
101 | of char-major-14. There is a built-in alias that translates this | ||
102 | request to loading the main sound module. | ||
103 | |||
104 | The sound module in its turn will request loading of a sub-driver | ||
105 | for mixer, audio, midi or synthesizer device. The first 3 are | ||
106 | supported by the mad16 driver. The synth device is supported | ||
107 | by the opl3 driver. | ||
108 | |||
109 | There is currently no way to autoload the sound device driver | ||
110 | if more than one card is installed. | ||
111 | |||
112 | options sb mad16=1 | ||
113 | |||
114 | This is left for historical reasons. If you enable the | ||
115 | config option 'Support MIDI in older MAD16 based cards (requires SB)' | ||
116 | or if you use an older mad16 driver it will force loading of the | ||
117 | SoundBlaster driver. This option tells the SB driver not to look | ||
118 | for a SB card but to wait for the mad16 driver. | ||
119 | |||
120 | options mad16 irq=10 dma=0 dma16=1 io=0x530 joystick=1 cdtype=0 | ||
121 | options opl3 io=0x388 | ||
122 | |||
123 | post-install mad16 /sbin/ad1848_mixer_reroute 14 8 15 3 16 6 | ||
124 | |||
125 | This sets resources and options for the mad16 and opl3 drivers. | ||
126 | I use two DMA channels (only one is required) to enable full duplex. | ||
127 | joystick=1 enables the joystick port. cdtype=0 disables the cd port. | ||
128 | You can also set mpu_io and mpu_irq in the mad16 options for the | ||
129 | uart401 driver. | ||
130 | |||
131 | This tells modprobe to run /sbin/ad1848_mixer_reroute after | ||
132 | mad16 is successfully loaded and initialized. The source | ||
133 | for ad1848_mixer_reroute is appended to the end of this readme | ||
134 | file. It is impossible for the sound driver to know the actual | ||
135 | connections to the mixer. The 3 inputs intended for cd, synth | ||
136 | and line-in are mapped to the generic inputs line1, line2 and | ||
137 | line3. This program reroutes these mixer channels to their | ||
138 | right names (note the right mapping depends on the actual sound | ||
139 | card that you use). | ||
140 | The 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. | ||
144 | For reference on other input names look at the file | ||
145 | /usr/include/linux/soundcard.h. | ||
146 | |||
147 | Using a joystick | ||
148 | ----------------- | ||
149 | You must enable a joystick in the mad16 options. (also | ||
150 | in /etc/isapnp.conf if you use it). | ||
151 | Tested with regular analog joysticks. | ||
152 | |||
153 | A CDROM drive connected to the sound card | ||
154 | ----------------------------------------- | ||
155 | The 82C931 chip has support only for secondary ATAPI cdrom. | ||
156 | (cdtype=8). Loading the mad16 driver resets the C931 chip | ||
157 | and if a cdrom was already mounted it may cause a complete | ||
158 | system hang. Do not use the sound card if you have an alternative. | ||
159 | If you do use the sound card it is important that you load | ||
160 | the mad16 driver (use "modprobe mad16" to prevent auto-unloading) | ||
161 | before the cdrom is accessed the first time. | ||
162 | |||
163 | Using the sound driver built-in to the kernel may help here, but... | ||
164 | Most new systems have a PnP BIOS and also two IDE controllers. | ||
165 | The IDE controller on the sound card may be needed only on older | ||
166 | systems (which have only one IDE controller) but these systems | ||
167 | also do not have a PnP BIOS - requiring isapnptools and a modularized | ||
168 | driver. | ||
169 | |||
170 | Known problems | ||
171 | -------------- | ||
172 | 1. See the section on "A CDROM drive connected to the sound card". | ||
173 | |||
174 | 2. 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 | |||
181 | Source for ad1848_mixer_reroute.c | ||
182 | --------------------------------- | ||
183 | #include <stdio.h> | ||
184 | #include <fcntl.h> | ||
185 | #include <linux/soundcard.h> | ||
186 | |||
187 | static char *mixer_names[SOUND_MIXER_NRDEVICES] = | ||
188 | SOUND_DEVICE_LABELS; | ||
189 | |||
190 | int | ||
191 | main(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 @@ | |||
1 | Pro Audio Spectrum 16 for 2.3.99 and later | ||
2 | ========================================= | ||
3 | by Thomas Molina (tmolina@home.com) | ||
4 | last modified 3 Mar 2001 | ||
5 | Acknowledgement to Axel Boldt (boldt@math.ucsb.edu) for stuff taken | ||
6 | from Configure.help, Riccardo Facchetti for stuff from README.OSS, | ||
7 | and others whose names I could not find. | ||
8 | |||
9 | This documentation is relevant for the PAS16 driver (pas2_card.c and | ||
10 | friends) under kernel version 2.3.99 and later. If you are | ||
11 | unfamiliar with configuring sound under Linux, please read the | ||
12 | Sound-HOWTO, Documentation/sound/oss/Introduction and other | ||
13 | relevant docs first. | ||
14 | |||
15 | The following information is relevant information from README.OSS | ||
16 | and legacy docs for the Pro Audio Spectrum 16 (PAS16): | ||
17 | ================================================================== | ||
18 | |||
19 | The pas2_card.c driver supports the following cards -- | ||
20 | Pro 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 | |||
27 | The sound driver configuration dialog | ||
28 | ------------------------------------- | ||
29 | |||
30 | Sound configuration starts by making some yes/no questions. Be careful | ||
31 | when answering to these questions since answering y to a question may | ||
32 | prevent some later ones from being asked. For example don't answer y to | ||
33 | the question about (PAS16) if you don't really have a PAS16. Sound | ||
34 | configuration may also be made modular by answering m to configuration | ||
35 | options presented. | ||
36 | |||
37 | Note also that all questions may not be asked. The configuration program | ||
38 | may disable some questions depending on the earlier choices. It may also | ||
39 | select 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 | |||
56 | With 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 | |||
61 | The new stuff for 2.3.99 and later | ||
62 | ============================================================================ | ||
63 | The following configuration options from Documentation/Configure.help | ||
64 | are relevant to configuring the PAS16: | ||
65 | |||
66 | Sound card support | ||
67 | CONFIG_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 | |||
80 | OSS sound modules | ||
81 | CONFIG_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 | |||
88 | Persistent DMA buffers | ||
89 | CONFIG_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 | |||
103 | ProAudioSpectrum 16 support | ||
104 | CONFIG_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 | |||
115 | FM Synthesizer (YM3812/OPL-3) support | ||
116 | CONFIG_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 | |||
138 | EXAMPLES | ||
139 | =================================================================== | ||
140 | To use the PAS16 in my computer I have enabled the following sound | ||
141 | configuration options: | ||
142 | |||
143 | CONFIG_SOUND=y | ||
144 | CONFIG_SOUND_OSS=y | ||
145 | CONFIG_SOUND_TRACEINIT=y | ||
146 | CONFIG_SOUND_DMAP=y | ||
147 | CONFIG_SOUND_PAS=y | ||
148 | CONFIG_SOUND_SB=n | ||
149 | CONFIG_SOUND_YM3812=m | ||
150 | |||
151 | I have also included the following append line in /etc/lilo.conf: | ||
152 | append="pas2=0x388,10,3,-1,0x220,5,1,-1 sb=0x220,5,1,-1 opl3=0x388" | ||
153 | |||
154 | The io address of 0x388 is default configuration on the PAS16. The | ||
155 | irq of 10 and dma of 3 may not match your installation. The above | ||
156 | configuration enables PAS16, 8-bit Soundblaster and OPL3 | ||
157 | functionality. If Soundblaster functionality is not desired, the | ||
158 | following line would be appropriate: | ||
159 | append="pas2=0x388,10,3,-1,0,-1,-1,-1 opl3=0x388" | ||
160 | |||
161 | If sound is built totally modular, the above options may be | ||
162 | specified in /etc/modprobe.conf for pas2, sb and opl3 | ||
163 | respectively. | ||
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 @@ | |||
1 | The PSS cards and other ECHO based cards provide an onboard DSP with | ||
2 | downloadable programs and also has an AD1848 "Microsoft Sound System" | ||
3 | device. The PSS driver enables MSS and MPU401 modes of the card. SB | ||
4 | is not enabled since it doesn't work concurrently with MSS. | ||
5 | |||
6 | If you build this driver as a module then the driver takes the following | ||
7 | parameters | ||
8 | |||
9 | pss_io. The I/O base the PSS card is configured at (normally 0x220 | ||
10 | or 0x240) | ||
11 | |||
12 | mss_io The base address of the Microsoft Sound System interface. | ||
13 | This is normally 0x530, but may be 0x604 or other addresses. | ||
14 | |||
15 | mss_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 | |||
20 | mss_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 | |||
24 | mpu_io The MPU emulation base address. This sets the base of the | ||
25 | synthesizer. It is typically 0x330 but can be altered. | ||
26 | |||
27 | mpu_irq The interrupt to use for the synthesizer. It must differ | ||
28 | from the IRQ used by the Microsoft Sound System port. | ||
29 | |||
30 | |||
31 | The mpu_io/mpu_irq fields are optional. If they are not specified the | ||
32 | synthesizer parts are not configured. | ||
33 | |||
34 | When 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. | ||
36 | This fil holds a general MIDI emulation. The file expected is called | ||
37 | genmidi.ld on newer DOS driver install disks and synth.ld on older ones. | ||
38 | |||
39 | You can also load alternative DSP algorithms into the card if you wish. One | ||
40 | alternative 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 | ||
2 | newly added features of the newest version of this driver. | ||
3 | |||
4 | The major enhancements present in this new revision of this driver is the | ||
5 | addition of two new module parameters that allow you to take full advantage of | ||
6 | all the features present on your PSS sound card. These features include the | ||
7 | ability to enable both the builtin CDROM and joystick ports. | ||
8 | |||
9 | pss_enable_joystick | ||
10 | |||
11 | This parameter is basically a flag. A 0 will leave the joystick port | ||
12 | disabled, while a non-zero value would enable the joystick port. The default | ||
13 | setting is pss_enable_joystick=0 as this keeps this driver fully compatible | ||
14 | with systems that were using previous versions of this driver. If you wish to | ||
15 | enable the joystick port you will have to add pss_enable_joystick=1 as an | ||
16 | argument to the driver. To actually use the joystick port you will then have | ||
17 | to load the joystick driver itself. Just remember to load the joystick driver | ||
18 | AFTER the pss sound driver. | ||
19 | |||
20 | pss_cdrom_port | ||
21 | |||
22 | This parameter takes a port address as its parameter. Any available port | ||
23 | address can be specified to enable the CDROM port, except for 0x0 and -1 as | ||
24 | these values would leave the port disabled. Like the joystick port, the cdrom | ||
25 | port will require that an appropriate CDROM driver be loaded before you can make | ||
26 | use of the newly enabled CDROM port. Like the joystick port option above, | ||
27 | remember to load the CDROM driver AFTER the pss sound driver. While it may | ||
28 | differ on some PSS sound cards, all the PSS sound cards that I have seen have a | ||
29 | builtin Wearnes CDROM port. If this is the case with your PSS sound card you | ||
30 | should load aztcd with the appropriate port option that matches the port you | ||
31 | assigned to the CDROM port when you loaded your pss sound driver. (ex. | ||
32 | modprobe pss pss_cdrom_port=0x340 && modprobe aztcd aztcd=0x340) The default | ||
33 | setting of this parameter leaves the CDROM port disabled to maintain full | ||
34 | compatibility with systems using previous versions of this driver. | ||
35 | |||
36 | Other options have also been added for the added convenience and utility | ||
37 | of the user. These options are only available if this driver is loaded as a | ||
38 | module. | ||
39 | |||
40 | pss_no_sound | ||
41 | |||
42 | This module parameter is a flag that can be used to tell the driver to | ||
43 | just configure non-sound components. 0 configures all components, a non-0 | ||
44 | value will only attept to configure the CDROM and joystick ports. This | ||
45 | parameter can be used by a user who only wished to use the builtin joystick | ||
46 | and/or CDROM port(s) of his PSS sound card. If this driver is loaded with this | ||
47 | parameter and with the parameter below set to true then a user can safely unload | ||
48 | this driver with the following command "rmmod pss && rmmod ad1848 && rmmod | ||
49 | mpu401 && rmmod sound && rmmod soundcore" and retain the full functionality of | ||
50 | his CDROM and/or joystick port(s) while gaining back the memory previously used | ||
51 | by the sound drivers. This default setting of this parameter is 0 to retain | ||
52 | full behavioral compatibility with previous versions of this driver. | ||
53 | |||
54 | pss_keep_settings | ||
55 | |||
56 | This parameter can be used to specify whether you want the driver to reset | ||
57 | all emulations whenever its unloaded. This can be useful for those who are | ||
58 | sharing resources (io ports, IRQ's, DMA's) between different ISA cards. This | ||
59 | flag can also be useful in that future versions of this driver may reset all | ||
60 | emulations by default on the driver's unloading (as it probably should), so | ||
61 | specifying it now will ensure that all future versions of this driver will | ||
62 | continue to work as expected. The default value of this parameter is 1 to | ||
63 | retain full behavioral compatibility with previous versions of this driver. | ||
64 | |||
65 | pss_firmware | ||
66 | |||
67 | This parameter can be used to specify the file containing the firmware | ||
68 | code so that a user could tell the driver where that file is located instead | ||
69 | of having to put it in a predefined location with a predefined name. The | ||
70 | default setting of this parameter is "/etc/sound/pss_synth" as this was the | ||
71 | path and filename the hardcoded value in the previous versions of this driver. | ||
72 | |||
73 | Examples: | ||
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 @@ | |||
1 | Introduction | ||
2 | ------------ | ||
3 | |||
4 | This file is a collection of all the old Readme files distributed with | ||
5 | OSS/Lite by Hannu Savolainen. Since the new Linux sound driver is founded | ||
6 | on it I think these information may still be interesting for users that | ||
7 | have to configure their sound system. | ||
8 | |||
9 | Be warned: Alan Cox is the current maintainer of the Linux sound driver so if | ||
10 | you have problems with it, please contact him or the current device-specific | ||
11 | driver maintainer (e.g. for aedsp16 specific problems contact me). If you have | ||
12 | patches, contributions or suggestions send them to Alan: I'm sure they are | ||
13 | welcome. | ||
14 | |||
15 | In this document you will find a lot of references about OSS/Lite or ossfree: | ||
16 | they are gone forever. Keeping this in mind and with a grain of salt this | ||
17 | document 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 | |||
22 | OSS/Free version 3.8 release notes | ||
23 | ---------------------------------- | ||
24 | |||
25 | Please read the SOUND-HOWTO (available from sunsite.unc.edu and other Linux FTP | ||
26 | sites). It gives instructions about using sound with Linux. It's bit out of | ||
27 | date but still very useful. Information about bug fixes and such things | ||
28 | is available from the web page (see above). | ||
29 | |||
30 | Please check http://www.opensound.com/pguide for more info about programming | ||
31 | with OSS API. | ||
32 | |||
33 | ==================================================== | ||
34 | - THIS VERSION ____REQUIRES____ Linux 2.1.57 OR LATER. | ||
35 | ==================================================== | ||
36 | |||
37 | Packages "snd-util-3.8.tar.gz" and "snd-data-0.1.tar.Z" | ||
38 | contain useful utilities to be used with this driver. | ||
39 | See http://www.opensound.com/ossfree/getting.html for | ||
40 | download instructions. | ||
41 | |||
42 | If you are looking for the installation instructions, please | ||
43 | look forward into this document. | ||
44 | |||
45 | Supported sound cards | ||
46 | --------------------- | ||
47 | |||
48 | See below. | ||
49 | |||
50 | Contributors | ||
51 | ------------ | ||
52 | |||
53 | This driver contains code by several contributors. In addition several other | ||
54 | persons have given useful suggestions. The following is a list of major | ||
55 | contributors. (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 | |||
90 | There are probably many other names missing. If you have sent me some | ||
91 | patches and your name is not in the above list, please inform me. | ||
92 | |||
93 | Sending your contributions or patches | ||
94 | ------------------------------------- | ||
95 | |||
96 | First of all it's highly recommended to contact me before sending anything | ||
97 | or before even starting to do any work. Tell me what you suggest to be | ||
98 | changed or what you have planned to do. Also ensure you are using the | ||
99 | very latest (development) version of OSS/Free since the change may already be | ||
100 | implemented there. In general it's a major waste of time to try to improve a | ||
101 | several months old version. Information about the latest version can be found | ||
102 | from http://www.opensound.com/ossfree. In general there is no point in | ||
103 | sending me patches relative to production kernels. | ||
104 | |||
105 | Sponsors etc. | ||
106 | ------------- | ||
107 | |||
108 | The following companies have greatly helped development of this driver | ||
109 | in form of a free copy of their product: | ||
110 | |||
111 | Novell, Inc. UnixWare personal edition + SDK | ||
112 | The Santa Cruz Operation, Inc. A SCO OpenServer + SDK | ||
113 | Ensoniq Corp, a SoundScape card and extensive amount of assistance | ||
114 | MediaTrix Peripherals Inc, a AudioTrix Pro card + SDK | ||
115 | Acer, Inc. a pair of AcerMagic S23 cards. | ||
116 | |||
117 | In addition the following companies have provided me sufficient amount | ||
118 | of technical information at least some of their products (free or $$$): | ||
119 | |||
120 | Advanced Gravis Computer Technology Ltd. | ||
121 | Media Vision Inc. | ||
122 | Analog Devices Inc. | ||
123 | Logitech Inc. | ||
124 | Aztech Labs Inc. | ||
125 | Crystal Semiconductor Corporation, | ||
126 | Integrated Circuit Systems Inc. | ||
127 | OAK Technology | ||
128 | OPTi | ||
129 | Turtle Beach | ||
130 | miro | ||
131 | Ad Lib Inc. ($$) | ||
132 | Music Quest Inc. ($$) | ||
133 | Creative Labs ($$$) | ||
134 | |||
135 | If you have some problems | ||
136 | ========================= | ||
137 | |||
138 | Read the sound HOWTO (sunsite.unc.edu:/pub/Linux/docs/...?). | ||
139 | Also look at the home page (http://www.opensound.com/ossfree). It may | ||
140 | contain info about some recent bug fixes. | ||
141 | |||
142 | It's likely that you have some problems when trying to use the sound driver | ||
143 | first time. Sound cards don't have standard configuration so there are no | ||
144 | good default configuration to use. Please try to use same I/O, DMA and IRQ | ||
145 | values for the sound card than with DOS. | ||
146 | |||
147 | If you get an error message when trying to use the driver, please look | ||
148 | at /var/adm/messages for more verbose error message. | ||
149 | |||
150 | |||
151 | The 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 | |||
169 | Linux installation | ||
170 | ================== | ||
171 | |||
172 | IMPORTANT! 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 | |||
201 | Boot time configuration (using lilo and insmod) | ||
202 | ----------------------------------------------- | ||
203 | |||
204 | This information has been removed. Too many users didn't believe | ||
205 | that it's really not necessary to use this method. Please look at | ||
206 | Readme of sound driver version 3.0.1 if you still want to use this method. | ||
207 | |||
208 | Problems | ||
209 | -------- | ||
210 | |||
211 | Common error messages: | ||
212 | |||
213 | - /dev/???????: No such file or directory. | ||
214 | Run the script at the end of this file. | ||
215 | |||
216 | - /dev/???????: No such device. | ||
217 | You are not running kernel which contains the sound driver. When using | ||
218 | modularized sound driver this error means that the sound driver is not | ||
219 | loaded. | ||
220 | |||
221 | - /dev/????: No such device or address. | ||
222 | Sound driver didn't detect suitable card when initializing. Please look at | ||
223 | Readme.cards for info about configuring the driver with your card. Also | ||
224 | check for possible boot (insmod) time error messages in /var/adm/messages. | ||
225 | |||
226 | - Other messages or problems | ||
227 | Please check http://www.opensound.com/ossfree for more info. | ||
228 | |||
229 | Configuring version 3.8 (for Linux) with some common sound cards | ||
230 | ================================================================ | ||
231 | |||
232 | This document describes configuring sound cards with the freeware version of | ||
233 | Open Sound Systems (OSS/Free). Information about the commercial version | ||
234 | (OSS/Linux) and its configuration is available from | ||
235 | http://www.opensound.com/linux.html. Information presented here is | ||
236 | not valid for OSS/Linux. | ||
237 | |||
238 | If you are unsure about how to configure OSS/Free | ||
239 | you can download the free evaluation version of OSS/Linux from the above | ||
240 | address. There is a chance that it can autodetect your sound card. In this case | ||
241 | you can use the information included in soundon.log when configuring OSS/Free. | ||
242 | |||
243 | |||
244 | IMPORTANT! 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 | |||
255 | THE BIGGEST MISTAKES YOU CAN MAKE | ||
256 | ================================= | ||
257 | |||
258 | 1. Assuming that the card is Sound Blaster compatible when it's not. | ||
259 | -------------------------------------------------------------------- | ||
260 | |||
261 | The number one mistake is to assume that your card is compatible with | ||
262 | Sound Blaster. Only the cards made by Creative Technology or which have | ||
263 | one or more chips labeled by Creative are SB compatible. In addition there | ||
264 | are few sound chipsets which are SB compatible in Linux such as ESS1688 or | ||
265 | Jazz16. Note that SB compatibility in DOS/Windows does _NOT_ mean anything | ||
266 | in Linux. | ||
267 | |||
268 | IF YOU REALLY ARE 150% SURE YOU HAVE A SOUND BLASTER YOU CAN SKIP THE REST OF | ||
269 | THIS CHAPTER. | ||
270 | |||
271 | For most other "supposed to be SB compatible" cards you have to use other | ||
272 | than SB drivers (see below). It is possible to get most sound cards to work | ||
273 | in SB mode but in general it's a complete waste of time. There are several | ||
274 | problems which you will encounter by using SB mode with cards that are not | ||
275 | truly SB compatible: | ||
276 | |||
277 | - The SB emulation is at most SB Pro (DSP version 3.x) which means that | ||
278 | you get only 8 bit audio (there is always an another ("native") mode which | ||
279 | gives the 16 bit capability). The 8 bit only operation is the reason why | ||
280 | many users claim that sound quality in Linux is much worse than in DOS. | ||
281 | In addition some applications require 16 bit mode and they produce just | ||
282 | noise with a 8 bit only device. | ||
283 | - The card may work only in some cases but refuse to work most of the | ||
284 | time. The SB compatible mode always requires special initialization which is | ||
285 | done by the DOS/Windows drivers. This kind of cards work in Linux after | ||
286 | you 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 | ||
289 | software selectable IRQ and DMA settings. If the (power on default) values | ||
290 | currently used by the card don't match configuration of the driver you will | ||
291 | get the above error message whenever you try to record or play. There are | ||
292 | few other reasons to the DMA timeout message but using the SB mode seems | ||
293 | to be the most common cause. | ||
294 | |||
295 | 2. Trying to use a PnP (Plug & Play) card just like an ordinary sound card | ||
296 | -------------------------------------------------------------------------- | ||
297 | |||
298 | Plug & Play is a protocol defined by Intel and Microsoft. It lets operating | ||
299 | systems to easily identify and reconfigure I/O ports, IRQs and DMAs of ISA | ||
300 | cards. 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 | ||
302 | to use some special tricks (see later) to get a PnP card alive. Many PnP cards | ||
303 | work after they have been initialized but this is not always the case. | ||
304 | |||
305 | There are sometimes both PnP and non-PnP versions of the same sound card. | ||
306 | The non-PnP version is the original model which usually has been discontinued | ||
307 | more than an year ago. The PnP version has the same name but with "PnP" | ||
308 | appended to it (sometimes not). This causes major confusion since the non-PnP | ||
309 | model works with Linux but the PnP one doesn't. | ||
310 | |||
311 | You should carefully check if "Plug & Play" or "PnP" is mentioned in the name | ||
312 | of the card or in the documentation or package that came with the card. | ||
313 | Everything described in the rest of this document is not necessarily valid for | ||
314 | PnP models of sound cards even you have managed to wake up the card properly. | ||
315 | Many PnP cards are simply too different from their non-PnP ancestors which are | ||
316 | covered by this document. | ||
317 | |||
318 | |||
319 | Cards that are not (fully) supported by this driver | ||
320 | =================================================== | ||
321 | |||
322 | See http://www.opensound.com/ossfree for information about sound cards | ||
323 | to be supported in future. | ||
324 | |||
325 | |||
326 | How to use sound without recompiling kernel and/or sound driver | ||
327 | =============================================================== | ||
328 | |||
329 | There is a commercial sound driver which comes in precompiled form and doesn't | ||
330 | require recompiling of the kernel. See http://www.4Front-tech.com/oss.html for | ||
331 | more info. | ||
332 | |||
333 | |||
334 | Configuring PnP cards | ||
335 | ===================== | ||
336 | |||
337 | New versions of most sound cards use the so-called ISA PnP protocol for | ||
338 | soft configuring their I/O, IRQ, DMA and shared memory resources. | ||
339 | Currently at least cards made by Creative Technology (SB32 and SB32AWE | ||
340 | PnP), Gravis (GUS PnP and GUS PnP Pro), Ensoniq (Soundscape PnP) and | ||
341 | Aztech (some Sound Galaxy models) use PnP technology. The CS4232/4236 audio | ||
342 | chip by Crystal Semiconductor (Intel Atlantis, HP Pavilion and many other | ||
343 | motherboards) is also based on PnP technology but there is a "native" driver | ||
344 | available for it (see information about CS4232 later in this document). | ||
345 | |||
346 | PnP sound cards (as well as most other PnP ISA cards) are not supported | ||
347 | by this version of the driver . Proper | ||
348 | support for them should be released during 97 once the kernel level | ||
349 | PnP support is available. | ||
350 | |||
351 | There is a method to get most of the PnP cards to work. The basic method | ||
352 | is the following: | ||
353 | |||
354 | 1) Boot DOS so the card's DOS drivers have a chance to initialize it. | ||
355 | 2) _Cold_ boot to Linux by using "loadlin.exe". Hitting ctrl-alt-del | ||
356 | works with older machines but causes a hard reset of all cards on recent | ||
357 | (Pentium) machines. | ||
358 | 3) If you have the sound driver in Linux configured properly, the card should | ||
359 | work now. "Proper" means that I/O, IRQ and DMA settings are the same as in | ||
360 | DOS. The hard part is to find which settings were used. See the documentation of | ||
361 | your card for more info. | ||
362 | |||
363 | Windows 95 could work as well as DOS but running loadlin may be difficult. | ||
364 | Probably you should "shut down" your machine to MS-DOS mode before running it. | ||
365 | |||
366 | Some machines have a BIOS utility for setting PnP resources. This is a good | ||
367 | way to configure some cards. In this case you don't need to boot DOS/Win95 | ||
368 | before starting Linux. | ||
369 | |||
370 | Another way to initialize PnP cards without DOS/Win95 is a Linux based | ||
371 | PnP isolation tool. When writing this there is a pre alpha test version | ||
372 | of such a tool available from ftp://ftp.demon.co.uk/pub/unix/linux/utils. The | ||
373 | file is called isapnptools-*. Please note that this tool is just a temporary | ||
374 | solution which may be incompatible with future kernel versions having proper | ||
375 | support for PnP cards. There are bugs in setting DMA channels in earlier | ||
376 | versions of isapnptools so at least version 1.6 is required with sound cards. | ||
377 | |||
378 | Yet another way to use PnP cards is to use (commercial) OSS/Linux drivers. See | ||
379 | http://www.opensound.com/linux.html for more info. This is probably the way you | ||
380 | should do it if you don't want to spend time recompiling the kernel and | ||
381 | required tools. | ||
382 | |||
383 | |||
384 | Read this before trying to configure the driver | ||
385 | =============================================== | ||
386 | |||
387 | There are currently many cards that work with this driver. Some of the cards | ||
388 | have native support while others work since they emulate some other | ||
389 | card (usually SB, MSS/WSS and/or MPU401). The following cards have native | ||
390 | support in the driver. Detailed instructions for configuring these cards | ||
391 | will be given later in this document. | ||
392 | |||
393 | Pro 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 | |||
400 | Media 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 | |||
406 | Sound 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 | |||
449 | Gravis 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 | |||
456 | MPU-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 | |||
466 | Windows 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 | |||
484 | Yamaha 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 | |||
506 | Yamaha 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 | |||
519 | 4Front 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 | |||
565 | PSS 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 | |||
578 | MediaTrix 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 | |||
583 | Ensoniq 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 | |||
594 | OPTi 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 | |||
612 | Audio 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 | |||
618 | Crystal 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 | |||
630 | Turtle 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 | |||
640 | Jumpers and software configuration | ||
641 | ================================== | ||
642 | |||
643 | Some of the earliest sound cards were jumper configurable. You have to | ||
644 | configure the driver use I/O, IRQ and DMA settings | ||
645 | that match the jumpers. Just few 8 bit cards are fully jumper | ||
646 | configurable (SB 1.x/2.x, SB Pro and clones). | ||
647 | Some cards made by Aztech have an EEPROM which contains the | ||
648 | config info. These cards behave much like hardware jumpered cards. | ||
649 | |||
650 | Most cards have jumper for the base I/O address but other parameters | ||
651 | are software configurable. Sometimes there are few other jumpers too. | ||
652 | |||
653 | Latest cards are fully software configurable or they are PnP ISA | ||
654 | compatible. There are no jumpers on the board. | ||
655 | |||
656 | The driver handles software configurable cards automatically. Just configure | ||
657 | the driver to use I/O, IRQ and DMA settings which are known to work. | ||
658 | You could usually use the same values than with DOS and/or Windows. | ||
659 | Using different settings is possible but not recommended since it may cause | ||
660 | some trouble (for example when warm booting from an OS to another or | ||
661 | when installing new hardware to the machine). | ||
662 | |||
663 | Sound driver sets the soft configurable parameters of the card automatically | ||
664 | during boot. Usually you don't need to run any extra initialization | ||
665 | programs when booting Linux but there are some exceptions. See the | ||
666 | card-specific instructions below for more info. | ||
667 | |||
668 | The drawback of software configuration is that the driver needs to know | ||
669 | how the card must be initialized. It cannot initialize unknown cards | ||
670 | even if they are otherwise compatible with some other cards (like SB, | ||
671 | MPU401 or Windows Sound System). | ||
672 | |||
673 | |||
674 | What if your card was not listed above? | ||
675 | ======================================= | ||
676 | |||
677 | The first thing to do is to look at the major IC chips on the card. | ||
678 | Many of the latest sound cards are based on some standard chips. If you | ||
679 | are lucky, all of them could be supported by the driver. The most common ones | ||
680 | are the OPTi MAD16, Mozart, SoundScape (Ensoniq) and the PSS architectures | ||
681 | listed above. Also look at the end of this file for list of unsupported | ||
682 | cards and the ones which could be supported later. | ||
683 | |||
684 | The last resort is to send _exact_ name and model information of the card | ||
685 | to me together with a list of the major IC chips (manufactured, model) to | ||
686 | me. I could then try to check if your card looks like something familiar. | ||
687 | |||
688 | There are many more cards in the world than listed above. The first thing to | ||
689 | do with these cards is to check if they emulate some other card or interface | ||
690 | such as SB, MSS and/or MPU401. In this case there is a chance to get the | ||
691 | card to work by booting DOS before starting Linux (boot DOS, hit ctrl-alt-del | ||
692 | and boot Linux without hard resetting the machine). In this method the | ||
693 | DOS based driver initializes the hardware to use known I/O, IRQ and DMA | ||
694 | settings. If sound driver is configured to use the same settings, everything | ||
695 | should work OK. | ||
696 | |||
697 | |||
698 | Configuring sound driver (with Linux) | ||
699 | ===================================== | ||
700 | |||
701 | The sound driver is currently distributed as part of the Linux kernel. The | ||
702 | files 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 | |||
720 | To 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 | ||
723 | about options for sound will then be asked. | ||
724 | |||
725 | After configuring the kernel and sound driver and compile the kernel | ||
726 | following instructions in the kernel README. | ||
727 | |||
728 | The sound driver configuration dialog | ||
729 | ------------------------------------- | ||
730 | |||
731 | Sound configuration starts by making some yes/no questions. Be careful | ||
732 | when answering to these questions since answering y to a question may | ||
733 | prevent some later ones from being asked. For example don't answer y to | ||
734 | the first question (PAS16) if you don't really have a PAS16. Don't enable | ||
735 | more cards than you really need since they just consume memory. Also | ||
736 | some drivers (like MPU401) may conflict with your SCSI controller and | ||
737 | prevent kernel from booting. If you card was in the list of supported | ||
738 | cards (above), please look at the card specific config instructions | ||
739 | (later in this file) before starting to configure. Some cards must be | ||
740 | configured in way which is not obvious. | ||
741 | |||
742 | So here is the beginning of the config dialog. Answer 'y' or 'n' to these | ||
743 | questions. 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 | ||
745 | since using the default _doesn't_ guarantee anything. | ||
746 | |||
747 | Note also that all questions may not be asked. The configuration program | ||
748 | may disable some questions depending on the earlier choices. It may also | ||
749 | select 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 | |||
856 | Then the configuration program asks some y/n questions about the higher | ||
857 | level services. It's recommended to answer 'y' to each of these questions. | ||
858 | Answer '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 | |||
869 | Entering the I/O, IRQ and DMA config parameters | ||
870 | ----------------------------------------------- | ||
871 | |||
872 | After the above questions the configuration program prompts for the | ||
873 | card specific configuration information. Usually just a set of | ||
874 | I/O address, IRQ and DMA numbers are asked. With some cards the program | ||
875 | asks for some files to be used during initialization of the card. For example | ||
876 | many cards have a DSP chip or microprocessor which must be initialized by | ||
877 | downloading a program (microcode) file to the card. | ||
878 | |||
879 | Instructions for answering these questions are given in the next section. | ||
880 | |||
881 | |||
882 | Card specific information | ||
883 | ========================= | ||
884 | |||
885 | This section gives additional instructions about configuring some cards. | ||
886 | Please refer manual of your card for valid I/O, IRQ and DMA numbers. Using | ||
887 | the same settings with DOS/Windows and Linux is recommended. Using | ||
888 | different values could cause some problems when switching between | ||
889 | different operating systems. | ||
890 | |||
891 | Sound Blasters (the original ones by Creative) | ||
892 | --------------------------------------------- | ||
893 | |||
894 | NOTE! 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 | |||
898 | It's possible to configure these cards to use different I/O, IRQ and | ||
899 | DMA settings. Since the possible/default settings have changed between various | ||
900 | models, you have to consult manual of your card for the proper ones. It's | ||
901 | a good idea to use the same values than with DOS/Windows. With SB and SB Pro | ||
902 | it's the only choice. SB16 has software selectable IRQ and DMA channels but | ||
903 | using different values with DOS and Linux is likely to cause troubles. The | ||
904 | DOS driver is not able to reset the card properly after warm boot from Linux | ||
905 | if Linux has used different IRQ or DMA values. | ||
906 | |||
907 | The original (steam) Sound Blaster (versions 1.x and 2.x) use always | ||
908 | DMA1. There is no way to change it. | ||
909 | |||
910 | The SB16 needs two DMA channels. A 8 bit one (1 or 3) is required for | ||
911 | 8 bit operation and a 16 bit one (5, 6 or 7) for the 16 bit mode. In theory | ||
912 | it's possible to use just one (8 bit) DMA channel by answering the 8 bit | ||
913 | one when the configuration program asks for the 16 bit one. This may work | ||
914 | in some systems but is likely to cause terrible noise on some other systems. | ||
915 | |||
916 | It's possible to use two SB16/32/64 at the same time. To do this you should | ||
917 | first configure OSS/Free for one card. Then edit local.h manually and define | ||
918 | SB2_BASE, SB2_IRQ, SB2_DMA and SB2_DMA2 for the second one. You can't get | ||
919 | the OPL3, MIDI and EMU8000 devices of the second card to work. If you are | ||
920 | going to use two PnP Sound Blasters, ensure that they are of different model | ||
921 | and have different PnP IDs. There is no way to get two cards with the same | ||
922 | card ID and serial number to work. The easiest way to check this is trying | ||
923 | if isapnptools can see both cards or just one. | ||
924 | |||
925 | NOTE! 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 | |||
929 | SB Clones | ||
930 | --------- | ||
931 | |||
932 | First of all: There are no SB16 clones. There are SB Pro clones with a | ||
933 | 16 bit mode which is not SB16 compatible. The most likely alternative is that | ||
934 | the 16 bit mode means MSS/WSS. | ||
935 | |||
936 | There are just a few fully 100% hardware SB or SB Pro compatible cards. | ||
937 | I know just Thunderboard and SM Games. Other cards require some kind of | ||
938 | hardware initialization before they become SB compatible. Check if your card | ||
939 | was listed in the beginning of this file. In this case you should follow | ||
940 | instructions for your card later in this file. | ||
941 | |||
942 | For other not fully SB clones you may try initialization using DOS in | ||
943 | the 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 | |||
951 | If your card is both SB and MSS compatible, I recommend using the MSS mode. | ||
952 | Most cards of this kind are not able to work in the SB and the MSS mode | ||
953 | simultaneously. Using the MSS mode provides 16 bit recording and playback. | ||
954 | |||
955 | ProAudioSpectrum 16 and compatibles | ||
956 | ----------------------------------- | ||
957 | |||
958 | PAS16 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 | ||
960 | the driver to have SB support too (this has been changed since version | ||
961 | 3.5-beta9 of this driver). | ||
962 | |||
963 | With current driver versions it's also possible to use PAS16 together with | ||
964 | another SB compatible card. In this case you should configure SB support | ||
965 | for the other card and to disable the SB emulation of PAS16 (there is a | ||
966 | separate questions about this). | ||
967 | |||
968 | With 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 | |||
972 | Gravis Ultrasound | ||
973 | ----------------- | ||
974 | |||
975 | There are many different revisions of the Ultrasound card (GUS). The | ||
976 | earliest ones (pre 3.7) don't have a hardware mixer. With these cards | ||
977 | the driver uses a software emulation for synth and pcm playbacks. It's | ||
978 | also possible to switch some of the inputs (line in, mic) off by setting | ||
979 | mixer volume of the channel level below 10%. For recording you have | ||
980 | to select the channel as a recording source and to use volume above 10%. | ||
981 | |||
982 | GUS 3.7 has a hardware mixer. | ||
983 | |||
984 | GUS MAX and the 16 bit sampling daughtercard have a CS4231 codec chip which | ||
985 | also contains a mixer. | ||
986 | |||
987 | Configuring GUS is simple. Just enable the GUS support and GUS MAX or | ||
988 | the 16 bit daughtercard if you have them. Note that enabling the daughter | ||
989 | card disables GUS MAX driver. | ||
990 | |||
991 | NOTE for owners of the 16 bit daughtercard: By default the daughtercard | ||
992 | uses /dev/dsp (and /dev/audio). Command "ln -sf /dev/dsp1 /dev/dsp" | ||
993 | selects the daughter card as the default device. | ||
994 | |||
995 | With just the standard GUS enabled the configuration program prompts | ||
996 | for the I/O, IRQ and DMA numbers for the card. Use the same values than | ||
997 | with DOS. | ||
998 | |||
999 | With the daughter card option enabled you will be prompted for the I/O, | ||
1000 | IRQ and DMA numbers for the daughter card. You have to use different I/O | ||
1001 | and DMA values than for the standard GUS. The daughter card permits | ||
1002 | simultaneous recording and playback. Use /dev/dsp (the daughtercard) for | ||
1003 | recording and /dev/dsp1 (GUS GF1) for playback. | ||
1004 | |||
1005 | GUS 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. | ||
1007 | Using two DMA channels permits simultaneous playback using two devices | ||
1008 | (dev/dsp0 and /dev/dsp1). The second DMA channel is required for | ||
1009 | full duplex audio. | ||
1010 | To enable the second DMA channels, give a valid DMA channel when the config | ||
1011 | program asks for the GUS MAX DMA (entering -1 disables the second DMA). | ||
1012 | Using 16 bit DMA channels (5,6 or 7) is recommended. | ||
1013 | |||
1014 | If you have problems in recording with GUS MAX, you could try to use | ||
1015 | just one 8 bit DMA channel. Recording will not work with one DMA | ||
1016 | channel if it's a 16 bit one. | ||
1017 | |||
1018 | Microphone input of GUS MAX is connected to mixer in little bit nonstandard | ||
1019 | way. There is actually two microphone volume controls. Normal "mic" controls | ||
1020 | only recording level. Mixer control "speaker" is used to control volume of | ||
1021 | microphone signal connected directly to line/speaker out. So just decrease | ||
1022 | volume of "speaker" if you have problems with microphone feedback. | ||
1023 | |||
1024 | GUS ACE works too but any attempt to record or to use the MIDI port | ||
1025 | will fail. | ||
1026 | |||
1027 | GUS PnP (with RAM) is partially supported but it needs to be initialized using | ||
1028 | DOS or isapnptools before starting the driver. | ||
1029 | |||
1030 | MPU401 and Windows Sound System | ||
1031 | ------------------------------- | ||
1032 | |||
1033 | Again. Don't enable these options in case your card is listed | ||
1034 | somewhere else in this file. | ||
1035 | |||
1036 | Configuring these cards is obvious (or it should be). With MSS | ||
1037 | you should probably enable the OPL3 synth also since | ||
1038 | most MSS compatible cards have it. However check that this is true | ||
1039 | before enabling OPL3. | ||
1040 | |||
1041 | Sound driver supports more than one MPU401 compatible cards at the same time | ||
1042 | but the config program asks config info for just the first of them. | ||
1043 | Adding the second or third MPU interfaces must be done manually by | ||
1044 | editing sound/local.h (after running the config program). Add defines for | ||
1045 | MPU2_BASE & MPU2_IRQ (and MPU3_BASE & MPU3_IRQ) to the file. | ||
1046 | |||
1047 | CAUTION! | ||
1048 | |||
1049 | The default I/O base of Adaptec AHA-1542 SCSI controller is 0x330 which | ||
1050 | is also the default of the MPU401 driver. Don't configure the sound driver to | ||
1051 | use 0x330 as the MPU401 base if you have a AHA1542. The kernel will not boot | ||
1052 | if you make this mistake. | ||
1053 | |||
1054 | PSS | ||
1055 | --- | ||
1056 | |||
1057 | Even the PSS cards are compatible with SB, MSS and MPU401, you must not | ||
1058 | enable these options when configuring the driver. The configuration | ||
1059 | program handles these options itself. (You may use the SB, MPU and MSS options | ||
1060 | together with PSS if you have another card on the system). | ||
1061 | |||
1062 | The PSS driver enables MSS and MPU401 modes of the card. SB is not enabled | ||
1063 | since it doesn't work concurrently with MSS. The driver loads also a | ||
1064 | DSP algorithm which is used to for the general MIDI emulation. The | ||
1065 | algorithm file (.ld) is read by the config program and written to a | ||
1066 | file included when the pss.c is compiled. For this reason the config | ||
1067 | program asks if you want to download the file. Use the genmidi.ld file | ||
1068 | distributed with the DOS/Windows drivers of the card (don't use the mt32.ld). | ||
1069 | With some cards the file is called 'synth.ld'. You must have access to | ||
1070 | the file when configuring the driver. The easiest way is to mount the DOS | ||
1071 | partition containing the file with Linux. | ||
1072 | |||
1073 | It's possible to load your own DSP algorithms and run them with the card. | ||
1074 | Look at the directory pss_test of snd-util-3.0.tar.gz for more info. | ||
1075 | |||
1076 | AudioTrix Pro | ||
1077 | ------------- | ||
1078 | |||
1079 | You have to enable the OPL3 and SB (not SB Pro or SB16) drivers in addition | ||
1080 | to the native AudioTrix driver. Don't enable MSS or MPU drivers. | ||
1081 | |||
1082 | Configuring ATP is little bit tricky since it uses so many I/O, IRQ and | ||
1083 | DMA numbers. Using the same values than with DOS/Win is a good idea. Don't | ||
1084 | attempt to use the same IRQ or DMA channels twice. | ||
1085 | |||
1086 | The SB mode of ATP is implemented so the ATP driver just enables SB | ||
1087 | in the proper address. The SB driver handles the rest. You have to configure | ||
1088 | both the SB driver and the SB mode of ATP to use the same IRQ, DMA and I/O | ||
1089 | settings. | ||
1090 | |||
1091 | Also the ATP has a microcontroller for the General MIDI emulation (OPL4). | ||
1092 | For this reason the driver asks for the name of a file containing the | ||
1093 | microcode (TRXPRO.HEX). This file is usually located in the directory | ||
1094 | where the DOS drivers were installed. You must have access to this file | ||
1095 | when configuring the driver. | ||
1096 | |||
1097 | If you have the effects daughtercard, it must be initialized by running | ||
1098 | the setfx program of snd-util-3.0.tar.gz package. This step is not required | ||
1099 | when using the (future) binary distribution version of the driver. | ||
1100 | |||
1101 | Ensoniq SoundScape | ||
1102 | ------------------ | ||
1103 | |||
1104 | NOTE! 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 | |||
1109 | The SoundScape driver handles initialization of MSS and MPU supports | ||
1110 | itself 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 | |||
1129 | The configuration program asks one DMA channel and two interrupts. One IRQ | ||
1130 | and one DMA is used by the MSS codec. The second IRQ is required for the | ||
1131 | MPU401 mode (you have to use different IRQs for both purposes). | ||
1132 | There were earlier two DMA channels for SoundScape but the current driver | ||
1133 | version requires just one. | ||
1134 | |||
1135 | The SoundScape card has a Motorola microcontroller which must initialized | ||
1136 | _after_ boot (the driver doesn't initialize it during boot). | ||
1137 | The initialization is done by running the 'ssinit' program which is | ||
1138 | distributed in the snd-util-3.0.tar.gz package. You have to edit two | ||
1139 | defines in the ssinit.c and then compile the program. You may run ssinit | ||
1140 | manually (after each boot) or add it to /etc/rc.d/rc.local. | ||
1141 | |||
1142 | The ssinit program needs the microcode file that comes with the DOS/Windows | ||
1143 | driver of the card. You will need to use version 1.30.00 or later | ||
1144 | of the microcode file (sndscape.co0 or sndscape.co1 depending on | ||
1145 | your card model). THE OLD sndscape.cod WILL NOT WORK. IT WILL HANG YOUR | ||
1146 | MACHINE. The only way to get the new microcode file is to download | ||
1147 | and install the DOS/Windows driver from ftp://ftp.ensoniq.com/pub. | ||
1148 | |||
1149 | Then you have to select the proper microcode file to use: soundscape.co0 | ||
1150 | is the right one for most cards and sndscape.co1 is for few (older) cards | ||
1151 | made by Reveal and/or Spea. The driver has capability to detect the card | ||
1152 | version during boot. Look at the boot log messages in /var/adm/messages | ||
1153 | and locate the sound driver initialization message for the SoundScape | ||
1154 | card. If the driver displays string <Ensoniq Soundscape (old)>, you have | ||
1155 | an old card and you will need to use sndscape.co1. For other cards use | ||
1156 | soundscape.co0. New Soundscape revisions such as Elite and PnP use | ||
1157 | code files with higher numbers (.co2, .co3, etc.). | ||
1158 | |||
1159 | NOTE! 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 | |||
1163 | Check /var/adm/messages after running ssinit. The driver prints | ||
1164 | the board version after downloading the microcode file. That version | ||
1165 | number must match the number in the name of the microcode file (extension). | ||
1166 | |||
1167 | Running ssinit with a wrong version of the sndscape.co? file is not | ||
1168 | dangerous as long as you don't try to use a file called sndscape.cod. | ||
1169 | If you have initialized the card using a wrong microcode file (sounds | ||
1170 | are terrible), just modify ssinit.c to use another microcode file and try | ||
1171 | again. It's possible to use an earlier version of sndscape.co[01] but it | ||
1172 | may sound weird. | ||
1173 | |||
1174 | MAD16 (Pro) and Mozart | ||
1175 | ---------------------- | ||
1176 | |||
1177 | You need to enable just the MAD16 /Mozart support when configuring | ||
1178 | the driver. _Don't_ enable SB, MPU401 or MSS. However you will need the | ||
1179 | /dev/audio, /dev/sequencer and MIDI supports. | ||
1180 | |||
1181 | Mozart and OPTi 82C928 (the original MAD16) chips don't support | ||
1182 | MPU401 mode so enter just 0 when the configuration program asks the | ||
1183 | MPU/MIDI I/O base. The MAD16 Pro (OPTi 82C929) and 82C930 chips have MPU401 | ||
1184 | mode. | ||
1185 | |||
1186 | TB Tropez is based on the 82C929 chip. It has two MIDI ports. | ||
1187 | The one connected to the MAD16 chip is the second one (there is a second | ||
1188 | MIDI connector/pins somewhere??). If you have not connected the second MIDI | ||
1189 | port, just disable the MIDI port of MAD16. The 'Maui' compatible synth of | ||
1190 | Tropez is jumper configurable and not connected to the MAD16 chip (the | ||
1191 | Maui driver can be used with it). | ||
1192 | |||
1193 | Some MAD16 based cards may cause feedback, whistle or terrible noise if the | ||
1194 | line3 mixer channel is turned too high. This happens at least with Shuttle | ||
1195 | Sound System. Current driver versions set volume of line3 low enough so | ||
1196 | this should not be a problem. | ||
1197 | |||
1198 | If you have a MAD16 card which have an OPL4 (FM + Wave table) synthesizer | ||
1199 | chip (_not_ an OPL3), you have to append a line containing #define MAD16_OPL4 | ||
1200 | to the file linux/drivers/sound/local.h (after running make config). | ||
1201 | |||
1202 | MAD16 cards having a CS4231 codec support full duplex mode. This mode | ||
1203 | can be enabled by configuring the card to use two DMA channels. Possible | ||
1204 | DMA channel pairs are: 0&1, 1&0 and 3&0. | ||
1205 | |||
1206 | NOTE! Cards having an OPTi 82C924/82C925 chip work with OSS/Free only in | ||
1207 | non-PnP mode (usually jumper selectable). The PnP mode is supported only | ||
1208 | by OSS/Linux. | ||
1209 | |||
1210 | MV Jazz (ProSonic) | ||
1211 | ------------------ | ||
1212 | |||
1213 | The Jazz16 driver is just a hack made to the SB Pro driver. However it works | ||
1214 | fairly well. You have to enable SB, SB Pro (_not_ SB16) and MPU401 supports | ||
1215 | when configuring the driver. The configuration program asks later if you | ||
1216 | want 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 | |||
1219 | The Jazz16 driver uses the MPU401 driver in a way which will cause | ||
1220 | problems if you have another MPU401 compatible card. In this case you must | ||
1221 | give address of the Jazz16 based MPU401 interface when the config | ||
1222 | program prompts for the MPU401 information. Then look at the MPU401 | ||
1223 | specific section for instructions about configuring more than one MPU401 cards. | ||
1224 | |||
1225 | Logitech Soundman Wave | ||
1226 | ---------------------- | ||
1227 | |||
1228 | Read the above MV Jazz specific instructions first. | ||
1229 | |||
1230 | The Logitech SoundMan Wave (don't confuse this with the SM16 or SM Games) is | ||
1231 | a MV Jazz based card which has an additional OPL4 based wave table | ||
1232 | synthesizer. The OPL4 chip is handled by an on board microcontroller | ||
1233 | which must be initialized during boot. The config program asks if | ||
1234 | you have a SM Wave immediately after asking the second DMA channel of jazz16. | ||
1235 | If you answer 'y', the config program will ask name of the file containing | ||
1236 | code to be loaded to the microcontroller. The file is usually called | ||
1237 | MIDI0001.BIN and it's located in the DOS/Windows driver directory. The file | ||
1238 | may also be called as TSUNAMI.BIN or something else (older cards?). | ||
1239 | |||
1240 | The OPL4 synth will be inaccessible without loading the microcontroller code. | ||
1241 | |||
1242 | Also 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 | ||
1244 | versions (pre 3.5-alpha8)). | ||
1245 | |||
1246 | NOTE! 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 | |||
1250 | Sound Galaxies | ||
1251 | -------------- | ||
1252 | |||
1253 | There are many different Sound Galaxy cards made by Aztech. The 8 bit | ||
1254 | ones are fully SB or SB Pro compatible and there should be no problems | ||
1255 | with them. | ||
1256 | |||
1257 | The older 16 bit cards (SG Pro16, SG NX Pro16, Nova and Lyra) have | ||
1258 | an EEPROM chip for storing the configuration data. There is a microcontroller | ||
1259 | which initializes the card to match the EEPROM settings when the machine | ||
1260 | is powered on. These cards actually behave just like they have jumpers | ||
1261 | for all of the settings. Configure driver for MSS, MPU, SB/SB Pro and OPL3 | ||
1262 | supports with these cards. | ||
1263 | |||
1264 | There are some new Sound Galaxies in the market. I have no experience with | ||
1265 | them so read the card's manual carefully. | ||
1266 | |||
1267 | ESS ES1688 and ES688 'AudioDrive' based cards | ||
1268 | --------------------------------------------- | ||
1269 | |||
1270 | Support for these two ESS chips is embedded in the SB driver. | ||
1271 | Configure these cards just like SB. Enable the 'SB MPU401 MIDI port' | ||
1272 | if you want to use MIDI features of ES1688. ES688 doesn't have MPU mode | ||
1273 | so you don't need to enable it (the driver uses normal SB MIDI automatically | ||
1274 | with ES688). | ||
1275 | |||
1276 | NOTE! ESS cards are not compatible with MSS/WSS so don't worry if MSS support | ||
1277 | of OSS doesn't work with it. | ||
1278 | |||
1279 | There are some ES1688/688 based sound cards and (particularly) motherboards | ||
1280 | which use software configurable I/O port relocation feature of the chip. | ||
1281 | This ESS proprietary feature is supported only by OSS/Linux. | ||
1282 | |||
1283 | There are ES1688 based cards which use different interrupt pin assignment than | ||
1284 | recommended by ESS (5, 7, 9/2 and 10). In this case all IRQs don't work. | ||
1285 | At least a card called (Pearl?) Hypersound 16 supports IRQ 15 but it doesn't | ||
1286 | work. | ||
1287 | |||
1288 | ES1868 is a PnP chip which is (supposed to be) compatible with ESS1688 | ||
1289 | probably works with OSS/Free after initialization using isapnptools. | ||
1290 | |||
1291 | Reveal cards | ||
1292 | ------------ | ||
1293 | |||
1294 | There are several different cards made/marketed by Reveal. Some of them | ||
1295 | are compatible with SoundScape and some use the MAD16 chip. You may have | ||
1296 | to look at the card and try to identify its origin. | ||
1297 | |||
1298 | Diamond | ||
1299 | ------- | ||
1300 | |||
1301 | The 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?) | ||
1303 | models are based on the MAD16 chip which is supported by the driver. | ||
1304 | |||
1305 | Audio Excel DSP16 | ||
1306 | ----------------- | ||
1307 | |||
1308 | Support for this card is currently not functional. A new driver for it | ||
1309 | should be available later this year. | ||
1310 | |||
1311 | PCMCIA cards | ||
1312 | ------------ | ||
1313 | |||
1314 | Sorry, can't help. Some cards may work and some don't. | ||
1315 | |||
1316 | TI TM4000M notebooks | ||
1317 | -------------------- | ||
1318 | |||
1319 | These computers have a built in sound support based on the Jazz chipset. | ||
1320 | Look at the instructions for MV Jazz (above). It's also important to note | ||
1321 | that there is something wrong with the mouse port and sound at least on | ||
1322 | some TM models. Don't enable the "C&T 82C710 mouse port support" when | ||
1323 | configuring Linux. Having it enabled is likely to cause mysterious problems | ||
1324 | and kernel failures when sound is used. | ||
1325 | |||
1326 | miroSOUND | ||
1327 | --------- | ||
1328 | |||
1329 | The miroSOUND PCM1-pro, PCM12 and PCM20 radio has been used | ||
1330 | successfully. These cards are based on the MAD16, OPL4, and CS4231A chips | ||
1331 | and everything said in the section about MAD16 cards applies here, | ||
1332 | too. The only major difference between the PCMxx and other MAD16 cards | ||
1333 | is that instead of the mixer in the CS4231 codec a separate mixer | ||
1334 | controlled by an on-board 80C32 microcontroller is used. Control of | ||
1335 | the mixer takes place via the ACI (miro's audio control interface) | ||
1336 | protocol that is implemented in a separate lowlevel driver. Make sure | ||
1337 | you compile this ACI driver together with the normal MAD16 support | ||
1338 | when 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 | ||
1340 | time). Only in special cases you want to change something regularly on | ||
1341 | the CS4231 mixer. | ||
1342 | |||
1343 | The miroSOUND PCM12 and PCM20 radio is capable of full duplex | ||
1344 | operation (simultaneous PCM replay and recording), which allows you to | ||
1345 | implement nice real-time signal processing audio effect software and | ||
1346 | network telephones. The ACI mixer has to be switched into the "solo" | ||
1347 | mode for duplex operation in order to avoid feedback caused by the | ||
1348 | mixer (input hears output signal). You can de-/activate this mode | ||
1349 | through toggleing the record button for the wave controller with an | ||
1350 | OSS-mixer. | ||
1351 | |||
1352 | The PCM20 contains a radio tuner, which is also controlled by | ||
1353 | ACI. This radio tuner is supported by the ACI driver together with the | ||
1354 | miropcm20.o module. Also the 7-band equalizer is integrated | ||
1355 | (limited by the OSS-design). Developement has started and maybe | ||
1356 | finished for the RDS decoder on this card, too. You will be able to | ||
1357 | read RadioText, the Programme Service name, Programme TYpe and | ||
1358 | others. Even the v4l radio module benefits from it with a refined | ||
1359 | strength value. See aci.[ch] and miropcm20*.[ch] for more details. | ||
1360 | |||
1361 | The following configuration parameters have worked fine for the PCM12 | ||
1362 | in Markus Kuhn's system, many other configurations might work, too: | ||
1363 | CONFIG_MAD16_BASE=0x530, CONFIG_MAD16_IRQ=11, CONFIG_MAD16_DMA=3, | ||
1364 | CONFIG_MAD16_DMA2=0, CONFIG_MAD16_MPU_BASE=0x330, CONFIG_MAD16_MPU_IRQ=10, | ||
1365 | DSP_BUFFSIZE=65536, SELECTED_SOUND_OPTIONS=0x00281000. | ||
1366 | |||
1367 | Bas van der Linden is using his PCM1-pro with a configuration that | ||
1368 | differs in: CONFIG_MAD16_IRQ=7, CONFIG_MAD16_DMA=1, CONFIG_MAD16_MPU_IRQ=9 | ||
1369 | |||
1370 | Compaq Deskpro XL | ||
1371 | ----------------- | ||
1372 | |||
1373 | The builtin sound hardware of Compaq Deskpro XL is now supported. | ||
1374 | You need to configure the driver with MSS and OPL3 supports enabled. | ||
1375 | In addition you need to manually edit linux/drivers/sound/local.h and | ||
1376 | to add a line containing "#define DESKPROXL" if you used | ||
1377 | make menuconfig/xconfig. | ||
1378 | |||
1379 | Others? | ||
1380 | ------- | ||
1381 | |||
1382 | Since there are so many different sound cards, it's likely that I have | ||
1383 | forgotten to mention many of them. Please inform me if you know yet another | ||
1384 | card which works with Linux, please inform me (or is anybody else | ||
1385 | willing to maintain a database of supported cards (just like in XF86)?). | ||
1386 | |||
1387 | Cards not supported yet | ||
1388 | ======================= | ||
1389 | |||
1390 | Please check the version of sound driver you are using before | ||
1391 | complaining that your card is not supported. It's possible you are | ||
1392 | using a driver version which was released months before your card was | ||
1393 | introduced. | ||
1394 | |||
1395 | First of all, there is an easy way to make most sound cards work with Linux. | ||
1396 | Just use the DOS based driver to initialize the card to a known state, then use | ||
1397 | loadlin.exe to boot Linux. If Linux is configured to use the same I/O, IRQ and | ||
1398 | DMA 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 | ||
1400 | new motherboards). This method works also with all/most PnP sound cards. | ||
1401 | |||
1402 | Don't get fooled with SB compatibility. Most cards are compatible with | ||
1403 | SB but that may require a TSR which is not possible with Linux. If | ||
1404 | the card is compatible with MSS, it's a better choice. Some cards | ||
1405 | don't work in the SB and MSS modes at the same time. | ||
1406 | |||
1407 | Then there are cards which are no longer manufactured and/or which | ||
1408 | are relatively rarely used (such as the 8 bit ProAudioSpectrum | ||
1409 | models). It's extremely unlikely that such cards ever get supported. | ||
1410 | Adding support for a new card requires much work and increases time | ||
1411 | required in maintaining the driver (some changes need to be done | ||
1412 | to all low level drivers and be tested too, maybe with multiple | ||
1413 | operating systems). For this reason I have made a decision to not support | ||
1414 | obsolete cards. It's possible that someone else makes a separately | ||
1415 | distributed driver (diffs) for the card. | ||
1416 | |||
1417 | Writing a driver for a new card is not possible if there are no | ||
1418 | programming information available about the card. If you don't | ||
1419 | find your new card from this file, look from the home page | ||
1420 | (http://www.opensound.com/ossfree). Then please contact | ||
1421 | manufacturer of the card and ask if they have (or are willing to) | ||
1422 | released technical details of the card. Do this before contacting me. I | ||
1423 | can only answer 'no' if there are no programming information available. | ||
1424 | |||
1425 | I have made decision to not accept code based on reverse engineering | ||
1426 | to the driver. There are three main reasons: First I don't want to break | ||
1427 | relationships to sound card manufacturers. The second reason is that | ||
1428 | maintaining and supporting a driver without any specs will be a pain. | ||
1429 | The third reason is that companies have freedom to refuse selling their | ||
1430 | products to other than Windows users. | ||
1431 | |||
1432 | Some companies don't give low level technical information about their | ||
1433 | products to public or at least their require signing a NDA. It's not | ||
1434 | possible to implement a freeware driver for them. However it's possible | ||
1435 | that support for such cards become available in the commercial version | ||
1436 | of this driver (see http://www.4Front-tech.com/oss.html for more info). | ||
1437 | |||
1438 | There are some common audio chipsets that are not supported yet. For example | ||
1439 | Sierra Aria and IBM Mwave. It's possible that these architectures | ||
1440 | get some support in future but I can't make any promises. Just look | ||
1441 | at the home page (http://www.opensound.com/ossfree/new_cards.html) | ||
1442 | for latest info. | ||
1443 | |||
1444 | Information about unsupported sound cards and chipsets is welcome as well | ||
1445 | as free copies of sound cards, SDKs and operating systems. | ||
1446 | |||
1447 | If you have any corrections and/or comments, please contact me. | ||
1448 | |||
1449 | Hannu Savolainen | ||
1450 | hannu@opensound.com | ||
1451 | |||
1452 | Personal home page: http://www.compusonic.fi/~hannu | ||
1453 | home page of OSS/Free: http://www.opensound.com/ossfree | ||
1454 | |||
1455 | home 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 | |||
10 | This is a sound driver extension for SoundBlaster AWE32 and other | ||
11 | compatible cards (AWE32-PnP, SB32, SB32-PnP, AWE64 & etc) to enable | ||
12 | the wave synth operations. The driver is provided for Linux 1.2.x | ||
13 | and 2.[012].x kernels, as well as FreeBSD, on Intel x86 and DEC | ||
14 | Alpha systems. | ||
15 | |||
16 | This driver was written by Takashi Iwai <iwai@ww.uni-erlangen.de>, | ||
17 | and provided "as is". The original source (awedrv-0.4.3.tar.gz) and | ||
18 | binary packages are available on the following URL: | ||
19 | http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/ | ||
20 | Note that since the author is apart from this web site, the update is | ||
21 | not frequent now. | ||
22 | |||
23 | |||
24 | * NOTE TO LINUX USERS | ||
25 | |||
26 | To 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 | ||
28 | and modules. The precise installation procedure is described in the | ||
29 | AWE64-Mini-HOWTO and linux-kernel/Documetation/sound/AWE32. | ||
30 | |||
31 | If you're using PnP cards, the card must be initialized before loading | ||
32 | the 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) | ||
36 | The detailed instruction for the solution using isapnp tools is found | ||
37 | in many documents like above. A brief instruction is also included in | ||
38 | the installation document of this package. | ||
39 | For 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 | |||
45 | The awedrv has several different playing modes to realize easy channel | ||
46 | allocation for MIDI songs. To hear the exact sound quality, you need | ||
47 | to obtain the extended sequencer program, drvmidi or playmidi-2.5. | ||
48 | |||
49 | For playing MIDI files, you *MUST* load the soundfont file on the | ||
50 | driver previously by sfxload utility. Otherwise you'll here no sounds | ||
51 | at all! All the utilities and driver source packages are found in the | ||
52 | above URL. The sfxload program is included in the package | ||
53 | awesfx-0.4.3.tgz. Binary packages are available there, too. See the | ||
54 | instruction in each package for installation. | ||
55 | |||
56 | Loading a soundfont file is very simple. Just execute the command | ||
57 | |||
58 | % sfxload synthgm.sbk | ||
59 | |||
60 | Then, sfxload transfers the file "synthgm.sbk" to the driver. | ||
61 | Both SF1 and SF2 formats are accepted. | ||
62 | |||
63 | Now you can hear midi musics by a midi player. | ||
64 | |||
65 | % drvmidi foo.mid | ||
66 | |||
67 | If you run MIDI player after MOD player, you need to load soundfont | ||
68 | files again, since MOD player programs clear the previous loaded | ||
69 | samples by their own data. | ||
70 | |||
71 | If you have only 512kb on the sound card, I recommend to use dynamic | ||
72 | sample loading via -L option of drvmidi. 2MB GM/GS soundfont file is | ||
73 | available in most midi files. | ||
74 | |||
75 | % sfxload synthgm | ||
76 | % drvmidi -L 2mbgmgs foo.mid | ||
77 | |||
78 | This makes a big difference (believe me)! For more details, please | ||
79 | refer to the FAQ list which is available on the URL above. | ||
80 | |||
81 | The current chorus, reverb and equalizer status can be changed by | ||
82 | aweset utility program (included in awesfx package). Note that | ||
83 | some awedrv-native programs (like drvmidi and xmp) will change the | ||
84 | current settings by themselves. The aweset program is effective | ||
85 | only for other programs like playmidi. | ||
86 | |||
87 | Enjoy. | ||
88 | |||
89 | |||
90 | * COMPILE FLAGS | ||
91 | |||
92 | Compile conditions are defined in awe_config.h. | ||
93 | |||
94 | [Compatibility Conditions] | ||
95 | The following flags are defined automatically when using installation | ||
96 | shell 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] | ||
111 | You DON'T have to define the following two values. | ||
112 | Define 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] | ||
124 | From ver.0.4.0, sample tables are allocated dynamically (except | ||
125 | Linux-1.2.x system), so you need NOT to touch these parameters. | ||
126 | Linux-1.2.x users may need to increase these values to appropriate size | ||
127 | if 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 | |||
185 | Thanks to Witold Jachimczyk (witek@xfactor.wpi.edu) for much advice | ||
186 | on programming of AWE32. Much code is brought from his AWE32-native | ||
187 | MOD player, ALMP. | ||
188 | The port of awedrv to FreeBSD is done by Randall Hopper | ||
189 | (rhh@ct.picker.com). | ||
190 | The new volume calculation routine was derived from Mark Weaver's | ||
191 | ADIP compatible routines. | ||
192 | I also thank linux-awe-ml members for their efforts | ||
193 | to 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 | |||
204 | Copyright (C) 1996-1998 Takashi Iwai | ||
205 | |||
206 | This program is free software; you can redistribute it and/or modify | ||
207 | it under the terms of the GNU General Public License as published by | ||
208 | the Free Software Foundation; either version 2 of the License, or | ||
209 | (at your option) any later version. | ||
210 | |||
211 | This program is distributed in the hope that it will be useful, | ||
212 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
213 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
214 | GNU General Public License for more details. | ||
215 | |||
216 | You should have received a copy of the GNU General Public License | ||
217 | along with this program; if not, write to the Free Software | ||
218 | Foundation, 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 @@ | |||
1 | Building a modular sound driver | ||
2 | ================================ | ||
3 | |||
4 | The following information is current as of linux-2.1.85. Check the other | ||
5 | readme files, especially README.OSS, for information not specific to | ||
6 | making sound modular. | ||
7 | |||
8 | First, configure your kernel. This is an idea of what you should be | ||
9 | setting 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 | ||
21 | but not .midi. As the help for them says, set them unless you know your | ||
22 | card does not use one of these chips for FM support. | ||
23 | |||
24 | Once you are configured, make zlilo, modules, modules_install; reboot. | ||
25 | Note that it is no longer necessary or possible to configure sound in the | ||
26 | drivers/sound dir. Now one simply configures and makes one's kernel and | ||
27 | modules in the usual way. | ||
28 | |||
29 | Then, add to your /etc/modprobe.conf something like: | ||
30 | |||
31 | alias char-major-14-* sb | ||
32 | install sb /sbin/modprobe -i sb && /sbin/modprobe adlib_card | ||
33 | options sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 | ||
34 | options adlib_card io=0x388 # FM synthesizer | ||
35 | |||
36 | Alternatively, if you have compiled in kernel level ISAPnP support: | ||
37 | |||
38 | alias char-major-14 sb | ||
39 | post-install sb /sbin/modprobe "-k" "adlib_card" | ||
40 | options adlib_card io=0x388 | ||
41 | |||
42 | The effect of this is that the sound driver and all necessary bits and | ||
43 | pieces autoload on demand, assuming you use kerneld (a sound choice) and | ||
44 | autoclean when not in use. Also, options for the device drivers are | ||
45 | set. They will not work without them. Change as appropriate for your card. | ||
46 | If 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 | ||
48 | that this kludgery is not necessary; for the time being, it seems to work | ||
49 | well. | ||
50 | |||
51 | Replace 'sb' with the driver for your card, and give it the right | ||
52 | options. To find the filename of the driver, look in | ||
53 | /lib/modules/<kernel-version>/misc. Mine looks like: | ||
54 | |||
55 | adlib_card.o # This is the generic OPLx driver | ||
56 | opl3.o # The OPL3 driver | ||
57 | sb.o # <<The SoundBlaster driver. Yours may differ.>> | ||
58 | sound.o # The sound driver | ||
59 | uart401.o # Used by sb, maybe other cards | ||
60 | |||
61 | Whichever card you have, try feeding it the options that would be the | ||
62 | default if you were making the driver wired, not as modules. You can | ||
63 | look at function referred to by module_init() for the card to see what | ||
64 | args are expected. | ||
65 | |||
66 | Note that at present there is no way to configure the io, irq and other | ||
67 | parameters for the modular drivers as one does for the wired drivers.. One | ||
68 | needs to pass the modules the necessary parameters as arguments, either | ||
69 | with /etc/modprobe.conf or with command-line args to modprobe, e.g. | ||
70 | |||
71 | modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 | ||
72 | modprobe adlib_card io=0x388 | ||
73 | |||
74 | recommend using /etc/modprobe.conf. | ||
75 | |||
76 | Persistent DMA Buffers: | ||
77 | |||
78 | The sound modules normally allocate DMA buffers during open() and | ||
79 | deallocate them during close(). Linux can often have problems allocating | ||
80 | DMA buffers for ISA cards on machines with more than 16MB RAM. This is | ||
81 | because ISA DMA buffers must exist below the 16MB boundary and it is quite | ||
82 | possible that we can't find a large enough free block in this region after | ||
83 | the machine has been running for any amount of time. The way to avoid this | ||
84 | problem is to allocate the DMA buffers during module load and deallocate | ||
85 | them when the module is unloaded. For this to be effective we need to load | ||
86 | the sound modules right after the kernel boots, either manually or by an | ||
87 | init script, and keep them around until we shut down. This is a little | ||
88 | wasteful of RAM, but it guarantees that sound always works. | ||
89 | |||
90 | To make the sound driver use persistent DMA buffers we need to pass the | ||
91 | sound.o module a "dmabuf=1" command-line argument. This is normally done | ||
92 | in /etc/modprobe.conf like so: | ||
93 | |||
94 | options sound dmabuf=1 | ||
95 | |||
96 | If you have 16MB or less RAM or a PCI sound card, this is wasteful and | ||
97 | unnecessary. It is possible that machine with 16MB or less RAM will find | ||
98 | this option useful, but if your machine is so memory-starved that it | ||
99 | cannot find a 64K block free, you will be wasting even more RAM by keeping | ||
100 | the sound modules loaded and the DMA buffers allocated when they are not | ||
101 | needed. The proper solution is to upgrade your RAM. But you do also have | ||
102 | this improper solution as well. Use it wisely. | ||
103 | |||
104 | I'm afraid I know nothing about anything but my setup, being more of a | ||
105 | text-mode guy anyway. If you have options for other cards or other helpful | ||
106 | hints, 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 @@ | |||
1 | Legacy audio driver for YMF7xx PCI cards. | ||
2 | |||
3 | |||
4 | FIRST 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 | |||
15 | DISCLIMER | ||
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 | |||
23 | ABOUT 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 | |||
35 | USAGE | ||
36 | ===== | ||
37 | |||
38 | # modprobe ymfsb (options) | ||
39 | |||
40 | |||
41 | OPTIONS 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 | |||
53 | FREQUENCY | ||
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 | |||
67 | SPDIF 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 | |||
77 | COPYING | ||
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 | |||
95 | TODO | ||
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 | |||
103 | AUTHOR | ||
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 @@ | |||
1 | Documentation for the SoundPro CMI8330 extensions in the WSS driver (ad1848.o) | ||
2 | ------------------------------------------------------------------------------ | ||
3 | |||
4 | ( Be sure to read Documentation/sound/oss/CMI8330 too ) | ||
5 | |||
6 | Ion Badulescu, ionut@cs.columbia.edu | ||
7 | February 24, 1999 | ||
8 | |||
9 | (derived from the OPL3-SA2 documentation by Scott Murray) | ||
10 | |||
11 | The SoundPro CMI8330 (ISA) is a chip usually found on some Taiwanese | ||
12 | motherboards. The official name in the documentation is CMI8330, SoundPro | ||
13 | is the nickname and the big inscription on the chip itself. | ||
14 | |||
15 | The chip emulates a WSS as well as a SB16, but it has certain differences | ||
16 | in the mixer section which require separate support. It also emulates an | ||
17 | MPU401 and an OPL3 synthesizer, so you probably want to enable support | ||
18 | for these, too. | ||
19 | |||
20 | The chip identifies itself as an AD1848, but its mixer is significantly | ||
21 | more advanced than the original AD1848 one. If your system works with | ||
22 | either 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. | ||
24 | Detection should work, but it hasn't been widely tested, so it might still | ||
25 | mis-identify the chip. You can still force soundpro=1 in the modprobe | ||
26 | parameters for ad1848. Please let me know if it happens to you, so I can | ||
27 | adjust the detection routine. | ||
28 | |||
29 | The chip is capable of doing full-duplex, but since the driver sees it as an | ||
30 | AD1848, it cannot take advantage of this. Moreover, the full-duplex mode is | ||
31 | not achievable through the WSS interface, b/c it needs a dma16 line which is | ||
32 | assigned only to the SB16 subdevice (with isapnp). Windows documentation | ||
33 | says the user must use WSS Playback and SB16 Recording for full-duplex, so | ||
34 | it might be possible to do the same thing under Linux. You can try loading | ||
35 | up both ad1848 and sb then use one for playback and the other for | ||
36 | recording. I don't know if this works, b/c I haven't tested it. Anyway, if | ||
37 | you try it, be very careful: the SB16 mixer *mostly* works, but certain | ||
38 | settings can have unexpected effects. Use the WSS mixer for best results. | ||
39 | |||
40 | There is also a PCI SoundPro chip. I have not seen this chip, so I have | ||
41 | no idea if the driver will work with it. I suspect it won't. | ||
42 | |||
43 | As with PnP cards, some configuration is required. There are two ways | ||
44 | of doing this. The most common is to use the isapnptools package to | ||
45 | initialize the card, and use the kernel module form of the sound | ||
46 | subsystem and sound drivers. Alternatively, some BIOS's allow manual | ||
47 | configuration of installed PnP devices in a BIOS menu, which should | ||
48 | allow using the non-modular sound drivers, i.e. built into the kernel. | ||
49 | Since in this latter case you cannot use module parameters, you will | ||
50 | have to enable support for the SoundPro at compile time. | ||
51 | |||
52 | The IRQ and DMA values can be any that are considered acceptable for a | ||
53 | WSS. Assuming you've got isapnp all happy, then you should be able to | ||
54 | do something like the following (which *must* match the isapnp/BIOS | ||
55 | configuration): | ||
56 | |||
57 | modprobe ad1848 io=0x530 irq=11 dma=0 soundpro=1 | ||
58 | -and maybe- | ||
59 | modprobe sb io=0x220 irq=5 dma=1 dma16=5 | ||
60 | |||
61 | -then- | ||
62 | modprobe mpu401 io=0x330 irq=9 | ||
63 | modprobe opl3 io=0x388 | ||
64 | |||
65 | If all goes well and you see no error messages, you should be able to | ||
66 | start using the sound capabilities of your system. If you get an | ||
67 | error message while trying to insert the module(s), then make | ||
68 | sure that the values of the various arguments match what you specified | ||
69 | in your isapnp configuration file, and that there is no conflict with | ||
70 | another 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 | ||
72 | butting heads with another device. | ||
73 | |||
74 | If you do not see the chipset version message, and none of the other | ||
75 | messages present in the system log are helpful, try adding 'debug=1' | ||
76 | to the ad1848 parameters, email me the syslog results and I'll do | ||
77 | my best to help. | ||
78 | |||
79 | Lastly, if you're using modules and want to set up automatic module | ||
80 | loading with kmod, the kernel module loader, here is the section I | ||
81 | currently use in my conf.modules file: | ||
82 | |||
83 | # Sound | ||
84 | post-install sound modprobe -k ad1848; modprobe -k mpu401; modprobe -k opl3 | ||
85 | options ad1848 io=0x530 irq=11 dma=0 | ||
86 | options sb io=0x220 irq=5 dma=1 dma16=5 | ||
87 | options mpu401 io=0x330 irq=9 | ||
88 | options opl3 io=0x388 | ||
89 | |||
90 | The above ensures that ad1848 will be loaded whenever the sound system | ||
91 | is being used. | ||
92 | |||
93 | Good luck. | ||
94 | |||
95 | Ion | ||
96 | |||
97 | NOT REALLY TESTED: | ||
98 | - recording | ||
99 | - recording device selection | ||
100 | - full-duplex | ||
101 | |||
102 | TODO: | ||
103 | - implement mixer support for surround, loud, digital CD switches. | ||
104 | - come up with a scheme which allows recording volumes for each subdevice. | ||
105 | This 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 @@ | |||
1 | modprobe sound | ||
2 | insmod uart401 | ||
3 | insmod sb ... | ||
4 | |||
5 | This loads the driver for the Sound Blaster and assorted clones. Cards that | ||
6 | are covered by other drivers should not be using this driver. | ||
7 | |||
8 | The Sound Blaster module takes the following arguments | ||
9 | |||
10 | io I/O address of the Sound Blaster chip (0x220,0x240,0x260,0x280) | ||
11 | irq IRQ of the Sound Blaster chip (5,7,9,10) | ||
12 | dma 8-bit DMA channel for the Sound Blaster (0,1,3) | ||
13 | dma16 16-bit DMA channel for SB16 and equivalent cards (5,6,7) | ||
14 | mpu_io I/O for MPU chip if present (0x300,0x330) | ||
15 | |||
16 | sm_games=1 Set if you have a Logitech soundman games | ||
17 | acer=1 Set this to detect cards in some ACER notebooks | ||
18 | mwave_bug=1 Set if you are trying to use this driver with mwave (see on) | ||
19 | type Use this to specify a specific card type | ||
20 | |||
21 | The following arguments are taken if ISAPnP support is compiled in | ||
22 | |||
23 | isapnp=0 Set this to disable ISAPnP detection (use io=0xXXX etc. above) | ||
24 | multiple=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. | ||
27 | pnplegacy=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. | ||
30 | reverse=1 Reverses the order of the search in the PnP table. | ||
31 | uart401=1 Set to enable detection of mpu devices on some clones. | ||
32 | isapnpjump=n Jumps to slot n in the driver's PnP table. Use the source, | ||
33 | Luke. | ||
34 | |||
35 | You may well want to load the opl3 driver for synth music on most SB and | ||
36 | clone SB devices | ||
37 | |||
38 | insmod opl3 io=0x388 | ||
39 | |||
40 | Using Mwave | ||
41 | |||
42 | To make this driver work with Mwave you must set mwave_bug. You also need | ||
43 | to warm boot from DOS/Windows with the required firmware loaded under this | ||
44 | OS. IBM are being difficult about documenting how to load this firmware. | ||
45 | |||
46 | Avance Logic ALS007 | ||
47 | |||
48 | This card is supported; see the separate file ALS007 for full details. | ||
49 | |||
50 | Avance Logic ALS100 | ||
51 | |||
52 | This card is supported; setup should be as for a standard Sound Blaster 16. | ||
53 | The 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 @@ | |||
1 | From: Paul Barton-Davis <pbd@op.net> | ||
2 | |||
3 | Here is the configuration I use with a Tropez+ and my modular | ||
4 | driver: | ||
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 | |||
16 | Things 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 | |||
26 | Please 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 @@ | |||
1 | Running sound cards on VIA chipsets | ||
2 | |||
3 | o 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 | |||
7 | o 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 | |||
13 | Certain patterns of ISA DMA access used for most PC sound cards cause the | ||
14 | VIA chipsets to lock up. From the collected reports this appears to cover a | ||
15 | wide range of boards. Some also lock up with sound cards under Win* as well. | ||
16 | |||
17 | Linux implements a workaround providing your chipset is PCI and you compiled | ||
18 | with PCI Quirks enabled. If so you will see a message | ||
19 | "Activating ISA DMA bug workarounds" | ||
20 | |||
21 | during booting. If you have a VIA PCI chipset that hangs when you use the | ||
22 | sound and is not generating this message even with PCI quirks enabled | ||
23 | please report the information to the linux-kernel list (see REPORTING-BUGS). | ||
24 | |||
25 | If you are one of the tiny number of unfortunates with a 486 ISA/VLB VIA | ||
26 | chipset board you need to do the following to build a special kernel for | ||
27 | your board | ||
28 | |||
29 | edit linux/include/asm-i386/dma.h | ||
30 | |||
31 | change | ||
32 | |||
33 | #define isa_dma_bridge_buggy (0) | ||
34 | |||
35 | to | ||
36 | |||
37 | #define isa_dma_bridge_buggy (1) | ||
38 | |||
39 | and rebuild a kernel without PCI quirk support. | ||
40 | |||
41 | |||
42 | Other than this particular glitch the VIA [M]VP* chipsets appear to work | ||
43 | perfectly 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 @@ | |||
1 | Sound Blaster 16X Vibra addendum | ||
2 | -------------------------------- | ||
3 | by Marius Ilioaea <mariusi@protv.ro> | ||
4 | Stefan Laudat <stefan@asit.ro> | ||
5 | |||
6 | Sat 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 | ||
11 | to setup because the kernel reported a lot of DMA errors and wouldn't | ||
12 | simply play any sound. | ||
13 | A good starting point is that the vibra16x chip full-duplex facility | ||
14 | is 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 | ||
16 | it as half-duplex soundcard). Oh, I almost forgot, the RedHat sndconfig | ||
17 | failed detecting it ;) | ||
18 | So, the big problem still remains, because the sb module wants a | ||
19 | 8-bit and a 16-bit dma, which we could not allocate for vibra... it supports | ||
20 | only two 8-bit dma channels, the second one will be passed to the module | ||
21 | as a 16 bit channel, the kernel will yield about that but everything will | ||
22 | be okay, trust us. | ||
23 | The only inconvenient you may find is that you will have | ||
24 | some sound playing jitters if you have HDD dma support enabled - but this | ||
25 | will 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' | ||
59 | you may want to: | ||
60 | |||
61 | modprobe sb io=0x220 irq=5 dma=1 dma16=3 | ||
62 | |||
63 | Or, take the hard way: | ||
64 | |||
65 | modprobe soundcore | ||
66 | modprobe sound | ||
67 | modprobe uart401 | ||
68 | modprobe sb io=0x220 irq=5 dma=1 dma16=3 | ||
69 | # do you need MIDI? | ||
70 | modprobe opl3=0x388 | ||
71 | |||
72 | Just in case, the kernel sound support should be: | ||
73 | |||
74 | CONFIG_SOUND=m | ||
75 | CONFIG_SOUND_OSS=m | ||
76 | CONFIG_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 | |||
8 | Driver Status | ||
9 | ------------- | ||
10 | |||
11 | Requires: Kernel 2.1.106 or later (the driver is included with kernels | ||
12 | 2.1.109 and above) | ||
13 | |||
14 | As of 7/22/1998, this driver is currently in *BETA* state. This means | ||
15 | that it compiles and runs, and that I use it on my system (Linux | ||
16 | 2.1.106) with some reasonably demanding applications and uses. I | ||
17 | believe the code is approaching an initial "finished" state that | ||
18 | provides bug-free support for the Tropez Plus. | ||
19 | |||
20 | Please note that to date, the driver has ONLY been tested on a Tropez | ||
21 | Plus. I would very much like to hear (and help out) people with Tropez | ||
22 | and Maui cards, since I think the driver can support those cards as | ||
23 | well. | ||
24 | |||
25 | Finally, 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 | ||
27 | OSS/Free for Linux makes this rather unnecessary. | ||
28 | |||
29 | Some Questions | ||
30 | -------------- | ||
31 | |||
32 | ********************************************************************** | ||
33 | 0) 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 | ********************************************************************** | ||
54 | 1) What to do about MIDI interfaces ? | ||
55 | ********************************************************************** | ||
56 | |||
57 | The Tropez Plus (and perhaps other WF cards) can in theory support up | ||
58 | to 2 physical MIDI interfaces. One of these is connected to the | ||
59 | ICS2115 chip (the WaveFront synth itself) and is controlled by | ||
60 | MPU/UART-401 emulation code running as part of the WaveFront OS. The | ||
61 | other is controlled by the CS4232 chip present on the board. However, | ||
62 | physical access to the CS4232 connector is difficult, and it is | ||
63 | unlikely (though not impossible) that you will want to use it. | ||
64 | |||
65 | An older version of this driver introduced an additional kernel config | ||
66 | variable which controlled whether or not the CS4232 MIDI interface was | ||
67 | configured. Because of Alan Cox's work on modularizing the sound | ||
68 | drivers, and now backporting them to 2.0.34 kernels, there seems to be | ||
69 | little reason to support "static" configuration variables, and so this | ||
70 | has been abandoned in favor of *only* module parameters. Specifying | ||
71 | "mpuio" and "mpuirq" for the cs4232 parameter will result in the | ||
72 | CS4232 MIDI interface being configured; leaving them unspecified will | ||
73 | leave it unconfigured (and thus unusable). | ||
74 | |||
75 | BTW, I have heard from one Tropez+ user that the CS4232 interface is | ||
76 | more reliable than the ICS2115 one. I have had no problems with the | ||
77 | latter, and I don't have the right cable to test the former one | ||
78 | out. Reports welcome. | ||
79 | |||
80 | ********************************************************************** | ||
81 | 2) Why does line XXX of the code look like this .... ? | ||
82 | ********************************************************************** | ||
83 | |||
84 | Either because it's not finished yet, or because you're a better coder | ||
85 | than I am, or because you don't understand some aspect of how the card | ||
86 | or the code works. | ||
87 | |||
88 | I absolutely welcome comments, criticisms and suggestions about the | ||
89 | design and implementation of the driver. | ||
90 | |||
91 | ********************************************************************** | ||
92 | 3) 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 | ********************************************************************** | ||
111 | 4) How do I compile/install/use it ? | ||
112 | ********************************************************************** | ||
113 | |||
114 | PART 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 | |||
119 | PART 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 | |||
127 | PART 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 | |||
153 | Here'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 | ************************************************************ | ||
189 | 6) How do I configure my card ? | ||
190 | ************************************************************ | ||
191 | |||
192 | You need to edit /etc/modprobe.conf. Here's mine (edited to show the | ||
193 | relevant 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 | |||
205 | Things 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 | ********************************************************************** | ||
218 | 7) What about firmware ? | ||
219 | ********************************************************************** | ||
220 | |||
221 | Turtle Beach have not given me permission to distribute their firmware | ||
222 | for the ICS2115. However, if you have a WaveFront card, then you | ||
223 | almost certainly have the firmware, and if not, its freely available | ||
224 | on their website, at: | ||
225 | |||
226 | http://www.tbeach.com/tbs/downloads/scardsdown.htm#tropezplus | ||
227 | |||
228 | The file is called WFOS2001.MOT (for the Tropez+). | ||
229 | |||
230 | This driver, however, doesn't use the pure firmware as distributed, | ||
231 | but instead relies on a somewhat processed form of it. You can | ||
232 | generate this very easily. Following an idea from Andrew Veliath's | ||
233 | Pinnacle driver, the following flex program will generate the | ||
234 | processed 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 | |||
245 | To 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 | |||
250 | and then use it like this: | ||
251 | |||
252 | ws < my-copy-of-the-oswf.mot-file > /etc/sound/wavefront.os | ||
253 | |||
254 | If you put it somewhere else, you'll always have to use the wf_ospath | ||
255 | module parameter (see below) or alter the source code. | ||
256 | |||
257 | ********************************************************************** | ||
258 | 7) How do I get it working ? | ||
259 | ********************************************************************** | ||
260 | |||
261 | Optionally, you can reboot with the "new" kernel (even though the only | ||
262 | changes have really been made to a module). | ||
263 | |||
264 | Then, as root do: | ||
265 | |||
266 | modprobe wavefront | ||
267 | |||
268 | You should get something like this in /var/log/messages: | ||
269 | |||
270 | WaveFront: firmware 1.20 already loaded. | ||
271 | |||
272 | or | ||
273 | |||
274 | WaveFront: no response to firmware probe, assume raw. | ||
275 | |||
276 | then: | ||
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 | |||
285 | The whole process takes about 16 seconds, the longest waits being | ||
286 | after reporting the hardware version (during the firmware download), | ||
287 | and after reporting program status (during patch status inquiry). Its | ||
288 | shorter (about 10 secs) if the firmware is already loaded (i.e. only | ||
289 | warm reboots since the last firmware load). | ||
290 | |||
291 | The "available DRAM" line will vary depending on how much added RAM | ||
292 | your card has. Mine has 8MB. | ||
293 | |||
294 | To 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 | ||
296 | to play a General MIDI file. Try the "-D 0" to hear the | ||
297 | difference between sending MIDI to the WaveFront and using the OPL/3, | ||
298 | which is the default (I think ...). If you have an external synth(s) | ||
299 | hooked to the soundcard, you can use "-e" to route to the | ||
300 | external synth(s) (in theory, -D 1 should work as well, but I think | ||
301 | there is a bug in playmidi which prevents this from doing what it | ||
302 | should). | ||
303 | |||
304 | ********************************************************************** | ||
305 | 8) What are the module parameters ? | ||
306 | ********************************************************************** | ||
307 | |||
308 | Its best to read wavefront.c for this, but here is a summary: | ||
309 | |||
310 | integers: | ||
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. | ||
329 | strings: | ||
330 | ospath - path to get to the pre-processed OS firmware. | ||
331 | (default: /etc/sound/wavefront.os) | ||
332 | |||
333 | ********************************************************************** | ||
334 | 9) Who should I contact if I have problems? | ||
335 | ********************************************************************** | ||
336 | |||
337 | Just 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 | |||
2 | Intro | ||
3 | ===== | ||
4 | |||
5 | people start bugging me about this with questions, looks like I | ||
6 | should write up some documentation for this beast. That way I | ||
7 | don't have to answer that much mails I hope. Yes, I'm lazy... | ||
8 | |||
9 | |||
10 | You might have noticed that the bt878 grabber cards have actually | ||
11 | _two_ PCI functions: | ||
12 | |||
13 | $ lspci | ||
14 | [ ... ] | ||
15 | 00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02) | ||
16 | 00:0a.1 Multimedia controller: Brooktree Corporation Bt878 (rev 02) | ||
17 | [ ... ] | ||
18 | |||
19 | The first does video, it is backward compatible to the bt848. The second | ||
20 | does audio. btaudio is a driver for the second function. It's a sound | ||
21 | driver which can be used for recording sound (and _only_ recording, no | ||
22 | playback). As most TV cards come with a short cable which can be plugged | ||
23 | into your sound card's line-in you probably don't need this driver if all | ||
24 | you want to do is just watching TV... | ||
25 | |||
26 | |||
27 | Driver Status | ||
28 | ============= | ||
29 | |||
30 | Still somewhat experimental. The driver should work stable, i.e. it | ||
31 | should'nt crash your box. It might not work as expected, have bugs, | ||
32 | not being fully OSS API compilant, ... | ||
33 | |||
34 | Latest versions are available from http://bytesex.org/bttv/, the | ||
35 | driver is in the bttv tarball. Kernel patches might be available too, | ||
36 | have a look at http://bytesex.org/bttv/listing.html. | ||
37 | |||
38 | The chip knows two different modes. btaudio registers two dsp | ||
39 | devices, one for each mode. They can not be used at the same time. | ||
40 | |||
41 | |||
42 | Digital audio mode | ||
43 | ================== | ||
44 | |||
45 | The chip gives you 16 bit stereo sound. The sample rate depends on | ||
46 | the external source which feeds the bt878 with digital sound via I2S | ||
47 | interface. There is a insmod option (rate) to tell the driver which | ||
48 | sample rate the hardware uses (32000 is the default). | ||
49 | |||
50 | One possible source for digital sound is the msp34xx audio processor | ||
51 | chip which provides digital sound via I2S with 32 kHz sample rate. My | ||
52 | Hauppauge board works this way. | ||
53 | |||
54 | The Osprey-200 reportly gives you digital sound with 44100 Hz sample | ||
55 | rate. It is also possible that you get no sound at all. | ||
56 | |||
57 | |||
58 | analog mode (A/D) | ||
59 | ================= | ||
60 | |||
61 | You can tell the driver to use this mode with the insmod option "analog=1". | ||
62 | The chip has three analog inputs. Consequently you'll get a mixer device | ||
63 | to control these. | ||
64 | |||
65 | The analog mode supports mono only. Both 8 + 16 bit. Both are _signed_ | ||
66 | int, which is uncommon for the 8 bit case. Sample rate range is 119 kHz | ||
67 | to 448 kHz. Yes, the number of digits is correct. The driver supports | ||
68 | downsampling by powers of two, so you can ask for more usual sample rates | ||
69 | like 44 kHz too. | ||
70 | |||
71 | With my Hauppauge I get noisy sound on the second input (mapped to line2 | ||
72 | by the mixer device). Others get a useable signal on line1. | ||
73 | |||
74 | |||
75 | some 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 | |||
87 | Have fun, | ||
88 | |||
89 | Gerd | ||
90 | |||
91 | -- | ||
92 | Gerd 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 | |||
2 | Documentation for the Cirrus Logic/Crystal SoundFusion cs46xx/cs4280 audio | ||
3 | controller chips (2001/05/11) | ||
4 | |||
5 | The cs46xx audio driver supports the DSP line of Cirrus controllers. | ||
6 | Specifically, the cs4610, cs4612, cs4614, cs4622, cs4624, cs4630 and the cs4280 | ||
7 | products. This driver uses the generic ac97_codec driver for AC97 codec | ||
8 | support. | ||
9 | |||
10 | |||
11 | Features: | ||
12 | |||
13 | Full Duplex Playback/Capture supported from 8k-48k. | ||
14 | 16Bit Signed LE & 8Bit Unsigned, with Mono or Stereo supported. | ||
15 | |||
16 | APM/PM - 2.2.x PM is enabled and functional. APM can also | ||
17 | be enabled for 2.4.x by modifying the CS46XX_ACPI_SUPPORT macro | ||
18 | definition. | ||
19 | |||
20 | DMA 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 | ||
22 | two 2k fragments. | ||
23 | |||
24 | MMAP seems to work well with QuakeIII, and test XMMS plugin. | ||
25 | |||
26 | Myth2 works, but the polling logic is not fully correct, but is functional. | ||
27 | |||
28 | The 2.4.4-ac6 gameport code in the cs461x joystick driver has been tested | ||
29 | with a Microsoft Sidewinder joystick (cs461x.o and sidewinder.o). This | ||
30 | audio driver must be loaded prior to the joystick driver to enable the | ||
31 | DSP task image supporting the joystick device. | ||
32 | |||
33 | |||
34 | Limitations: | ||
35 | |||
36 | SPDIF is currently not supported. | ||
37 | |||
38 | Primary codec support only. No secondary codec support is implemented. | ||
39 | |||
40 | |||
41 | |||
42 | NOTES: | ||
43 | |||
44 | Hercules Game Theatre XP - the EGPIO2 pin controls the external Amp, | ||
45 | and has been tested. | ||
46 | Module parameter hercules_egpio_disable set to 1, will force a 0 to EGPIODR | ||
47 | to disable the external amplifier. | ||
48 | |||
49 | VTB Santa Cruz - the GPIO7/GPIO8 on the Secondary Codec control | ||
50 | the external amplifier for the "back" speakers, since we do not | ||
51 | support the secondary codec then this external amp is not | ||
52 | turned on. The primary codec external amplifier is supported but | ||
53 | note that the AC97 EAPD bit is inverted logic (amp_voyetra()). | ||
54 | |||
55 | DMA buffer size - there are issues with many of the Linux applications | ||
56 | concerning the optimal buffer size. Several applications request a | ||
57 | certain fragment size and number and then do not verify that the driver | ||
58 | has the ability to support the requested configuration. | ||
59 | SNDCTL_DSP_SETFRAGMENT ioctl is used to request a fragment size and | ||
60 | number of fragments. Some applications exit if an error is returned | ||
61 | on this particular ioctl. Therefore, in alignment with the other OSS audio | ||
62 | drivers, no error is returned when a SETFRAGs IOCTL is received, but the | ||
63 | values passed from the app are not used in any buffer calculation | ||
64 | (ossfragshift/ossmaxfrags are not used). | ||
65 | Use the "defaultorder=N" module parameter to change the buffer size if | ||
66 | you have an application that requires a specific number of fragments | ||
67 | or a specific buffer size (see below). | ||
68 | |||
69 | Debug Interface | ||
70 | --------------- | ||
71 | There is an ioctl debug interface to allow runtime modification of the | ||
72 | debug print levels. This debug interface code can be disabled from the | ||
73 | compilation process with commenting the following define: | ||
74 | #define CSDEBUG_INTERFACE 1 | ||
75 | There is also a debug print methodolgy to select printf statements from | ||
76 | different areas of the driver. A debug print level is also used to allow | ||
77 | additional printfs to be active. Comment out the following line in the | ||
78 | driver to disable compilation of the CS_DBGOUT print statements: | ||
79 | #define CSDEBUG 1 | ||
80 | |||
81 | Please see the definitions for cs_debuglevel and cs_debugmask for additional | ||
82 | information on the debug levels and sections. | ||
83 | |||
84 | There is also a csdbg executable to allow runtime manipulation of these | ||
85 | parameters. for a copy email: twoller@crystal.cirrus.com | ||
86 | |||
87 | |||
88 | |||
89 | MODULE_PARMS definitions | ||
90 | ------------------------ | ||
91 | MODULE_PARM(defaultorder, "i"); | ||
92 | defaultorder=N | ||
93 | where N is a value from 1 to 12 | ||
94 | The buffer order determines the size of the dma buffer for the driver. | ||
95 | under Linux, a smaller buffer allows more responsiveness from many of the | ||
96 | applications (e.g. games). A larger buffer allows some of the apps (esound) | ||
97 | to not underrun the dma buffer as easily. As default, use 32k (order=3) | ||
98 | rather than 64k as some of the games work more responsively. | ||
99 | (2^N) * PAGE_SIZE = allocated buffer size | ||
100 | |||
101 | MODULE_PARM(cs_debuglevel, "i"); | ||
102 | MODULE_PARM(cs_debugmask, "i"); | ||
103 | cs_debuglevel=N | ||
104 | cs_debugmask=0xMMMMMMMM | ||
105 | where N is a value from 0 (no debug printfs), to 9 (maximum) | ||
106 | 0xMMMMMMMM is a debug mask corresponding to the CS_xxx bits (see driver source). | ||
107 | |||
108 | MODULE_PARM(hercules_egpio_disable, "i"); | ||
109 | hercules_egpio_disable=N | ||
110 | where N is a 0 (enable egpio), or a 1 (disable egpio support) | ||
111 | |||
112 | MODULE_PARM(initdelay, "i"); | ||
113 | initdelay=N | ||
114 | This value is used to determine the millescond delay during the initialization | ||
115 | code prior to powering up the PLL. On laptops this value can be used to | ||
116 | assist with errors on resume, mostly with IBM laptops. Basically, if the | ||
117 | system is booted under battery power then the mdelay()/udelay() functions fail to | ||
118 | properly delay the required time. Also, if the system is booted under AC power | ||
119 | and then the power removed, the mdelay()/udelay() functions will not delay properly. | ||
120 | |||
121 | MODULE_PARM(powerdown, "i"); | ||
122 | powerdown=N | ||
123 | where N is 0 (disable any powerdown of the internal blocks) or 1 (enable powerdown) | ||
124 | |||
125 | |||
126 | MODULE_PARM(external_amp, "i"); | ||
127 | external_amp=1 | ||
128 | if N is set to 1, then force enabling the EAPD support in the primary AC97 codec. | ||
129 | override the detection logic and force the external amp bit in the AC97 0x26 register | ||
130 | to be reset (0). EAPD should be 0 for powerup, and 1 for powerdown. The VTB Santa Cruz | ||
131 | card has inverted logic, so there is a special function for these cards. | ||
132 | |||
133 | MODULE_PARM(thinkpad, "i"); | ||
134 | thinkpad=1 | ||
135 | if N is set to 1, then force enabling the clkrun functionality. | ||
136 | Currently, when the part is being used, then clkrun is disabled for the entire system, | ||
137 | but 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 | ||
5 | driver. To find out whether the driver succeeded loading, | ||
6 | check the kernel log (dmesg). | ||
7 | |||
8 | |||
9 | ALaw/uLaw sample formats | ||
10 | ------------------------ | ||
11 | |||
12 | This driver does not support the ALaw/uLaw sample formats. | ||
13 | ALaw is the default mode when opening a sound device | ||
14 | using OSS/Free. The reason for the lack of support is | ||
15 | that the hardware does not support these formats, and adding | ||
16 | conversion routines to the kernel would lead to very ugly | ||
17 | code in the presence of the mmap interface to the driver. | ||
18 | And since xquake uses mmap, mmap is considered important :-) | ||
19 | and no sane application uses ALaw/uLaw these days anyway. | ||
20 | In short, playing a Sun .au file as follows: | ||
21 | |||
22 | cat my_file.au > /dev/dsp | ||
23 | |||
24 | does not work. Instead, you may use the play script from | ||
25 | Chris Bagwell's sox-12.14 package (available from the URL | ||
26 | below) to play many different audio file formats. | ||
27 | The script automatically determines the audio format | ||
28 | and does do audio conversions if necessary. | ||
29 | http://home.sprynet.com/sprynet/cbagwell/projects.html | ||
30 | |||
31 | |||
32 | Blocking vs. nonblocking IO | ||
33 | --------------------------- | ||
34 | |||
35 | Unlike OSS/Free this driver honours the O_NONBLOCK file flag | ||
36 | not only during open, but also during read and write. | ||
37 | This is an effort to make the sound driver interface more | ||
38 | regular. Timidity has problems with this; a patch | ||
39 | is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html. | ||
40 | (Timidity patched will also run on OSS/Free). | ||
41 | |||
42 | |||
43 | MIDI UART | ||
44 | --------- | ||
45 | |||
46 | The driver supports a simple MIDI UART interface, with | ||
47 | no ioctl's supported. | ||
48 | |||
49 | |||
50 | MIDI synthesizer | ||
51 | ---------------- | ||
52 | |||
53 | This soundcard does not have any hardware MIDI synthesizer; | ||
54 | MIDI synthesis has to be done in software. To allow this | ||
55 | the driver/soundcard supports two PCM (/dev/dsp) interfaces. | ||
56 | The second one goes to the mixer "synth" setting and supports | ||
57 | only a limited set of sampling rates (44100, 22050, 11025, 5512). | ||
58 | By setting lineout to 1 on the driver command line | ||
59 | (eg. insmod es1370 lineout=1) it is even possible on some | ||
60 | cards to convert the LINEIN jack into a second LINEOUT jack, thus | ||
61 | making it possible to output four independent audio channels! | ||
62 | |||
63 | There is a freely available software package that allows | ||
64 | MIDI file playback on this soundcard called Timidity. | ||
65 | See http://www.cgs.fi/~tt/timidity/. | ||
66 | |||
67 | |||
68 | |||
69 | Thomas Sailer | ||
70 | t.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 | ||
5 | driver. To find out whether the driver succeeded loading, | ||
6 | check the kernel log (dmesg). | ||
7 | |||
8 | |||
9 | ALaw/uLaw sample formats | ||
10 | ------------------------ | ||
11 | |||
12 | This driver does not support the ALaw/uLaw sample formats. | ||
13 | ALaw is the default mode when opening a sound device | ||
14 | using OSS/Free. The reason for the lack of support is | ||
15 | that the hardware does not support these formats, and adding | ||
16 | conversion routines to the kernel would lead to very ugly | ||
17 | code in the presence of the mmap interface to the driver. | ||
18 | And since xquake uses mmap, mmap is considered important :-) | ||
19 | and no sane application uses ALaw/uLaw these days anyway. | ||
20 | In short, playing a Sun .au file as follows: | ||
21 | |||
22 | cat my_file.au > /dev/dsp | ||
23 | |||
24 | does not work. Instead, you may use the play script from | ||
25 | Chris Bagwell's sox-12.14 package (available from the URL | ||
26 | below) to play many different audio file formats. | ||
27 | The script automatically determines the audio format | ||
28 | and does do audio conversions if necessary. | ||
29 | http://home.sprynet.com/sprynet/cbagwell/projects.html | ||
30 | |||
31 | |||
32 | Blocking vs. nonblocking IO | ||
33 | --------------------------- | ||
34 | |||
35 | Unlike OSS/Free this driver honours the O_NONBLOCK file flag | ||
36 | not only during open, but also during read and write. | ||
37 | This is an effort to make the sound driver interface more | ||
38 | regular. Timidity has problems with this; a patch | ||
39 | is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html. | ||
40 | (Timidity patched will also run on OSS/Free). | ||
41 | |||
42 | |||
43 | MIDI UART | ||
44 | --------- | ||
45 | |||
46 | The driver supports a simple MIDI UART interface, with | ||
47 | no ioctl's supported. | ||
48 | |||
49 | |||
50 | MIDI synthesizer | ||
51 | ---------------- | ||
52 | |||
53 | This soundcard does not have any hardware MIDI synthesizer; | ||
54 | MIDI synthesis has to be done in software. To allow this | ||
55 | the driver/soundcard supports two PCM (/dev/dsp) interfaces. | ||
56 | |||
57 | There is a freely available software package that allows | ||
58 | MIDI file playback on this soundcard called Timidity. | ||
59 | See http://www.cgs.fi/~tt/timidity/. | ||
60 | |||
61 | |||
62 | |||
63 | Thomas Sailer | ||
64 | t.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 | |||
9 | OK, first thing - the IRQ problem IS a problem, whether the test is bypassed or | ||
10 | not. It is NOT a Linux problem, but an MWAVE problem that is fixed with the | ||
11 | latest MWAVE patches. So, in other words, don't bypass the test for MWAVES! | ||
12 | |||
13 | I have Windows 95 on /dev/hda1, swap on /dev/hda2, and Red Hat 5 on /dev/hda3. | ||
14 | |||
15 | The 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] | ||
40 | menuitem=W95, Windows 95 | ||
41 | menuitem=LINTP, Linux - ThinkPad | ||
42 | menuitem=LINTP3, Linux - ThinkPad Console | ||
43 | menuitem=LINDOC, Linux - Docked | ||
44 | menuitem=LINDOC3, Linux - Docked Console | ||
45 | menuitem=LIN1, Linux - Single User Mode | ||
46 | REM menudefault=W95,10 | ||
47 | |||
48 | [W95] | ||
49 | |||
50 | [LINTP] | ||
51 | |||
52 | [LINDOC] | ||
53 | |||
54 | [LINTP3] | ||
55 | |||
56 | [LINDOC3] | ||
57 | |||
58 | [LIN1] | ||
59 | |||
60 | [COMMON] | ||
61 | FILES=30 | ||
62 | REM Please read README.TXT in C:\MWW subdirectory before changing the DOS= statement. | ||
63 | DOS=HIGH,UMB | ||
64 | DEVICE=C:\MWW\MANAGER\MWD50430.EXE | ||
65 | SHELL=c:\command.com /e:2048 | ||
66 | ------------------- | ||
67 | |||
68 | The 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 | ||
76 | if "%CONFIG%" == "W95" goto W95 | ||
77 | |||
78 | REM | ||
79 | REM Linux stuff | ||
80 | REM | ||
81 | SET MWPATH=C:\MWW\DLL;C:\MWW\MWGAMES;C:\MWW\DSP | ||
82 | SET BLASTER=A220 I5 D1 | ||
83 | SET MWROOT=C:\MWW | ||
84 | SET LIBPATH=C:\MWW\DLL | ||
85 | SET PATH=C:\WINDOWS;C:\MWW\DLL; | ||
86 | CALL MWAVE START NOSHOW | ||
87 | c:\linux\boot\loadlin.exe @c:\linux\boot\parms\%CONFIG%.par | ||
88 | |||
89 | :W95 | ||
90 | REM | ||
91 | REM Windows 95 stuff | ||
92 | REM | ||
93 | c:\toolkit\guard | ||
94 | SET MSINPUT=C:\MSINPUT | ||
95 | SET MWPATH=C:\MWW\DLL;C:\MWW\MWGAMES;C:\MWW\DSP | ||
96 | REM The following is used by DOS games to recognize Sound Blaster hardware. | ||
97 | REM If hardware settings are changed, please change this line as well. | ||
98 | REM See the Mwave README file for instructions. | ||
99 | SET BLASTER=A220 I5 D1 | ||
100 | SET MWROOT=C:\MWW | ||
101 | SET LIBPATH=C:\MWW\DLL | ||
102 | SET 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; | ||
103 | SET INCLUDE=f:\MSDEV\INCLUDE;F:\MSDEV\MFC\INCLUDE | ||
104 | SET LIB=F:\MSDEV\LIB;F:\MSDEV\MFC\LIB | ||
105 | win | ||
106 | |||
107 | ------------------------ | ||
108 | |||
109 | Now build a file in c:\linux\boot\parms for each Linux config that you have. | ||
110 | |||
111 | For example, my LINDOC3 config is for a docked Thinkpad at runlevel 3 with no | ||
112 | initrd 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 | # | ||
119 | c:\linux\boot\zImage.krn # First value must be filename of Linux kernel. | ||
120 | root=/dev/hda3 # device which gets mounted as root FS | ||
121 | ro # Other kernel arguments go here. | ||
122 | apm=off | ||
123 | doc=yes | ||
124 | 3 | ||
125 | ----------------------- | ||
126 | |||
127 | The doc=yes parameter is an environment variable used by my init scripts, not | ||
128 | a kernel argument. | ||
129 | |||
130 | However, the apm=off parameter IS a kernel argument! APM, at least in my setup, | ||
131 | causes the kernel to crash when loaded via loadlin (but NOT when loaded via | ||
132 | LILO). The APM stuff COULD be forced out of the kernel via the kernel compile | ||
133 | options. Instead, I got an unofficial patch to the APM drivers that allows them | ||
134 | to be dynamically deactivated via kernel arguments. Whatever you chose to | ||
135 | document, APM, it seems, MUST be off for setups like mine. | ||
136 | |||
137 | Now make sure C:\MWW\MWCONFIG.REF looks like this: | ||
138 | |||
139 | ---------------------- | ||
140 | [NativeDOS] | ||
141 | Default=SB1.5 | ||
142 | SBInputSource=CD | ||
143 | SYNTH=FM | ||
144 | QSound=OFF | ||
145 | Reverb=OFF | ||
146 | Chorus=OFF | ||
147 | ReverbDepth=5 | ||
148 | ChorusDepth=5 | ||
149 | SBInputVolume=5 | ||
150 | SBMainVolume=10 | ||
151 | SBWaveVolume=10 | ||
152 | SBSynthVolume=10 | ||
153 | WaveTableVolume=10 | ||
154 | AudioPowerDriver=ON | ||
155 | |||
156 | [FastCFG] | ||
157 | Show=No | ||
158 | HideOption=Off | ||
159 | ----------------------------- | ||
160 | |||
161 | OR the Default= line COULD be | ||
162 | |||
163 | Default=SBPRO | ||
164 | |||
165 | Reboot to Windows 95 and choose Linux. When booted, use sndconfig to configure | ||
166 | the sound modules and voilà - ThinkPad sound with Linux. | ||
167 | |||
168 | Now the gotchas - you can either have CD sound OR Mixers but not both. That's a | ||
169 | problem with the SB1.5 (CD sound) or SBPRO (Mixers) settings. No one knows why | ||
170 | this is! | ||
171 | |||
172 | For some reason MPEG3 files, when played through mpg123, sound like they | ||
173 | are playing at 1/8th speed - not very useful! If you have ANY insight | ||
174 | on 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 @@ | |||
1 | Beta release of the rme96xx (driver for RME 96XX cards like the | ||
2 | "Hammerfall" and the "Hammerfall light") | ||
3 | |||
4 | Important: The driver module has to be installed on a freshly rebooted system, | ||
5 | otherwise the driver might not be able to acquire its buffers. | ||
6 | |||
7 | features: | ||
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 | |||
15 | The driver uses a specific multichannel interface, which I will document | ||
16 | when the driver gets stable. (take a look at the defines in rme96xx.h, | ||
17 | which adds blocked multichannel formats i.e instead of | ||
18 | lrlrlrlr --> llllrrrr etc. | ||
19 | |||
20 | Use the "rmectrl" programm to look at the status of the card .. | ||
21 | or use xrmectrl, a GUI interface for the ctrl program. | ||
22 | |||
23 | What you can do with the rmectrl program is to set the stereo device for | ||
24 | OSS emulation (e.g. if you use SPDIF out). | ||
25 | |||
26 | You do: | ||
27 | |||
28 | ./ctrl offset 24 24 | ||
29 | |||
30 | which makes the stereo device use channels 25 and 26. | ||
31 | |||
32 | Guenter Geiger <geiger@epy.co.at> | ||
33 | |||
34 | copy the first part of the attached source code into rmectrl.c | ||
35 | and the second part into xrmectrl (or get the program from | ||
36 | http://gige.xdv.org/pages/soft/pages/rme) | ||
37 | |||
38 | to 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 | |||
62 | void 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 | |||
84 | int 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" | ||
306 | set CTRLPROG "./rmectrl" | ||
307 | if {$argc} { | ||
308 | set CTRLPROG "$CTRLPROG $argv" | ||
309 | } | ||
310 | puts "CTRLPROG $CTRLPROG" | ||
311 | |||
312 | frame .butts | ||
313 | button .butts.exit -text "Exit" -command "exit" -relief ridge | ||
314 | #button .butts.state -text "State" -command "get_all" | ||
315 | |||
316 | pack .butts.exit -side left | ||
317 | pack .butts -side bottom | ||
318 | |||
319 | |||
320 | # | ||
321 | # STATUS | ||
322 | # | ||
323 | |||
324 | frame .status | ||
325 | |||
326 | # Sampling Rate | ||
327 | |||
328 | frame .status.sr | ||
329 | label .status.sr.text -text "Sampling Rate" -justify left | ||
330 | radiobutton .status.sr.441 -selectcolor red -text "44.1 kHz" -width 10 -anchor nw -variable srate -value 44100 -font times | ||
331 | radiobutton .status.sr.480 -selectcolor red -text "48 kHz" -width 10 -anchor nw -variable srate -value 48000 -font times | ||
332 | radiobutton .status.sr.882 -selectcolor red -text "88.2 kHz" -width 10 -anchor nw -variable srate -value 88200 -font times | ||
333 | radiobutton .status.sr.960 -selectcolor red -text "96 kHz" -width 10 -anchor nw -variable srate -value 96000 -font times | ||
334 | |||
335 | pack .status.sr.text .status.sr.441 .status.sr.480 .status.sr.882 .status.sr.960 -side top -padx 3 | ||
336 | |||
337 | # Lock | ||
338 | |||
339 | frame .status.lock | ||
340 | label .status.lock.text -text "Lock" -justify left | ||
341 | checkbutton .status.lock.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatlock1 -font times | ||
342 | checkbutton .status.lock.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatlock2 -font times | ||
343 | checkbutton .status.lock.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatlock3 -font times | ||
344 | |||
345 | pack .status.lock.text .status.lock.adat1 .status.lock.adat2 .status.lock.adat3 -side top -padx 3 | ||
346 | |||
347 | # Sync | ||
348 | |||
349 | frame .status.sync | ||
350 | label .status.sync.text -text "Sync" -justify left | ||
351 | checkbutton .status.sync.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatsync1 -font times | ||
352 | checkbutton .status.sync.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatsync2 -font times | ||
353 | checkbutton .status.sync.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatsync3 -font times | ||
354 | |||
355 | pack .status.sync.text .status.sync.adat1 .status.sync.adat2 .status.sync.adat3 -side top -padx 3 | ||
356 | |||
357 | # Timecode | ||
358 | |||
359 | frame .status.tc | ||
360 | label .status.tc.text -text "Timecode" -justify left | ||
361 | checkbutton .status.tc.busy -selectcolor red -text "busy" -anchor nw -width 10 -variable tcbusy -font times | ||
362 | checkbutton .status.tc.out -selectcolor red -text "out" -anchor nw -width 10 -variable tcout -font times | ||
363 | checkbutton .status.tc.valid -selectcolor red -text "valid" -anchor nw -width 10 -variable tcvalid -font times | ||
364 | |||
365 | pack .status.tc.text .status.tc.busy .status.tc.out .status.tc.valid -side top -padx 3 | ||
366 | |||
367 | # SPDIF In | ||
368 | |||
369 | frame .status.spdif | ||
370 | label .status.spdif.text -text "SPDIF In" -justify left | ||
371 | label .status.spdif.sr -text "--.- kHz" -anchor n -width 10 -font times | ||
372 | checkbutton .status.spdif.error -selectcolor red -text "Input Lock" -anchor nw -width 10 -variable spdiferr -font times | ||
373 | |||
374 | pack .status.spdif.text .status.spdif.sr .status.spdif.error -side top -padx 3 | ||
375 | |||
376 | pack .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 | |||
383 | proc setprof {} { | ||
384 | global CTRLPROG | ||
385 | global spprof | ||
386 | exec $CTRLPROG pro $spprof | ||
387 | } | ||
388 | |||
389 | proc setemph {} { | ||
390 | global CTRLPROG | ||
391 | global spemph | ||
392 | exec $CTRLPROG emphasis $spemph | ||
393 | } | ||
394 | |||
395 | proc setnoaud {} { | ||
396 | global CTRLPROG | ||
397 | global spnoaud | ||
398 | exec $CTRLPROG dolby $spnoaud | ||
399 | } | ||
400 | |||
401 | proc setoptical {} { | ||
402 | global CTRLPROG | ||
403 | global spoptical | ||
404 | exec $CTRLPROG optout $spoptical | ||
405 | } | ||
406 | |||
407 | proc setspdifin {} { | ||
408 | global CTRLPROG | ||
409 | global spdifin | ||
410 | exec $CTRLPROG spdifin [expr $spdifin - 1] | ||
411 | } | ||
412 | |||
413 | proc setsyncsource {} { | ||
414 | global CTRLPROG | ||
415 | global syncsource | ||
416 | exec $CTRLPROG syncref [expr $syncsource -1] | ||
417 | } | ||
418 | |||
419 | |||
420 | proc setmaster {} { | ||
421 | global CTRLPROG | ||
422 | global master | ||
423 | exec $CTRLPROG master $master | ||
424 | } | ||
425 | |||
426 | proc setwordclock {} { | ||
427 | global CTRLPROG | ||
428 | global wordclock | ||
429 | exec $CTRLPROG wordclock $wordclock | ||
430 | } | ||
431 | |||
432 | proc setadat1cd {} { | ||
433 | global CTRLPROG | ||
434 | global adat1cd | ||
435 | exec $CTRLPROG adat1cd $adat1cd | ||
436 | } | ||
437 | |||
438 | |||
439 | frame .control | ||
440 | |||
441 | # SPDIF In & SPDIF Out | ||
442 | |||
443 | |||
444 | frame .control.spdif | ||
445 | |||
446 | frame .control.spdif.in | ||
447 | label .control.spdif.in.text -text "SPDIF In" -justify left | ||
448 | radiobutton .control.spdif.in.input1 -text "Optical" -anchor nw -width 13 -variable spdifin -value 1 -command setspdifin -selectcolor blue -font times | ||
449 | radiobutton .control.spdif.in.input2 -text "Coaxial" -anchor nw -width 13 -variable spdifin -value 2 -command setspdifin -selectcolor blue -font times | ||
450 | radiobutton .control.spdif.in.input3 -text "Intern " -anchor nw -width 13 -variable spdifin -command setspdifin -value 3 -selectcolor blue -font times | ||
451 | |||
452 | checkbutton .control.spdif.in.adat1cd -text "ADAT1 Intern" -anchor nw -width 13 -variable adat1cd -command setadat1cd -selectcolor blue -font times | ||
453 | |||
454 | pack .control.spdif.in.text .control.spdif.in.input1 .control.spdif.in.input2 .control.spdif.in.input3 .control.spdif.in.adat1cd | ||
455 | |||
456 | label .control.spdif.space | ||
457 | |||
458 | frame .control.spdif.out | ||
459 | label .control.spdif.out.text -text "SPDIF Out" -justify left | ||
460 | checkbutton .control.spdif.out.pro -text "Professional" -anchor nw -width 13 -variable spprof -command setprof -selectcolor blue -font times | ||
461 | checkbutton .control.spdif.out.emphasis -text "Emphasis" -anchor nw -width 13 -variable spemph -command setemph -selectcolor blue -font times | ||
462 | checkbutton .control.spdif.out.dolby -text "NoAudio" -anchor nw -width 13 -variable spnoaud -command setnoaud -selectcolor blue -font times | ||
463 | checkbutton .control.spdif.out.optout -text "Optical Out" -anchor nw -width 13 -variable spoptical -command setoptical -selectcolor blue -font times | ||
464 | |||
465 | pack .control.spdif.out.optout .control.spdif.out.dolby .control.spdif.out.emphasis .control.spdif.out.pro .control.spdif.out.text -side bottom | ||
466 | |||
467 | pack .control.spdif.in .control.spdif.space .control.spdif.out -side top -fill y -padx 3 -expand 1 | ||
468 | |||
469 | # Sync Mode & Sync Source | ||
470 | |||
471 | frame .control.sync | ||
472 | frame .control.sync.mode | ||
473 | label .control.sync.mode.text -text "Sync Mode" -justify left | ||
474 | checkbutton .control.sync.mode.master -text "Master" -anchor nw -width 13 -variable master -command setmaster -selectcolor blue -font times | ||
475 | checkbutton .control.sync.mode.wc -text "Wordclock" -anchor nw -width 13 -variable wordclock -command setwordclock -selectcolor blue -font times | ||
476 | |||
477 | pack .control.sync.mode.text .control.sync.mode.master .control.sync.mode.wc | ||
478 | |||
479 | label .control.sync.space | ||
480 | |||
481 | frame .control.sync.src | ||
482 | label .control.sync.src.text -text "Sync Source" -justify left | ||
483 | radiobutton .control.sync.src.input1 -text "ADAT1" -anchor nw -width 13 -variable syncsource -value 1 -command setsyncsource -selectcolor blue -font times | ||
484 | radiobutton .control.sync.src.input2 -text "ADAT2" -anchor nw -width 13 -variable syncsource -value 2 -command setsyncsource -selectcolor blue -font times | ||
485 | radiobutton .control.sync.src.input3 -text "ADAT3" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 3 -selectcolor blue -font times | ||
486 | radiobutton .control.sync.src.input4 -text "SPDIF" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 4 -selectcolor blue -font times | ||
487 | |||
488 | pack .control.sync.src.input4 .control.sync.src.input3 .control.sync.src.input2 .control.sync.src.input1 .control.sync.src.text -side bottom | ||
489 | |||
490 | pack .control.sync.mode .control.sync.space .control.sync.src -side top -fill y -padx 3 -expand 1 | ||
491 | |||
492 | label .control.space -text "" -width 10 | ||
493 | |||
494 | # Buffer Size | ||
495 | |||
496 | frame .control.buf | ||
497 | label .control.buf.text -text "Buffer Size (Latency)" -justify left | ||
498 | radiobutton .control.buf.b1 -selectcolor red -text "64 (1.5 ms)" -width 13 -anchor nw -variable ssrate -value 1 -font times | ||
499 | radiobutton .control.buf.b2 -selectcolor red -text "128 (3 ms)" -width 13 -anchor nw -variable ssrate -value 2 -font times | ||
500 | radiobutton .control.buf.b3 -selectcolor red -text "256 (6 ms)" -width 13 -anchor nw -variable ssrate -value 3 -font times | ||
501 | radiobutton .control.buf.b4 -selectcolor red -text "512 (12 ms)" -width 13 -anchor nw -variable ssrate -value 4 -font times | ||
502 | radiobutton .control.buf.b5 -selectcolor red -text "1024 (23 ms)" -width 13 -anchor nw -variable ssrate -value 5 -font times | ||
503 | radiobutton .control.buf.b6 -selectcolor red -text "2048 (46 ms)" -width 13 -anchor nw -variable ssrate -value 6 -font times | ||
504 | radiobutton .control.buf.b7 -selectcolor red -text "4096 (93 ms)" -width 13 -anchor nw -variable ssrate -value 7 -font times | ||
505 | radiobutton .control.buf.b8 -selectcolor red -text "8192 (186 ms)" -width 13 -anchor nw -variable ssrate -value 8 -font times | ||
506 | |||
507 | pack .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 | |||
511 | frame .control.offset | ||
512 | |||
513 | frame .control.offset.in | ||
514 | label .control.offset.in.text -text "Offset In" -justify left | ||
515 | label .control.offset.in.off0 -text "dev\#0: -" -anchor nw -width 10 -font times | ||
516 | label .control.offset.in.off1 -text "dev\#1: -" -anchor nw -width 10 -font times | ||
517 | label .control.offset.in.off2 -text "dev\#2: -" -anchor nw -width 10 -font times | ||
518 | label .control.offset.in.off3 -text "dev\#3: -" -anchor nw -width 10 -font times | ||
519 | |||
520 | pack .control.offset.in.text .control.offset.in.off0 .control.offset.in.off1 .control.offset.in.off2 .control.offset.in.off3 | ||
521 | |||
522 | label .control.offset.space | ||
523 | |||
524 | frame .control.offset.out | ||
525 | label .control.offset.out.text -text "Offset Out" -justify left | ||
526 | label .control.offset.out.off0 -text "dev\#0: -" -anchor nw -width 10 -font times | ||
527 | label .control.offset.out.off1 -text "dev\#1: -" -anchor nw -width 10 -font times | ||
528 | label .control.offset.out.off2 -text "dev\#2: -" -anchor nw -width 10 -font times | ||
529 | label .control.offset.out.off3 -text "dev\#3: -" -anchor nw -width 10 -font times | ||
530 | |||
531 | pack .control.offset.out.off3 .control.offset.out.off2 .control.offset.out.off1 .control.offset.out.off0 .control.offset.out.text -side bottom | ||
532 | |||
533 | pack .control.offset.in .control.offset.space .control.offset.out -side top -fill y -padx 3 -expand 1 | ||
534 | |||
535 | |||
536 | pack .control.spdif .control.sync .control.space .control.buf .control.offset -side left -fill both -anchor n -expand 1 | ||
537 | |||
538 | |||
539 | label .statustext -text Status -justify center -relief ridge | ||
540 | label .controltext -text Control -justify center -relief ridge | ||
541 | |||
542 | label .statusspace | ||
543 | label .controlspace | ||
544 | |||
545 | pack .statustext .status .statusspace .controltext .control .controlspace -side top -anchor nw -fill both -expand 1 | ||
546 | |||
547 | |||
548 | proc get_bit {output sstr} { | ||
549 | set idx1 [string last [concat $sstr 1] $output] | ||
550 | set idx1 [expr $idx1 != -1] | ||
551 | return $idx1 | ||
552 | } | ||
553 | |||
554 | proc 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 | |||
560 | proc 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 | |||
566 | proc 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 | |||
594 | proc 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 | |||
703 | proc 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 | |||
756 | proc get_all {} { | ||
757 | get_status | ||
758 | get_control | ||
759 | get_offset | ||
760 | } | ||
761 | |||
762 | # main | ||
763 | while {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 @@ | |||
1 | Recording | ||
2 | --------- | ||
3 | |||
4 | Recording does not work on the author's card, but there | ||
5 | is at least one report of it working on later silicon. | ||
6 | The chip behaves differently than described in the data sheet, | ||
7 | likely due to a chip bug. Working around this would require | ||
8 | the help of ESS (for example by publishing an errata sheet), | ||
9 | but ESS has not done so so far. | ||
10 | |||
11 | Also, the chip only supports 24 bit addresses for recording, | ||
12 | which 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 | ||
19 | driver. To find out whether the driver succeeded loading, | ||
20 | check the kernel log (dmesg). | ||
21 | |||
22 | |||
23 | ALaw/uLaw sample formats | ||
24 | ------------------------ | ||
25 | |||
26 | This driver does not support the ALaw/uLaw sample formats. | ||
27 | ALaw is the default mode when opening a sound device | ||
28 | using OSS/Free. The reason for the lack of support is | ||
29 | that the hardware does not support these formats, and adding | ||
30 | conversion routines to the kernel would lead to very ugly | ||
31 | code in the presence of the mmap interface to the driver. | ||
32 | And since xquake uses mmap, mmap is considered important :-) | ||
33 | and no sane application uses ALaw/uLaw these days anyway. | ||
34 | In short, playing a Sun .au file as follows: | ||
35 | |||
36 | cat my_file.au > /dev/dsp | ||
37 | |||
38 | does not work. Instead, you may use the play script from | ||
39 | Chris Bagwell's sox-12.14 package (or later, available from the URL | ||
40 | below) to play many different audio file formats. | ||
41 | The script automatically determines the audio format | ||
42 | and does do audio conversions if necessary. | ||
43 | http://home.sprynet.com/sprynet/cbagwell/projects.html | ||
44 | |||
45 | |||
46 | Blocking vs. nonblocking IO | ||
47 | --------------------------- | ||
48 | |||
49 | Unlike OSS/Free this driver honours the O_NONBLOCK file flag | ||
50 | not only during open, but also during read and write. | ||
51 | This is an effort to make the sound driver interface more | ||
52 | regular. Timidity has problems with this; a patch | ||
53 | is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html. | ||
54 | (Timidity patched will also run on OSS/Free). | ||
55 | |||
56 | |||
57 | MIDI UART | ||
58 | --------- | ||
59 | |||
60 | The driver supports a simple MIDI UART interface, with | ||
61 | no ioctl's supported. | ||
62 | |||
63 | |||
64 | MIDI synthesizer | ||
65 | ---------------- | ||
66 | |||
67 | The card has an OPL compatible FM synthesizer. | ||
68 | |||
69 | Thomas Sailer | ||
70 | t.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 | ||
5 | driver. To find out whether the driver succeeded loading, | ||
6 | check the kernel log (dmesg). | ||
7 | |||
8 | |||
9 | ALaw/uLaw sample formats | ||
10 | ------------------------ | ||
11 | |||
12 | This driver does not support the ALaw/uLaw sample formats. | ||
13 | ALaw is the default mode when opening a sound device | ||
14 | using OSS/Free. The reason for the lack of support is | ||
15 | that the hardware does not support these formats, and adding | ||
16 | conversion routines to the kernel would lead to very ugly | ||
17 | code in the presence of the mmap interface to the driver. | ||
18 | And since xquake uses mmap, mmap is considered important :-) | ||
19 | and no sane application uses ALaw/uLaw these days anyway. | ||
20 | In short, playing a Sun .au file as follows: | ||
21 | |||
22 | cat my_file.au > /dev/dsp | ||
23 | |||
24 | does not work. Instead, you may use the play script from | ||
25 | Chris Bagwell's sox-12.14 package (available from the URL | ||
26 | below) to play many different audio file formats. | ||
27 | The script automatically determines the audio format | ||
28 | and does do audio conversions if necessary. | ||
29 | http://home.sprynet.com/sprynet/cbagwell/projects.html | ||
30 | |||
31 | |||
32 | Blocking vs. nonblocking IO | ||
33 | --------------------------- | ||
34 | |||
35 | Unlike OSS/Free this driver honours the O_NONBLOCK file flag | ||
36 | not only during open, but also during read and write. | ||
37 | This is an effort to make the sound driver interface more | ||
38 | regular. Timidity has problems with this; a patch | ||
39 | is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html. | ||
40 | (Timidity patched will also run on OSS/Free). | ||
41 | |||
42 | |||
43 | MIDI UART | ||
44 | --------- | ||
45 | |||
46 | The driver supports a simple MIDI UART interface, with | ||
47 | no ioctl's supported. | ||
48 | |||
49 | |||
50 | MIDI synthesizer | ||
51 | ---------------- | ||
52 | |||
53 | The card both has an OPL compatible FM synthesizer as well as | ||
54 | a wavetable synthesizer. | ||
55 | |||
56 | I haven't managed so far to get the OPL synth running. | ||
57 | |||
58 | Using the wavetable synthesizer requires allocating | ||
59 | 1-4MB of physically contiguous memory, which isn't possible | ||
60 | currently on Linux without ugly hacks like the bigphysarea | ||
61 | patch. Therefore, the driver doesn't support wavetable | ||
62 | synthesis. | ||
63 | |||
64 | |||
65 | No support from S3 | ||
66 | ------------------ | ||
67 | |||
68 | I do not get any support from S3. Therefore, the driver | ||
69 | still has many problems. For example, although the manual | ||
70 | states that the chip should be able to access the sample | ||
71 | buffer anywhere in 32bit address space, I haven't managed to | ||
72 | get it working with buffers above 16M. Therefore, the card | ||
73 | has the same disadvantages as ISA soundcards. | ||
74 | |||
75 | Given that the card is also very noisy, and if you haven't | ||
76 | already bought it, you should strongly opt for one of the | ||
77 | comparatively priced Ensoniq products. | ||
78 | |||
79 | |||
80 | Thomas Sailer | ||
81 | t.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 @@ | |||
1 | modprobe sound | ||
2 | insmod ad1848 | ||
3 | insmod gus io=* irq=* dma=* ... | ||
4 | |||
5 | This loads the driver for the Gravis Ultrasound family of sound cards. | ||
6 | |||
7 | The gus module takes the following arguments | ||
8 | |||
9 | io I/O address of the Ultrasound card (eg. io=0x220) | ||
10 | irq IRQ of the Sound Blaster card | ||
11 | dma DMA channel for the Sound Blaster | ||
12 | dma16 2nd DMA channel, only needed for full duplex operation | ||
13 | type 1 for PnP card | ||
14 | gus16 1 for using 16 bit sampling daughter board | ||
15 | no_wave_dma Set to disable DMA usage for wavetable (see note) | ||
16 | db16 ??? | ||
17 | |||
18 | |||
19 | no_wave_dma option | ||
20 | |||
21 | This option defaults to a value of 0, which allows the Ultrasound wavetable | ||
22 | DSP to use DMA for for playback and downloading samples. This is the same | ||
23 | as the old behaviour. If set to 1, no DMA is needed for downloading samples, | ||
24 | and allows owners of a GUS MAX to make use of simultaneous digital audio | ||
25 | (/dev/dsp), MIDI, and wavetable playback. | ||
26 | |||
27 | |||
28 | If you have problems in recording with GUS MAX, you could try to use | ||
29 | just one 8 bit DMA channel. Recording will not work with one DMA | ||
30 | channel 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 @@ | |||
1 | vwsnd - Sound driver for the Silicon Graphics 320 and 540 Visual | ||
2 | Workstations' onboard audio. | ||
3 | |||
4 | Copyright 1999 Silicon Graphics, Inc. All rights reserved. | ||
5 | |||
6 | |||
7 | At the time of this writing, March 1999, there are two models of | ||
8 | Visual Workstation, the 320 and the 540. This document only describes | ||
9 | those models. Future Visual Workstation models may have different | ||
10 | sound capabilities, and this driver will probably not work on those | ||
11 | boxes. | ||
12 | |||
13 | The Visual Workstation has an Analog Devices AD1843 "SoundComm" audio | ||
14 | codec chip. The AD1843 is accessed through the Cobalt I/O ASIC, also | ||
15 | known as Lithium. This driver programs both both chips. | ||
16 | |||
17 | ============================================================================== | ||
18 | QUICK CONFIGURATION | ||
19 | |||
20 | # insmod soundcore | ||
21 | # insmod vwsnd | ||
22 | |||
23 | ============================================================================== | ||
24 | I/O CONNECTIONS | ||
25 | |||
26 | On the Visual Workstation, only three of the AD1843 inputs are hooked | ||
27 | up. The analog line in jacks are connected to the AD1843's AUX1 | ||
28 | input. The CD audio lines are connected to the AD1843's AUX2 input. | ||
29 | The microphone jack is connected to the AD1843's MIC input. The mic | ||
30 | jack is mono, but the signal is delivered to both the left and right | ||
31 | MIC inputs. You can record in stereo from the mic input, but you will | ||
32 | get the same signal on both channels (within the limits of A/D | ||
33 | accuracy). Full scale on the Line input is +/- 2.0 V. Full scale on | ||
34 | the MIC input is 20 dB less, or +/- 0.2 V. | ||
35 | |||
36 | The AD1843's LOUT1 outputs are connected to the Line Out jacks. The | ||
37 | AD1843's HPOUT outputs are connected to the speaker/headphone jack. | ||
38 | LOUT2 is not connected. Line out's maximum level is +/- 2.0 V peak to | ||
39 | peak. The speaker/headphone out's maximum is +/- 4.0 V peak to peak. | ||
40 | |||
41 | The AD1843's PCM input channel and one of its output channels (DAC1) | ||
42 | are connected to Lithium. The other output channel (DAC2) is not | ||
43 | connected. | ||
44 | |||
45 | ============================================================================== | ||
46 | CAPABILITIES | ||
47 | |||
48 | The AD1843 has PCM input and output (Pulse Code Modulation, also known | ||
49 | as wavetable). PCM input and output can be mono or stereo in any of | ||
50 | four formats. The formats are 16 bit signed and 8 bit unsigned, | ||
51 | u-Law, and A-Law format. Any sample rate from 4 KHz to 49 KHz is | ||
52 | available, in 1 Hz increments. | ||
53 | |||
54 | The AD1843 includes an analog mixer that can mix all three input | ||
55 | signals (line, mic and CD) into the analog outputs. The mixer has a | ||
56 | separate gain control and mute switch for each input. | ||
57 | |||
58 | There are two outputs, line out and speaker/headphone out. They | ||
59 | always produce the same signal, and the speaker always has 3 dB more | ||
60 | gain than the line out. The speaker/headphone output can be muted, | ||
61 | but this driver does not export that function. | ||
62 | |||
63 | The hardware can sync audio to the video clock, but this driver does | ||
64 | not have a way to specify syncing to video. | ||
65 | |||
66 | ============================================================================== | ||
67 | PROGRAMMING | ||
68 | |||
69 | This section explains the API supported by the driver. Also see the | ||
70 | Open Sound Programming Guide at http://www.opensound.com/pguide/ . | ||
71 | This section assumes familiarity with that document. | ||
72 | |||
73 | The driver has two interfaces, an I/O interface and a mixer interface. | ||
74 | There is no MIDI or sequencer capability. | ||
75 | |||
76 | ============================================================================== | ||
77 | PROGRAMMING PCM I/O | ||
78 | |||
79 | The I/O interface is usually accessed as /dev/audio or /dev/dsp. | ||
80 | Using the standard Open Sound System (OSS) ioctl calls, the sample | ||
81 | rate, number of channels, and sample format may be set within the | ||
82 | limitations described above. The driver supports triggering. It also | ||
83 | supports getting the input and output pointers with one-sample | ||
84 | accuracy. | ||
85 | |||
86 | The 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 | |||
95 | Memory mapping (mmap) is not implemented. | ||
96 | |||
97 | The driver permits subdivided fragment sizes from 64 to 4096 bytes. | ||
98 | The number of fragments can be anything from 3 fragments to however | ||
99 | many fragments fit into 124 kilobytes. It is up to the user to | ||
100 | determine how few/small fragments can be used without introducing | ||
101 | glitches with a given workload. Linux is not realtime, so we can't | ||
102 | promise anything. (sigh...) | ||
103 | |||
104 | When this driver is switched into or out of mu-Law or A-Law mode on | ||
105 | output, it may produce an audible click. This is unavoidable. To | ||
106 | prevent clicking, use signed 16-bit mode instead, and convert from | ||
107 | mu-Law or A-Law format in software. | ||
108 | |||
109 | ============================================================================== | ||
110 | PROGRAMMING THE MIXER INTERFACE | ||
111 | |||
112 | The mixer interface is usually accessed as /dev/mixer. It is accessed | ||
113 | through ioctls. The mixer allows the application to control gain or | ||
114 | mute several audio signal paths, and also allows selection of the | ||
115 | recording source. | ||
116 | |||
117 | Each of the constants described here can be read using the | ||
118 | MIXER_READ(SOUND_MIXER_xxx) ioctl. Those that are not read-only can | ||
119 | also be written using the MIXER_WRITE(SOUND_MIXER_xxx) ioctl. In most | ||
120 | cases, <sys/soundcard.h> defines constants SOUND_MIXER_READ_xxx and | ||
121 | SOUND_MIXER_WRITE_xxx which work just as well. | ||
122 | |||
123 | SOUND_MIXER_CAPS Read-only | ||
124 | |||
125 | This is a mask of optional driver capabilities that are implemented. | ||
126 | This driver's only capability is SOUND_CAP_EXCL_INPUT, which means | ||
127 | that only one recording source can be active at a time. | ||
128 | |||
129 | SOUND_MIXER_DEVMASK Read-only | ||
130 | |||
131 | This is a mask of the sound channels. This driver's channels are PCM, | ||
132 | LINE, MIC, CD, and RECLEV. | ||
133 | |||
134 | SOUND_MIXER_STEREODEVS Read-only | ||
135 | |||
136 | This is a mask of which sound channels are capable of stereo. All | ||
137 | channels are capable of stereo. (But see caveat on MIC input in I/O | ||
138 | CONNECTIONS section above). | ||
139 | |||
140 | SOUND_MIXER_OUTMASK Read-only | ||
141 | |||
142 | This is a mask of channels that route inputs through to outputs. | ||
143 | Those are LINE, MIC, and CD. | ||
144 | |||
145 | SOUND_MIXER_RECMASK Read-only | ||
146 | |||
147 | This is a mask of channels that can be recording sources. Those are | ||
148 | PCM, LINE, MIC, CD. | ||
149 | |||
150 | SOUND_MIXER_PCM Default: 0x5757 (0 dB) | ||
151 | |||
152 | This is the gain control for PCM output. The left and right channel | ||
153 | gain are controlled independently. This gain control has 64 levels, | ||
154 | which range from -82.5 dB to +12.0 dB in 1.5 dB steps. Those 64 | ||
155 | levels are mapped onto 100 levels at the ioctl, see below. | ||
156 | |||
157 | SOUND_MIXER_LINE Default: 0x4a4a (0 dB) | ||
158 | |||
159 | This is the gain control for mixing the Line In source into the | ||
160 | outputs. The left and right channel gain are controlled | ||
161 | independently. 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 | ||
163 | 100 levels at the ioctl, see below. | ||
164 | |||
165 | SOUND_MIXER_MIC Default: 0x4a4a (0 dB) | ||
166 | |||
167 | This is the gain control for mixing the MIC source into the outputs. | ||
168 | The left and right channel gain are controlled independently. This | ||
169 | gain control has 32 levels, which range from -34.5 dB to +12.0 dB in | ||
170 | 1.5 dB steps. Those 32 levels are mapped onto 100 levels at the | ||
171 | ioctl, see below. | ||
172 | |||
173 | SOUND_MIXER_CD Default: 0x4a4a (0 dB) | ||
174 | |||
175 | This is the gain control for mixing the CD audio source into the | ||
176 | outputs. The left and right channel gain are controlled | ||
177 | independently. 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 | ||
179 | 100 levels at the ioctl, see below. | ||
180 | |||
181 | SOUND_MIXER_RECLEV Default: 0 (0 dB) | ||
182 | |||
183 | This is the gain control for PCM input (RECording LEVel). The left | ||
184 | and right channel gain are controlled independently. This gain | ||
185 | control has 16 levels, which range from 0 dB to +22.5 dB in 1.5 dB | ||
186 | steps. Those 16 levels are mapped onto 100 levels at the ioctl, see | ||
187 | below. | ||
188 | |||
189 | SOUND_MIXER_RECSRC Default: SOUND_MASK_LINE | ||
190 | |||
191 | This is a mask of currently selected PCM input sources (RECording | ||
192 | SouRCes). Because the AD1843 can only have a single recording source | ||
193 | at a time, only one bit at a time can be set in this mask. The | ||
194 | allowable values are SOUND_MASK_PCM, SOUND_MASK_LINE, SOUND_MASK_MIC, | ||
195 | or SOUND_MASK_CD. Selecting SOUND_MASK_PCM sets up internal | ||
196 | resampling which is useful for loopback testing and for hardware | ||
197 | sample rate conversion. But software sample rate conversion is | ||
198 | probably faster, so I don't know how useful that is. | ||
199 | |||
200 | SOUND_MIXER_OUTSRC DEFAULT: SOUND_MASK_LINE|SOUND_MASK_MIC|SOUND_MASK_CD | ||
201 | |||
202 | This is a mask of sources that are currently passed through to the | ||
203 | outputs. Those sources whose bits are not set are muted. | ||
204 | |||
205 | ============================================================================== | ||
206 | GAIN CONTROL | ||
207 | |||
208 | There are five gain controls listed above. Each has 16, 32, or 64 | ||
209 | steps. Each control has 1.5 dB of gain per step. Each control is | ||
210 | stereo. | ||
211 | |||
212 | The OSS defines the argument to a channel gain ioctl as having two | ||
213 | components, left and right, each of which ranges from 0 to 100. The | ||
214 | two components are packed into the same word, with the left side gain | ||
215 | in the least significant byte, and the right side gain in the second | ||
216 | least 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 | |||
226 | So each OSS gain control has 101 steps. But the hardware has 16, 32, | ||
227 | or 64 steps. The hardware steps are spread across the 101 OSS steps | ||
228 | nearly evenly. The conversion formulas are like this, given N equals | ||
229 | 16, 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 | |||
235 | Here is a snippet of C code that will return the left and right gain | ||
236 | of any channel in dB. Pass it one of the predefined gain_desc_t | ||
237 | structures 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 | |||
270 | And 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 | |||