This page provides several ways to configure the sound. Either you use the opensound system (OSS), that you can download from http://www.opensound.com or you take the free version of OSS. You can configure the sound manually as shown here or using the script. The linux plug and play configuration can also be used to setup the sound.
a) using OSS/Lite free version: (OSS/Free:3.8s2++-971130)
OSS/Lite is included in kernel 2.2.13. Install the downloaded file linux-2.2.13.tar.gz in /usr/src. Remove the link "linux" in /usr/src. Otherwise your current kernel sources might be overwriten! Then install the archive using tar and rename linux to linux-2.2.13 and set a link to linux-2.2.13 with name linux. The following command summarize it:
> cd /usr/src
> ftp open ftp.linux.org
> cd pub/linux/kernel/v2.2/
> get linux-2.2.13.tar.gz
> quit
> rm linux
> tar zvxf linux-2.2.13.tar.gz
> mv linux linux-2.2.13
> ln -s linux-2.2.13 linux
I have written an installation script and a deinstallation script, that configures the sound part of the kernel. Furthermore, this script configures /etc/conf.modules and /etc/pcmcia/config.opts to avoid interupt conflicts. This script is distributed in the hope that it will be useful, but without any warranty. Please report any bugs or suggestions! If you prefer the manual configuration follow the lines below, otherwise you can skip to the test.
Now go into the linux directory to compile the kernel (make sure to clean /usr/src/linux/modules and /lib/modules/2.2.13 if you had installed kernel 2.2.13 before and probably had tried to install the sound driver without success - this is important!!):
> cd linux
> make menuconfig
After some compilation you get to the following main menu and choose sound and afterwards set the sound driver options as shown in the following two frames:
You do not need to activate "Additional low level sound drivers" and do not try to use "NM256AV/NM256ZX" audio support! Now exit the menus, save the kernel configuration and compile the kernel (if you are experienced, you might only need to recompile and install the modules but it is impossible to describe all here):
> make dep;
> # the following command might be different
from system to system:
> make zlilo
> make modules
> make modules_install
If you use lilo then you can use "make zlilo" as shown above. However, if the kernel gets to big or you do not use lilo you might need to use something like "make bzImage" or "make vmlinuz" etc. (see Kernel-howto for more details). In /lib/modules/2.2.13/misc should be the modules ad1848.o, softoss2.o, opl3.o, sound.o, soundcore.o and v_midi.o and eventually some more.
The next step is to configure /etc/conf.modules. Make sure that none of the following aliases is commented:
# alias char-major-14 off
# alias sound on
# alias midi off
Then insert (if not already there) the following lines:
alias char-major-14 ad1848
options ad1848 io=0x530 irq=10 dma=1 dma2=0
post-install ad1848 modprobe "-k" opl3; modprobe
"-k" v_midi; modprobe "-k" softoss2
options opl3 io=0x388
Furthermore, it might be necessary to configure your pcmcia (/etc/pcmcia/config.opts), because there might be an IRQ conflict. Exclude at least the IRQs 7 and 10. Now you should be ready to boot your new kernel. Good luck!
If you were successful, you can test your sound by cat-ting an .au file to the /dev/audio port, a .wav (no mpeg-wav!) file to the /dev/dsp port or by looking at the sound status using
> cat /dev/sndstat
which results in
OSS/Free:3.8s2++-971130
Load type: Driver loaded as a module
Kernel: Linux travelson 2.2.13 #4 Sun Feb
13 06:50:43 GMT 2000 i686
Config options: 0
Installed drivers:
Card config:
Audio devices:
0: MSS audio codec (CS4231) (DUPLEX)
Synth devices:
0: Yamaha OPL3
1: SoftOSS
Midi devices:
0: Loopback MIDI Port 1
1: Loopback MIDI Port 2
Timers:
0: System clock
1: SoftOSS
Mixers:
0: MSS audio codec (CS4231)
The modules should be loaded automatically (if not activate it in kernel!). You will see it using "lsmod" in the command line:
Module
Size Used by
softoss2
56784 0 (autoclean)
v_midi
4916 0 (autoclean)
opl3
11208 0 (autoclean)
ad1848
15920 0 (autoclean)
sound
57228 0 (autoclean) [softoss2 v_midi opl3 ad1848]
soundcore
2372 7 (autoclean) [sound]
At this point you should be able to control the volume (with any mixer, for example, kmix of kde), you should be able to play .wav files (cat <filename>.wav > /dev/dsp), .au files (cat <filename>.au > /dev/audio) and .mid files (with kmid or kmidi from kde). I was not able to play mpegs, which might be the fault of the player or defect mpeg files. Definitely the devices /dev/mixer, /dev/dsp and /dev/audio seemed to work. However, I could not get run the micro to record something - please report me, if you got it!!!
b) using OSS: (see http://www.opensound.com)
Download the package (something like osslinux*glibc*.tar.gz) and install it according to the manual (running ./oss-install) in one of the proposed directories. Make sure /etc/conf.modules has only one "alias char-major-14" set as (you might have been asked by oss-install):
alias char-major-14 off
OSS will recognize Neomagic NM2200 PCI *Beta* which did not work on my notebook. Therefore, when you are in the following menu, use "Remove a card/device" and "Add new card/device" as "Generic 256AV NM2". You should go through the following menus:
The Readme file recommends to set the I/O, IRQ and DMA as in Windows. According to my windows configuration only the IRQ of the OPL3-SA MIDI port must be set to 7 instead of 5.
Furthermore, it might be necessary to configure your pcmcia (/etc/pcmcia/config.opts), because there might be an IRQ conflict. Exclude at least the IRQs 7 and 10 (in my case, as I set these IRQs for OSS). Save the configuration and better reboot linux now.
To test OSS switch on the sound using "soundon" and test it. "cat /dev/sndstat" will result in the following
OSS/Linux 3.9.3d (C) 4Front Technologies 1996-2000
License serial number: E00000008
This Open Sound System copy is licensed for
limited evaluation use only.
You can order the permanent OSS license from
http://www.opensound.com/order.html
License will expire after: 04/2000
Options: ALL
*** Activity time of this evaluation version is limited ***
Build: 2.2.14-UP
Card config:
Yamaha OPL3-SAx at 0x530 irq 10 drq 1,0
OPL3-SA MIDI at 0x330 irq 7
OPL-2/OPL-3 FM at 0x388
Audio devices:
0: MS Sound System (CS4231) (DUPLEX)
1: Shadow of audio device #0 (DUPLEX)
Synth devices:
0: Yamaha OPL-3
Midi devices:
0: OPL3-SA (MPU401)
Timers:
0: System clock
1: MS Sound System (CS4231)
Mixers:
0: MS Sound System (CS4231)
Although the soundcard is a PCI it can be configured like a ISA card. Do the following steps: