A User's Guide to ALSA

Your Linux system's sound probably just came up and worked, which is great for games, chat or music listening. But with a little exploration, you can unlock the recording studio inside your hardware.
A Brief Note Regarding JACK

Figure 4 shows off the envy24control mixer in a JACK environment. JACK is an audio connections manager designed to professional specifications for low-latency communication between the JACK server and its clients. JACK requires a native system audio driver, which for Linux can be a dummy driver, an OSS driver, PortAudio or, most typically, ALSA. I will present the JACK system in detail in a future article.

The ALSA Applications Software Base

It is no exaggeration to state that all contemporary major Linux audio software wants ALSA's special services. MIDI programs enjoy the connectivity of the ALSA sequencer, digital audio systems make use of ALSA's drivers for pro-audio hardware and thorough support is provided for common desktop audio/video activities. Figures 5 and 6 represent some screens commonly seen on my desktop, thanks to ALSA.

Figure 5. Recording with Ardour

Figure 6. Audio/MIDI Sequencing in Rosegarden

Future Work

From the normal user's point of view, ALSA's most obvious weakness is in its lack of GUI front ends for the various tools and utilities that make up so much of the system's power: a configuration panel, complete with options for configuring and reordering your installed cards, loading the virtual MIDI driver, selecting plugins for .asoundrc and generating a new file, operating alsactl and so forth. ALSA is indeed feature-rich, but too many of its excellent features are available only to those of us willing to write scripts and resource files.

Fortunately, there is an abundance of ALSA documentation and information for users of all levels. I already mentioned the man pages for the ALSA utilities. The ALSA Web site includes many resources for basic and advanced use of the system. Also,the alsa-user and alsa-devel mail lists are founts of wisdom and assistance, as is the excellent ALSA Wiki.

The project always needs programmers, but it also needs graphics artists, technical writers and beta testers, so even if you can't code, your skills might still be valuable to the project. Donations of hardware and cash also are cheerfully accepted; please see the ALSA Web site for appropriate contact details.

The average user can expect to see more cards supported, with more features available to the user. Hopefully, card configuration will become easier: getting the most from ALSA can be a simple matter or it can be a difficult thing. It is true that what is difficult is not impossible, and the payoff certainly can be worth the effort. Hopefully, though, we also will see some more accessible tools for user-level configuration.

Acknowledgements

The author thanks Jaroslav Kysela and Takashi Iwai for their vast patience and excellent assistance over the years I've been using ALSA. Thanks also to all members of the ALSA development team, past, present and future, for this great gift to the world of Linux sound. Finally, thanks to Len Moskowitz for the extended loan of his outstanding Core Sound PDAudioCF card.

Resources for this article: /article/8324.

Dave Phillips is a musician, teacher and writer living in Findlay, Ohio. He has been an active member of the Linux Audio community since his first contact with Linux in 1995. He is the author of The Book of Linux Music & Sound, as well as numerous articles in Linux Journal.

______________________

Similis sum folio de quo ludunt venti.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

alsa

Anonymous's picture

can u plz tell me the modules and directories reqired to capture & play the sound....

You seem to confuse OSS

Anonymous's picture

You seem to confuse OSS (Open Sound System) with Open Source Software (as used in the term "OSS/Free software"), which leads to a rather surrealist "Our Story Begins" section. ALSA is as free as OSS was (and is)!

fool, the Open Sound System

Anonymous's picture

fool, the Open Sound System was known as OSS/Free because 4Front had decided to close source OSS, as 4Front moved ahead with OSSv4 development (which was not free) people were only left with OSSv3, which was dubbed OSS/Free to avoid confusion between the two differently licensed versions. get it?

PS: (OSSv4.2 is kickass, ALSA is bloated and under documented.)

Sales force automation example

Abu's picture

Keep the good works comming.
I am from African and also now am reading in English, give true I wrote the following sentence: "As based in this sensor, an specialty case' cogs any building for the brand or rental of cost whereby a drug includes a athletic layout for the email to reduce prototyper for cloning one or more similar positions into interest in the region or for the drug to create part when a response developed by the communication includes a many killing."

Thank you very much ;). Abu.

ALS120 ISA Soundcard under Linux (EPC-SALS12.01 Vers 2.0 )

Christian1000's picture

Hi, I am trying to activate the above named card with my current Linux system (Ubuntu 9.04 ) but it does not work. Can you give some advice?

Author's reply

Dave Phillips's picture

Have you tried this command:

sudo modprobe snd-als100

Best,

dp

Similis sum folio de quo ludunt venti.

Very nice and informative for beginners

vivek's picture

Even experienced user like me find it useful, especially Linux Laptop MIDI System part. I’m also recommending this to all my user group members.

Regards,

Vivek G Gite.

Illuminating

wcoltters's picture

Very exciting article from beginning to end!
I'm new to Linux Audio but not to Linux. I'm educating myself with all the information I can get, and your articles are of great help to setup my personal home studio.
Thanks.
Wilson

about alsa and multiple cards

Will Morrison's picture

Great article, all in all. I am in a bit of a quandry with ALSA vs OSS, as I am trying to use 2 Delta 1010lt cards in one machine and have them function as one card. According to the OSS people, you can use up to 4 of this card in one machine this way, but I can't find anything in the ALSA docs that says "Yes, here is how it works and how to do it".

ALSA has come a long, long way in the last few years, but it still has a way to go (but don't we all). I do applaud those who have done such good work. Ardour with the 1010lt is great! Jamin is also wonderful, and things just keep getting better. Thanks to all for their work!

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix