[alsa-devel] Writing a driver for Sound Card

Clemens Ladisch clemens at ladisch.de
Tue Nov 23 15:27:28 CET 2010

Ramya Desai wrote:
> I have a doubt about the Linux sound driver architecture. I need to
> develop the driver with mixer, player, recorder, MIDI etc. components.
> Do I need to develop these components in single driver OR Do I need to
> develop as a individual component (one driver for one component).

You can do this however you want; ALSA doesn't impose any restriction.

Many drivers choose put the code for different components in separate
source files because the components are actually independent.

When a driver uses other modules, this is usually because that hardware
is common for multiple sound cards (e.g., most MIDI interfaces are
compatible with the Roland MPU-401).

> I looked into the /usr/src/linux-2.6.35/sound directory. I did not
> understand it completely. Is there any driver (sample) which I can go
> through?

The basic driver structure is explained in the documentation; most of
the additional code in drivers handles the quirks of actual hardware
and would not be very helpful for you.  Do you have any specific

Please tell us more about the architecture of your hardware.


More information about the Alsa-devel mailing list