This is a driver for ZA2. Probably only output works so far. Input is not
tested (Will be soonn).

If you want to test it, copy the files into the alsa-tree.
I used alsa-driver-0.3.0-pre2 and kernel 2.0.36
alsa-driver-0.2 does not work!!!

Necessary changes to alsa
=========================

include/asoundid.h
------------------
Edit include/asoundid.h
Add the line
#define SND_CARD_TYPE_ZA2               0x00000016      /* ZA2 */
and increment SND_CARD_TYPE_LAST by one.

cards/Makefile
--------------
In cards/Makefile add
          $(TOPDIR)/modules/snd-za2.o
to TARGETS

Define 

ZA2              = za2.o

and

$(TOPDIR)/modules/snd-za2.o: .depend $(ZA2)
        $(LINKER) -o $@ $(ZA2)


Hopefully you should be able to compile now

Loading the device
==================

/etc/conf.modules
-----------------

alias char-major-14 snd
alias snd-minor-oss-0 snd-mixer
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-za2
options snd snd_major=14 snd_cards_limit=1
options snd-za2 snd_index=1 snd_port=0x210

Probably you must change the port. I think default port is 0x310. Possible
ports are 0x210, 0x250, 0x310, 0x350. Autodetect does not work. You must
specify the right port.

modprobe snd-za2 will load the device.

Output should work with 16bit,stereo and 20kHz-60kHz. Don't try anything
else. It's not supported right now.

If left and right channels are switched occasionaly, comment out the 
command enable_dma in snd_dma_program in kernel/isadma.c. Strange as seems
dma starts running directly after programming the DMA-chip, although it
should start after setting the right bit's in the ZA2-command-register.
Be aware that all the other soundcard using snd_dma_program won't work
anymore after changing isadma.c 

Martin Pahl

P.S. Probably pausing the driver won't work right now.

