From: hsavolai@cs.Helsinki.FI (Hannu Savolainen) Subject: Re: 0.99.7 kernel with sound 1.0 Date: 15 Mar 1993 23:43:35 GMT
In <1993Mar15.214856.11846@infodev.cam.ac.uk> tjrc1@cus.cam.ac.uk (T.J.R. Cutts) writes:
>I'm having difficulty compiling kernel 0.99.7 with sound driver 1.0. I make
>config, make dep and make Image, which dies with:
>soundcard.c: In function `soundcard_init':
>soundcard.c:321: `chrdev_fops' undeclared (first use this function)
The kernel/driver interface changed when Linux 0.99.6 was released.
There is a simple modification required to the soundcard.c. Look at the
end of this message.
Hannu
==============
The following is a beta version of the installation instructions for the
sound driver.
Installing the sound driver
===========================
The following steps are required while installing the sound driver.
You may start also at step 2b (not recommended).
Don't change the order of the steps. I assume you are installing your
Linux sources to /usr/src/linux.
1) You will need the following files. Copy them to your
/usr/src -directory.
- Linux kernel sources:
linux-0.99.6.tar.Z (recommended)
or linux-0.99.5.tar.Z
or linux-0.99.4.tar.Z
- Sound driver sources:
snd-driv-1.0.tar.Z
- Patch to the linux/Makefile and linux/config.in
linux-0.99.5.sound.diff
(This is required and works with 0.99.4, 0.99.5 and
0.99.6).
2) Install the linux sources (linux-0.99.[4-6].tar.Z).
(cd /usr/src;zcat linux-0.99.6.tar|tar xvf -)
Don't compile the kernel yet. If you have already installed
Linux sources, you need not to repeat this.
2b) Remove the directory linux/kernel/chr_drv/sound
(cd /usr/src/linux/kernel/chr_drv;rm -rf sound)
3) Install the sound driver (snd-driv-1.0.tar.Z).
(cd /usr/src;zcat snd-driv-1.0.tar|tar xvf -).
DON'T OMIT THIS STEP. The sound driver must always be installed
again after you have installed the kernel sources.
NOTE! Perform the steps 2 and 3 in the same directory (usually /usr/src).
The sound driver must be installed over the kernel sources.
Don't change the order.
4) Apply the patch linux-0.99.5.sound.diff (only if you performed
step 2).
(cd /usr/src/linux;patch < ../linux-0.99.5.sound.diff).
Look at the output. There must not be any "Hunk failed" messages.
5) If you have linux 0.99.6, make the two changes at the end
of this file to the linux/kernel/chr_drv/sound/soundcard.c.
6) cd /usr/src/linux
7) make config
(This should prompt for the DMA buffer size as the last question.
If something else happens, please contact me).
8) make dep
9) Edit the linux/Makefile and set the root disk, keyboard etc.
properly. If you omit this step, you will get kernel with
finnish keyboard and /dev/fd0 as the root disk.
10) "make disk" or "make linux". This step compiles the kernel and
produces the boot disk (make disk) or installs the kernel image
on your hard disk (make lilo). The plain "make" just compiles
the kernel but doesn't 'install' it.
11) Reboot your system. Try to read the first messages displayed
during boot. The sound driver prints several lines while
detecting the sound hardware. If nothing is displayed, there
is obviously something wrong.
Possible problems
=================
- /dev/dsp: No such file or directory.
You have not created the device files for the sound driver. Please
read linux/kernel/chr_drv/sound/Readme. It contains instructions how
to create the devices.
- /dev/dsp: No such device.
The sound driver is not installed properly. Goto step 1.
- /dev/dsp: No space left on device.
The sound driver has not been initialized properly during boot. You
propably have a kernel version earlier than 0.99.4.
- When playing digitized voice (str, splay, srec etc) there is about one
seconds of voice and then the program hangs.
You have given incorrect IRQ number for your card during "make config"
(step 7).
- SB Dsp command timeout.
You propably have IRQ conflict. The IRQ number used by Sound Blaster is
used by another card also. The Sound Blaster driver gets extraneous
interrupts and tries to communicate with the sound card too early.
Installing a new kernel version
===============================
You have to install the sound driver again after you have installed a
new kernel version. Goto step 2b.
===================================================================
===== changes to the sound driver 1.0 with Linux 0.99.6 or later ==
===================================================================
To use the sound driver with Linux 0.99.6 you should make three changes to
file linux/kernel/chr_drv/sound/soundcard.c:
1) Replace the line (321) containing:
chrdev_fops[SND_MAJOR] = &sound_fops;
with
register_chrdev(SND_MAJOR, "sound", &sound_fops);
2) Delete line (363) containing:
chrdev_fops[major] = &sound_fops;
3) Delete line (378) containing:
chrdev_fops[major] = NULL;
============================================================================
Hannu Savolainen (hsavolai@cs.helsinki.fi)
Kun Savolainen puhuu, niin vastuu siirtyy valittomasti kuulijalle.
(or link("/dev/null", "/dev/flames") in plain C)