[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SOUND HELP



On Wed, 24 Mar 1999, Craig T. Hancock wrote:

> I don't undersand what I am doing wrong if anyone can help I would greatly appricate
> it

If I am getting this right, you have a Soundblaster 16 *Plug and Play* ? 
In any case, that's what I have.  If that is correct, you might need to
compile all the sound parts of the kernel as modules because you need to
configure the PnP card before you can actually have the kernel support it. 
This is usually done with a tool like isapnp (the isapnptools package). 
I'm not saying that the following is the right way or the only way to do
it, especially because I never was able to get the FM synthesizer to work.
(If anyone has a clue about getting the synthesizer/midi part to work,
please respond to this mailing-list!!)
This is how I did it:
First, I got the isapnptools package installed.
Then I ran pnpdump > /etc/isapnp.conf and uncommented the appropriate
lines in it.  Here's the essential part of my isapnp.conf (comment- and
blank lines removed):
(READPORT 0x0203)
(ISOLATE PRESERVE)
(IDENTIFY *)
(VERBOSITY 2)
(CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
(CONFIGURE CTL00f0/-1 (LD 0
 (INT 0 (IRQ 5 (MODE +E)))
 (DMA 0 (CHANNEL 1))
 (DMA 1 (CHANNEL 5))
 (IO 0 (SIZE 16) (BASE 0x0220))
 (IO 1 (SIZE 2) (BASE 0x0330))
 (IO 2 (SIZE 4) (BASE 0x0388))
 (NAME "CTL00f0/-1[0]{Audio               }")
 (ACT Y)
))
(CONFIGURE CTL00f0/-1 (LD 1
 (IO 0 (SIZE 1) (BASE 0x0200))
 (NAME "CTL00f0/-1[1]{Game                }")
 (ACT Y)
))
(WAITFORKEY)

In other words, I uncommented the first block for every device (I left the
comment lines marked with `#', though... ;-), and I also uncommented the
(ACT Y) part.
Now, when I boot (or run isapnp /etc/isapnp.conf), I get the following:

lspci not found, so PCI resource conflict not checked
Board 1 has Identity 6d ff ff ff ff f0 00 8c 0e:  CTL00f0 Serial No -1 [checksum 6d]
CTL00f0/-1[0]{Audio               }: Ports 0x220 0x330 0x388; IRQ5 DMA1 DMA5 --- Enabled OK
CTL00f0/-1[1]{Game                }: Port 0x200; --- Enabled OK

(The PCI stuff is because I don't have PCI slots in this old 486DX33.)
The 'Game' part is not really necessary - I don't have a joystick anyway.

If running the isapnp didn't work properly, you might need to either
select a different 'block' from the pnpdump, or different settings for the
IRQ, DMA or IO (as suggested by pnpdump in the comments).
Note that if your kernel already has the sound support compiled in (or the
modules for the sound is loaded), isapnp might have problems allocating
the IRQs, DMAs or IOs because the kernel already is occupying them.

And now we're ready to compile the sound support into the kernel.
I did this with modules.  Here's the sound part:
bakh:/usr/src/linux# grep -e CONFIG_SOUND .config|grep -v -e '^#'
CONFIG_SOUND=m
CONFIG_SOUND_OSS=m
CONFIG_SOUND_SB=m
CONFIG_SOUND_ADLIB=m
CONFIG_SOUND_SOFTOSS=m
CONFIG_SOUND_YM3812=m
CONFIG_SOUND_VMIDI=m

The four last lines (ADLIB, SOFTOSS, YM3812 and VMIDI) are just my
attempts to get the midi/FM synth stuff working, you don't really need
those.  If you're wondering what I really selected in make menuconfig:
<M> Sound card support
<M> OSS sound modules
<M> 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
<M> Generic OPL2/OPL3 FM synthesizer support
<M> SoftOSS software wave table engine
<M> FM synthesizer (YM3812/OPL-3) support
<M> Loopback MIDI device support

(Again, the last four are only my failed attempts to get the FM synth/midi
stuff working)

The kernel compiled and installed should give (I left out the
non-essential modules) these sound modules in /lib/modules/2.2.3/misc:
soundcore.o   sb.o          uart401.o     sound.o

Having these modules in place, I created a file: /etc/modutils/sound
and put these lines in there:

alias char-major-14 sb
post-install sb /root/bin/volume 66
options soundcore -k
options sound -k dmabuf=1 traceinit=1
options uart401 -k
options sb -k io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330

The post-install line loads a volume program that sets the volume to 66%
since I don't have any volume controls on my cheapo speakers.  You could
do the same, but you'd need to compile the volume-tarball or use some
other utility (like aumix).
Then I ran update-modules (So it was added into the /etc/conf.modules
automatically).

Then rebooted.

Now upon boot, isapnp should be run automatically, and depending on what
is in your /etc/modules, the sound modules might be loaded automatically.
In any case, a cat /dev/sndstat should load them.  You should get output
like this (when the modules are loaded):
Sound initialization started
Sound initialization complete
Soundblaster audio driver Copyright (C) by Hannu Savolainen 1993-1996
SB 4.16 detected OK (220)
<Sound Blaster 16 (4.16)> at 0x220 irq 5 dma 1,5
<Sound Blaster 16> at 0x330 irq 5 dma 0,0

The cat /dev/sndstat (or /proc/sound) should yield:
OSS/Free:3.8s2++-971130
Load type: Driver loaded as a module
Kernel: Linux bakh 2.2.3 #1 Tue Mar 23 02:55:19 CST 1999 i486
Config options: 0

Installed drivers:

Card config:

Audio devices:
0: Sound Blaster 16 (4.16)

Synth devices:

Midi devices:
0: Sound Blaster 16

Timers:
0: System clock

Mixers:
0: Sound Blaster


Now you should be able to (If you have that wavtools package
installed) wavp some-mono-or-stereo-wav.wav
Or possibly cat english.au >/dev/audio (from SillySounds in
ftp.kernel.org :-)

Hope this helps.

Again:  If anyone has any clue on how to get the FM synthesizer to play
midi files, please post to this mailing list.

Roy

#### Unsolicited commercial email with be billed at $350/message ####
Roy Larsen, royal@nospam.bellsouth.net
To send me an email remove the `nospam.' part from the address.


Reply to: