| … | |
… | |
| 23 | |
23 | |
| 24 | <abstract> |
24 | <abstract> |
| 25 | This guide will show you how to set up the Advanced Linux Sound Architecture (ALSA) on Gentoo Linux. |
25 | This guide will show you how to set up the Advanced Linux Sound Architecture (ALSA) on Gentoo Linux. |
| 26 | In addition to the Gentoo Linux Desktop Configuration Guide, this guide is supposed to give you more information on this subject. </abstract> |
26 | In 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> |
| … | |
… | |
| 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. |
| 167 | Mine is <c>snd-emu10k1</c>, since I have an SBlive! soundcard, with the <e>EMU10K1</e> chipset. |
167 | Mine is <c>snd-emu10k1</c>, since I have an SBlive! soundcard, with the <e>EMU10K1</e> chipset. |
| 168 | We'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. |
168 | We'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> |
| 178 | You 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>. |
175 | You 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>. |
| 179 | For example, like this: <c>echo 'ALSA_CARDS="emu10k1"' >> /etc/make.conf</c> |
176 | For example, like this: <c>echo 'ALSA_CARDS="emu10k1"' >> /etc/make.conf</c> |
| 180 | </note> |
177 | </note> |
| 181 | |
178 | |
| … | |
… | |
| 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 |
| 188 | wrapper. </note> |
185 | wrapper. </note> |
| 189 | |
186 | |
| 190 | </p> |
187 | <note>If you plan on recompiling your kernels numerous times, it might |
|
|
188 | be adviseable to emerge <c>alsa-driver</c> with <c>--buildpkg</c>. This |
|
|
189 | will create a binary package for it. Later, after recompiling your kernel, |
|
|
190 | you can just do <c>emerge --usepkg alsa-driver</c> which will install the |
|
|
191 | binary package instead of recompiling it completely.</note> |
|
|
192 | |
| 191 | <p> |
193 | <p> |
| 192 | After this, the ALSA modules should be installed on your system. |
194 | After this, the ALSA modules should be installed on your system. |
| 193 | </p> |
195 | </p> |
| 194 | </body> |
196 | </body> |
| 195 | </section> |
197 | </section> |
| … | |
… | |
| 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> |
| 334 | If you got this far, now unmute both Master and PCM channels. |
336 | If you got this far, now unmute Master and PCM channels. Some hardware |
| 335 | </p> |
337 | even requires you to unmute the center channel or even the surround |
|
|
338 | channel. |
| 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> |
| 343 | We check to see if sound is working by using the aplay (alsa play) command. If you hear a pop, then sound is indeed working. |
351 | We check to see if sound is working by using the aplay (alsa play) command. If you hear a pop, then sound is indeed working. |
| 344 | Then, adjust the volume settings to your liking; the ncurses-based <c>alsamixer</c> is a great way to get them "just so". |
352 | Then, 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> |