Memory allocation
=================

void *snd_malloc( unsigned long size )
void snd_free( void *ptr, unsigned long size )

Routines uses it's own memory allocation algoritm. It should be removed
in future and replaced with kmalloc and kfree calls, but I need trace
all allocation problems to make code clean... Note that ALSA driver heavy
uses dynamic allocation for most things.

Basic coding
============

All things is made as object and are referenced in this way. I don't preferer
pass index to some array of structures or something this. Pointer to object
which contains data should be passed rather.

All main structures should have snd_xxxx_new, snd_xxxx_free, snd_xxxx_register,
snd_xxxx_unregister functions.

snd_card_t
  - basic structure which contains info about soundcard, index and
    resource tracking variables

include/driver.h contains all things related to this structure

snd_pcm_t
  - basic structure for PCM device
snd_pcm_channel_t
  - structure for PCM channel (direction)
struct snd_stru_pcm_hardware
  - structure which must be filled by lowlevel code

include/pcm.h contains all things related to these structures

snd_kmixer_t
  - basic structure for MIXER device
snd_kmixer_channel_t
  - basic structure for MIXER channel
struct snd_stru_mixer_channel_hw
  - structure which must be filled by lowlevel code

include/mixer.h contains all things related to these structures

Examples
========

You should look to code for GUS soundcards how can be things done...
Note that code should be compiled cleanly under 2.0.X kernels and under
latest 2.1.X kernels...
