Version 1.1 - 18 April 1998
Version 1.2 - 16 June 1998
Version 1.3 - 25 November 1998
This document is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.
You can obtain a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Note: | OSS/Free 3s86 was used throughout this project with kernel version 2.0.30. I have no idea of how the previous version of the sound driver would cope with this treatment. |
As a first attempt at getting the card to work under Linux, use the ISA PnP tools to configure the card thus:
As an example, the appropriate lines from my /etc/isapnp.conf file are reproduced below. These are only a guide and you should follow the instructions which come with the isapnptools package. Also note that you must use a version > 1.6 as previous versions are known to have problems with soundcards.
(READPORT 0x0203) (ISOLATE) (IDENTIFY *) # Card 1: (serial identifier 26 01 00 00 00 07 00 93 05) # Vendor Id ALS0007, Serial Number 16777216, checksum 0x26. # Version 1.0, Vendor version 0.0 # ANSI string -->Avance Sound Chip<-- # This sets the DSP base port to 0x220, audio IRQ to 5 and audio DMA to 1 (CONFIGURE ALS0007/16777216 (LD 0 (IO 0 (BASE 0x0220)) (INT 0 (IRQ 5 (MODE +E))) (DMA 0 (CHANNEL 1)) (ACT Y) )) # This is the OPL/3 FM synthesiser. Base port is 0x388. (CONFIGURE ALS0007/16777216 (LD 1 (IO 0 (BASE 0x0388)) (ACT Y) )) # Logical device 2 is the joystick port. I don't have this configured. (CONFIGURE ALS0007/16777216 (LD 2 # (IO 0 (BASE 0x0200)) # (ACT Y) )) # This is the MPU-401 Midi interface. Base port = 0x330, IRQ = 10 (CONFIGURE ALS0007/16777216 (LD 3 (IO 0 (BASE 0x0330)) (INT 0 (IRQ 10 (MODE +E))) (ACT Y) ))
Compile the Linux sound driver ( OSS/Free 3.8s6 ). Configure a Soundblaster card with the same values as used to configure the card using ISA PnP (note that there is no 16 bit DMA, so set this to -1). Importantly, the sound driver should be compiled as a module since this particular card does not seem to work unless ISA PnP has been run first. Interestingly enough, an initialisation under DOS followed by a warm boot with LoadLin does not always seem to be enough.
Once the new module is installed, test your installation:
cat /dev/sndstatIf all is working as expected, the system should respond with:
OSS/Free3.8s5-971223 (Fri Jan 30 21:18:36 CST 1998 root, Linux marble 2.0.30 #2 Fri Jan 30 20:45:26 CST 1998 i586 unknown) Load type: Driver loaded as a module. Kernel: Linux marble 2.0.30 #5 Sun Feb 1 20:56:38 CST 1998 i586 Config options: 0 Installed drivers: Type 1: OPL-2/OPL-3 FM Type 26: MPU-401 (UART) Type 2: Sound Blaster Type 29: Sound Blaster PnP Type 7: SB MPU-401 Card config: Sound Blaster at 0x220 irq 5 drq 1 SB MPU-401 at 0x330 irq 10 drq 0 OPL-2/OPL-3 FM at 0x388 drq 0 Audio devices: 0: Sound Blaster 16 (4.2) Synth devices: 0: Yamaha OPL-3 Midi devices: 0: Sound Blaster Timers: 0: System clock Mixers: 0: Sound BlasterSurprisingly, even though the ALS-007 isn't known as a "Soundblaster" card, the system seems to identify it as such. Even better is that most of the card appears to work as expected. Using wavplay 1.0 it is possible to play both 8 and 16 bit samples and the MPU-401 interface also works satisfactorily using playmidi 2.2 to play a .mid file. The FM interface also responds to Playmidi in the expected way.
However, it seems from a cursory test using mixer-1.0 that all is not well with the mixer part of the card, even though OSS identifies it as a Soundblaster mixer. In a way this is not surprising, since the documentation for this soundcard warns that the (Diamond Sound System) mixer is not compatible with the Soundblaster mixer.
MIR | Register referenced using MDR |
62h | Master volume |
64h | DSP (audio) volume |
66h | FM synthesiser volume |
68h | CD audio volume |
6Ah | Mic/PC speaker volume |
6Eh | Line input volume |
3Ch | Output control register #1 |
4Ch | Output control register #2 |
6Ch | Record source select |
To read or write to any of these registers, first do an write the appropriate number to the MIR at [base]+04h. The existing values can then be read by reading the MDR at [base]+05h, and a new value can be set by writing to the MDR.
bit -> 7 6 5 4 3 2 1 0 \_________/ | | | | |____Mic on (3Ch) Reserved______| | | | | | | | |_________CD on R (3Ch) Line On L (3Ch)_________| | | DSP on R (4Ch) Midi (FM) On L (4Ch) | | | |______________CD on L (3Ch) Line On R (3Ch) | DSP on R (4Ch) Midi (FM) On R (4Ch)_________|
CD audio out | = 2 |
microphone input | = 4 |
line in | = 6 |
FM synth | = 7 |
Mixer output | = 7 |
Oddly enough it seems that a value of "7" is used to select both the FM synth AND the "mixer output" with no other values being used to differentiate them. Experiments have shown that a value of 7 seems to select the mixer output rather than just the FM device. To record the FM synthesiser it would therefore seem necessary to fade out all inputs expect the FM synth prior to recording.
It is important to note that in order for recording (sampling) to take place correctly, the DSP must be removed from the output of the soundcard. This is easily done by zeroing bits 1 and 2 of mixer register 4ch. After recording, these 2 bits may be set back to 1 to re-enable DSP output. There also seems to be a tendancy for the DSP volume to be faded down before switching these bits (and fading back up after the switch); this is not necessary though, and appears to be done to prevent clicks in the output.
The driver behaves exactly as for a SB16 with the following exceptions.
OSS/Free3.8s5-971223 (Sun Feb 1 20:53:28 CST 1998 root, Linux marble 2.0.30 #4 Sun Feb 1 20:39:53 CST 1998 i586 unknown) Load type: Driver loaded as a module. Kernel: Linux marble 2.0.30 #5 Sun Feb 1 20:56:38 CST 1998 i586 Config options: 0 Installed drivers: Type 1: OPL-2/OPL-3 FM Type 26: MPU-401 (UART) Type 2: Sound Blaster Type 29: Sound Blaster PnP Type 7: SB MPU-401 Card config: Sound Blaster at 0x220 irq 5 drq 1 SB MPU-401 at 0x330 irq 10 drq 0 OPL-2/OPL-3 FM at 0x388 drq 0 Audio devices: 0: Sound Blaster (ALS-007) (4.2) Synth devices: 0: Yamaha OPL-3 Midi devices: 0: Sound Blaster Timers: 0: System clock Mixers: 0: Avance ALS-007
With this configuration:
However, the ALS-007 mixer patches will not drive the mixers of these other chips. Whereas the ALS-007 has only a 16 level mixer, these other cards have 32 levels; from the mixer register discussions above it should be clear that the 32 level chips could not possibly use the same register format. Given that the SB16 is also a 32 level mixer it is possible that the standard drivers will successfully drive the other ALS-xxx chips. Since I do not have access to any other ALS-xxx based cards I am not in a position to confirm this theory either way. The best way is to try it and see.