I want to write dummy ALSA compliant driver as a loadable kernel module. When accessing it by aplay/arecord throught the ALSA-lib, let's say, it must behave as normal 7.1 channel audio device providing all the basic controls at least - sampling rates, number of channels, format, etc... Underneath it will just get every channel from the audio stream and will send it through the network as UDP packet stream. It must be capable to be loaded multiple times and ultimately it would expose as many as want audio devices under /dev. In that way we will have multiple virtual sound cards in the system.
What should be the minimal structure of such a kernel module? Can you give me an example skeleton (at least the interfaces) to be 100% ALSA compliant? ALSA driver examples are so poor...