/[gentoo]/xml/htdocs/doc/en/alsa-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/alsa-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.12 Revision 1.13
13 Arcady Genkin</mail> 13 Arcady Genkin</mail>
14</author> 14</author>
15<author title="Editor"><mail link="zhen@gentoo.org"> 15<author title="Editor"><mail link="zhen@gentoo.org">
16 John P. Davis</mail> 16 John P. Davis</mail>
17</author> 17</author>
18<author title="Editor"><mail link="swift@gentoo.org"> 18<author title="Editor"><mail link="swift@gentoo.org">
19 Sven Vermeulen</mail> 19 Sven Vermeulen</mail>
20</author> 20</author>
21 21
22<license/> 22<license/>
23 23
24<abstract> 24<abstract>
25This guide will show you how to set up the Advanced Linux Sound Architecture (ALSA) on Gentoo Linux. 25This guide will show you how to set up the Advanced Linux Sound Architecture (ALSA) on Gentoo Linux.
26In addition to the Gentoo Linux Desktop Configuration Guide, this guide is supposed to give you more information on this subject. </abstract> 26In addition to the Gentoo Linux Desktop Configuration Guide, this guide is supposed to give you more information on this subject. </abstract>
27 27
28<version>1.2</version> 28<version>1.3</version>
29<date>5 June 2003</date> 29<date>September 7, 2003</date>
30 30
31<chapter> 31<chapter>
32<title>Introduction</title> 32<title>Introduction</title>
33<section> 33<section>
34 <title>What is ALSA?</title> 34 <title>What is ALSA?</title>
35<body> 35<body>
36<p> 36<p>
37The Advanced Linux Sound Architecture (ALSA) is a project to improve the Linux sound subsystem by rewriting 37The Advanced Linux Sound Architecture (ALSA) is a project to improve the Linux sound subsystem by rewriting
38large chunks of it. 38large chunks of it.
39It is anticipated that ALSA will make it into Linux kernel 2.6.x (or 3.x.x -- whichever comes first) as it becomes ready. 39It is anticipated that ALSA will make it into Linux kernel 2.6.x (or 3.x.x -- whichever comes first) as it becomes ready.
40</p> 40</p>
41 41
42<p> 42<p>
43ALSA provides audio and MIDI functionality for Linux. 43ALSA provides audio and MIDI functionality for Linux.
44</p> 44</p>
156If you had a previous sound setup and there are still non-ALSA sound modules loaded, unload them <e>now</e>. 156If you had a previous sound setup and there are still non-ALSA sound modules loaded, unload them <e>now</e>.
157Check with <c>lsmod</c> and use <c>rmmod</c> to unload all sound-related modules on your system. 157Check with <c>lsmod</c> and use <c>rmmod</c> to unload all sound-related modules on your system.
158</warn> 158</warn>
159</p> 159</p>
160 160
161<p> 161<p>
162We could simply do an <c>emerge alsa-driver</c> now, this would compile and install <e>all</e> ALSA sound drivers. 162We could simply do an <c>emerge alsa-driver</c> now, this would compile and install <e>all</e> ALSA sound drivers.
163</p> 163</p>
164<p> 164<p>
165However, to save some time, lookup the <e>Module Name</e> of your soundcard(s) on the 165However, to save some time, lookup the <e>Module Name</e> of your soundcard(s) on the
166<uri link="http://www.alsa-project.org/alsa-doc">ALSA Soundcard Matrix</uri> by following the <e>Details</e> link in the <e>Driver and Docs</e> column in the row of the chipset of your soundcard. 166<uri link="http://www.alsa-project.org/alsa-doc">ALSA Soundcard Matrix</uri> by following the <e>Details</e> link in the <e>Driver and Docs</e> column in the row of the chipset of your soundcard.
167Mine is <c>snd-emu10k1</c>, since I have an SBlive! soundcard, with the <e>EMU10K1</e> chipset. 167Mine is <c>snd-emu10k1</c>, since I have an SBlive! soundcard, with the <e>EMU10K1</e> chipset.
168We'll set ALSA_CARDS environment to the value of the module name before emerging (but without the snd prefix), so emerge will only compile the drivers we need. 168We'll set ALSA_CARDS environment to the value of the module name before emerging (but without the snd prefix), so emerge will only compile the drivers we need.
169</p> 169</p>
170 170
171<p>
172<pre> 171<pre>
173# <c>env ALSA_CARDS='emu10k1' emerge alsa-driver</c> 172# <c>env ALSA_CARDS='emu10k1' emerge alsa-driver</c>
174</pre> 173</pre>
175</p>
176<p>
177<note> 174<note>
178You can also add this value in <path>/etc/make.conf</path>, so when you have to emerge the alsa-driver later on you can just run <c>emerge alsa-driver</c>. 175You can also add this value in <path>/etc/make.conf</path>, so when you have to emerge the alsa-driver later on you can just run <c>emerge alsa-driver</c>.
179For example, like this: <c>echo 'ALSA_CARDS="emu10k1"' >> /etc/make.conf</c> 176For example, like this: <c>echo 'ALSA_CARDS="emu10k1"' >> /etc/make.conf</c>
180</note> 177</note>
181 178
182<note> 179<note>
183When you want to install ALSA drivers for more than one soundcard, you could set ALSA_CARDS to a space-separated list 180When you want to install ALSA drivers for more than one soundcard, you could set ALSA_CARDS to a space-separated list
184of drivers; like this: <c>env ALSA_CARDS='emu10k1 intel8x0 ens1370' emerge alsa-driver</c> 181of drivers; like this: <c>env ALSA_CARDS='emu10k1 intel8x0 ens1370' emerge alsa-driver</c>
185</note> 182</note>
186 183
187<note>If you want to have OSS compatibility, make sure to emerge <i>alsa-oss</i>, it is the ALSA/OSS compatibility 184<note>If you want to have OSS compatibility, make sure to emerge <i>alsa-oss</i>, it is the ALSA/OSS compatibility
188wrapper. </note> 185wrapper. </note>
189 186
190</p> 187<note>If you plan on recompiling your kernels numerous times, it might
188be adviseable to emerge <c>alsa-driver</c> with <c>--buildpkg</c>. This
189will create a binary package for it. Later, after recompiling your kernel,
190you can just do <c>emerge --usepkg alsa-driver</c> which will install the
191binary package instead of recompiling it completely.</note>
192
191<p> 193<p>
192After this, the ALSA modules should be installed on your system. 194After this, the ALSA modules should be installed on your system.
193</p> 195</p>
194</body> 196</body>
195</section> 197</section>
196<section> 198<section>
197 <title>Configuration of ALSA</title> 199 <title>Configuration of ALSA</title>
198<body> 200<body>
199<p> 201<p>
200Let's start configuring now to get ALSA working properly. 202Let's start configuring now to get ALSA working properly.
201We'll need to edit some files, to let our system know about the freshly installed ALSA modules. 203We'll need to edit some files, to let our system know about the freshly installed ALSA modules.
202</p> 204</p>
203 205
204<p> 206<p>
205First, install <c>alsa-utils</c> on your system: 207First, install <c>alsa-utils</c> on your system:
319<pre caption = "Running amixer"> 321<pre caption = "Running amixer">
320# <i>amixer</i> 322# <i>amixer</i>
321</pre> 323</pre>
322<p> 324<p>
323<warn> 325<warn>
324You shouldn't get this, but <e>if</e> you get an error about "amixer: Mixer attach default error: No such file or directory", you should manually insmod 326You shouldn't get this, but <e>if</e> you get an error about "amixer: Mixer attach default error: No such file or directory", you should manually insmod
325<c>snd-mixer-oss</c> and <c>snd-pcm-oss</c> once. After that run amixer again. 327<c>snd-mixer-oss</c> and <c>snd-pcm-oss</c> once. After that run amixer again.
326</warn> 328</warn>
327</p> 329</p>
328<pre caption="only if you get an error when running amixer"> 330<pre caption="only if you get an error when running amixer">
329# <c>insmod snd-mixer-oss</c> 331# <c>insmod snd-mixer-oss</c>
330# <c>insmod snd-pcm-oss</c> 332# <c>insmod snd-pcm-oss</c>
331# <c>amixer</c> 333# <c>amixer</c>
332</pre> 334</pre>
333<p> 335<p>
334If you got this far, now unmute both Master and PCM channels. 336If you got this far, now unmute Master and PCM channels. Some hardware
335</p> 337even requires you to unmute the center channel or even the surround
338channel.
336<p> 339</p>
337<pre> 340<p>
341<pre caption = "Unmuting channels">
338# <c>amixer set Master 100 unmute</c> 342# <i>amixer set Master 100 unmute</i>
339# <c>amixer set PCM 100 unmute</c> 343# <i>amixer set PCM 100 unmute</i>
344<comment>Only if the above doesn't succeed on its own:</comment>
345# <i>amixer set Center 100 unmute</i>
346# <i>amixer set Surround 100 unmute</i>
347<comment>Test the sound:</comment>
340# <c>aplay $KDEDIR/share/sounds/pop.wav</c> <codenote>(pop.wav is part of KDE)</codenote> 348# <i>aplay $KDEDIR/share/sounds/pop.wav</i> <codenote>(pop.wav is part of KDE)</codenote>
341</pre> 349</pre>
342</p> 350</p>
343We check to see if sound is working by using the aplay (alsa play) command. If you hear a pop, then sound is indeed working. 351We check to see if sound is working by using the aplay (alsa play) command. If you hear a pop, then sound is indeed working.
344Then, adjust the volume settings to your liking; the ncurses-based <c>alsamixer</c> is a great way to get them "just so". 352Then, adjust the volume settings to your liking; the ncurses-based <c>alsamixer</c> is a great way to get them "just so".
345<p> 353<p>
346You may want to emerge <c>alsa-xmms</c> as that will provide ALSA support for XMMS. 354You may want to emerge <c>alsa-xmms</c> as that will provide ALSA support for XMMS.
347</p> 355</p>
348When you reboot your system, the <e>alsasound</e> init script will properly save and restore your volume settings. 356When you reboot your system, the <e>alsasound</e> init script will properly save and restore your volume settings.
349</body> 357</body>
350</section> 358</section>
351</chapter> 359</chapter>
352<chapter> 360<chapter>
353<title>Final Notes</title> 361<title>Final Notes</title>
354<section> 362<section>
355 <title>After kernel-upgrades..</title> 363 <title>After kernel-upgrades..</title>

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20