Difference between revisions of "ALSA 0.9.x Developer documentation"

From AlsaProject
Jump to: navigation, search
(Removed old text file, mark alsa-lib API reference more clear)
Line 30: Line 30:
will have to read the code and reference other applications for more advanced
will have to read the code and reference other applications for more advanced
== Developer tutorials ==
*[http://www.suse.de/~mana/alsa090_howto.html ALSA 0.9.0 HOWTO] - Dr Matthias Nagorni has writen a comprehensive tutorial for audio application developers.
*[http://equalarea.com/paul/alsa-audio.html Howto use the ALSA API] - Paul Davis has also written a brief explanation.
*[http://www.alsa-project.org/~frank/alsa-sequencer/ ALSA Sequencer (draft)] - Frank van de Pol's draft on programming the alsa sequencer.
*[http://www.alsa-project.org/~iwai/OSS-Emulation.html Kernel OSS-Emulation] - Takashi Iwai has written some notes on how ALSA handles OSS applications.
*[http://www.salleurl.edu/~is04069/Modders/Docs/alsadoc.html Programming ALSA (Espanol)] - David Garcia Garzon has written Spanish docs and tutorials
=== Presentations: ===
*The [http://www.linuxdj.com/audio/lad/eventszkm2003.php LAD meeting] in Karlsruhe, April 2003 provided two presentations (among many) from the core ALSA developers Jaroslav and Takashi. You can view slides and listen to .ogg recordings of the presentations.
== ALSA Library API ==
The ALSA lib api is the interface to the ALSA drivers. Developers need to
use the functions in this api to achieve native ALSA support for their
applications. The ALSA lib documentation is a valuable developer reference
to the available functions. In many ways it is a tutorial. The latest
on-line documentation is generated from the alsa-lib CVS sources.
*[http://www.alsa-project.org/alsa-doc/alsa-lib/ ALSA-lib API reference]
You can also generate it yourself. Install the
[http://www.doxygen.org doxygen tool] and type 'make doc' in
the alsa-lib directory.
The currently designed interfaces are listed below:
#Information Interface (/proc/asound)
#Control Interface (/dev/snd/controlCX)
#Mixer Interface (/dev/snd/mixerCXDX)
#PCM Interface (/dev/snd/pcmCXDX)
#Raw MIDI Interface (/dev/snd/midiCXDX)
#Sequencer Interface (/dev/snd/seq)
#Timer Interface (/dev/snd/timer)
== ALSA Driver Documentation ==
Takashi Iwai has written "Writing an ALSA Driver" - a very comprehensive
guide to developing a device driver for ALSA.
The document focuses mainly on the PCI soundcard. In the case of other
device types, the API might be different. However the ALSA kernel API is
consistent so it will be helpful in that context.
*[http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html HTML (multiple documents)]
*[http://www.alsa-project.org/~iwai/writing-an-alsa-driver.pdf pdf file]
*[http://www.alsa-project.org/~iwai/writing-an-alsa-driver.sgml The sgml source] is also available
== ALSA Driver API ==
This document gives a complete rundown of the functions in the alsa-driver API.
*[http://www.alsa-project.org/~iwai/alsa-driver-api/index.html HTML (multiple documents)]
*[http://www.alsa-project.org/~iwai/alsa-driver-api.pdf pdf file]
*[http://www.alsa-project.org/~iwai/alsa-driver-api.sgml The sgml source] is also available
=== Older documents ===
=== Older documents ===

Revision as of 16:40, 3 August 2007

Background Info

The Advanced Linux Sound Architecture comes with a driver API & library API. Our aim is to describe hardware as close as possible in drivers, but in userspace, the alsa-lib covers the hardware differences (if required). It's possible for applications to control all hardware features (if required).

Q: Why is ALSA more advanced than OSS?

  • kernel-space supports only h/w-level capabilities
  • multi-thread safe design
  • transparent use of plugin architecture to handle format,rate,channel cnt and many other conversions
  • support for non-interleaved interfaces
  • user-space software mixing (dmix)
  • user-space "loopback/snoop" capabilities
  • merging multiple cards into a single virtual device
  • hiding non-ALSA-drivers behind a consistent user-space API (e.g. IEEE1394 drivers, or JACK)
  • consistent and generic control API for managing h/w controls
  • sufficiently flexible mixer architecture to handle modern audio interfaces fully (rather than reducing them to a simplistic device)
  • consistent support for multiple instances of the same card
  • linked operations of multiple cards
  • and more...

Currently we need developers to write docs on the ctl API. Until then you will have to read the code and reference other applications for more advanced info.

Older documents

The ALSA HOWTO/FAQ documentation tries to do the ALSA driver installation easier. If you have any ideas or questions regarding this documentation, please, leave a message on the alsa-devel at lists.sourceforge.net mailing list.

The ALSA-sound-mini-HOWTO describes the installation of the ALSA sound drivers for Linux. This HOWTO is also available from the Linux Documentation Project, take a look at http://metalab.unc.edu/LDP/mirrors.html to find your nearest mirror. You can get this HOWTO in various formats:

There is also an old ALSA FAQ document from John Fulmer.

ALSA 0.5.x Developer documentation

N.B. The 0.5.x series is considered deprecated and is no longer supported by ALSA developers

The ALSA 0.4.0 Developer documentation describes the internals of the ALSA kernel driver. It is a document for kernel developers and others which want to know more about ALSA internals. It is not for application programmers. Application programmers should use the ALSA library API found in the alsa-lib package. Incomplete documentation for ALSA 0.5.x API is available in HTML format on ALSA WWW server or you may get tarball for off-line reading.

Custom Search
Personal tools