Next Previous Contents

4. Testing the Sound Driver

4.1 /proc/devices, /dev/sndstat

If you have built-in sound support, you will get some useful information at boot time. If you have sound support installed as a loadable module, you can get the same information (perhaps after removing the sound module with modprobe -r sound first) with

# modprobe -a sound trace_init=1
Sound initialization started

<Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
<Sound Blaster 16> at 0x330 irq 5 dma 0
<Yamaha OPL3 FM> at 0x388
Sound initialization complete
AWE32 Sound Driver v0.3.3e (DRAM 2048k)

If you have a /proc virtual file system, you can look for the sound device with

# cat /proc/devices
Character devices:
[...]
14 sound
[...]

Next make sure you have the correct devices installed under /dev/. Please look at the Sound HOWTO for details. Then ask /dev/sndstat about the status of the sound module:

# cat /dev/sndstat
Sound Driver:3.5.4-960630 (Sat Oct 11 19:35:14 CEST 1997 root,
Linux flora 2.0.29 #1 Sat Oct 11 19:12:56 CEST 1997 i586 unknown)
Kernel: Linux flora 2.0.29 #1 Sat Oct 11 19:36:23 CEST 1997 i586
Config options: 0

Installed drivers:
Type 1: OPL-2/OPL-3 FM
Type 2: Sound Blaster
Type 7: SB MPU-401

Card config:
Sound Blaster at 0x220 irq 5 drq 1,5
SB MPU-401 at 0x330 irq 5 drq 0
OPL-2/OPL-3 FM at 0x388 drq 0

Audio devices:
0: Sound Blaster 16 (4.13)

Synth devices:
0: Yamaha OPL-3
1: AWE32 Driver v0.3.3e (DRAM 2048k)

Midi devices:
0: Sound Blaster 16

Timers:
0: System clock

Mixers:
0: Sound Blaster
1: AWE32 Equalizer

If you don't have an output like this, perhaps there is an error in your configuration. Go on and see what doesn't work, then go back to step Getting Started, checking everything.

4.2 Output - The Raw Audio Device

Try to get an .au file (Sun workstation) or a raw sample file, and do

# cat bell.au > /dev/audio

resp.

# cat sample > /dev/dsp

You should hear the content of the file via the Audio Device 0: Sound Blaster 16 (4.3).

4.3 Output - The OPL-2/OPL-3 Synthesis

If you want to use the OPL-2/OPL-3 FM synthesis to play MIDI-Files with your sound card, try the program playmidi (see Appendix B). Start it with

# playmidi -f dance.mid

or

# playmidi -4 dance.mid

The former will give you OPL-2, the latter OPL-3 MIDI music. If you are embarrassed about the sound, don't blame playmidi: It is the FM synthesis that sounds bad.

Imagine you would only have the OSS/Free Sound Driver: Than this is the quality of MIDI Music you can achieve (apart from software synthesis). Fortunately, you have a SB AWE, and you can use the Wave Table capabilities with the AWE Sound Driver Extension.

4.4 Output - The Wave Table Synthesis

The AWE Driver Extension comes with special tools (awesfx) to make use of the EMU 8000 Wave Table synthesis. First, you have to load a Sound Font Bank on your card - even if you want to use the ROM samples! You can get the files from your Windows installation - look for files ending in *.sfb or *.sf2.

The ROM samples can be loaded with SYNTHGM.SBK, real samples are in SYNTHGS.SBK and SYNTHMT.SBK, as well as in SAMPLE.SBK. You can get other Sound Font Banks via ftp or www, try the EMU Homepage, the web site from Creative Labs, and look out for the Chaos samples, they are really good (be sure to check out the AWE Driver Web Site).

Try to load the standard GM (ROM) set with

# sfxload -i synthgm.sbk

and then play a midi file that comes with your SB AWE:

# drvmidi dance.mid

4.5 Mixing

Get your favorite mixer program and start it. Start a raw audio sample and two MIDI files at the same time, and try out the mixer settings. Play a bit, it should be very easy. Here a list of the devices and how they are called:

Yamaha OPL-3

Synth or FM

AWE32 Driver

Synth or FM (does anyone know a mixer were the last two are separated from each other?)

Sound Blaster 16 (4.13)

PCM or DSP

PC Speaker (still alive)

Spkr

Other mixer settings refer to the CD ROM, possibly connected to the sound card, to Master Volume, Bass, Treble and Recording Level of the different input lines. You can specify which lines should be recorded.

4.6 Input - Sampling with the Raw Audio Device

You can record different sources: a connected CD ROM, a microphone connected to mic, and any that you can connect to line in. Set the mixer in the appropriate position. Play a sound and record into a file, reading from the Raw Audio Device, for example:

# cdplay
# dd bs=8k count=5 </dev/dsp >music.au
5+0 records in
5+0 records out
# cat music.au >/dev/dsp

records and plays five seconds of audio from the input device.

4.7 The MIDI Port

Sorry, no information about MIDI port yet!


Next Previous Contents
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout