ZA2-driver for Linux
README for ZA2-driver for Linux
To install the driver, you have to modify KERNELVERSION and perhaps
KFLAGS in the main Makefile (as far as I know, you only need to modify
KFLAGS to compile the driver on SMP system by adding -D__SMP__).
Then just compile it with "make all" and (if everything was ok)
install it (as root !) with "make install". This installs the driver to
/lib/modules/2.2.9/misc (where 2.2.9 is replaced by your kernel
version), the tools to /usr/bin and the firmware to /etc/sound.
The installation of the firmware has changed completely since I've
now the permission of Zefiro Acoustics (thanks to Greg Hanssen) to add
the DSP codes and the Xilinx mask.
The firmware that is installed is:
- the Xilinx mask (which implements the bus interface of the ZA2)
The mask I added is the one of my ZA2. You can try it, but if your
card is much older or much newer than my, it is possible that you
have problems with it. Then you should replace the file
/etc/sound/za2mask.bit by your xza2rdx?.bit.
- the DSP codes
As far as I know, they are compatible between the revisions of the
ZA2, so everything should work fine. Anyway, if you want to replace
them, do it by using the tool "conv2bin" (which you can find in
za2/tools) to convert the firmware files provided by Zefiro to
binaries by typing (for example):
conv2bin dsposx2.sim /etc/sound/dsposx2.sim
The only DSP program that is absolutely necessary for the driver is
the DSPOS. The others are goodies, which are loaded when needed.
I've compiled the driver with egcs-2.91.66 (SUSE 6.1) and a
2.2.9 kernel. It should work at least with the other 2.2.x kernels,
for the 2.1.x and 2.0.x you'll have to modify a few function calls
(this shouldn't be too difficult).
The driver is now decoupled from the OSS-modules, only soundcore.o is needed.
So it is sufficient to compile the sound facility of the kernel
(CONFIG_SOUND=m). The driver itself can only be compiled as a module.
When loading the driver with insmod, you have to specify the
io-address of your card (usually 0x310, alternatively 0x210, 0x250,
0x310, 0x350) and the input and output dma. The dma-channels are
probed if you don't specify them. For me, the probing didn't work, if
the dma-channel was occupied by my PNP-soundblaster (this is perhaps
due to pnp ??) without the sb-driver being loaded.
Additionaly, the driver needs an interrupt, which is also probed. The
ZA2 works with either 9,10,11,12.
The driver won't work without the interrupt or without dma (you can
use it with only one channel).
If you want the driver to be loaded automatically when /dev/dsp is
accessed, you can add the following lines to your /etc/conf.modules:
alias char-major-14 za2
options za2 io=0x310 dmi=6 dmo=7
(you should adjust io, dmi and dmo as you need them).
io specifies the io port of the card, dmi the input dma and dmo the
output dma. They may be the same, then the driver disables the full
duplex mode. Additionaly you can specify:
- digin: digital input, default is 0 (TOSLINK); 1=COAX, 2&3=AES
- scms: scms-bits in ouput stream: 0=no SCMS, 1=SCMS activated (default is 0)
- emph: emphasis: 0=off, 1=on, default:0
- aeso: AES-output :0=SPDIF, 1=AES/EBU, default:0
- irq: interrupt of za2 (is autoprobed when not specified)
The installed tools are:
- testone
this is some kind of port of the DOS-program testone, it
generates a sine-tone on the right and a clicking on the left to test
if the ZA2 works fine.
- playmp2
as the DOS-program, it plays MP2-files via the DSP of the za2
without much use of the CPU(s). It works only with an installed
MPEG-code. It is capable of playing multiple files, shuffling and
repeating them. Has now some sane checkings.
- recza2 and playza2
In the new version, they support also wav files,
so perhaps they are now of some use. You can still play and record raw
files, but you have to force the programs to do so by using -R (to
prevent you from demolating your speakers by playing emacs).
Be carefull: by playing garbage you can damage your speakers !!
(next version will support automatic splitting according to the start
ids or track indices (depending on the source)).
- readcbits
Reads CBITS and prints the information contained in the
CBITS. Works only with a valid source and the ZA2 switched to that
source (it's best to use it during recording or resampling).
- readubits
Reads UBITS and prints the information. Same comment as readcbits,
except that it only works with CDs (and perhaps laserdisc and minidisc
?, DATs don't use the UBITS apart from the start ids).
- echodsp
Small program to test duplex mode by adding an echo to the input
stream. Not very usefull. (has been renamed to reduce confusion)
Coming soon: kind of control panel to swap inputs, start IDs and do
background tasks (sampling rate conversion, change SCMS bits) ...
BUGS:
- the mixer is merely a joke ...
- sending start ID's and changing SCMS/emphasis during play is
still somewhat buggy
When working with the driver, please mail me your experiences. So far,
I was able to use x11amp, DAP, soundstudio (only playing, but I used
the demo version), wavplay, wavrec, cdda2wav (echo to soundcard). If
you try any other software, the first thing you should check when
things don't work is to switch to 16 Bit stereo and to use a sampling
rate that is the same as the rate of your input (when recording).
Remember that neither the ZA2 nor the driver supports other parameters
then the following:
- Stereo
- Sampling rate 20kHz-60kHz
- 16 Bit
Additionally, most digital HiFi-equipment does not support sampling
rates other than 32, 44.1 and 48 kHz.
(future plans include a special resampling DSPOS for poor quality
modes (so called LoFi-modes))
ZA2-driver for Linux
Last change: 14.10.99
Peter Wahl (wahl@uni-bonn.de)