Home

A User's Guide to ALSA

image

Contents

1. 5 Support for the older OSS API providing binary compatibility for most OSS programs ALSA is released under the GPL GNU General Public license and the LGPL GNU Lesser General Public License Let s look at each one of these features restating them in language more comprehensible to a normal user Efficient support means that you can manage the basic and advanced features of supported sound cards easily using ALSA tools such as a sound card configuration utility and mixer programs Such tools are integral components of the complete ALSA installation Modularized sound drivers means that ALSA sound card drivers are easy to install and update They also provide the means by which the user can control a card s available options in more detail Later in this article we show how you can work with a driver module to access and control features of an ALSA supported sound card ALSA supports multiprocessor or SMP machines Thread safe is a programming term that indicates the services provided by the software can run concurrently in different threads without bothering each other In a modern audio MIDI application thread safety is a Very Good Thing ALSA s user space library provides programmers and hence their programs with easy access to ALSA s services and its significance to the normal user may seem a rather slight matter However the ALSA library provides the interface through which applications can reach those functions helping form a more hom
2. I will present the JACK system in detail in a future article The ALSA Applications Software Base 6 18 2006 8 32 PM A User s Guide to ALSA 8 of 9 http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 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 Session Edit JACK Windows Zoom 00 00 07 0171 f Left master bass guitar piano drums hamonica vocal rhythm guit _ Edit Groups JE midiboys fadeouts rhythmso harmonica Audio MIDI SR 44 1 kHz 11 6 msecs Span Zoom Focus B Stop O Messages 4 Status 3 Connect DI Patchbay Snap To 7 Region ends i Magnetic E E bass Snap Mode master piano guitar drums 00 02 56 00 rhythm guit ooro ee E harmonica Settings Options Display Misc off otf 1 1 RecorD solo mute RECORD 1 1 RECORD RECORD TAP Equali Preset Name delta66 Server Server Path jackstart v Driver alsa es 8 X Delete Parameters E Realtime No
3. Memory Lock Unlock Memory O Soft Mode C Monitor Readable Clients Output Ports v 3 Disconnect All A rhythm guitar in 1 x Force 16bit Z H W Monitor C H W Meter Verbose messages output Erames Period Sample Rate Periods Buffer Priority 0 Port Maximum 128 Start Delay secs 2 a Interface hw 2 Audio Duplex Input Device default Output Device default v Input Channels 0 aj Output Channels Dither Timeout msec Latency 23 2 msec Q pianosin 1 Refresh Figure 5 Recording with Ardour RECORD Plate reverl Amplifier t link iG OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTP aa comments comments comments comments comments comm 6 18 2006 8 32 PM A User s Guide to ALSA http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 Eile Edit Composition Segments Tracks Tools Settings Help 4 gt wh Ww De 4 zZ ex gt a FA 7 4 i z hhe e 9 AHAI SOHAL PPM TMM fA ome Wh 2 Zoom O 100 TPIT TT ATITETITTITTITTITTITT OTT ORITITI IRRI Ro r Seg
4. cards alsactl restore 0 alsactl restore 2 alsamixer c 0 alsamixer c 2 In my system card 1 is the virtual MIDI card which takes no channel settings and therefore has no associated mixer ALSA Plugins and the asoundrc File The ALSA plugins are utility services available through a file named asoundrc typically placed in your home directory Plugin services include resampling channel routing sample format conversion and software volume control Please see the ALSA Wiki notes on asoundre for detailed information regarding these and other ALSA plugins As I mentioned earlier the default sound capability of my laptop is restricted to only one application at a time Fortunately ALSA provides a cool plugin called dmix and its sole function is to provide a type of audio stream multiplexing called software mixing Unfortunately ALSA doesn t autodetect the need for the dmix plugin so the user must prepare the necessary components Here is the asoundre for my laptop pcm default type plug slave pcm dmixer pcm dmixer type dmix ipc_key 1024 slave pcm hw 0 0 period_time 0 6of9 6 18 2006 8 32 PM A User s Guide to ALSA http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 7 of 9 period_size 1024 buffer_size 4096 rate 32000 bindings 00 La pcm dsp type plug slave pcm dmixer ctl dmixer type hw card 0 This file defines a new PCM device named dmixer of
5. cat proc asound cards 0 Live EMU10K1 Sound Blaster Live Sound Blaster Live rev 8 at 0xd000 irq 3 1 VirMIDI VirMIDI VirMIDI Virtual MIDI Card 1 2 M66 ICE1712 M Audio Delta 66 M Audio Delta 66 at 0xd800 irq 5 ALSA does not provide a default asoundrc file nor is it an absolute necessity However many interesting ALSA features are accessible only through asoundrc and the reader is advised to study the example files found on the ALSA Web site For an advanced example see Timo Sivula s El Cheapo HOWTO a rather amazing hardware software hack that allows sample accurate multichannel recording using two or more consumer grade sound cards Timo used the Creative Labs PCI128 Under normal circumstances such an approach would be doomed to fail from inherent instabilities between the clock crystals of the cards but Timo s hardware modifications and the capabilities of asoundre make it possible The El Cheapo HOWTO is not for the faint of heart but it does succeed at providing an inexpensive path to high quality multichannel recording on the Linux desktop 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
6. client 72 Virtual Raw MIDI 1 0 type kernel 0 VirMIDI 1 0 t client 73 Virtual Raw MIDI 1 1 type kernel 0 VirMIDI 1 1 y client 74 Virtual Raw MIDI 1 2 type kernel 0 VirMIDI 1 2 client 75 Virtual Raw MIDI 1 3 type kernel 0 VirMIDI 1 3 n This report shows my available receiving ports Thus the following command connects the first virmidi port to my onboard FM synth aconnect 72 0 65 0 The kconnect alsa patch bay and QJackCtl programs provide graphic interfaces for device identification and connection F saulei 5 130 0 TiMidity port 0 le 16 aje E gt aog mea ao fad a2 47 18 j9 Oh Yeh Give It Up Youza Swan like Untied 41 41 re o L 5 pi A 7 Event 0x90 Note On t Figure 3 A Basic Linux Laptop MIDI System Figure 3 shows off a small but powerful MIDI sequencing system The main program is Rob Buse s seq24 a lightweight looping sequencer designed in the style of the hardware sequencers of the 1980s and 90s seq24 manages its connections internally and the figure conceals the connections between the virtual keyboard and seq24 as well as the output targets for the individual sequences Some of the sequences have been routed to the OPL3 synth others have be
7. observant reader might wonder how I can route MIDI data without the benefit of MIDI hardware Thanks to ALSA s virmidi module my system has four virtual devices usable as raw MIDI I O ports for any other ALSA sequencer clients The sequencer of what is known as the ALSA sequencer API is not a sequencing application such as MusE or Rosegarden This sequencer manages the merging and timing of freely interconnected MIDI data streams including multiple connections to single ports Compliance with the ALSA sequencer API allows each client to interconnect freely to one or more other clients and it has become an expected capability of modern Linux audio software The ALSA aconnect utility tells me what ports are available for connection via the ALSA sequencer aconnect i client 0 System type kernel 0 Timer X 1 Announce i 6 18 2006 8 32 PM A User s Guide to ALSA http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 4 of 9 client 72 Virtual Raw MIDI 1 0 type kernel 0 VirMIDI 1 0 t client 73 Virtual Raw MIDI 1 1 type kernel 0 VirMIDI 1 1 A client 74 Virtual Raw MIDI 1 2 type kernel 0 VirMIDI 1 2 i client 75 Virtual Raw MIDI 1 3 type kernel 0 VirMIDI 1 3 i This report indicates that I have four virtual MIDI ports Whatever software I assign to those ports then can be connected to any other ALSA sequencer clients aconnect o client 65 OPL3 FM synth type kernel 0 OPL3 FM Port t
8. such comprehensive resources leaving Jaroslav with a sound card that was not fully operational At that time the Linux kernel sound system was the OSS Free system a solid and serviceable audio MIDI subsystem that had been with the kernel sources since the early days of Linux thanks primarily to the pioneering work of Hannu Savolainen Alas OSS Free had not kept pace with the rapidly evolving world of desktop audio production and many sound cards either were unsupported or supported only partially as was the case with the Gravis boards To be fair the OSS Free maintainers were few there was less organization in the general Linux audio world and manufacturers then were as some still are now too secretive about their driver specifications It might have been possible to incorporate greater support for the Gravis cards into OSS Free but as Jaroslav Kysela researched the OSS Free applications programming interface API he realized there was a need for a new API that could support more broadly the developments taking place with modern sound cards and digital audio interfaces Professional and consumer level expectations had risen demanding support for features such as high sample rates and bit depths for professional recording 5 1 and other 3 D surround sound audio output arrays multichannel digital audio I O and multiple MIDI I O ports There simply were too many advances that required fundamental changes in OSS Free so Jaroslav did what any tr
9. 65 0 opl3 home dlphilp soundfiles sbi patches std o3 home dlphilp soundfiles sbi patches drums o03 The options include the required target port determined with aconnect o and a switch for either OPL2 or OPL3 support the OPL2 is only a 2 operator FM synth The example s patches are included with the ALSA tools see locate 03 and locate db for locations A few other patch sets for the OPL3 are available on the Internet and Patch editors also are available At this point I opened alsamixer to set the channel status for the CS4232 Figure 2 shown above displays the results I now could play OGG and other music files PCM listen to my music CDs Aux1 and watch and listen to DVDs and other video formats Aux I could record analog audio through either a microphone input or line in jack and I even could listen to MIDI music files played by the soundchip synth Aux1 By default I can do only one of those activities at a time but ALSA supplies a neat plugin for software mixing which I describe later By the way on Red Hat or Fedora the entire ALSA system can be started and stopped with these commands etc init d alsasound start etc init d alsasound stop etc init d alsasound restart If you have installed the Debian packages the file is etc init d alsa This feature makes it easy to test new configurations The exact location of the alsasound control can be determined with locate alsasound The ALSA Virtual MIDI Module The
10. A User s Guide to ALSA http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 1 of 9 A User s Guide to ALSA Dave Phillips Abstract 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 Since the public release of the 2 6 Linux stable kernel series the Advanced Linux Sound Architecture ALSA has become the default kernel sound system This change brings significant improvements to Linux audio and MIDI capabilities including support for professional audio hardware 3 D surround sound advanced MIDI functions and software mixing or audio stream multiplexing When combined with a kernel patched for low latency ALSA provides resources for sound and MIDI that compare well with competing platforms and in some respects are superior to them This is a bold claim so let s look at ALSA to see what makes it tick Our Story Begins The ALSA Project began when a young programmer named Jaroslav Kysela became frustrated with the kernel sound system s lack of full support for his Gravis Ultrasound audio MIDI card The Gravis card created its sounds by using sampled sounds stored in the card s memory in a file format known as PAT patch Banks of PAT sounds could be edited and stored by the user as long as the user was running Microsoft Windows or Apple Mac OS Linux sad to say did not provide
11. efore installing the ALSA package Normally this task entails little more than moving the older modules into a temporary directory in case you want or need to put them back and making sure that the kernel s soundcore o object file remains in its original place usually lib modules your kernel number here kernel drivers sound After removing OSS Free you need to install the ALSA packages by way of your package manager of choice ALSA configuration has improved greatly over the years but it still can be a tricky procedure especially if your system has more than one sound device or if the device is connected to your computer on the USB or PCMCIA bus Obviously I can t go into the details regarding every possible configuration but fortunately the ALSA Web site contains a large number of configuration pages for supported devices often including tips and tricks from other users Basic Configuration Basic configuration can be done with the alsaconf utility Figure 1 alsaconf works well at recognizing single devices but it might not do so well with systems containing multiple devices Don t worry it s still fairly simple to accommodate multiple audio and MIDI devices and we return to that task in a few moments For now let s proceed as though you have only one audio device for your machine Driver Selection Probing legacy ISA cards Please select the drivers to probe Yamaha OPL3SA2 Cirrus Logic 4235 9 Generic 54231 ESS ES18xx AudioD
12. en sent to an instance of TiMidity running as a Soundfont server A USB MIDI Interface Like many other laptop owners I ve hooked up a USB device to my machine in this case a MIDIman 2x2 MidiSport The MidiSport provides two independent I O ports and yes ALSA supports multiport MIDI hardware However I don t always have my MidiSport with me when I use this machine so I prefer to load the USB module after setting up my CS4232 and virmidi cards To defeat the autoloading of my USB MIDI module I added these lines to etc hotplug blacklist So I can keep my preferred order of sound cards snd usb audio uhci usb uhci handles the same pci class usb uhci Next I wrote the following script to configure and activate the MidiSport 2x2 echo Loading MidiSport firmware 6 18 2006 8 32 PM A User s Guide to ALSA http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 modprobe snd usb audio sfxload I usr share usb ezusbmidi ezusbmidi2x2 ihx D proc bus usb 001 003 echo Done The firmware and loader are included with the ALSA installation You may need to query the proc bus usb filesystem for your available USB identifiers and you may need to try each identifier to find which one applies to your hardware Use the cat command to list your identifier numbers cat proc bus usb 001 001 003 The system reports an error if you select the wrong identifier so at least in my case the trial and error p
13. erface As with the OPL3 synthesizer on my laptop I must load sound data into the SBLive s EMU10k1 hardware synthesizer using the ALSA sfxload utility to load soundfonts into the synth This command configures my SBLive synth with a General MIDI soundfont distributed with the sound card sfxload 8mbgmsfx Recently developer Lee Revell significantly improved the ALSA driver for the Creative Labs SBLive and Audigy sound cards unlocking much greater potential than was available through the previous drivers Lee followed the lead of the kX Project an open source Windows based project intended to open all the capabilities of the SBLive Audigy cards including true multichannel I O access to the DSP registers and support for x 1 surround sound Lee s work greatly expands the recording and playback possibilities for inexpensive hardware bringing even more value to Linux as a desktop music and sound workstation Installation and operation of the virtual MIDI driver for my desktop is exactly the same as it was for my laptop See the appropriate section above for the details Channel settings for my SBLive can be made using alsamixer but setting up my Delta 66 requires the use of the specialized envy24control mixer Figure 4 This mixer provides access to and control of the advanced features of cards with the ice1712 chipsets including the M Audio Delta cards 5 of 9 6 18 2006 8 32 PM A User s Guide to ALSA http 0 delivery acm org innopac lib ryerso
14. g Core Sound PDAudioCF card Resources for this article http www linuxjournal com article 8324 6 18 2006 8 32 PM
15. ment Parameters 7 9 10 11 12 15 Label buzztalk wav inserte E Distorion Guitar a Repeat Transpose 0 v oom Pick Bass Quantize Of Delay 0 m O Percussion Color Default Color v 4 O lt untitled gt Instrument Parameters 5 lt untitied gt 6 O lt untitled gt General MIDI Device 1 TOOLI Pil 65 0 Emul0k1 Port 0 m arr fa e m 8 O lt untitled gt E Berciscice m 9 O lt untitled gt Bank Z General MIDI 100 lt untitled gt Program 1 Acoustic Grand Piano v 11 lt untitled gt 12 O lt untitled gt 13 O lt untitled gt Pan z Chorus oe eC Volume Reverb m lt untitled gt z Sustain e Expression 1s lt untitled gt 16 lt untitled gt 1708 buzras Sees mam lightnin H smO Bunting 20 lt untitled audio gt 21 lt untitled audio gt 9 10 11 12 v E Ready 0 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 asoundre 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
16. modules conf In this section I can customize various features of my sound chip setting I O port and IRQ addresses enabling or disabling onboard synth capability and defining the DMA channels Iran alsaconf P to see a list of the legacy non PnP modules alsaconf P opl3sa2 cs4236 cs4232 cs4231 esl8xx esl1688 sb16 sb8 Next I probed the CS4232 driver for its default options settings alsaconf p cs4232 port 0x534 cport 0x538 isapnp 0 dmal 1 dma2 0 irg 5 I could have accepted these values and had a working audio system but thanks again to Takashi Iwai I discovered that I also could enable an onboard synth chip the Yamaha OPL3 an inexpensive 4 operator FM synthesizer notorious for its ubiquity in inexpensive sound cards and its general cheesiness of sound Takashi also advised entering and disabling an option for a physical MIDI port simply to indicate its presence as a chipset feature Thus my current options section in etc modules conf now includes this more complete configuration for the CS4232 options snd cs4232 port 0x534 cport 0x538 mpu_port 1 fm_port 0x388 irq 5 dmal 1 dma2 0 isapnp 0 With this configuration I now have working audio I O and a cheesy onboard FM synthesizer However the synthesizer needs a set of sound patches before it can make any sound and of course ALSA supplies the needed utility sbiload to load the patch data into the synth ALSA even supplies the patches I use the loader as follows sbiload p
17. n ca 10 1145 1090000 10800 Q bog 5 800k oF Rue I6OKBPS 44KH2 SHUFFU Stop Ye Status DO Patchbay Monitor Mixer Patchbay Router Hardware Settings Analog Volume About Digital Mixer PCM Out 1 PCM Out 2 PCM Out 3 PCM Out 4 PCM Out 5 PCM Out 6 PCM Out 7 n on nn ne nn ne 8 nd The Maytals Sweet And Dar 0 0 0 0 0 o o i 0 i i i Let Right Left Right Left Right Left Right Left Right Left Right Left Right Mute Mute Mute Mute Mute Mute Mute Mute Mute Mute Mute Mute Mute Mute Left Right L R Gang L R Gang L R Gang L R Gang L R Gang L R Gang L R Gang Reset Peaks Audio MIDI Readable Clients Output Ports Writable Clients Input Ports alsa pcm Blalsa_pcm lxmms jack_00 playback_1 playback_2 lt lt playback_3 lt playback_S lt playback_6 lt playback_7 lt playback_8 lt playback_9 lt playback_10 X Disconnect XF Disconnect All Refresh Figure 4 The envy24control Mixer ALSA easily handles systems with multiple cards The ALSA utilities usually include an option for specific card selection as in these examples for my SBLive and Delta
18. ogeneous environment at the user level Your programs can run more harmoniously with one another with enhanced possibilities for connection and communication between applications ALSA evolved during the first phase of Linux sound support when most applications were using the OSS Free API so an OSS Free compatibility layer was an immediate necessity for normal users A large number of Linux sound applications still need OSS Free compatibility so ALSA provides seamless support for the older API However programmers should note that the older API now officially is deprecated Installing and Configuring Full details regarding installation are available on the ALSA home page see the on line Resources so I mention here only a few details and clarifications If you re using a distribution or customized Linux system based on a 2 6 kernel ALSA already is installed Distros and systems based on earlier kernels require a manual ALSA installation Installing ALSA is not especially difficult and the way has been cleared at least partially by packages supplied by audio centric Linux distributions bundles such as AGNULA Demudi for Debian PlanetCCRMA for Red Hat and Fedora and AudioSlack for SlackWare Mandrake users can install one of Thac s packages see Resources Regardless of your base system 6 18 2006 8 32 PM A User s Guide to ALSA http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 you must uninstall the OSS Free modules b
19. port is a weird world and I spent considerable time getting things working properly However my machine now has a sound system supporting stereo analog PCM I O a CD audio channel a MIDI accessible onboard synthesizer four virtual MIDI I O ports an external 2x2 MIDI interface and a high quality digital audio input port Not too shabby a set of capabilities for a PII 366 and of course the real thanks go to ALSA By the way if I forget the ordered numbering of my cards I always can query the proc filesystem for their numbers and status cat proc asound cards 0 CS4231 T CS4231 CS4231 CS4231 at 0x534 irq 5 dma 1 amp 0 1 VirMIDI VirMIDI VirMIDI Virtual MIDI Card 1 2 M2x2 USB Audio Midisport 2x2 Midiman Midisport 2x2 at usb 00 07 2 1 full speed 3 PDAudioCF PDAudio CF Core Sound PDAudio CF Core Sound PDAudio CF at 0x100 irg 11 Thus the specific hardware definitions would be hw 0 hw 1 hw 2 and hw 3 hw 1 and hw 2 are MIDI only devices and cannot be used for audio purposes And yes proc is reporting a CS4231 where I ve configured a CS4232 but Takashi Iwai assured me that this behavior is normal for the chipset I know it s weird Basic and Advanced Desktop Configuration My desktop system has been much easier to configure It still is a fairly complex system supporting one sound card a SoundBlaster Live Value with external MIDI adapter the virtual MIDI module and an M Audio Delta 66 multichannel audio int
20. rive ESS ESx688 AudioDrive Sound Blaster 16 Sound Blaster 1 0 2 0 Pro lt Cancel gt Figure 1 The alsaconf configuration tool is good for finding sound hardware on systems with one sound card installed After alsaconf has set up basic support for your sound device you need to activate its playback and record channels By default ALSA started with all channels of your device muted It may be an annoyance for some users but it certainly reduces the likelihood of inadvertently blowing up your speakers when you first start your new system You can set your sound device s channel capabilities with ALSA s alsamixer utility a character graphics mixer complete with sliders and switches for each channel of the detected device Figure 2 Use the arrow keys to select a channel use the lt gt keys to unmute mute channels and use the spacebar to select a channel as a recording source capture in ALSA speak When you ve set your mixer preferences run the alsactl utility to save and recall your settings alsact1 store restore Or Hono Out Hono Out Capture Hix Figure 2 By default ALSA starts with sound muted so you need to set audio channel values with alsamixer As you already can see ALSA thoughtfully provides a number of useful tools to help configure the system If you want to know more details about using those tools simply run the utility with the h option or use the man command to see a more detailed description The follo
21. rocess didn t last long A PCMCIA Audio Card As though I hadn t already stuffed my little system full of ALSA drivers I also wanted to use the Core Sound PDAudioCF card a high quality digital audio input card made for handheld computers such as the Zaurus but quite usable with a CF to PCMCIA adapter Again I want to have my other devices configured before setting up the PDAudioCF so I simply wait until I have everything else working as desired before inserting the card The system autodetects the new hardware and loads the appropriate module snd pdaudiocf a procedure totally transparent to the end user Using this card is easy The following example illustrates the use of ALSA s arecord utility to record a 30 second stereo digital audio stream from the S PDIF digital output of my desktop system s SBLive to the PDAudioCF card arecord f dat D hw 3 0 d 30 foo wav The dat option sets the recording format to include a sample rate of 48kHz which is the only output sample rate supported by the SBLive I substituted ca for the DAT option and recorded again from the S PDIF output of my Delta 66 this time with the standard redbook CD audio values that is 16 bit stereo audio with a sample rate of 44 1kHz In both cases the recording and playback was flawless and had beautiful audio quality thanks to the PDAudioCD card For more details regarding ALSA s playback and record utilities seeman aplay and man arecord Linux laptop sound sup
22. 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 outstandin
23. t features selecting the cs4232 module from alsaconf s list of non PnP ISA chipsets When I chose to probe for all possible DMA and IRQ settings my machine locked up freezing the keyboard and forcing a power down and cold boot To be fair I must mention that alsaconf warned me that might happen Happily when I rejected the more aggressive search alsaconf completed its task gracefully and added the following section to my etc modules conf file BEGIN Generated by ALSACONF do not edit ALSACONF version 1 0 4 alias char major 116 snd alias snd card 0 snd cs4232 alias char major 14 soundcore alias sound slot 0 snd card 0 alias sound service 0 0 snd mixer oss alias sound service 0 1 snd seq oss alias sound service 0 3 snd pcm oss alias sound service 0 8 snd seq oss alias sound service 0 12 snd pcm oss alias snd card 1 snd virmidi alias sound slot 1 snd card 1 END Generated by ALSACONF do not edit Alsaconf merely set up a series of aliases for the general and card specific services ALSA can provide for my machine For normal use this section should remain as alsaconf generates it By the way the entries for the virmidi modules are there because I m running Red Hat 9 with the ALSA packages from PlanetCCRMA a suite of components for setting up a low latency high performance Linux audio MIDI workstation PlanetCCRMA installs the virtual MIDI modules by default Next I edited the driver options in etc
24. the plugin type dmix which is slaved to the PCM capabilities of the sound chip The plugin also lets me tailor the sample rate to the capabilities of my hardware easing CPU demands With the dmix plugin I can run an audio player and a video player at the same time In case you re wondering why I might want to do such a thing consider that I often study t ai chi videos available on DivX discs The video is usually wonderful but the background music isn t always to my liking so it s nice to be able to listen to something more to my taste The following commands launch Andy Lo A Fo s neat alsaplayer soundfile player and the MPlayer video player mplayer ao alsa9 dmixer aop list volume volume 0 framedrop foo avi alsaplayer o alsa d plug dmixer cool foo mp3 The video player s audio output is negated thanks to MPlayer s software volume control while the alsaplayer plays my preferred music Very cool stuff courtesy of the dmix plugin I have no special needs on my desktop system but I ve configured my asoundrc file for basic accommodations for the SBLive and the Delta 66 pem emul0kl type hw card 0 ctl emul0k1 type hw card 0 pem Delta66 type hw card 2 ctl Delta66 type hw card 2 pem DeltaPlug type plug card 2 ctl DeltaPlug type plug card 2 pem DeltaPlugHW type plughw card 2 ctl DeltaPlugHW type plughw card 2 The card numbering reflects the ordering list when I query proc asound
25. uly hard core Linux coder does he designed a new audio MIDI API for Linux calling it the Advanced Linux Sound Architecture Designing and implementing an API that would encompass the requirements of contemporary audio is a non trivial task and ALSA needed many years many programmers and many releases to attain its current status as the kernel sound system In its earlier stages normal users had to install the system by hand normally as a replacement for the OSS Free system in order to acquire support for a card or the extended features of a card This process included uninstalling OSS Free and recompiling the kernel for ALSA support at that time a decidedly non trivial task Nevertheless the ranks of dedicated ALSA users grew development flourished and eventually ALSA was incorporated into the Linux 2 5 kernel development track Finally with the public release of the 2 6 kernel series ALSA became the default kernel sound system What Is ALSA The ALSA home page gives us the following information The Advanced Linux Sound Architecture provides audio and MIDI functionality to the Linux operating system ALSA has the following significant features 1 Efficient support for all types of audio interfaces from consumer sound cards to professional multichannel audio interfaces 2 Fully modularized sound drivers 3 SMP and thread safe design 4 User space library alsa lib to simplify application programming and provide higher level functionality
26. wing examples display the manual pages for the utilities I ve mentioned already e man alsaconf man alsamixer man alsactl Advanced Configuration Now that we ve considered some of the basic installation and configuration details let s look at how we might set up a more complicated system For the following example I ve used 2 of 9 6 18 2006 8 32 PM A User s Guide to ALSA http 0 delivery acm org innopac lib ryerson ca 10 1145 1090000 10800 3 of 9 the configuration details for my laptop system a Pentium II 366MHz HP Omnobook 4150 with a combined audio video chipset manufactured by NeoMagic Setting up laptop audio support under Linux can be a complicated task and it just so happens that my hardware is slightly problematic Thankfully ALSA supplies the tools I needed to resolve my difficulties with finding the correct chip and driver identification The alsaconf utility tries to identify your system s audio and MIDI capabilities and then it writes a basic configuration file to etc modules conf However in the weird world of laptop sound support things may not always be what they seem For example alsaconf correctly identified my laptop audio chip as a NeoMagic NM256 However the configuration failed reporting that I should use either the basic SoundBlaster16 driver sb16 or one of the Crystal Sound drivers cs423x On the advice of ALSA guru Takashi Iwai I tried using alsaconf to set up the driver for the CS4232 chipse

Download Pdf Manuals

image

Related Search

Related Contents

Orchid Inventory of the Yotoco Forest Reserve, Cauca Valley  español - Barstuff.de  SLIM FIT  pessac_secret [Lecture seule] - Aquitaine Développement Innovation  3A1592F, PR70 and PR70v, Repair - Parts, Spanish    - regintech.com.tw  MANUAL DE SERVICIO - service-repair  取扱説明書 [F-12C]  Manuel d`installation  

Copyright © All rights reserved.
Failed to retrieve file