LWN.net Logo

An Introduction to Linux Audio (O'Reilly)

An Introduction to Linux Audio (O'Reilly)

Posted Aug 3, 2007 19:47 UTC (Fri) by drag (subscriber, #31333)
In reply to: An Introduction to Linux Audio (O'Reilly) by rfunk
Parent article: An Introduction to Linux Audio (O'Reilly)

Actually nowadays dmix is enabled by default. There is no longer any need for a typical end user to muck around with their asoundrc.

The only time Linux, generally, users are forced to deal with Alsa now is when faced by Artsd (which is easy since it can be configured to use alsa) or with OSS-only applications which can't typically use dmix.

Your behind the times by a year or so. :)

Arts is effectively dead. But Pulseaudio has replaced ESD and is API/ABI compatable while being much superior. (esd has always sounded like utter crap..)

If you have need for networked sound I strongly suggest looking at pulseaudio. It supports all sorts of fancy features... For example Zeroconf so that the services will automatically be declared over a network and be picked up by things like Avahi or other pulseaudio software.Also it can be setup to follow X. So if your accessing remote X and there is sound involved then you can use pulseaudio to automatically follow it.

Also there is a 'pulse' plugin for Alsa. This way anything that supports Alsa can be used over the network via pulseaudio.

Jack is very nice for audio work.

It's special feature is that it is low-latency. This makes it suitable for realtime audio editing with multiple audio streams and multiple applications.

This gives Linux a unique advantage with applications that support jack they and route and re-route audio and midi between applications. Software synths, recording applications, midi controllers, LADSPA plugins etc etc. It'll work with internal and external midi stuff and allow you to easily control the I/O on your sound card, both digital and analog for setting up things like monitoring audio channels and playback/record stuff.

You can connect all these things to create very sophisticated super-applications. Sort of like you can string awk, sed, cat, and other things together to make sophisticated text handling applications.

In comparison with typical proprietary Windows or OS X setup your depending on one or another company's flagship product and your options are much more limited.

Combined with special low-latency patches like Ingor Molnar's realtime-preempt this allows a Linux PC to work as a REAL audio workstation and be suitable for studio, dj, and live audio work. Whatever you want. There are currently people selling Linux-based audio workstations for professional/studio-level work.

I think that the difference between desktop audio and network audio is enough that there is enough room for Jack, Alsa, and Pulseaudio to exist besides each other.

Also keep in mind that it's possible to get Jack and Pulseaudio to work together. There are also Jack and Pulse plugins for Alsa applications to use.

For arranging your applications to work through Pulseaudio take a look at:
http://www.pulseaudio.org/wiki/PerfectSetup


(Log in to post comments)

An Introduction to Linux Audio (O'Reilly)

Posted Aug 3, 2007 20:01 UTC (Fri) by rfunk (subscriber, #4054) [Link]

Ah, thanks for updating me! :-) Maybe I can delete my .asoundrc then.

But despite its lack of continued development, arts won't be entirely dead until
KDE 3 is dead. Also, my understanding of dmix is that it does work with ALSA's
OSS-compat mode.

I've used arts for networked sound in the past, but now I'll have to look into
pulse.

Last time I looked at Jack (on Debian) it wanted to rip out a bunch of my
sound-related infrastructure, which didn't give me a good feeling. I hope that's
been fixed somehow. (It was probably more of a Debian library issue of the
sort that makes people jump to Gentoo.)

An Introduction to Linux Audio (O'Reilly)

Posted Aug 4, 2007 0:05 UTC (Sat) by drag (subscriber, #31333) [Link]

I don't have any problems with jack nowadays, it should play nicely with everything else.

But keep in mind that it's for audio work. You can't use it with Dmix because dmix adds latency between jack and the sound card. It's not a very convenient or desktop-friendly way of doing things.

> But despite its lack of continued development, arts won't be entirely dead until KDE 3 is dead.

Yep. It's pretty much impossible for a normal user to use any KDE application and NOT use Artsd. The KDELibs will start artsd up automaticly when you launch applications. But it's not a difficult problem to deal with since artsd can be set to use Alsa and that solves most of the problems people have with it.

> Also, my understanding of dmix is that it does work with ALSA's
OSS-compat mode.

Sorta.

With Quake3-style games, for example, requires support of 'mmap' in the audio card for this to work. Some cards simply WILL NOT work with these games and OSS and although alsa supports mmap emulation I can't seem to get it to work.
(although with artsdsp -m they will work.. so you can go artsdsp --> artsd ---> dmix ---> alsa, though with the penalty of pretty high latency)

Also normal oss applications with dmix/alsa you need to start up applications with the the aoss wrapper. Using this they can work with dmix and play well with everybody else.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.